From 2379c00711d04991ac057ef49ae25416d49daeb1 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Thu, 20 Aug 2015 01:54:09 +0300 Subject: [PATCH] Fix (c)mangos IsCasting and removefromworld --- GameObjectMethods.h | 4 ++++ UnitMethods.h | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/GameObjectMethods.h b/GameObjectMethods.h index 0ed04bc..d9d8493 100644 --- a/GameObjectMethods.h +++ b/GameObjectMethods.h @@ -247,7 +247,11 @@ namespace LuaGameObject bool deldb = Eluna::CHECKVAL(L, 2, false); // cs_gobject.cpp copy paste +#ifdef TRINITY ObjectGuid ownerGuid = go->GetOwnerGUID(); +#else + ObjectGuid ownerGuid = go->GetOwnerGuid(); +#endif if (ownerGuid) { Unit* owner = ObjectAccessor::GetUnit(*go, ownerGuid); diff --git a/UnitMethods.h b/UnitMethods.h index 44eb03b..cd454cb 100644 --- a/UnitMethods.h +++ b/UnitMethods.h @@ -547,10 +547,10 @@ namespace LuaUnit */ int IsCasting(Eluna* /*E*/, lua_State* L, Unit* unit) { -#ifndef TRINITY - Eluna::Push(L, unit->hasUnitState(UNIT_STATE_CASTING)); -#else +#ifdef TRINITY Eluna::Push(L, unit->HasUnitState(UNIT_STATE_CASTING)); +#else + Eluna::Push(L, unit->IsNonMeleeSpellCasted(false)); #endif return 1; }