Chore: Remove unused #if statement (TrinityCore, Mangos, AzerothCore, TBC, Classic, Mists, Cata) (#217)
This commit is contained in:
@@ -39,11 +39,7 @@ namespace LuaAura
|
||||
*/
|
||||
int GetCasterGUID(lua_State* L, Aura* aura)
|
||||
{
|
||||
#if defined TRINITY || AZEROTHCORE
|
||||
Eluna::Push(L, aura->GetCasterGUID());
|
||||
#else
|
||||
Eluna::Push(L, aura->GetCasterGuid());
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -65,11 +61,7 @@ namespace LuaAura
|
||||
*/
|
||||
int GetDuration(lua_State* L, Aura* aura)
|
||||
{
|
||||
#if defined TRINITY || AZEROTHCORE
|
||||
Eluna::Push(L, aura->GetDuration());
|
||||
#else
|
||||
Eluna::Push(L, aura->GetAuraDuration());
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -94,11 +86,7 @@ namespace LuaAura
|
||||
*/
|
||||
int GetMaxDuration(lua_State* L, Aura* aura)
|
||||
{
|
||||
#if defined TRINITY || AZEROTHCORE
|
||||
Eluna::Push(L, aura->GetMaxDuration());
|
||||
#else
|
||||
Eluna::Push(L, aura->GetAuraMaxDuration());
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -122,11 +110,7 @@ namespace LuaAura
|
||||
*/
|
||||
int GetOwner(lua_State* L, Aura* aura)
|
||||
{
|
||||
#if defined TRINITY || defined AZEROTHCORE
|
||||
Eluna::Push(L, aura->GetOwner());
|
||||
#else
|
||||
Eluna::Push(L, aura->GetTarget());
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -138,16 +122,7 @@ namespace LuaAura
|
||||
int SetDuration(lua_State* L, Aura* aura)
|
||||
{
|
||||
int32 duration = Eluna::CHECKVAL<int32>(L, 2);
|
||||
#if defined TRINITY || defined AZEROTHCORE
|
||||
aura->SetDuration(duration);
|
||||
#else
|
||||
aura->GetHolder()->SetAuraDuration(duration);
|
||||
#if (defined(TBC) || defined(CLASSIC))
|
||||
aura->GetHolder()->UpdateAuraDuration();
|
||||
#else
|
||||
aura->GetHolder()->SendAuraUpdate(false);
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -162,16 +137,7 @@ namespace LuaAura
|
||||
int SetMaxDuration(lua_State* L, Aura* aura)
|
||||
{
|
||||
int32 duration = Eluna::CHECKVAL<int32>(L, 2);
|
||||
#if defined TRINITY || defined AZEROTHCORE
|
||||
aura->SetMaxDuration(duration);
|
||||
#else
|
||||
aura->GetHolder()->SetAuraMaxDuration(duration);
|
||||
#if (defined(TBC) || defined(CLASSIC))
|
||||
aura->GetHolder()->UpdateAuraDuration();
|
||||
#else
|
||||
aura->GetHolder()->SendAuraUpdate(false);
|
||||
#endif
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -186,11 +152,7 @@ namespace LuaAura
|
||||
int SetStackAmount(lua_State* L, Aura* aura)
|
||||
{
|
||||
uint8 amount = Eluna::CHECKVAL<uint8>(L, 2);
|
||||
#if defined TRINITY || defined AZEROTHCORE
|
||||
aura->SetStackAmount(amount);
|
||||
#else
|
||||
aura->GetHolder()->SetStackAmount(amount);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -199,11 +161,7 @@ namespace LuaAura
|
||||
*/
|
||||
int Remove(lua_State* L, Aura* aura)
|
||||
{
|
||||
#if defined TRINITY || defined AZEROTHCORE
|
||||
aura->Remove();
|
||||
#else
|
||||
aura->GetTarget()->RemoveSpellAuraHolder(aura->GetHolder(), AURA_REMOVE_BY_CANCEL);
|
||||
#endif
|
||||
Eluna::CHECKOBJ<ElunaObject>(L, 1)->Invalidate();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user