mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-06 14:58:00 +00:00
New hooks OnAfterUpdateMaxPower and OnBeforeRollMeleeOutcomeAgainst
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
|
||||
inline bool _ModifyUInt32(bool apply, uint32& baseValue, int32& amount)
|
||||
{
|
||||
@@ -291,6 +292,8 @@ void Player::UpdateMaxPower(Powers power)
|
||||
|
||||
float bonusPower = (power == POWER_MANA && GetCreatePowers(power) > 0) ? GetManaBonusFromIntellect() : 0;
|
||||
|
||||
sScriptMgr->OnAfterUpdateMaxPower(this, power, bonusPower);
|
||||
|
||||
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreatePowers(power);
|
||||
value *= GetModifierValue(unitMod, BASE_PCT);
|
||||
value += GetModifierValue(unitMod, TOTAL_VALUE) + bonusPower;
|
||||
|
||||
Reference in New Issue
Block a user