diff options
author | maximius <none@none> | 2009-09-14 16:48:00 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-09-14 16:48:00 -0700 |
commit | 7349c1d9dd7ff2331d5059595f3e81dfc097f071 (patch) | |
tree | c637055aab5d8f0e733fc611fada42c43ad04d83 /src | |
parent | 4ab8d4a5ddebbb04597ed2c2d1da39d315bc08ef (diff) |
Backed out changeset 60578c781be1
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/BattleGround.cpp | 2 | ||||
-rw-r--r-- | src/game/BattleGroundMgr.h | 2 | ||||
-rw-r--r-- | src/game/GameObject.cpp | 2 | ||||
-rw-r--r-- | src/game/Guild.h | 26 | ||||
-rw-r--r-- | src/game/Map.cpp | 4 | ||||
-rw-r--r-- | src/game/PetAI.cpp | 2 | ||||
-rw-r--r-- | src/game/Player.cpp | 38 | ||||
-rw-r--r-- | src/game/Player.h | 6 | ||||
-rw-r--r-- | src/game/Spell.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 6 | ||||
-rw-r--r-- | src/game/SpellAuras.h | 2 | ||||
-rw-r--r-- | src/game/StatSystem.cpp | 42 | ||||
-rw-r--r-- | src/game/Unit.cpp | 2 | ||||
-rw-r--r-- | src/game/Unit.h | 2 |
14 files changed, 69 insertions, 69 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index e11728b32d3..7163a9874f8 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -1907,5 +1907,5 @@ bool BattleGround::IsTeamScoreInRange(uint32 team, uint32 minScore, uint32 maxSc { BattleGroundTeamId team_idx = GetTeamIndexByTeamId(team); uint32 score = (m_TeamScores[team_idx] < 0) ? 0 : uint32(m_TeamScores[team_idx]); - return score >= minScore && score <= maxScore; + return score >= minScore && score <= maxScore; } diff --git a/src/game/BattleGroundMgr.h b/src/game/BattleGroundMgr.h index c16de449f54..1b07676ddfc 100644 --- a/src/game/BattleGroundMgr.h +++ b/src/game/BattleGroundMgr.h @@ -150,7 +150,7 @@ class BGQueueInviteEvent : public BasicEvent uint64 m_PlayerGuid; uint32 m_BgInstanceGUID; BattleGroundTypeId m_BgTypeId; - uint32 m_RemoveTime; + uint32 m_RemoveTime; }; /* diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index e92fcb70863..18a80ce46fe 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -402,7 +402,7 @@ void GameObject::Update(uint32 /*p_time*/) if (GetGOInfo()->GetAutoCloseTime() && (m_cooldownTime < time(NULL))) ResetDoorOrButton(); break; - default: break; + default: break; } break; } diff --git a/src/game/Guild.h b/src/game/Guild.h index bf8e810839b..7a715be8911 100644 --- a/src/game/Guild.h +++ b/src/game/Guild.h @@ -297,19 +297,19 @@ class Guild uint32 GetId(){ return m_Id; } const uint64& GetLeader(){ return m_LeaderGuid; } - std::string const& GetName() const { return m_Name; } - std::string const& GetMOTD() const { return MOTD; } - std::string const& GetGINFO() const { return GINFO; } - - uint32 GetCreatedYear() const { return m_CreatedYear; } - uint32 GetCreatedMonth() const { return m_CreatedMonth; } - uint32 GetCreatedDay() const { return m_CreatedDay; } - - uint32 GetEmblemStyle() const { return m_EmblemStyle; } - uint32 GetEmblemColor() const { return m_EmblemColor; } - uint32 GetBorderStyle() const { return m_BorderStyle; } - uint32 GetBorderColor() const { return m_BorderColor; } - uint32 GetBackgroundColor() const { return m_BackgroundColor; } + std::string const& GetName() const { return m_Name; } + std::string const& GetMOTD() const { return MOTD; } + std::string const& GetGINFO() const { return GINFO; } + + uint32 GetCreatedYear() const { return m_CreatedYear; } + uint32 GetCreatedMonth() const { return m_CreatedMonth; } + uint32 GetCreatedDay() const { return m_CreatedDay; } + + uint32 GetEmblemStyle() const { return m_EmblemStyle; } + uint32 GetEmblemColor() const { return m_EmblemColor; } + uint32 GetBorderStyle() const { return m_BorderStyle; } + uint32 GetBorderColor() const { return m_BorderColor; } + uint32 GetBackgroundColor() const { return m_BackgroundColor; } void SetLeader(uint64 guid); bool AddMember(uint64 plGuid, uint32 plRank); diff --git a/src/game/Map.cpp b/src/game/Map.cpp index ad322868c61..2fba8c37d2c 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -1870,8 +1870,8 @@ uint16 Map::GetAreaFlag(float x, float y, float z) const // Makers' Overlook (ground and cave) else if (x > 5634.48f && x < 5774.53f && y < 3475.0f && z > 300.0f) { - if(y > 3380.26f || y > 3265.0f && z < 360.0f) - areaflag = 2187; + if(y > 3380.26f || y > 3265.0f && z < 360.0f) + areaflag = 2187; } break; // The Makers' Perch (underground) diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp index d78872a1432..bf368001cc1 100644 --- a/src/game/PetAI.cpp +++ b/src/game/PetAI.cpp @@ -300,7 +300,7 @@ void PetAI::AttackStart(Unit *target) DoAttack(target,true); // STAY or FOLLOW, player clicked "attack" so attack with chase else DoAttack(target,false); // STAY, target in range, attack not clicked so attack without chase - } + } } Unit *PetAI::SelectNextTarget() diff --git a/src/game/Player.cpp b/src/game/Player.cpp index f50ac604d8f..b1b27b2dda1 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -448,7 +448,7 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa m_baseSpellPower = 0; m_baseFeralAP = 0; m_baseManaRegen = 0; - m_armorPenetrationPct = 0.0f; + m_armorPenetrationPct = 0.0f; // Honor System m_lastHonorUpdateTime = time(NULL); @@ -2398,8 +2398,8 @@ bool Player::IsGroupVisibleFor(Player* p) const bool Player::IsInSameGroupWith(Player const* p) const { - return (p==this || (GetGroup() != NULL && - GetGroup()->SameSubGroup((Player*)this, (Player*)p))); + return (p==this || (GetGroup() != NULL && + GetGroup()->SameSubGroup((Player*)this, (Player*)p))); } ///- If the player is invited, remove him. If the group if then only 1 person, disband the group. @@ -10996,15 +10996,15 @@ Item* Player::EquipItem( uint16 pos, Item *pItem, bool update ) // update expertise and armor penetration - passive auras may need it if( slot == EQUIPMENT_SLOT_MAINHAND ) - { + { UpdateExpertise(BASE_ATTACK); - UpdateArmorPenetration(); - } + UpdateArmorPenetration(); + } else if( slot == EQUIPMENT_SLOT_OFFHAND ) - { + { UpdateExpertise(OFF_ATTACK); - UpdateArmorPenetration(); - } + UpdateArmorPenetration(); + } switch(slot) { @@ -11154,13 +11154,13 @@ void Player::RemoveItem( uint8 bag, uint8 slot, bool update ) } UpdateExpertise(BASE_ATTACK); - UpdateArmorPenetration(); + UpdateArmorPenetration(); } else if( slot == EQUIPMENT_SLOT_OFFHAND ) - { + { UpdateExpertise(OFF_ATTACK); - UpdateArmorPenetration(); - } + UpdateArmorPenetration(); + } // update armor penetration - passive auras may need it switch(slot) { @@ -11290,15 +11290,15 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update ) } if( slot == EQUIPMENT_SLOT_MAINHAND ) - { + { UpdateExpertise(BASE_ATTACK); - UpdateArmorPenetration(); - } + UpdateArmorPenetration(); + } else if( slot == EQUIPMENT_SLOT_OFFHAND ) - { + { UpdateExpertise(OFF_ATTACK); - UpdateArmorPenetration(); - } + UpdateArmorPenetration(); + } // equipment visual show SetVisibleItemSlot(slot, NULL); diff --git a/src/game/Player.h b/src/game/Player.h index 8557e9c0e81..449e0be40e8 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1699,7 +1699,7 @@ class MANGOS_DLL_SPEC Player : public Unit void UpdateSpellCritChance(uint32 school); void UpdateArmorPenetration(int32 amount); void UpdateExpertise(WeaponAttackType attType); - void UpdateArmorPenetration(); + void UpdateArmorPenetration(); void ApplyManaRegenBonus(int32 amount, bool apply); void UpdateManaRegen(); @@ -1866,7 +1866,7 @@ class MANGOS_DLL_SPEC Player : public Unit float GetTotalPercentageModValue(BaseModGroup modGroup) const { return m_auraBaseMod[modGroup][FLAT_MOD] + m_auraBaseMod[modGroup][PCT_MOD]; } void _ApplyAllStatBonuses(); void _RemoveAllStatBonuses(); - float GetArmorPenetrationPct() const { return m_armorPenetrationPct; } + float GetArmorPenetrationPct() const { return m_armorPenetrationPct; } void _ApplyWeaponDependentAuraMods(Item *item, WeaponAttackType attackType, bool apply); void _ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attackType, AuraEffect* aura, bool apply); @@ -2355,7 +2355,7 @@ Spell * m_spellModTakingSpell; uint16 m_baseSpellPower; uint16 m_baseFeralAP; uint16 m_baseManaRegen; - float m_armorPenetrationPct; + float m_armorPenetrationPct; SpellModList m_spellMods[MAX_SPELLMOD]; uint32 m_pad; diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index b214ce5067b..fbe5bce42d7 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5363,7 +5363,7 @@ SpellCastResult Spell::CheckCasterAuras() const else if ( m_spellInfo->PreventionType==SPELL_PREVENTION_TYPE_SILENCE) return SPELL_FAILED_SILENCED; break; - default: break; + default: break; } } } diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 510c14c943b..e9027764b7d 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -7000,8 +7000,8 @@ bool AuraEffect::IsPeriodicTickCrit(Unit const * pCaster) const void Aura::HandleModTargetArmorPct(bool apply, bool Real) { - if(m_target->GetTypeId() != TYPEID_PLAYER) - return; + if(m_target->GetTypeId() != TYPEID_PLAYER) + return; - ((Player*)m_target)->UpdateArmorPenetration(); + ((Player*)m_target)->UpdateArmorPenetration(); } diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index 0577690feef..1c5c485291b 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -333,7 +333,7 @@ class TRINITY_DLL_SPEC AuraEffect void HandleAuraCloneCaster(bool Apply, bool Real, bool changeAmount); void HandleAuraModCritPct(bool Apply, bool Real, bool changeAmount); void HandleAuraLinked(bool Apply, bool Real, bool changeAmount); - void HandleModTargetArmorPct(bool Apply, bool Real); + void HandleModTargetArmorPct(bool Apply, bool Real); void HandleAuraEffectSpecificMods(bool apply, bool Real, bool changeAmount); int32 CalculateCrowdControlAuraAmount(Unit * caster); diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index 3fb46703f9d..a55f0bb47c3 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -151,7 +151,7 @@ bool Player::UpdateAllStats() UpdateAllSpellCritChances(); UpdateDefenseBonusesMod(); UpdateShieldBlockValue(); - UpdateArmorPenetration(); + UpdateArmorPenetration(); UpdateSpellDamageAndHealingBonus(); UpdateManaRegen(); UpdateExpertise(BASE_ATTACK); @@ -689,26 +689,26 @@ void Player::UpdateExpertise(WeaponAttackType attack) void Player::UpdateArmorPenetration() { - m_armorPenetrationPct = GetRatingBonusValue(CR_ARMOR_PENETRATION); - - AuraList const& armorAuras = GetAurasByType(SPELL_AURA_MOD_TARGET_ARMOR_PCT); - for(AuraList::const_iterator itr = armorAuras.begin(); itr != armorAuras.end(); ++itr) - { - // affects all weapons - if((*itr)->GetSpellProto()->EquippedItemClass == -1) - { - m_armorPenetrationPct += (*itr)->GetModifier()->m_amount; - continue; - } - - // dependent on weapon class - for(uint8 i = 0; i < MAX_ATTACK; ++i) - { - Item *weapon = GetWeaponForAttack(WeaponAttackType(i)); - if(weapon && weapon->IsFitToSpellRequirements((*itr)->GetSpellProto())) - m_armorPenetrationPct += (*itr)->GetModifier()->m_amount; - } - } + m_armorPenetrationPct = GetRatingBonusValue(CR_ARMOR_PENETRATION); + + AuraList const& armorAuras = GetAurasByType(SPELL_AURA_MOD_TARGET_ARMOR_PCT); + for(AuraList::const_iterator itr = armorAuras.begin(); itr != armorAuras.end(); ++itr) + { + // affects all weapons + if((*itr)->GetSpellProto()->EquippedItemClass == -1) + { + m_armorPenetrationPct += (*itr)->GetModifier()->m_amount; + continue; + } + + // dependent on weapon class + for(uint8 i = 0; i < MAX_ATTACK; ++i) + { + Item *weapon = GetWeaponForAttack(WeaponAttackType(i)); + if(weapon && weapon->IsFitToSpellRequirements((*itr)->GetSpellProto())) + m_armorPenetrationPct += (*itr)->GetModifier()->m_amount; + } + } } void Player::ApplyManaRegenBonus(int32 amount, bool apply) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index b59fb9839f6..5fec651dd47 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1673,7 +1673,7 @@ uint32 Unit::CalcArmorReducedDamage(Unit* pVictim, const uint32 damage, SpellEnt // Apply Player CR_ARMOR_PENETRATION rating and percent talents if (GetTypeId()==TYPEID_PLAYER) - armor *= 1.0f - ((Player*)this)->GetArmorPenetrationPct() / 100.0f; + armor *= 1.0f - ((Player*)this)->GetArmorPenetrationPct() / 100.0f; // Ignore enemy armor by SPELL_AURA_MOD_TARGET_ARMOR_PCT //armor *= 1.0f - GetTotalAuraModifier(SPELL_AURA_MOD_ARMOR_PENETRATION_PCT) / 100.0f; diff --git a/src/game/Unit.h b/src/game/Unit.h index f8a94c3b678..566c2fb6a1b 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -852,7 +852,7 @@ struct SpellPeriodicAuraLogInfo AuraEffect *auraEff; uint32 damage; - uint32 overDamage; // overkill/overheal + uint32 overDamage; // overkill/overheal uint32 absorb; uint32 resist; float multiplier; |