mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Fix TC build
This commit is contained in:
@@ -267,12 +267,18 @@ namespace LuaGameObject
|
|||||||
owner->RemoveGameObject(go, false);
|
owner->RemoveGameObject(go, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (deldb)
|
||||||
|
{
|
||||||
|
#ifdef TRINITY
|
||||||
|
GameObject::DeleteFromDB(go->GetSpawnId());
|
||||||
|
#else
|
||||||
|
go->DeleteFromDB();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
go->SetRespawnTime(0);
|
go->SetRespawnTime(0);
|
||||||
go->Delete();
|
go->Delete();
|
||||||
|
|
||||||
if (deldb)
|
|
||||||
go->DeleteFromDB();
|
|
||||||
|
|
||||||
Eluna::CHECKOBJ<ElunaObject>(L, 1)->Invalidate();
|
Eluna::CHECKOBJ<ElunaObject>(L, 1)->Invalidate();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,7 +268,10 @@ namespace LuaMap
|
|||||||
uint32 weatherType = Eluna::CHECKVAL<uint32>(L, 3);
|
uint32 weatherType = Eluna::CHECKVAL<uint32>(L, 3);
|
||||||
float grade = Eluna::CHECKVAL<float>(L, 4);
|
float grade = Eluna::CHECKVAL<float>(L, 4);
|
||||||
|
|
||||||
#if defined TRINITY || AZEROTHCORE
|
#if defined TRINITY
|
||||||
|
if (Weather * weather = map->GetOrGenerateZoneDefaultWeather(zoneId))
|
||||||
|
weather->SetWeather((WeatherType)weatherType, grade);
|
||||||
|
#elif defined AZEROTHCORE
|
||||||
Weather* weather = WeatherMgr::FindWeather(zoneId);
|
Weather* weather = WeatherMgr::FindWeather(zoneId);
|
||||||
if (!weather)
|
if (!weather)
|
||||||
weather = WeatherMgr::AddWeather(zoneId);
|
weather = WeatherMgr::AddWeather(zoneId);
|
||||||
|
|||||||
Reference in New Issue
Block a user