feat: add PLAYER_EVENT_ON_QUEST_REWARD_ITEM, add PLAYER_EVENT_ON_CREATE_ITEM, add PLAYER_EVENT_ON_STORE_NEW_ITEM (#88)

Co-authored-by: Axel Cocat <ax.cocat@gmail.com>
This commit is contained in:
veserine
2023-01-30 21:18:28 +08:00
committed by GitHub
parent 63d6ebab01
commit 695c6b7d7c
7 changed files with 57 additions and 0 deletions

View File

@@ -635,3 +635,30 @@ bool Eluna::OnCanJoinLfg(Player* player, uint8 roles, lfg::LfgDungeonSet& dungeo
Push(comment);
return CallAllFunctionsBool(PlayerEventBindings, key);
}
void Eluna::OnQuestRewardItem(Player* player, Item* item, uint32 count)
{
START_HOOK(PLAYER_EVENT_ON_QUEST_REWARD_ITEM);
Push(player);
Push(item);
Push(count);
CallAllFunctions(PlayerEventBindings, key);
}
void Eluna::OnCreateItem(Player* player, Item* item, uint32 count)
{
START_HOOK(PLAYER_EVENT_ON_CREATE_ITEM);
Push(player);
Push(item);
Push(count);
CallAllFunctions(PlayerEventBindings, key);
}
void Eluna::OnStoreNewItem(Player* player, Item* item, uint32 count)
{
START_HOOK(PLAYER_EVENT_ON_STORE_NEW_ITEM);
Push(player);
Push(item);
Push(count);
CallAllFunctions(PlayerEventBindings, key);
}