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

@@ -2924,6 +2924,21 @@ namespace LuaPlayer
return 0;
}
/**
* Learn the [Player] the [Talent] specified by talent_id and talentRank
*
* @param uint32 talent_id
* @param uint32 talentRank
*/
int LearnTalent(Eluna* /*E*/, lua_State* L, Player* player)
{
uint32 id = Eluna::CHECKVAL<uint32>(L, 2);
uint32 rank = Eluna::CHECKVAL<uint32>(L, 3);
player->LearnTalent(id, rank);
return 0;
}
/**
* Resurrects the [Player]
*