From 1be14ebf7f38ab446907b4c111370b3a62bdc268 Mon Sep 17 00:00:00 2001 From: Feyo Korenhof <35343640+feyokorenhof@users.noreply.github.com> Date: Mon, 29 Nov 2021 13:53:58 +0100 Subject: Added ExperienceAmount variable to HOOK_PLAYER_FISHING and HOOK_PLAYER_FISHED (#5345) * Implemented cServer::ScheduleTask() and cServer::TickQueuedTasks() * Fixed formatting and added ScheduleTask to APIDesc * Added feyokorenhof to contributors * Added ExperienceAmount variable to all the hook calls. * Made ExperienceAmount int reference instead of int in HOOK_PLAYER_FISHING. Fixed bug: a_Reward is now a reference * Add documentation, change ItemFishingRod to pass in experience Co-authored-by: Alexander Harkness --- src/Bindings/Plugin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Bindings/Plugin.h') diff --git a/src/Bindings/Plugin.h b/src/Bindings/Plugin.h index 47f8820e8..2b5abfca9 100644 --- a/src/Bindings/Plugin.h +++ b/src/Bindings/Plugin.h @@ -76,8 +76,8 @@ public: virtual bool OnPlayerBrokenBlock (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) = 0; virtual bool OnPlayerDestroyed (cPlayer & a_Player) = 0; virtual bool OnPlayerEating (cPlayer & a_Player) = 0; - virtual bool OnPlayerFished (cPlayer & a_Player, const cItems & a_Reward) = 0; - virtual bool OnPlayerFishing (cPlayer & a_Player, cItems & a_Reward) = 0; + virtual bool OnPlayerFished (cPlayer & a_Player, const cItems & a_Reward, const int ExperienceAmount) = 0; + virtual bool OnPlayerFishing (cPlayer & a_Player, cItems & a_Reward, int & ExperienceAmount) = 0; virtual bool OnPlayerFoodLevelChange (cPlayer & a_Player, int a_NewFoodLevel) = 0; virtual bool OnPlayerJoined (cPlayer & a_Player) = 0; virtual bool OnPlayerLeftClick (cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, char a_Status) = 0; -- cgit v1.2.3