From 897d5e915978817d948d8f2745fa977eea048c47 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Wed, 17 Jul 2019 20:49:08 +0300 Subject: [PATCH] Fix TC build --- GameObjectMethods.h | 12 +++++++++--- MapMethods.h | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/GameObjectMethods.h b/GameObjectMethods.h index d97de7a..e5b7973 100644 --- a/GameObjectMethods.h +++ b/GameObjectMethods.h @@ -267,12 +267,18 @@ namespace LuaGameObject owner->RemoveGameObject(go, false); } + if (deldb) + { +#ifdef TRINITY + GameObject::DeleteFromDB(go->GetSpawnId()); +#else + go->DeleteFromDB(); +#endif + } + go->SetRespawnTime(0); go->Delete(); - if (deldb) - go->DeleteFromDB(); - Eluna::CHECKOBJ(L, 1)->Invalidate(); return 0; } diff --git a/MapMethods.h b/MapMethods.h index 1f954b2..a9a7799 100644 --- a/MapMethods.h +++ b/MapMethods.h @@ -268,7 +268,10 @@ namespace LuaMap uint32 weatherType = Eluna::CHECKVAL(L, 3); float grade = Eluna::CHECKVAL(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); if (!weather) weather = WeatherMgr::AddWeather(zoneId);