mirror of
https://github.com/azerothcore/mod-ale
synced 2025-12-01 21:15:19 +08:00
Fix (c)mangos IsCasting and removefromworld
This commit is contained in:
@@ -247,7 +247,11 @@ namespace LuaGameObject
|
|||||||
bool deldb = Eluna::CHECKVAL<bool>(L, 2, false);
|
bool deldb = Eluna::CHECKVAL<bool>(L, 2, false);
|
||||||
|
|
||||||
// cs_gobject.cpp copy paste
|
// cs_gobject.cpp copy paste
|
||||||
|
#ifdef TRINITY
|
||||||
ObjectGuid ownerGuid = go->GetOwnerGUID();
|
ObjectGuid ownerGuid = go->GetOwnerGUID();
|
||||||
|
#else
|
||||||
|
ObjectGuid ownerGuid = go->GetOwnerGuid();
|
||||||
|
#endif
|
||||||
if (ownerGuid)
|
if (ownerGuid)
|
||||||
{
|
{
|
||||||
Unit* owner = ObjectAccessor::GetUnit(*go, ownerGuid);
|
Unit* owner = ObjectAccessor::GetUnit(*go, ownerGuid);
|
||||||
|
|||||||
@@ -547,10 +547,10 @@ namespace LuaUnit
|
|||||||
*/
|
*/
|
||||||
int IsCasting(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsCasting(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifndef TRINITY
|
#ifdef TRINITY
|
||||||
Eluna::Push(L, unit->hasUnitState(UNIT_STATE_CASTING));
|
|
||||||
#else
|
|
||||||
Eluna::Push(L, unit->HasUnitState(UNIT_STATE_CASTING));
|
Eluna::Push(L, unit->HasUnitState(UNIT_STATE_CASTING));
|
||||||
|
#else
|
||||||
|
Eluna::Push(L, unit->IsNonMeleeSpellCasted(false));
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user