diff --git a/LuaFunctions.cpp b/LuaFunctions.cpp index 6bccd5ce95..6ad9873429 100644 --- a/LuaFunctions.cpp +++ b/LuaFunctions.cpp @@ -65,7 +65,7 @@ ElunaConstrainedObjectRef GetWeakPtrForObjectImpl(Object const* obj) } ElunaConstrainedObjectRef GetWeakPtrFor(Quest const* obj) { return { obj->GetWeakPtr(), nullptr }; } ElunaConstrainedObjectRef GetWeakPtrFor(Spell const* obj) { return { obj->GetWeakPtr(), obj->GetCaster()->GetMap() }; } -#if ELUNA_EXPANSION >= WOTLK +#if ELUNA_EXPANSION >= EXP_WOTLK ElunaConstrainedObjectRef GetWeakPtrFor(Vehicle const* obj) { #if defined ELUNA_TRINITY diff --git a/hooks/GossipHooks.cpp b/hooks/GossipHooks.cpp index 587e56f7d1..22399e721b 100644 --- a/hooks/GossipHooks.cpp +++ b/hooks/GossipHooks.cpp @@ -26,7 +26,7 @@ using namespace Hooks; bool Eluna::OnGossipHello(Player* pPlayer, GameObject* pGameObject) { START_HOOK_WITH_RETVAL(GameObjectGossipBindings, GOSSIP_EVENT_ON_HELLO, pGameObject->GetEntry(), false); -#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < CATA +#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < EXP_CATA pPlayer->GetPlayerMenu()->ClearMenus(); #else pPlayer->PlayerTalkClass->ClearMenus(); @@ -39,7 +39,7 @@ bool Eluna::OnGossipHello(Player* pPlayer, GameObject* pGameObject) bool Eluna::OnGossipSelect(Player* pPlayer, GameObject* pGameObject, uint32 sender, uint32 action) { START_HOOK_WITH_RETVAL(GameObjectGossipBindings, GOSSIP_EVENT_ON_SELECT, pGameObject->GetEntry(), false); -#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < CATA +#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < EXP_CATA pPlayer->GetPlayerMenu()->ClearMenus(); #else pPlayer->PlayerTalkClass->ClearMenus(); @@ -54,7 +54,7 @@ bool Eluna::OnGossipSelect(Player* pPlayer, GameObject* pGameObject, uint32 send bool Eluna::OnGossipSelectCode(Player* pPlayer, GameObject* pGameObject, uint32 sender, uint32 action, const char* code) { START_HOOK_WITH_RETVAL(GameObjectGossipBindings, GOSSIP_EVENT_ON_SELECT, pGameObject->GetEntry(), false); -#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < CATA +#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < EXP_CATA pPlayer->GetPlayerMenu()->ClearMenus(); #else pPlayer->PlayerTalkClass->ClearMenus(); @@ -70,7 +70,7 @@ bool Eluna::OnGossipSelectCode(Player* pPlayer, GameObject* pGameObject, uint32 void Eluna::HandleGossipSelectOption(Player* pPlayer, uint32 menuId, uint32 sender, uint32 action, const std::string& code) { START_HOOK(PlayerGossipBindings, GOSSIP_EVENT_ON_SELECT, menuId); -#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < CATA +#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < EXP_CATA pPlayer->GetPlayerMenu()->ClearMenus(); #else pPlayer->PlayerTalkClass->ClearMenus(); @@ -91,7 +91,7 @@ void Eluna::HandleGossipSelectOption(Player* pPlayer, uint32 menuId, uint32 send bool Eluna::OnItemGossip(Player* pPlayer, Item* pItem, SpellCastTargets const& /*targets*/) { START_HOOK_WITH_RETVAL(ItemGossipBindings, GOSSIP_EVENT_ON_HELLO, pItem->GetEntry(), true); -#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < CATA +#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < EXP_CATA pPlayer->GetPlayerMenu()->ClearMenus(); #else pPlayer->PlayerTalkClass->ClearMenus(); @@ -104,7 +104,7 @@ bool Eluna::OnItemGossip(Player* pPlayer, Item* pItem, SpellCastTargets const& / void Eluna::HandleGossipSelectOption(Player* pPlayer, Item* pItem, uint32 sender, uint32 action, const std::string& code) { START_HOOK(ItemGossipBindings, GOSSIP_EVENT_ON_SELECT, pItem->GetEntry()); -#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < CATA +#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < EXP_CATA pPlayer->GetPlayerMenu()->ClearMenus(); #else pPlayer->PlayerTalkClass->ClearMenus(); @@ -125,7 +125,7 @@ void Eluna::HandleGossipSelectOption(Player* pPlayer, Item* pItem, uint32 sender bool Eluna::OnGossipHello(Player* pPlayer, Creature* pCreature) { START_HOOK_WITH_RETVAL(CreatureGossipBindings, GOSSIP_EVENT_ON_HELLO, pCreature->GetEntry(), false); -#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < CATA +#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < EXP_CATA pPlayer->GetPlayerMenu()->ClearMenus(); #else pPlayer->PlayerTalkClass->ClearMenus(); @@ -138,7 +138,7 @@ bool Eluna::OnGossipHello(Player* pPlayer, Creature* pCreature) bool Eluna::OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action) { START_HOOK_WITH_RETVAL(CreatureGossipBindings, GOSSIP_EVENT_ON_SELECT, pCreature->GetEntry(), false); -#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < CATA +#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < EXP_CATA auto original_menu = *pPlayer->GetPlayerMenu(); pPlayer->GetPlayerMenu()->ClearMenus(); #else @@ -151,7 +151,7 @@ bool Eluna::OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender, HookPush(action); auto preventDefault = CallAllFunctionsBool(CreatureGossipBindings, key, true); if (!preventDefault) { -#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < CATA +#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < EXP_CATA *pPlayer->GetPlayerMenu() = original_menu; #else *pPlayer->PlayerTalkClass = original_menu; @@ -163,7 +163,7 @@ bool Eluna::OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender, bool Eluna::OnGossipSelectCode(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action, const char* code) { START_HOOK_WITH_RETVAL(CreatureGossipBindings, GOSSIP_EVENT_ON_SELECT, pCreature->GetEntry(), false); -#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < CATA +#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < EXP_CATA auto original_menu = *pPlayer->GetPlayerMenu(); pPlayer->GetPlayerMenu()->ClearMenus(); #else @@ -177,7 +177,7 @@ bool Eluna::OnGossipSelectCode(Player* pPlayer, Creature* pCreature, uint32 send HookPush(code); auto preventDefault = CallAllFunctionsBool(CreatureGossipBindings, key, true); if (!preventDefault) { -#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < CATA +#if defined ELUNA_CMANGOS && ELUNA_EXPANSION < EXP_CATA *pPlayer->GetPlayerMenu() = original_menu; #else *pPlayer->PlayerTalkClass = original_menu; diff --git a/methods/CMangos/AuraMethods.h b/methods/CMangos/AuraMethods.h index 394f1b8dde..d97ddfc27a 100644 --- a/methods/CMangos/AuraMethods.h +++ b/methods/CMangos/AuraMethods.h @@ -123,7 +123,7 @@ namespace LuaAura { int32 duration = E->CHECKVAL(2); aura->GetHolder()->SetAuraDuration(duration); -#if ELUNA_EXPANSION < WOTLK +#if ELUNA_EXPANSION < EXP_WOTLK aura->GetHolder()->UpdateAuraDuration(); #else aura->GetHolder()->SendAuraUpdate(false); @@ -143,7 +143,7 @@ namespace LuaAura { int32 duration = E->CHECKVAL(2); aura->GetHolder()->SetAuraMaxDuration(duration); -#if ELUNA_EXPANSION < WOTLK +#if ELUNA_EXPANSION < EXP_WOTLK aura->GetHolder()->UpdateAuraDuration(); #else aura->GetHolder()->SendAuraUpdate(false); @@ -162,7 +162,7 @@ namespace LuaAura int SetStackAmount(Eluna* E, Aura* aura) { uint8 amount = E->CHECKVAL(2); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA aura->GetHolder()->SetStackAmount(amount, aura->GetTarget()); #else aura->GetHolder()->SetStackAmount(amount); diff --git a/methods/CMangos/BattleGroundMethods.h b/methods/CMangos/BattleGroundMethods.h index 5fdfa37c5a..ff67decdf8 100644 --- a/methods/CMangos/BattleGroundMethods.h +++ b/methods/CMangos/BattleGroundMethods.h @@ -107,7 +107,7 @@ namespace LuaBattleGround */ int GetInstanceId(Eluna* E, BattleGround* bg) { -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA E->Push(bg->GetInstanceId()); #else E->Push(bg->GetInstanceID()); diff --git a/methods/CMangos/CreatureMethods.h b/methods/CMangos/CreatureMethods.h index 43c081013c..192baf0c1a 100644 --- a/methods/CMangos/CreatureMethods.h +++ b/methods/CMangos/CreatureMethods.h @@ -26,7 +26,7 @@ namespace LuaCreature return 1; } -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA /** * Returns `true` if the [Creature] is set to not give reputation when killed, * and returns `false` otherwise. @@ -66,7 +66,7 @@ namespace LuaCreature { bool mustBeDead = E->CHECKVAL(2, false); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA E->Push(creature->IsTargetableForAttack(mustBeDead)); #else E->Push(creature->isTargetableForAttack(mustBeDead)); @@ -715,7 +715,7 @@ namespace LuaCreature return 1; } -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA /** * Returns the [Creature]'s shield block value. * @@ -827,7 +827,7 @@ namespace LuaCreature return 0; } -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA /** * Sets whether the [Creature] gives reputation or not. * @@ -1056,7 +1056,7 @@ namespace LuaCreature uint32 entry = E->CHECKVAL(2); uint32 dataGuidLow = E->CHECKVAL(3, 0); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA creature->UpdateEntry(entry, dataGuidLow ? eObjectMgr->GetCreatureData(dataGuidLow) : NULL); #else creature->UpdateEntry(entry, ALLIANCE, dataGuidLow ? eObjectMgr->GetCreatureData(dataGuidLow) : NULL); @@ -1160,7 +1160,7 @@ namespace LuaCreature SpellEntry const* spellEntry = GetSpellStore()->LookupEntry(spell); creature->AddThreat(victim, threat, false, (SpellSchoolMask)schoolMask, spellEntry); -#if ELUNA_EXPANSION == CLASSIC +#if ELUNA_EXPANSION == EXP_CLASSIC creature->AddThreat(victim, threat, false, spellEntry ? GetSchoolMask(spellEntry->School) : SPELL_SCHOOL_MASK_NONE, spellEntry); #else creature->AddThreat(victim, threat, false, spellEntry ? static_cast(spellEntry->SchoolMask) : SPELL_SCHOOL_MASK_NONE, spellEntry); @@ -1219,7 +1219,7 @@ namespace LuaCreature { "GetRank", &LuaCreature::GetRank }, { "GetDBTableGUIDLow", &LuaCreature::GetDBTableGUIDLow }, { "GetCreatureFamily", &LuaCreature::GetCreatureFamily }, -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA { "GetShieldBlockValue", &LuaCreature::GetShieldBlockValue }, #else { "GetShieldBlockValue", METHOD_REG_NONE }, @@ -1240,7 +1240,7 @@ namespace LuaCreature { "SetWalk", &LuaCreature::SetWalk }, { "SetHomePosition", &LuaCreature::SetHomePosition }, { "SetEquipmentSlots", &LuaCreature::SetEquipmentSlots }, -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA { "SetDisableReputationGain", &LuaCreature::SetDisableReputationGain }, #else { "SetDisableReputationGain", METHOD_REG_NONE }, @@ -1268,7 +1268,7 @@ namespace LuaCreature { "HasQuest", &LuaCreature::HasQuest }, { "HasSpellCooldown", &LuaCreature::HasSpellCooldown }, { "CanFly", &LuaCreature::CanFly }, -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA { "IsReputationGainDisabled", &LuaCreature::IsReputationGainDisabled }, #else { "IsReputationGainDisabled", METHOD_REG_NONE }, diff --git a/methods/CMangos/GroupMethods.h b/methods/CMangos/GroupMethods.h index be819ca119..687e413d16 100644 --- a/methods/CMangos/GroupMethods.h +++ b/methods/CMangos/GroupMethods.h @@ -36,7 +36,7 @@ namespace LuaGroup return 1; } -#if ELUNA_EXPANSION >= WOTLK +#if ELUNA_EXPANSION >= EXP_WOTLK /** * Returns 'true' if the [Group] is a LFG group * @@ -200,7 +200,7 @@ namespace LuaGroup */ int GetGUID(Eluna* E, Group* group) { -#if ELUNA_EXPANSION == CLASSIC +#if ELUNA_EXPANSION == EXP_CLASSIC E->Push(group->GetId()); #else E->Push(group->GET_GUID()); @@ -361,7 +361,7 @@ namespace LuaGroup if (icon >= TARGETICONCOUNT) return luaL_argerror(E->L, 2, "valid target icon expected"); -#if ELUNA_EXPANSION <= TBC +#if ELUNA_EXPANSION <= EXP_TBC group->SetTargetIcon(icon, target); #else group->SetTargetIcon(icon, setter, target); @@ -402,7 +402,7 @@ namespace LuaGroup { "IsAssistant", &LuaGroup::IsAssistant }, { "SameSubGroup", &LuaGroup::SameSubGroup }, { "HasFreeSlotSubGroup", &LuaGroup::HasFreeSlotSubGroup }, -#if ELUNA_EXPANSION == WOTLK +#if ELUNA_EXPANSION == EXP_WOTLK { "IsLFGGroup", &LuaGroup::IsLFGGroup }, #else { "IsLFGGroup", METHOD_REG_NONE }, diff --git a/methods/CMangos/GuildMethods.h b/methods/CMangos/GuildMethods.h index f7c5162f84..5f66b5c88f 100644 --- a/methods/CMangos/GuildMethods.h +++ b/methods/CMangos/GuildMethods.h @@ -121,7 +121,7 @@ namespace LuaGuild return 1; } -#if ELUNA_EXPANSION <= WOTLK +#if ELUNA_EXPANSION <= EXP_WOTLK /** * Sets the leader of this [Guild] * @@ -136,7 +136,7 @@ namespace LuaGuild } #endif -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC /** * Sets the information of the bank tab specified * @@ -252,13 +252,13 @@ namespace LuaGuild { "GetMemberCount", &LuaGuild::GetMemberCount }, // Setters -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC { "SetBankTabText", &LuaGuild::SetBankTabText, METHOD_REG_WORLD }, // World state method only in multistate #else { "SetBankTabText", METHOD_REG_NONE }, #endif { "SetMemberRank", &LuaGuild::SetMemberRank, METHOD_REG_WORLD }, // World state method only in multistate -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA { "SetLeader", &LuaGuild::SetLeader, METHOD_REG_WORLD }, // World state method only in multistate #else { "SetLeader", METHOD_REG_NONE }, diff --git a/methods/CMangos/MapMethods.h b/methods/CMangos/MapMethods.h index 7fccda2af1..ab545bec49 100644 --- a/methods/CMangos/MapMethods.h +++ b/methods/CMangos/MapMethods.h @@ -17,7 +17,7 @@ namespace LuaMap { -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC /** * Returns `true` if the [Map] is an arena [BattleGround], `false` otherwise. * @@ -63,7 +63,7 @@ namespace LuaMap return 1; } -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC /** * Returns `true` if the [Map] is a heroic, `false` otherwise. * @@ -111,7 +111,7 @@ namespace LuaMap { float x = E->CHECKVAL(2); float y = E->CHECKVAL(3); -#if ELUNA_EXPANSION <= TBC +#if ELUNA_EXPANSION <= EXP_TBC float z = map->GetHeight(x, y, MAX_HEIGHT); #else uint32 phasemask = E->CHECKVAL(4, 1); @@ -131,7 +131,7 @@ namespace LuaMap */ int GetDifficulty(Eluna* E, Map* map) { -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC E->Push(map->GetDifficulty()); #else E->Push((Difficulty)0); @@ -353,7 +353,7 @@ namespace LuaMap { "IsDungeon", &LuaMap::IsDungeon }, { "IsEmpty", &LuaMap::IsEmpty }, { "IsRaid", &LuaMap::IsRaid }, -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC { "IsArena", &LuaMap::IsArena }, { "IsHeroic", &LuaMap::IsHeroic }, #else diff --git a/methods/CMangos/PlayerMethods.h b/methods/CMangos/PlayerMethods.h index fc0686c147..c9ed51cefd 100644 --- a/methods/CMangos/PlayerMethods.h +++ b/methods/CMangos/PlayerMethods.h @@ -12,7 +12,7 @@ */ namespace LuaPlayer { -#if ELUNA_EXPANSION >= WOTLK +#if ELUNA_EXPANSION >= EXP_WOTLK /** * Returns 'true' if the [Player] can Titan Grip, 'false' otherwise. * @@ -127,7 +127,7 @@ namespace LuaPlayer return 1; } -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC /** * Returns 'true' if the [Player] has a title by specific ID, 'false' otherwise. * @@ -251,7 +251,7 @@ namespace LuaPlayer return 1; } -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC /** * Returns 'true' if the [Player] can fly, 'false' otherwise. * @@ -264,7 +264,7 @@ namespace LuaPlayer } #endif -#if ELUNA_EXPANSION == CLASSIC +#if ELUNA_EXPANSION == EXP_CLASSIC /** * Returns [Player] kills * @@ -324,7 +324,7 @@ namespace LuaPlayer return 1; } -#if ELUNA_EXPANSION == CLASSIC +#if ELUNA_EXPANSION == EXP_CLASSIC /** * Updates the [Player]s weekly honor status */ @@ -353,7 +353,7 @@ namespace LuaPlayer } #endif -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC /** * Returns 'true' if the [Player] is currently flying, 'false' otherwise. * @@ -401,7 +401,7 @@ namespace LuaPlayer return 1; } -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC /** * Returns 'true' if the [Player] is in an arena team specified by type, 'false' otherwise. * @@ -654,7 +654,7 @@ namespace LuaPlayer return 1; } -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC /** * Returns 'true' if the [Player] is currently in an arena, 'false' otherwise. * @@ -700,7 +700,7 @@ namespace LuaPlayer return 1; } -#if ELUNA_EXPANSION >= WOTLK +#if ELUNA_EXPANSION >= EXP_WOTLK /** * Returns the amount of available specs the [Player] currently has * @@ -724,7 +724,7 @@ namespace LuaPlayer } #endif -#if ELUNA_EXPANSION == WOTLK +#if ELUNA_EXPANSION == EXP_WOTLK /** * Returns the normal phase of the player instead of the actual phase possibly containing GM phase * @@ -737,7 +737,7 @@ namespace LuaPlayer } #endif -#if ELUNA_EXPANSION >= TBC && ELUNA_EXPANSION <= WOTLK +#if ELUNA_EXPANSION >= EXP_TBC && ELUNA_EXPANSION <= EXP_WOTLK /** * Returns the [Player]s current amount of Arena Points * @@ -760,7 +760,7 @@ namespace LuaPlayer return 1; } #endif -#if ELUNA_EXPANSION <= WOTLK +#if ELUNA_EXPANSION <= EXP_WOTLK /** * Returns the [Player]s current shield block value * @@ -830,7 +830,7 @@ namespace LuaPlayer { float radius = E->CHECKVAL(2); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA E->Push(player->GetNextRandomRaidMember(radius, SPELL_AURA_NONE)); #else E->Push(player->GetNextRandomRaidMember(radius)); @@ -930,7 +930,7 @@ namespace LuaPlayer int GetSkillTempBonusValue(Eluna* E, Player* player) { uint32 skill = E->CHECKVAL(2); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA E->Push(player->GetSkillBonusTemporary(skill)); #else E->Push(player->GetSkillTempBonusValue(skill)); @@ -947,7 +947,7 @@ namespace LuaPlayer int GetSkillPermBonusValue(Eluna* E, Player* player) { uint32 skill = E->CHECKVAL(2); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA E->Push(player->GetSkillBonusPermanent(skill)); #else E->Push(player->GetSkillPermBonusValue(skill)); @@ -964,7 +964,7 @@ namespace LuaPlayer int GetPureSkillValue(Eluna* E, Player* player) { uint32 skill = E->CHECKVAL(2); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA E->Push(player->GetSkillValuePure(skill)); #else E->Push(player->GetPureSkillValue(skill)); @@ -981,7 +981,7 @@ namespace LuaPlayer int GetBaseSkillValue(Eluna* E, Player* player) { uint32 skill = E->CHECKVAL(2); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA E->Push(player->GetSkillValueBase(skill)); #else E->Push(player->GetBaseSkillValue(skill)); @@ -1012,7 +1012,7 @@ namespace LuaPlayer int GetPureMaxSkillValue(Eluna* E, Player* player) { uint32 skill = E->CHECKVAL(2); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA E->Push(player->GetSkillMaxPure(skill)); #else E->Push(player->GetPureMaxSkillValue(skill)); @@ -1029,7 +1029,7 @@ namespace LuaPlayer int GetMaxSkillValue(Eluna* E, Player* player) { uint32 skill = E->CHECKVAL(2); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA E->Push(player->GetSkillMax(skill)); #else E->Push(player->GetMaxSkillValue(skill)); @@ -1067,9 +1067,9 @@ namespace LuaPlayer */ int GetDifficulty(Eluna* E, Player* player) { -#if ELUNA_EXPANSION == TBC +#if ELUNA_EXPANSION == EXP_TBC E->Push(player->GetDifficulty()); -#elif ELUNA_EXPANSION == CLASSIC +#elif ELUNA_EXPANSION == EXP_CLASSIC E->Push((Difficulty)0); #else bool isRaid = E->CHECKVAL(2, true); @@ -1566,7 +1566,7 @@ namespace LuaPlayer if (apply) { player->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED | UNIT_FLAG_SILENCED); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA player->UpdateClientControl(player, 0); #else player->SetClientControl(player, 0); @@ -1575,7 +1575,7 @@ namespace LuaPlayer else { player->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED | UNIT_FLAG_SILENCED); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA player->UpdateClientControl(player, 1); #else player->SetClientControl(player, 1); @@ -1683,7 +1683,7 @@ namespace LuaPlayer uint32 points = E->CHECKVAL(2); player->SetFreeTalentPoints(points); -#if ELUNA_EXPANSION > TBC +#if ELUNA_EXPANSION > EXP_TBC player->SendTalentsInfoData(false); #endif return 0; @@ -1699,7 +1699,7 @@ namespace LuaPlayer { uint32 faction = E->CHECKVAL(2); int32 value = E->CHECKVAL(3); -#if ELUNA_EXPANSION == TBC +#if ELUNA_EXPANSION == EXP_TBC FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction); #else FactionEntry const* factionEntry = sFactionStore.LookupEntry(faction); @@ -1847,7 +1847,7 @@ namespace LuaPlayer return 0; } -#if ELUNA_EXPANSION >= TBC && ELUNA_EXPANSION <= WOTLK +#if ELUNA_EXPANSION >= EXP_TBC && ELUNA_EXPANSION <= EXP_WOTLK /** * Sets the [Player]s Arena Points to the amount specified * @@ -1873,7 +1873,7 @@ namespace LuaPlayer } #endif -#if ELUNA_EXPANSION == CLASSIC +#if ELUNA_EXPANSION == EXP_CLASSIC /** * Sets kills * @@ -1962,7 +1962,7 @@ namespace LuaPlayer return 0; } -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC /** * Adds the specified title to the [Player]s list of known titles * @@ -1991,7 +1991,7 @@ namespace LuaPlayer return 0; } -#if ELUNA_EXPANSION > TBC +#if ELUNA_EXPANSION > EXP_TBC /** * Resets the [Player]s pets talent points */ @@ -2023,7 +2023,7 @@ namespace LuaPlayer { ObjectGuid guid = E->CHECKVAL(2, player->GET_GUID()); -#if ELUNA_EXPANSION <= TBC +#if ELUNA_EXPANSION <= EXP_TBC WorldPacket data(CMSG_GET_MAIL_LIST, 8); data << guid; player->GetSession()->HandleGetMailList(data); @@ -2033,7 +2033,7 @@ namespace LuaPlayer return 0; } -#if ELUNA_EXPANSION >= TBC && ELUNA_EXPANSION <= WOTLK +#if ELUNA_EXPANSION >= EXP_TBC && ELUNA_EXPANSION <= EXP_WOTLK /** * Adds or detracts from the [Player]s current Arena Points * @@ -2081,7 +2081,7 @@ namespace LuaPlayer float x, y, z; summoner->GetPosition(x,y,z); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA player->SetSummonPoint(summoner->GetMapId(), x, y, z, summoner->GetMasterGuid()); #else player->SetSummonPoint(summoner->GetMapId(), x, y, z); @@ -2265,7 +2265,7 @@ namespace LuaPlayer int LogoutPlayer(Eluna* E, Player* player) { bool save = E->CHECKVAL(2, true); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA player->GetSession()->LogoutPlayer(); #else player->GetSession()->LogoutPlayer(save); @@ -2293,12 +2293,12 @@ namespace LuaPlayer int UnbindInstance(Eluna* E, Player* player) { uint32 map = E->CHECKVAL(2); -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC uint32 difficulty = E->CHECKVAL(3, 0); if (difficulty < MAX_DIFFICULTY) player->UnbindInstance(map, (Difficulty)difficulty); -#else//CLASSIC +#else//EXP_CLASSIC player->UnbindInstance(map); #endif return 0; @@ -2309,7 +2309,7 @@ namespace LuaPlayer */ int UnbindAllInstances(Eluna* /*E*/, Player* player) { -#if ELUNA_EXPANSION == CLASSIC +#if ELUNA_EXPANSION == EXP_CLASSIC Player::BoundInstancesMap& binds = player->GetBoundInstances(); for (Player::BoundInstancesMap::iterator itr = binds.begin(); itr != binds.end();) { @@ -2359,7 +2359,7 @@ namespace LuaPlayer bool takeCost = E->CHECKVAL(3, true); float discountMod = E->CHECKVAL(4, 1.0f); -#if ELUNA_EXPANSION == CLASSIC +#if ELUNA_EXPANSION == EXP_CLASSIC player->DurabilityRepair(position, takeCost, discountMod); #else player->DurabilityRepair(position, takeCost, discountMod, false); @@ -2380,7 +2380,7 @@ namespace LuaPlayer float discountMod = E->CHECKVAL(3, 1.0f); bool guildBank = E->CHECKVAL(4, false); -#if ELUNA_EXPANSION == CLASSIC +#if ELUNA_EXPANSION == EXP_CLASSIC player->DurabilityRepairAll(takeCost, discountMod); #else player->DurabilityRepairAll(takeCost, discountMod, guildBank); @@ -2506,7 +2506,7 @@ namespace LuaPlayer bool no_cost = E->CHECKVAL(2, true); player->resetTalents(no_cost); -#if ELUNA_EXPANSION > TBC +#if ELUNA_EXPANSION > EXP_TBC player->SendTalentsInfoData(false); #endif return 0; @@ -2683,7 +2683,7 @@ namespace LuaPlayer { if (CreatureInfo const* cInfo = ObjectMgr::GetCreatureTemplate(creature)) for (uint16 z = 0; z < creaturecount; ++z) -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA player->KilledMonster(cInfo, nullptr); #else player->KilledMonster(cInfo, ObjectGuid()); @@ -2703,7 +2703,7 @@ namespace LuaPlayer uint32 repValue = quest->GetRepObjectiveValue(); uint32 curRep = player->GetReputationMgr().GetReputation(repFaction); if (curRep < repValue) -#if ELUNA_EXPANSION == TBC +#if ELUNA_EXPANSION == EXP_TBC if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(repFaction)) #else if (FactionEntry const* factionEntry = sFactionStore.LookupEntry(repFaction)) @@ -2949,7 +2949,7 @@ namespace LuaPlayer return 1; } player->ItemAddedQuestCheck(entry, 1); -#if ELUNA_EXPANSION > TBC +#if ELUNA_EXPANSION > EXP_TBC player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_RECEIVE_EPIC_ITEM, entry, 1); #endif } @@ -3011,7 +3011,7 @@ namespace LuaPlayer return 1; } -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC /** * Removes a title by ID from the [Player]s list of known titles * @@ -3098,7 +3098,7 @@ namespace LuaPlayer float z = E->CHECKVAL(5); float o = E->CHECKVAL(6); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA if (player->IsTaxiFlying()) player->TaxiFlightInterrupt(); else @@ -3297,7 +3297,7 @@ namespace LuaPlayer data << uint8(channel); data << int32(LANG_ADDON); data << player->GET_GUID(); -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC data << uint32(0); data << receiver->GET_GUID(); #endif @@ -3356,7 +3356,7 @@ namespace LuaPlayer uint32 rank = E->CHECKVAL(3); player->LearnTalent(id, rank); -#if ELUNA_EXPANSION > TBC +#if ELUNA_EXPANSION > EXP_TBC player->SendTalentsInfoData(false); #endif @@ -3366,7 +3366,7 @@ namespace LuaPlayer return 0; } -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC /** * Remove cooldowns on spells that have less than 10 minutes of cooldown from the [Player], similarly to when you enter an arena. */ @@ -3419,11 +3419,11 @@ namespace LuaPlayer bool _code = E->CHECKVAL(6, false); const char* _promptMsg = E->CHECKVAL(7, ""); uint32 _money = E->CHECKVAL(8, 0); -#if ELUNA_EXPANSION >= TBC && ELUNA_EXPANSION <= WOTLK +#if ELUNA_EXPANSION >= EXP_TBC && ELUNA_EXPANSION <= EXP_WOTLK player->GetPlayerMenu()->GetGossipMenu().AddMenuItem(_icon, msg, _sender, _intid, _promptMsg, _money, _code); -#elif ELUNA_EXPANSION == CLASSIC +#elif ELUNA_EXPANSION == EXP_CLASSIC player->GetPlayerMenu()->GetGossipMenu().AddMenuItem(_icon, msg, _sender, _intid, _promptMsg, _code); -#elif ELUNA_EXPANSION == CATA +#elif ELUNA_EXPANSION == EXP_CATA player->PlayerTalkClass->GetGossipMenu().AddMenuItem(_icon, msg, _sender, _intid, _promptMsg, _money, _code); #endif return 0; @@ -3436,7 +3436,7 @@ namespace LuaPlayer */ int GossipComplete(Eluna* /*E*/, Player* player) { -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA player->GetPlayerMenu()->CloseGossip(); #else player->PlayerTalkClass->CloseGossip(); @@ -3465,13 +3465,13 @@ namespace LuaPlayer if (sender->GetTypeId() == TYPEID_PLAYER) { uint32 menu_id = E->CHECKVAL(4); -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA player->GetPlayerMenu()->GetGossipMenu().SetMenuId(menu_id); #else player->PlayerTalkClass->GetGossipMenu().SetMenuId(menu_id); #endif } -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA player->GetPlayerMenu()->SendGossipMenu(npc_text, sender->GET_GUID()); #else player->PlayerTalkClass->SendGossipMenu(npc_text, sender->GET_GUID()); @@ -3489,7 +3489,7 @@ namespace LuaPlayer */ int GossipClearMenu(Eluna* /*E*/, Player* player) { -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA player->GetPlayerMenu()->ClearMenus(); #else player->PlayerTalkClass->ClearMenus(); @@ -3578,7 +3578,7 @@ namespace LuaPlayer if (!quest) return 0; -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA player->GetPlayerMenu()->SendQuestGiverQuestDetails(quest, player->GET_GUID(), activateAccept); #else player->PlayerTalkClass->SendQuestGiverQuestDetails(quest, player->GET_GUID(), activateAccept); @@ -3645,7 +3645,7 @@ namespace LuaPlayer if (success) { -#if ELUNA_EXPANSION <= TBC +#if ELUNA_EXPANSION <= EXP_TBC WorldPacket data(SMSG_GROUP_INVITE, 10); // guess size data << player->GetName(); invited->GetSession()->SendPacket(data); @@ -3719,7 +3719,7 @@ namespace LuaPlayer return 0; } -#if ELUNA_EXPANSION > TBC +#if ELUNA_EXPANSION > EXP_TBC /** * Starts a movie for the [Player] * @@ -3795,14 +3795,14 @@ namespace LuaPlayer { "GetCorpse", &LuaPlayer::GetCorpse }, { "GetGossipTextId", &LuaPlayer::GetGossipTextId }, { "GetQuestRewardStatus", &LuaPlayer::GetQuestRewardStatus }, -#if ELUNA_EXPANSION >= TBC && ELUNA_EXPANSION <= WOTLK +#if ELUNA_EXPANSION >= EXP_TBC && ELUNA_EXPANSION <= EXP_WOTLK { "GetArenaPoints", &LuaPlayer::GetArenaPoints }, { "GetHonorPoints", &LuaPlayer::GetHonorPoints }, #else { "GetArenaPoints", METHOD_REG_NONE }, { "GetHonorPoints", METHOD_REG_NONE }, #endif -#if ELUNA_EXPANSION == WOTLK +#if ELUNA_EXPANSION == EXP_WOTLK { "GetPhaseMaskForSpawn", &LuaPlayer::GetPhaseMaskForSpawn }, { "GetActiveSpec", &LuaPlayer::GetActiveSpec }, { "GetSpecsCount", &LuaPlayer::GetSpecsCount }, @@ -3811,7 +3811,7 @@ namespace LuaPlayer { "GetActiveSpec", METHOD_REG_NONE }, { "GetSpecsCount", METHOD_REG_NONE }, #endif -#if ELUNA_EXPANSION < CATA +#if ELUNA_EXPANSION < EXP_CATA { "GetShieldBlockValue", &LuaPlayer::GetShieldBlockValue }, #else { "GetShieldBlockValue", METHOD_REG_NONE }, @@ -3844,14 +3844,14 @@ namespace LuaPlayer { "SetPlayerLock", &LuaPlayer::SetPlayerLock }, { "SetGender", &LuaPlayer::SetGender }, { "SetSheath", &LuaPlayer::SetSheath }, -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC { "SetKnownTitle", &LuaPlayer::SetKnownTitle }, { "UnsetKnownTitle", &LuaPlayer::UnsetKnownTitle }, #else { "SetKnownTitle", METHOD_REG_NONE }, { "UnsetKnownTitle", METHOD_REG_NONE }, #endif -#if ELUNA_EXPANSION >= TBC && ELUNA_EXPANSION <= WOTLK +#if ELUNA_EXPANSION >= EXP_TBC && ELUNA_EXPANSION <= EXP_WOTLK { "SetArenaPoints", &LuaPlayer::SetArenaPoints }, { "SetHonorPoints", &LuaPlayer::SetHonorPoints }, #else @@ -3903,7 +3903,7 @@ namespace LuaPlayer { "HasSpellCooldown", &LuaPlayer::HasSpellCooldown }, { "IsInWater", &LuaPlayer::IsInWater }, { "IsMoving", &LuaPlayer::IsMoving }, -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC { "HasTitle", &LuaPlayer::HasTitle }, { "IsInArenaTeam", &LuaPlayer::IsInArenaTeam }, { "InArena", &LuaPlayer::InArena }, @@ -3916,7 +3916,7 @@ namespace LuaPlayer { "CanFly", METHOD_REG_NONE }, { "IsFlying", METHOD_REG_NONE }, #endif -#if ELUNA_EXPANSION == WOTLK +#if ELUNA_EXPANSION == EXP_WOTLK { "HasAchieved", &LuaPlayer::HasAchieved }, { "HasTalent", &LuaPlayer::HasTalent }, { "CanTitanGrip", &LuaPlayer::CanTitanGrip }, @@ -4007,19 +4007,19 @@ namespace LuaPlayer { "GroupInvite", &LuaPlayer::GroupInvite, METHOD_REG_WORLD }, // World state method only in multistate { "GroupCreate", &LuaPlayer::GroupCreate, METHOD_REG_WORLD }, // World state method only in multistate { "SendCinematicStart", &LuaPlayer::SendCinematicStart }, -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC { "RemoveArenaSpellCooldowns", &LuaPlayer::RemoveArenaSpellCooldowns }, #else { "RemoveArenaSpellCooldowns", METHOD_REG_NONE }, #endif -#if ELUNA_EXPANSION >= TBC && ELUNA_EXPANSION <= WOTLK +#if ELUNA_EXPANSION >= EXP_TBC && ELUNA_EXPANSION <= EXP_WOTLK { "ModifyHonorPoints", &LuaPlayer::ModifyHonorPoints }, { "ModifyArenaPoints", &LuaPlayer::ModifyArenaPoints }, #else { "ModifyHonorPoints", METHOD_REG_NONE }, { "ModifyArenaPoints", METHOD_REG_NONE }, #endif -#if ELUNA_EXPANSION == WOTLK +#if ELUNA_EXPANSION == EXP_WOTLK { "ResetPetTalents", &LuaPlayer::ResetPetTalents }, { "ResetAchievements", &LuaPlayer::ResetAchievements }, { "SendMovieStart", &LuaPlayer::SendMovieStart }, diff --git a/methods/CMangos/QuestMethods.h b/methods/CMangos/QuestMethods.h index 3243faa175..34ef3aced7 100644 --- a/methods/CMangos/QuestMethods.h +++ b/methods/CMangos/QuestMethods.h @@ -57,7 +57,7 @@ namespace LuaQuest return 1; } -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC /** * Returns 'true' if the [Quest] is a daily quest, false otherwise. * @@ -185,7 +185,7 @@ namespace LuaQuest // Boolean { "HasFlag", &LuaQuest::HasFlag }, -#if ELUNA_EXPANSION >= TBC +#if ELUNA_EXPANSION >= EXP_TBC { "IsDaily", &LuaQuest::IsDaily }, #else { "IsDaily", METHOD_REG_NONE }, diff --git a/methods/CMangos/VehicleMethods.h b/methods/CMangos/VehicleMethods.h index e458601ca9..c2e52e54fa 100644 --- a/methods/CMangos/VehicleMethods.h +++ b/methods/CMangos/VehicleMethods.h @@ -107,5 +107,5 @@ namespace LuaVehicle }; } -#endif // EXPANSION >= WOTLK +#endif // EXPANSION >= EXP_WOTLK #endif // VEHICLEMETHODS_H diff --git a/methods/CMangos/WorldPacketMethods.h b/methods/CMangos/WorldPacketMethods.h index 8ce42b9f99..6b40ee9a8e 100644 --- a/methods/CMangos/WorldPacketMethods.h +++ b/methods/CMangos/WorldPacketMethods.h @@ -52,7 +52,7 @@ namespace LuaPacket uint32 opcode = E->CHECKVAL(2); if (opcode >= NUM_MSG_TYPES) return luaL_argerror(E->L, 2, "valid opcode expected"); -#if ELUNA_EXPANSION == CLASSIC +#if ELUNA_EXPANSION == EXP_CLASSIC packet->SetOpcode((Opcodes)opcode); #else packet->SetOpcode((OpcodesList)opcode);