eluna OnLearnTalents hook and player:LearnTalent function
Signed-off-by: Salja <salja8840@gmail.com>
This commit is contained in:
@@ -9,13 +9,26 @@
|
||||
|
||||
#include "Hooks.h"
|
||||
#include "HookHelpers.h"
|
||||
#include "ElunaTemplate.h"
|
||||
#include "LuaEngine.h"
|
||||
#include "ElunaBinding.h"
|
||||
#include "ElunaIncludes.h"
|
||||
#include "ElunaTemplate.h"
|
||||
|
||||
using namespace Hooks;
|
||||
|
||||
void Eluna::OnLearnTalents(Player* pPlayer, uint32 talentId, uint32 talentRank, uint32 spellid)
|
||||
{
|
||||
if (!PlayerEventBindings->HasEvents(PLAYER_EVENT_ON_LEARN_TALENTS))
|
||||
return;
|
||||
|
||||
LOCK_ELUNA;
|
||||
Push(pPlayer);
|
||||
Push(talentId);
|
||||
Push(talentRank);
|
||||
Push(spellid);
|
||||
CallAllFunctions(PlayerEventBindings, PLAYER_EVENT_ON_LEARN_TALENTS);
|
||||
}
|
||||
|
||||
void Eluna::HandleGossipSelectOption(Player* pPlayer, Item* item, uint32 sender, uint32 action, const std::string& code)
|
||||
{
|
||||
if (!ItemGossipBindings->HasEvents(GOSSIP_EVENT_ON_SELECT, item->GetEntry()))
|
||||
@@ -717,4 +730,4 @@ bool Eluna::OnChat(Player* pPlayer, uint32 type, uint32 lang, std::string& msg,
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // _PLAYER_HOOKS_H
|
||||
#endif // _PLAYER_HOOKS_H
|
||||
|
||||
Reference in New Issue
Block a user