eluna OnLearnTalents hook and player:LearnTalent function

Signed-off-by: Salja <salja8840@gmail.com>
This commit is contained in:
Salja
2015-01-15 10:29:27 +01:00
committed by Rochet2
parent 3f9251fef9
commit ed0d7dd415
15 changed files with 52 additions and 23 deletions

View File

@@ -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