mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 00:53:46 +00:00
feat(Hooks/PlayerScript): ShouldBeRewardedWithMoneyInsteadOfExp (#4445)
This commit is contained in:
@@ -1714,6 +1714,17 @@ bool ScriptMgr::CanJoinInBattlegroundQueue(Player* player, uint64 BattlemasterGu
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool ScriptMgr::ShouldBeRewardedWithMoneyInsteadOfExp(Player* player)
|
||||
{
|
||||
bool ret = false; // return false by default if not scripts
|
||||
|
||||
FOR_SCRIPTS_RET(PlayerScript, itr, end, ret)
|
||||
if (itr->second->ShouldBeRewardedWithMoneyInsteadOfExp(player))
|
||||
ret = true; // we change ret value only when a script returns true
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ScriptMgr::OnBeforeTempSummonInitStats(Player* player, TempSummon* tempSummon, uint32& duration)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnBeforeTempSummonInitStats(player, tempSummon, duration);
|
||||
|
||||
@@ -936,6 +936,7 @@ public:
|
||||
virtual void OnFirstLogin(Player* /*player*/) { }
|
||||
|
||||
virtual bool CanJoinInBattlegroundQueue(Player* /*player*/, uint64 /*BattlemasterGuid*/, BattlegroundTypeId /*BGTypeID*/, uint8 /*joinAsGroup*/, GroupJoinBattlegroundResult& /*err*/) { return true; }
|
||||
virtual bool ShouldBeRewardedWithMoneyInsteadOfExp(Player* /*player*/) { return false; }
|
||||
|
||||
// Called before the player's temporary summoned creature has initialized it's stats
|
||||
virtual void OnBeforeTempSummonInitStats(Player* /*player*/, TempSummon* /*tempSummon*/, uint32& /*duration*/) { }
|
||||
@@ -1394,6 +1395,7 @@ public: /* PlayerScript */
|
||||
void OnFirstLogin(Player* player);
|
||||
void OnPlayerCompleteQuest(Player* player, Quest const* quest);
|
||||
bool CanJoinInBattlegroundQueue(Player* player, uint64 BattlemasterGuid, BattlegroundTypeId BGTypeID, uint8 joinAsGroup, GroupJoinBattlegroundResult& err);
|
||||
bool ShouldBeRewardedWithMoneyInsteadOfExp(Player* player);
|
||||
void OnBeforeTempSummonInitStats(Player* player, TempSummon* tempSummon, uint32& duration);
|
||||
void OnBeforeGuardianInitStatsForLevel(Player* player, Guardian* guardian, CreatureTemplate const* cinfo, PetType& petType);
|
||||
void OnAfterGuardianInitStatsForLevel(Player* player, Guardian* guardian);
|
||||
|
||||
Reference in New Issue
Block a user