Skip to content

Commit

Permalink
Rename EXPANSION preprocessor to ELUNA_EXPANSION
Browse files Browse the repository at this point in the history
  • Loading branch information
Foereaper committed Jul 25, 2024
1 parent 5ab1c07 commit 16908e7
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 33 deletions.
20 changes: 10 additions & 10 deletions ElunaIncludes.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
#include "BasicAI.h"
#include "SQLStorages.h"
#endif // TRINITY
#if EXPANSION > CLASSIC
#if ELUNA_EXPANSION > CLASSIC
#include "ArenaTeam.h"
#endif
#if EXPANSION >= WOTLK
#if ELUNA_EXPANSION >= WOTLK
#include "Vehicle.h"
#endif
#else
Expand Down Expand Up @@ -95,13 +95,13 @@
#include "Tools/Language.h"
#include "AI/BaseAI/UnitAI.h"
#include "Server/SQLStorages.h"
#if EXPANSION > CLASSIC
#if ELUNA_EXPANSION > CLASSIC
#include "Arena/ArenaTeam.h"
#endif
#if EXPANSION >= WOTLK
#if ELUNA_EXPANSION >= WOTLK
#include "Entities/Vehicle.h"
#endif
#if EXPANSION >= CATA
#if ELUNA_EXPANSION >= CATA
#include "AI/BaseAI/AggressorAI.h"
#endif
#endif
Expand All @@ -112,7 +112,7 @@
#include "revision.h"
#endif

#if EXPANSION > CLASSIC
#if ELUNA_EXPANSION > CLASSIC
typedef Opcodes OpcodesList;
#endif

Expand All @@ -123,7 +123,7 @@ typedef Opcodes OpcodesList;
#if defined CMANGOS
#define CORE_NAME "cMaNGOS"
#define CORE_VERSION REVISION_DATE " " REVISION_ID
#if EXPANSION == CATA
#if ELUNA_EXPANSION == CATA
#define NUM_MSG_TYPES MAX_OPCODE_TABLE_SIZE
#endif
#endif
Expand Down Expand Up @@ -168,15 +168,15 @@ typedef Opcodes OpcodesList;
#endif


#if EXPANSION >= CATA || defined VMANGOS
#if ELUNA_EXPANSION >= CATA || defined VMANGOS
#define PLAYER_FIELD_LIFETIME_HONORABLE_KILLS PLAYER_FIELD_LIFETIME_HONORBALE_KILLS
#endif

#if EXPANSION == TBC
#if ELUNA_EXPANSION == TBC
#define SPELL_AURA_MOD_KILL_XP_PCT SPELL_AURA_MOD_XP_PCT
#endif

#if EXPANSION >= WOTLK
#if ELUNA_EXPANSION >= WOTLK
#define UNIT_BYTE2_FLAG_SANCTUARY UNIT_BYTE2_FLAG_SUPPORTABLE
#endif

Expand Down
12 changes: 6 additions & 6 deletions LuaEngine.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ class TemporarySummon;
typedef TemporarySummon TempSummon;
#endif

#if EXPANSION == CLASSIC
#if ELUNA_EXPANSION == CLASSIC
typedef int Difficulty;
#endif

#if EXPANSION >= WOTLK
#if ELUNA_EXPANSION >= WOTLK
class VehicleInfo;
typedef VehicleInfo Vehicle;
#endif
Expand Down Expand Up @@ -458,7 +458,7 @@ class ELUNA_GAME_API Eluna
bool OnQuestAccept(Player* pPlayer, GameObject* pGameObject, Quest const* pQuest);
bool OnQuestReward(Player* pPlayer, GameObject* pGameObject, Quest const* pQuest, uint32 opt);
void GetDialogStatus(const Player* pPlayer, const GameObject* pGameObject);
#if EXPANSION >= WOTLK
#if ELUNA_EXPANSION >= WOTLK
void OnDestroyed(GameObject* pGameObject, WorldObject* attacker);
void OnDamaged(GameObject* pGameObject, WorldObject* attacker);
#endif
Expand Down Expand Up @@ -486,7 +486,7 @@ class ELUNA_GAME_API Eluna
void OnFreeTalentPointsChanged(Player* pPlayer, uint32 newPoints);
void OnTalentsReset(Player* pPlayer, bool noCost);
void OnMoneyChanged(Player* pPlayer, int32& amount);
#if EXPANSION >= CATA
#if ELUNA_EXPANSION >= CATA
void OnMoneyChanged(Player* pPlayer, int64& amount);
#endif
void OnGiveXP(Player* pPlayer, uint32& amount, Unit* pVictim);
Expand Down Expand Up @@ -514,7 +514,7 @@ class ELUNA_GAME_API Eluna
void HandleGossipSelectOption(Player* pPlayer, uint32 menuId, uint32 sender, uint32 action, const std::string& code);
void OnAchievementComplete(Player* pPlayer, uint32 achievementId);

#if EXPANSION >= WOTLK
#if ELUNA_EXPANSION >= WOTLK
/* Vehicle */
void OnInstall(Vehicle* vehicle);
void OnUninstall(Vehicle* vehicle);
Expand Down Expand Up @@ -544,7 +544,7 @@ class ELUNA_GAME_API Eluna
void OnDisband(Guild* guild);
void OnMemberWitdrawMoney(Guild* guild, Player* player, uint32& amount, bool isRepair);
void OnMemberDepositMoney(Guild* guild, Player* player, uint32& amount);
#if EXPANSION >= CATA
#if ELUNA_EXPANSION >= CATA
void OnMemberWitdrawMoney(Guild* guild, Player* player, uint64& amount, bool isRepair);
void OnMemberDepositMoney(Guild* guild, Player* player, uint64& amount);
#endif
Expand Down
2 changes: 1 addition & 1 deletion LuaFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void RegisterFunctions(Eluna* E)
ElunaTemplate<Item>::SetMethods(E, LuaObject::ObjectMethods);
ElunaTemplate<Item>::SetMethods(E, LuaItem::ItemMethods);

#if EXPANSION >= WOTLK
#if ELUNA_EXPANSION >= WOTLK
ElunaTemplate<Vehicle>::Register(E, "Vehicle");
ElunaTemplate<Vehicle>::SetMethods(E, LuaVehicle::VehicleMethods);
#endif
Expand Down
2 changes: 1 addition & 1 deletion hooks/GameObjectHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void Eluna::GetDialogStatus(const Player* pPlayer, const GameObject* pGameObject
CallAllFunctions(GameObjectEventBindings, key);
}

#if EXPANSION >= WOTLK
#if ELUNA_EXPANSION >= WOTLK
void Eluna::OnDestroyed(GameObject* pGameObject, WorldObject* attacker)
{
START_HOOK(GAMEOBJECT_EVENT_ON_DESTROYED, pGameObject->GetEntry());
Expand Down
22 changes: 11 additions & 11 deletions hooks/GossipHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 CMANGOS && EXPANSION < CATA
#if defined CMANGOS && ELUNA_EXPANSION < CATA
pPlayer->GetPlayerMenu()->ClearMenus();
#else
pPlayer->PlayerTalkClass->ClearMenus();
Expand All @@ -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 CMANGOS && EXPANSION < CATA
#if defined CMANGOS && ELUNA_EXPANSION < CATA
pPlayer->GetPlayerMenu()->ClearMenus();
#else
pPlayer->PlayerTalkClass->ClearMenus();
Expand All @@ -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 CMANGOS && EXPANSION < CATA
#if defined CMANGOS && ELUNA_EXPANSION < CATA
pPlayer->GetPlayerMenu()->ClearMenus();
#else
pPlayer->PlayerTalkClass->ClearMenus();
Expand All @@ -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 CMANGOS && EXPANSION < CATA
#if defined CMANGOS && ELUNA_EXPANSION < CATA
pPlayer->GetPlayerMenu()->ClearMenus();
#else
pPlayer->PlayerTalkClass->ClearMenus();
Expand All @@ -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 CMANGOS && EXPANSION < CATA
#if defined CMANGOS && ELUNA_EXPANSION < CATA
pPlayer->GetPlayerMenu()->ClearMenus();
#else
pPlayer->PlayerTalkClass->ClearMenus();
Expand All @@ -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 CMANGOS && EXPANSION < CATA
#if defined CMANGOS && ELUNA_EXPANSION < CATA
pPlayer->GetPlayerMenu()->ClearMenus();
#else
pPlayer->PlayerTalkClass->ClearMenus();
Expand All @@ -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 CMANGOS && EXPANSION < CATA
#if defined CMANGOS && ELUNA_EXPANSION < CATA
pPlayer->GetPlayerMenu()->ClearMenus();
#else
pPlayer->PlayerTalkClass->ClearMenus();
Expand All @@ -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 CMANGOS && EXPANSION < CATA
#if defined CMANGOS && ELUNA_EXPANSION < CATA
auto original_menu = *pPlayer->GetPlayerMenu();
pPlayer->GetPlayerMenu()->ClearMenus();
#else
Expand All @@ -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 CMANGOS && EXPANSION < CATA
#if defined CMANGOS && ELUNA_EXPANSION < CATA
*pPlayer->GetPlayerMenu() = original_menu;
#else
*pPlayer->PlayerTalkClass = original_menu;
Expand All @@ -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 CMANGOS && EXPANSION < CATA
#if defined CMANGOS && ELUNA_EXPANSION < CATA
auto original_menu = *pPlayer->GetPlayerMenu();
pPlayer->GetPlayerMenu()->ClearMenus();
#else
Expand All @@ -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 CMANGOS && EXPANSION < CATA
#if defined CMANGOS && ELUNA_EXPANSION < CATA
*pPlayer->GetPlayerMenu() = original_menu;
#else
*pPlayer->PlayerTalkClass = original_menu;
Expand Down
4 changes: 2 additions & 2 deletions hooks/GuildHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void Eluna::OnMemberWitdrawMoney(Guild* guild, Player* player, uint32& amount, b
CleanUpStack(4);
}

#if EXPANSION >= CATA
#if ELUNA_EXPANSION >= CATA
void Eluna::OnMemberWitdrawMoney(Guild* guild, Player* player, uint64& amount, bool isRepair)
{
START_HOOK(GUILD_EVENT_ON_MONEY_WITHDRAW);
Expand Down Expand Up @@ -149,7 +149,7 @@ void Eluna::OnMemberDepositMoney(Guild* guild, Player* player, uint32& amount)
CleanUpStack(3);
}

#if EXPANSION >= CATA
#if ELUNA_EXPANSION >= CATA
void Eluna::OnMemberDepositMoney(Guild* guild, Player* player, uint64& amount)
{
START_HOOK(GUILD_EVENT_ON_MONEY_DEPOSIT);
Expand Down
2 changes: 1 addition & 1 deletion hooks/PlayerHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ void Eluna::OnMoneyChanged(Player* pPlayer, int32& amount)
CleanUpStack(2);
}

#if EXPANSION >= CATA
#if ELUNA_EXPANSION >= CATA
void Eluna::OnMoneyChanged(Player* pPlayer, int64& amount)
{
START_HOOK(PLAYER_EVENT_ON_MONEY_CHANGE);
Expand Down
2 changes: 1 addition & 1 deletion hooks/VehicleHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "BindingMap.h"
#include "ElunaTemplate.h"

#if EXPANSION >= WOTLK
#if ELUNA_EXPANSION >= WOTLK

using namespace Hooks;

Expand Down

0 comments on commit 16908e7

Please sign in to comment.