Fix (c)mangos IsCasting and removefromworld

This commit is contained in:
Rochet2
2015-08-20 01:54:09 +03:00
parent f51217b0c4
commit 2379c00711
2 changed files with 7 additions and 3 deletions

View File

@@ -247,7 +247,11 @@ namespace LuaGameObject
bool deldb = Eluna::CHECKVAL<bool>(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);

View File

@@ -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;
}