diff options
author | QAston <none@none> | 2009-08-08 16:18:05 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-08-08 16:18:05 +0200 |
commit | 6b4772207fc4a6af1c9942d0057b9005aa38452e (patch) | |
tree | 84c2cdf2b9b44623e2e12839dd9f59502fb1c8c3 /src/game/Player.cpp | |
parent | 08f1421ae187e43c3d5060f6a467d5b861159823 (diff) |
*Cleanups, remove obsolete code and minor optimizations in spellauras.cpp and spelleffects.cpp
*Remove GetDummyAura(uint32 spellid) function - it is faster to use GetAuraEffect or GetAura if id is known than iterate threw dummy auras list
*Move Death Strike code from HandleDummyAuraProc to Spell::EffectDummy - original patch by hununza.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index ed2f79f4b38..a02190d4b69 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -6115,7 +6115,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor, bool pvpt } // 'Inactive' this aura prevents the player from gaining honor points and battleground tokens - if(GetDummyAura(SPELL_AURA_PLAYER_INACTIVE)) + if(HasAura(SPELL_AURA_PLAYER_INACTIVE)) return false; uint64 victim_guid = 0; @@ -10534,7 +10534,7 @@ uint8 Player::CanUseAmmo( uint32 item ) const return EQUIP_ERR_CANT_EQUIP_LEVEL_I; // Requires No Ammo - if(GetDummyAura(46699)) + if(HasAura(46699)) return EQUIP_ERR_BAG_FULL6; return EQUIP_ERR_OK; @@ -18515,7 +18515,7 @@ void Player::LeaveBattleground(bool teleportToEntryPoint) bool Player::CanJoinToBattleground() const { // check Deserter debuff - if(GetDummyAura(26013)) + if(HasAura(26013)) return false; return true; @@ -20701,7 +20701,7 @@ void Player::HandleFall(MovementInfo const& movementInfo) damage = GetMaxHealth(); // Gust of Wind - if (GetDummyAura(43621)) + if (HasAura(43621)) damage = GetMaxHealth()/2; EnvironmentalDamage(DAMAGE_FALL, damage); |