diff options
Diffstat (limited to 'src/game/Player.h')
-rw-r--r-- | src/game/Player.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/game/Player.h b/src/game/Player.h index 53358c03817..cac6e889345 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -111,7 +111,7 @@ struct SpellModifier int32 value; flag96 mask; uint32 spellId; - Aura *const ownerAura; + Aura * const ownerAura; }; typedef UNORDERED_MAP<uint32, PlayerTalent*> PlayerTalentMap; @@ -297,6 +297,7 @@ struct RuneInfo uint8 BaseRune; uint8 CurrentRune; uint8 Cooldown; + AuraEffect const * ConvertAura; }; struct Runes @@ -1924,8 +1925,8 @@ class TRINITY_DLL_SPEC Player : public Unit, public GridObject<Player> void _RemoveAllStatBonuses(); void _ApplyWeaponDependentAuraMods(Item *item, WeaponAttackType attackType, bool apply); - void _ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attackType, AuraEffect* aura, bool apply); - void _ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType attackType, AuraEffect* aura, bool apply); + void _ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attackType, AuraEffect const * aura, bool apply); + void _ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType attackType, AuraEffect const * aura, bool apply); void _ApplyItemMods(Item *item,uint8 slot,bool apply); void _RemoveAllItemMods(); @@ -2259,6 +2260,10 @@ class TRINITY_DLL_SPEC Player : public Unit, public GridObject<Player> void SetBaseRune(uint8 index, RuneType baseRune) { m_runes->runes[index].BaseRune = baseRune; } void SetCurrentRune(uint8 index, RuneType currentRune) { m_runes->runes[index].CurrentRune = currentRune; } void SetRuneCooldown(uint8 index, uint8 cooldown) { m_runes->runes[index].Cooldown = cooldown; m_runes->SetRuneState(index, (cooldown == 0) ? true : false); } + void SetRuneConvertAura(uint8 index, AuraEffect const * aura) { m_runes->runes[index].ConvertAura = aura; } + void AddRuneByAuraEffect(uint8 index, RuneType newType, AuraEffect const * aura) { SetRuneConvertAura(index, aura); ConvertRune(index, newType); } + void RemoveRunesByAuraEffect(AuraEffect const * aura); + void RestoreBaseRune(uint8 index); void ConvertRune(uint8 index, RuneType newType); void ResyncRunes(uint8 count); void AddRunePower(uint8 index); @@ -2594,6 +2599,7 @@ template <class T> T Player::ApplySpellMod(uint32 spellId, SpellModOp op, T &bas if(!IsAffectedBySpellmod(spellInfo,mod,spell)) continue; + if (mod->type == SPELLMOD_FLAT) totalflat += mod->value; else if (mod->type == SPELLMOD_PCT) @@ -2611,7 +2617,6 @@ template <class T> T Player::ApplySpellMod(uint32 spellId, SpellModOp op, T &bas DropModCharge(mod, spell); } - float diff = (float)basevalue*(float)totalpct/100.0f + (float)totalflat; basevalue = T((float)basevalue + diff); return T(diff); |