moved hook from battleground script to formula script
This commit is contained in:
@@ -1571,9 +1571,9 @@ void ScriptMgr::OnBeforeInitTalentForLevel(Player* player, uint8& level, uint32&
|
|||||||
FOREACH_SCRIPT(PlayerScript)->OnBeforeInitTalentForLevel(player, level, talentPointsForLevel);
|
FOREACH_SCRIPT(PlayerScript)->OnBeforeInitTalentForLevel(player, level, talentPointsForLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptMgr::OnAfterArenaRatingCalculation(Battleground *const bg, int32 &winnerMatchmakerChange, int32 &loserMatchmakerChange)
|
void ScriptMgr::OnAfterArenaRatingCalculation(Battleground *const bg, int32 &winnerMatchmakerChange, int32 &loserMatchmakerChange, int32 &winnerChange, int32 &loserChange)
|
||||||
{
|
{
|
||||||
FOREACH_SCRIPT(BattlegroundScript)->OnAfterArenaRatingCalculation(bg, winnerMatchmakerChange, loserMatchmakerChange);
|
FOREACH_SCRIPT(FormulaScript)->OnAfterArenaRatingCalculation(bg, winnerMatchmakerChange, loserMatchmakerChange, winnerChange, loserChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
AllMapScript::AllMapScript(const char* name)
|
AllMapScript::AllMapScript(const char* name)
|
||||||
|
|||||||
@@ -287,6 +287,9 @@ class FormulaScript : public ScriptObject
|
|||||||
|
|
||||||
// Called when calculating the experience rate for group experience.
|
// Called when calculating the experience rate for group experience.
|
||||||
virtual void OnGroupRateCalculation(float& /*rate*/, uint32 /*count*/, bool /*isRaid*/) { }
|
virtual void OnGroupRateCalculation(float& /*rate*/, uint32 /*count*/, bool /*isRaid*/) { }
|
||||||
|
|
||||||
|
// Called after calculating arena rating changes
|
||||||
|
virtual void OnAfterArenaRatingCalculation(Battleground *const bg, int32 &winnerMatchmakerChange, int32 &loserMatchmakerChange, int32 &winnerChange, int32 &loserChange) { };
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class TMap> class MapScript : public UpdatableScript<TMap>
|
template<class TMap> class MapScript : public UpdatableScript<TMap>
|
||||||
@@ -599,7 +602,6 @@ class BattlegroundScript : public ScriptObject
|
|||||||
// Should return a fully valid Battleground object for the type ID.
|
// Should return a fully valid Battleground object for the type ID.
|
||||||
virtual Battleground* GetBattleground() const = 0;
|
virtual Battleground* GetBattleground() const = 0;
|
||||||
|
|
||||||
virtual void OnAfterArenaRatingCalculation(Battleground *const bg, int32 &winnerMatchmakerChange, int32 &loserMatchmakerChange) { };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class OutdoorPvPScript : public ScriptObject
|
class OutdoorPvPScript : public ScriptObject
|
||||||
@@ -899,6 +901,7 @@ class PlayerScript : public ScriptObject
|
|||||||
virtual void OnBeforeUpdateAttackPowerAndDamage(Player* /*player*/, float& /*level*/, float& /*val2*/, bool /*ranged*/) { }
|
virtual void OnBeforeUpdateAttackPowerAndDamage(Player* /*player*/, float& /*level*/, float& /*val2*/, bool /*ranged*/) { }
|
||||||
virtual void OnAfterUpdateAttackPowerAndDamage(Player* /*player*/, float& /*level*/, float& /*base_attPower*/, float& /*attPowerMod*/, float& /*attPowerMultiplier*/, bool /*ranged*/) { }
|
virtual void OnAfterUpdateAttackPowerAndDamage(Player* /*player*/, float& /*level*/, float& /*base_attPower*/, float& /*attPowerMod*/, float& /*attPowerMultiplier*/, bool /*ranged*/) { }
|
||||||
|
|
||||||
|
virtual void OnBeforeInitTalentForLevel(Player* /*player*/, uint8& /*level*/, uint32& /*talentPointsForLevel*/) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class GuildScript : public ScriptObject
|
class GuildScript : public ScriptObject
|
||||||
@@ -1053,6 +1056,7 @@ class ScriptMgr
|
|||||||
void OnBaseGainCalculation(uint32& gain, uint8 playerLevel, uint8 mobLevel, ContentLevels content);
|
void OnBaseGainCalculation(uint32& gain, uint8 playerLevel, uint8 mobLevel, ContentLevels content);
|
||||||
void OnGainCalculation(uint32& gain, Player* player, Unit* unit);
|
void OnGainCalculation(uint32& gain, Player* player, Unit* unit);
|
||||||
void OnGroupRateCalculation(float& rate, uint32 count, bool isRaid);
|
void OnGroupRateCalculation(float& rate, uint32 count, bool isRaid);
|
||||||
|
void OnAfterArenaRatingCalculation(Battleground *const bg, int32 &winnerMatchmakerChange, int32 &loserMatchmakerChange, int32 &winnerChange, int32 &loserChange);
|
||||||
|
|
||||||
public: /* MapScript */
|
public: /* MapScript */
|
||||||
|
|
||||||
@@ -1113,8 +1117,6 @@ class ScriptMgr
|
|||||||
|
|
||||||
Battleground* CreateBattleground(BattlegroundTypeId typeId);
|
Battleground* CreateBattleground(BattlegroundTypeId typeId);
|
||||||
|
|
||||||
void OnAfterArenaRatingCalculation(Battleground *const bg, int32 &winnerMatchmakerChange, int32 &loserMatchmakerChange);
|
|
||||||
|
|
||||||
public: /* OutdoorPvPScript */
|
public: /* OutdoorPvPScript */
|
||||||
|
|
||||||
OutdoorPvP* CreateOutdoorPvP(OutdoorPvPData const* data);
|
OutdoorPvP* CreateOutdoorPvP(OutdoorPvPData const* data);
|
||||||
@@ -1216,6 +1218,7 @@ class ScriptMgr
|
|||||||
void OnAfterUpdateMaxHealth(Player* player, float& value);
|
void OnAfterUpdateMaxHealth(Player* player, float& value);
|
||||||
void OnBeforeUpdateAttackPowerAndDamage(Player* player, float& level, float& val2, bool ranged);
|
void OnBeforeUpdateAttackPowerAndDamage(Player* player, float& level, float& val2, bool ranged);
|
||||||
void OnAfterUpdateAttackPowerAndDamage(Player* player, float& level, float& base_attPower, float& attPowerMod, float& attPowerMultiplier, bool ranged);
|
void OnAfterUpdateAttackPowerAndDamage(Player* player, float& level, float& base_attPower, float& attPowerMod, float& attPowerMultiplier, bool ranged);
|
||||||
|
void OnBeforeInitTalentForLevel(Player* player, uint8& level, uint32& talentPointsForLevel);
|
||||||
|
|
||||||
public: /* GuildScript */
|
public: /* GuildScript */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user