mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
feat(Core/Hooks): Add the KillRewarder reference to the OnRewardKillRewarder hook. (#18290)
* Another hackfix attempt at warden payload forcechecks ban fix. * Revert last commit, interrupt all forcechecks instead of just _dataSent ones. * Add rewarder parameter to OnRewardKillRewarder hook. * Undo old warden changes. * Removed too much!
This commit is contained in:
@@ -992,11 +992,11 @@ void ScriptMgr::PetitionShowList(Player* player, Creature* creature, uint32& Cha
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnRewardKillRewarder(Player* player, bool isDungeon, float& rate)
|
||||
void ScriptMgr::OnRewardKillRewarder(Player* player, KillRewarder* rewarder, bool isDungeon, float& rate)
|
||||
{
|
||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||
{
|
||||
script->OnRewardKillRewarder(player, isDungeon, rate);
|
||||
script->OnRewardKillRewarder(player, rewarder, isDungeon, rate);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
// TODO to remove
|
||||
#include "AchievementMgr.h"
|
||||
#include "KillRewarder.h"
|
||||
|
||||
class PlayerScript : public ScriptObject
|
||||
{
|
||||
@@ -314,7 +315,7 @@ public:
|
||||
|
||||
virtual void PetitionShowList(Player* /*player*/, Creature* /*creature*/, uint32& /*CharterEntry*/, uint32& /*CharterDispayID*/, uint32& /*CharterCost*/) { }
|
||||
|
||||
virtual void OnRewardKillRewarder(Player* /*player*/, bool /*isDungeon*/, float& /*rate*/) { }
|
||||
virtual void OnRewardKillRewarder(Player* /*player*/, KillRewarder* /*rewarder*/, bool /*isDungeon*/, float& /*rate*/) { }
|
||||
|
||||
[[nodiscard]] virtual bool CanGiveMailRewardAtGiveLevel(Player* /*player*/, uint8 /*level*/) { return true; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user