mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-17 21:39:52 -04:00
*Use 4 spaces instead of tabs in .cpp and .h files
--HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ class BGQueueInviteEvent : public BasicEvent
|
||||
uint64 m_PlayerGuid;
|
||||
uint32 m_BgInstanceGUID;
|
||||
BattleGroundTypeId m_BgTypeId;
|
||||
uint32 m_RemoveTime;
|
||||
uint32 m_RemoveTime;
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -402,7 +402,7 @@ void GameObject::Update(uint32 /*p_time*/)
|
||||
if (GetGOInfo()->GetAutoCloseTime() && (m_cooldownTime < time(NULL)))
|
||||
ResetDoorOrButton();
|
||||
break;
|
||||
default: break;
|
||||
default: break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
+11
-11
@@ -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; }
|
||||
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 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; }
|
||||
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);
|
||||
|
||||
+2
-2
@@ -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)
|
||||
|
||||
+1
-1
@@ -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()
|
||||
|
||||
+19
-19
@@ -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);
|
||||
|
||||
+3
-3
@@ -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;
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
+19
-19
@@ -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);
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
// 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)
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -852,7 +852,7 @@ struct SpellPeriodicAuraLogInfo
|
||||
|
||||
AuraEffect *auraEff;
|
||||
uint32 damage;
|
||||
uint32 overDamage; // overkill/overheal
|
||||
uint32 overDamage; // overkill/overheal
|
||||
uint32 absorb;
|
||||
uint32 resist;
|
||||
float multiplier;
|
||||
|
||||
Reference in New Issue
Block a user