mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
@@ -731,6 +731,11 @@ public:
|
||||
{
|
||||
sEluna->OnFirstLogin(player);
|
||||
}
|
||||
|
||||
void OnLearnSpell(Player* player, uint32 spellId) override
|
||||
{
|
||||
sEluna->OnLearnSpell(player, spellId);
|
||||
}
|
||||
};
|
||||
|
||||
class Eluna_ServerScript : public ServerScript
|
||||
|
||||
@@ -706,6 +706,7 @@ namespace LuaGlobalFunctions
|
||||
* // UNUSED = 41, // (event, player)
|
||||
* PLAYER_EVENT_ON_COMMAND = 42, // (event, player, command, chatHandler) - player is nil if command used from console. Can return false
|
||||
* PLAYER_EVENT_ON_PET_ADDED_TO_WORLD = 43, // (event, player, pet)
|
||||
* * PLAYER_EVENT_ON_LEARN_SPELL = 44, // (event, player, spellId)
|
||||
* };
|
||||
* </pre>
|
||||
*
|
||||
|
||||
@@ -205,6 +205,7 @@ namespace Hooks
|
||||
// UNUSED = 41, // (event, player)
|
||||
PLAYER_EVENT_ON_COMMAND = 42, // (event, player, command, chatHandler) - player is nil if command used from console. Can return false
|
||||
PLAYER_EVENT_ON_PET_ADDED_TO_WORLD = 43, // (event, player, pet)
|
||||
PLAYER_EVENT_ON_LEARN_SPELL = 44, // (event, player, spellId)
|
||||
|
||||
PLAYER_EVENT_COUNT
|
||||
};
|
||||
|
||||
@@ -472,6 +472,7 @@ public:
|
||||
void OnUpdateZone(Player* pPlayer, uint32 newZone, uint32 newArea);
|
||||
void OnMapChanged(Player* pPlayer);
|
||||
void HandleGossipSelectOption(Player* pPlayer, uint32 menuId, uint32 sender, uint32 action, const std::string& code);
|
||||
void OnLearnSpell(Player* player, uint32 spellId);
|
||||
|
||||
#ifndef CLASSIC
|
||||
#ifndef TBC
|
||||
|
||||
@@ -558,3 +558,11 @@ void Eluna::OnPetAddedToWorld(Player* player, Creature* pet)
|
||||
Push(pet);
|
||||
CallAllFunctions(PlayerEventBindings, key);
|
||||
}
|
||||
|
||||
void Eluna::OnLearnSpell(Player* player, uint32 spellId)
|
||||
{
|
||||
START_HOOK(PLAYER_EVENT_ON_LEARN_SPELL);
|
||||
Push(player);
|
||||
Push(spellId);
|
||||
CallAllFunctions(PlayerEventBindings, key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user