chore: rename Eluna to ALE (#318)

Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
This commit is contained in:
Foe
2025-10-23 12:53:30 +02:00
committed by GitHub
parent c35416fa36
commit 81d3f02679
77 changed files with 3605 additions and 3605 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010 - 2016 Eluna Lua Engine <http://emudevs.com/>
* Copyright (C) 2010 - 2025 Eluna Lua Engine <https://elunaluaengine.github.io/>
* This program is free software licensed under GPL version 3
* Please see the included DOCS/LICENSE.md for more information
*/
@@ -8,28 +8,28 @@
#include "HookHelpers.h"
#include "LuaEngine.h"
#include "BindingMap.h"
#include "ElunaIncludes.h"
#include "ElunaTemplate.h"
#include "ALEIncludes.h"
#include "ALETemplate.h"
using namespace Hooks;
#define START_HOOK(BINDINGS, EVENT, ENTRY) \
if (!ElunaConfig::GetInstance().IsElunaEnabled())\
if (!ALEConfig::GetInstance().IsALEEnabled())\
return;\
auto key = EntryKey<GossipEvents>(EVENT, ENTRY);\
if (!BINDINGS->HasBindingsFor(key))\
return;\
LOCK_ELUNA
LOCK_ALE
#define START_HOOK_WITH_RETVAL(BINDINGS, EVENT, ENTRY, RETVAL) \
if (!ElunaConfig::GetInstance().IsElunaEnabled())\
if (!ALEConfig::GetInstance().IsALEEnabled())\
return RETVAL;\
auto key = EntryKey<GossipEvents>(EVENT, ENTRY);\
if (!BINDINGS->HasBindingsFor(key))\
return RETVAL;\
LOCK_ELUNA
LOCK_ALE
bool Eluna::OnGossipHello(Player* pPlayer, GameObject* pGameObject)
bool ALE::OnGossipHello(Player* pPlayer, GameObject* pGameObject)
{
START_HOOK_WITH_RETVAL(GameObjectGossipBindings, GOSSIP_EVENT_ON_HELLO, pGameObject->GetEntry(), false);
pPlayer->PlayerTalkClass->ClearMenus();
@@ -38,7 +38,7 @@ bool Eluna::OnGossipHello(Player* pPlayer, GameObject* pGameObject)
return CallAllFunctionsBool(GameObjectGossipBindings, key, true);
}
bool Eluna::OnGossipSelect(Player* pPlayer, GameObject* pGameObject, uint32 sender, uint32 action)
bool ALE::OnGossipSelect(Player* pPlayer, GameObject* pGameObject, uint32 sender, uint32 action)
{
START_HOOK_WITH_RETVAL(GameObjectGossipBindings, GOSSIP_EVENT_ON_SELECT, pGameObject->GetEntry(), false);
pPlayer->PlayerTalkClass->ClearMenus();
@@ -49,7 +49,7 @@ bool Eluna::OnGossipSelect(Player* pPlayer, GameObject* pGameObject, uint32 send
return CallAllFunctionsBool(GameObjectGossipBindings, key, true);
}
bool Eluna::OnGossipSelectCode(Player* pPlayer, GameObject* pGameObject, uint32 sender, uint32 action, const char* code)
bool ALE::OnGossipSelectCode(Player* pPlayer, GameObject* pGameObject, uint32 sender, uint32 action, const char* code)
{
START_HOOK_WITH_RETVAL(GameObjectGossipBindings, GOSSIP_EVENT_ON_SELECT, pGameObject->GetEntry(), false);
pPlayer->PlayerTalkClass->ClearMenus();
@@ -61,7 +61,7 @@ bool Eluna::OnGossipSelectCode(Player* pPlayer, GameObject* pGameObject, uint32
return CallAllFunctionsBool(GameObjectGossipBindings, key, true);
}
void Eluna::HandleGossipSelectOption(Player* pPlayer, uint32 menuId, uint32 sender, uint32 action, const std::string& code)
void ALE::HandleGossipSelectOption(Player* pPlayer, uint32 menuId, uint32 sender, uint32 action, const std::string& code)
{
START_HOOK(PlayerGossipBindings, GOSSIP_EVENT_ON_SELECT, menuId);
pPlayer->PlayerTalkClass->ClearMenus();
@@ -78,7 +78,7 @@ void Eluna::HandleGossipSelectOption(Player* pPlayer, uint32 menuId, uint32 send
CallAllFunctions(PlayerGossipBindings, key);
}
bool Eluna::OnItemGossip(Player* pPlayer, Item* pItem, SpellCastTargets const& /*targets*/)
bool ALE::OnItemGossip(Player* pPlayer, Item* pItem, SpellCastTargets const& /*targets*/)
{
START_HOOK_WITH_RETVAL(ItemGossipBindings, GOSSIP_EVENT_ON_HELLO, pItem->GetEntry(), true);
pPlayer->PlayerTalkClass->ClearMenus();
@@ -87,7 +87,7 @@ bool Eluna::OnItemGossip(Player* pPlayer, Item* pItem, SpellCastTargets const& /
return CallAllFunctionsBool(ItemGossipBindings, key, true);
}
void Eluna::HandleGossipSelectOption(Player* pPlayer, Item* pItem, uint32 sender, uint32 action, const std::string& code)
void ALE::HandleGossipSelectOption(Player* pPlayer, Item* pItem, uint32 sender, uint32 action, const std::string& code)
{
START_HOOK(ItemGossipBindings, GOSSIP_EVENT_ON_SELECT, pItem->GetEntry());
pPlayer->PlayerTalkClass->ClearMenus();
@@ -104,7 +104,7 @@ void Eluna::HandleGossipSelectOption(Player* pPlayer, Item* pItem, uint32 sender
CallAllFunctions(ItemGossipBindings, key);
}
bool Eluna::OnGossipHello(Player* pPlayer, Creature* pCreature)
bool ALE::OnGossipHello(Player* pPlayer, Creature* pCreature)
{
START_HOOK_WITH_RETVAL(CreatureGossipBindings, GOSSIP_EVENT_ON_HELLO, pCreature->GetEntry(), false);
pPlayer->PlayerTalkClass->ClearMenus();
@@ -113,7 +113,7 @@ bool Eluna::OnGossipHello(Player* pPlayer, Creature* pCreature)
return CallAllFunctionsBool(CreatureGossipBindings, key, true);
}
bool Eluna::OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
bool ALE::OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
{
START_HOOK_WITH_RETVAL(CreatureGossipBindings, GOSSIP_EVENT_ON_SELECT, pCreature->GetEntry(), false);
auto originalMenu = *pPlayer->PlayerTalkClass;
@@ -129,7 +129,7 @@ bool Eluna::OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender,
return preventDefault;
}
bool Eluna::OnGossipSelectCode(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action, const char* code)
bool ALE::OnGossipSelectCode(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action, const char* code)
{
START_HOOK_WITH_RETVAL(CreatureGossipBindings, GOSSIP_EVENT_ON_SELECT, pCreature->GetEntry(), false);
auto originalMenu = *pPlayer->PlayerTalkClass;