mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Code Style (game + scripts only):
"!=" --> " != " (when needed) " !=" --> " !=" "!= " --> "!= " --HG-- branch : trunk
This commit is contained in:
@@ -856,7 +856,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
||||
void Unit::CastStop(uint32 except_spellid)
|
||||
{
|
||||
for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; i++)
|
||||
if (m_currentSpells[i] && m_currentSpells[i]->m_spellInfo->Id!=except_spellid)
|
||||
if (m_currentSpells[i] && m_currentSpells[i]->m_spellInfo->Id != except_spellid)
|
||||
InterruptSpell(CurrentSpellTypes(i),false);
|
||||
}
|
||||
|
||||
@@ -4257,7 +4257,7 @@ void Unit::RemoveAreaAurasDueToLeaveWorld()
|
||||
// remove area auras owned by others
|
||||
for (AuraApplicationMap::iterator iter = m_appliedAuras.begin(); iter != m_appliedAuras.end();)
|
||||
{
|
||||
if (iter->second->GetBase()->GetOwner()!=this)
|
||||
if (iter->second->GetBase()->GetOwner() != this)
|
||||
{
|
||||
RemoveAura(iter);
|
||||
cleanRun = false;
|
||||
@@ -4401,7 +4401,7 @@ AuraEffect* Unit::GetAuraEffect(AuraType type, SpellFamilyNames family, uint32 f
|
||||
SpellEntry const *spell = (*i)->GetSpellProto();
|
||||
if (spell->SpellFamilyName == family && spell->SpellFamilyFlags.HasFlag(familyFlag1, familyFlag2, familyFlag3))
|
||||
{
|
||||
if (casterGUID && (*i)->GetCasterGUID()!=casterGUID)
|
||||
if (casterGUID && (*i)->GetCasterGUID() != casterGUID)
|
||||
continue;
|
||||
return (*i);
|
||||
}
|
||||
@@ -4414,7 +4414,7 @@ AuraApplication * Unit::GetAuraApplication(uint32 spellId, uint64 casterGUID, ui
|
||||
for (AuraApplicationMap::const_iterator itr = m_appliedAuras.lower_bound(spellId); itr != m_appliedAuras.upper_bound(spellId); ++itr)
|
||||
{
|
||||
Aura const * aura = itr->second->GetBase();
|
||||
if (((aura->GetEffectMask() & reqEffMask) == reqEffMask) && (!casterGUID || aura->GetCasterGUID() == casterGUID) && (!except || except!=itr->second))
|
||||
if (((aura->GetEffectMask() & reqEffMask) == reqEffMask) && (!casterGUID || aura->GetCasterGUID() == casterGUID) && (!except || except != itr->second))
|
||||
return itr->second;
|
||||
}
|
||||
return NULL;
|
||||
@@ -5109,7 +5109,7 @@ bool Unit::HandleHasteAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
}
|
||||
|
||||
// default case
|
||||
if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target!=this && !target->isAlive()))
|
||||
if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
|
||||
return false;
|
||||
|
||||
if (cooldown && GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->HasSpellCooldown(triggered_spell_id))
|
||||
@@ -5171,7 +5171,7 @@ bool Unit::HandleSpellCritChanceAuraProc(Unit *pVictim, uint32 /*damage*/, AuraE
|
||||
}
|
||||
|
||||
// default case
|
||||
if (!target || target!=this && !target->isAlive())
|
||||
if (!target || target != this && !target->isAlive())
|
||||
return false;
|
||||
|
||||
if (cooldown && GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->HasSpellCooldown(triggered_spell_id))
|
||||
@@ -5638,7 +5638,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
// Hot Streak
|
||||
if (dummySpell->SpellIconID == 2999)
|
||||
{
|
||||
if (effIndex!=0)
|
||||
if (effIndex != 0)
|
||||
return false;
|
||||
AuraEffect *counter = triggeredByAura->GetBase()->GetEffect(1);
|
||||
if (!counter)
|
||||
@@ -6001,7 +6001,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
if (!pVictim || !pVictim->isAlive())
|
||||
return false;
|
||||
|
||||
if (effIndex!=0)
|
||||
if (effIndex != 0)
|
||||
return false;
|
||||
|
||||
// pVictim is caster of aura
|
||||
@@ -6455,7 +6455,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
// Seal of Righteousness - melee proc dummy (addition ${$MWS*(0.022*$AP+0.044*$SPH)} damage)
|
||||
if (dummySpell->SpellFamilyFlags[0]&0x8000000)
|
||||
{
|
||||
if (effIndex!=0)
|
||||
if (effIndex != 0)
|
||||
return false;
|
||||
triggered_spell_id = 25742;
|
||||
float ap = GetTotalAttackPowerValue(BASE_ATTACK);
|
||||
@@ -6814,7 +6814,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
// Windfury Weapon (Passive) 1-5 Ranks
|
||||
case 33757:
|
||||
{
|
||||
if (GetTypeId()!=TYPEID_PLAYER || !castItem || !castItem->IsEquipped() || !pVictim || !pVictim->isAlive())
|
||||
if (GetTypeId() != TYPEID_PLAYER || !castItem || !castItem->IsEquipped() || !pVictim || !pVictim->isAlive())
|
||||
return false;
|
||||
|
||||
// custom cooldown processing case
|
||||
@@ -7000,7 +7000,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
// Flametongue Weapon (Passive)
|
||||
if (dummySpell->SpellFamilyFlags[0] & 0x200000)
|
||||
{
|
||||
if (GetTypeId()!=TYPEID_PLAYER || !pVictim || !pVictim->isAlive() || !castItem || !castItem->IsEquipped())
|
||||
if (GetTypeId() != TYPEID_PLAYER || !pVictim || !pVictim->isAlive() || !castItem || !castItem->IsEquipped())
|
||||
return false;
|
||||
|
||||
// firehit = dummySpell->EffectBasePoints[0] / ((4*19.25) * 1.3);
|
||||
@@ -7181,7 +7181,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
if (dummySpell->Id == 49028)
|
||||
{
|
||||
// 1 dummy aura for dismiss rune blade
|
||||
if (effIndex!=2)
|
||||
if (effIndex != 2)
|
||||
return false;
|
||||
uint64 PetGUID = NULL;
|
||||
for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr) //Find Rune Weapon
|
||||
@@ -7422,7 +7422,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
|
||||
}
|
||||
|
||||
// default case
|
||||
if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target!=this && !target->isAlive()))
|
||||
if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
|
||||
return false;
|
||||
|
||||
if (cooldown && GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->HasSpellCooldown(triggered_spell_id))
|
||||
@@ -7481,7 +7481,7 @@ bool Unit::HandleObsModEnergyAuraProc(Unit *pVictim, uint32 damage, AuraEffect*
|
||||
}
|
||||
|
||||
// default case
|
||||
if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target!=this && !target->isAlive()))
|
||||
if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
|
||||
return false;
|
||||
|
||||
if (cooldown && GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->HasSpellCooldown(triggered_spell_id))
|
||||
@@ -7538,7 +7538,7 @@ bool Unit::HandleModDamagePctTakenAuraProc(Unit *pVictim, uint32 damage, AuraEff
|
||||
}
|
||||
|
||||
// default case
|
||||
if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target!=this && !target->isAlive()))
|
||||
if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
|
||||
return false;
|
||||
|
||||
if (cooldown && GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->HasSpellCooldown(triggered_spell_id))
|
||||
@@ -8277,7 +8277,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
|
||||
// Enlightenment (trigger only from mana cost spells)
|
||||
case 35095:
|
||||
{
|
||||
if (!procSpell || procSpell->powerType!=POWER_MANA || procSpell->manaCost == 0 && procSpell->ManaCostPercentage == 0 && procSpell->manaCostPerlevel == 0)
|
||||
if (!procSpell || procSpell->powerType != POWER_MANA || procSpell->manaCost == 0 && procSpell->ManaCostPercentage == 0 && procSpell->manaCostPerlevel == 0)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
@@ -8386,7 +8386,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
|
||||
target = !(procFlags & (PROC_FLAG_SUCCESSFUL_POSITIVE_MAGIC_SPELL | PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL_HIT)) && IsPositiveSpell(trigger_spell_id) ? this : pVictim;
|
||||
|
||||
// default case
|
||||
if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target!=this && !target->isAlive()))
|
||||
if ((!target && !spellmgr.IsSrcTargetSpell(triggerEntry)) || (target && target != this && !target->isAlive()))
|
||||
return false;
|
||||
|
||||
if (basepoints0)
|
||||
@@ -8416,21 +8416,21 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, uint32 damage, AuraE
|
||||
{
|
||||
case 836: // Improved Blizzard (Rank 1)
|
||||
{
|
||||
if (!procSpell || procSpell->SpellVisual[0]!=9487)
|
||||
if (!procSpell || procSpell->SpellVisual[0] != 9487)
|
||||
return false;
|
||||
triggered_spell_id = 12484;
|
||||
break;
|
||||
}
|
||||
case 988: // Improved Blizzard (Rank 2)
|
||||
{
|
||||
if (!procSpell || procSpell->SpellVisual[0]!=9487)
|
||||
if (!procSpell || procSpell->SpellVisual[0] != 9487)
|
||||
return false;
|
||||
triggered_spell_id = 12485;
|
||||
break;
|
||||
}
|
||||
case 989: // Improved Blizzard (Rank 3)
|
||||
{
|
||||
if (!procSpell || procSpell->SpellVisual[0]!=9487)
|
||||
if (!procSpell || procSpell->SpellVisual[0] != 9487)
|
||||
return false;
|
||||
triggered_spell_id = 12486;
|
||||
break;
|
||||
@@ -9531,7 +9531,7 @@ Unit* Unit::GetNextRandomRaidMemberOrPet(float radius)
|
||||
if (!pGroup)
|
||||
{
|
||||
// We are pet now, return owner
|
||||
if (player!=this)
|
||||
if (player != this)
|
||||
return IsWithinDistInMap(player, radius) ? player : NULL;
|
||||
Unit * pet = GetGuardianPet();
|
||||
//No pet, no group, nothing to return
|
||||
@@ -9862,7 +9862,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
|
||||
// Get stack of Holy Vengeance/Blood Corruption on the target added by caster
|
||||
uint32 stacks = 0;
|
||||
Unit::AuraEffectList const& auras = pVictim->GetAuraEffectsByType(SPELL_AURA_PERIODIC_DAMAGE);
|
||||
for (Unit::AuraEffectList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
|
||||
for (Unit::AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||
if (((*itr)->GetId() == 31803 || (*itr)->GetId() == 53742) && (*itr)->GetCasterGUID() == GetGUID())
|
||||
{
|
||||
stacks = (*itr)->GetBase()->GetStackAmount();
|
||||
@@ -10452,7 +10452,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
|
||||
for (AuraApplicationMap::const_iterator itr = victimAuras.begin(); itr != victimAuras.end(); ++itr)
|
||||
{
|
||||
Aura const * aura = itr->second->GetBase();
|
||||
if (aura->GetCasterGUID()!=GetGUID())
|
||||
if (aura->GetCasterGUID() != GetGUID())
|
||||
continue;
|
||||
SpellEntry const* m_spell = aura->GetSpellProto();
|
||||
if (m_spell->SpellFamilyName != SPELLFAMILY_DRUID ||
|
||||
@@ -10939,7 +10939,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage, WeaponAttackType att
|
||||
if ((*i)->GetMiscValue() & GetMeleeDamageSchoolMask())
|
||||
TakenFlatBenefit += (*i)->GetAmount();
|
||||
|
||||
if (attType!=RANGED_ATTACK)
|
||||
if (attType != RANGED_ATTACK)
|
||||
TakenFlatBenefit += pVictim->GetTotalAuraModifier(SPELL_AURA_MOD_MELEE_DAMAGE_TAKEN);
|
||||
else
|
||||
TakenFlatBenefit += pVictim->GetTotalAuraModifier(SPELL_AURA_MOD_RANGED_DAMAGE_TAKEN);
|
||||
@@ -11092,7 +11092,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage, WeaponAttackType att
|
||||
if (pVictim->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, spellProto, this))
|
||||
{
|
||||
AuraEffect* eff0 = (*i)->GetBase()->GetEffect(0);
|
||||
if (!eff0 || (*i)->GetEffIndex()!=1)
|
||||
if (!eff0 || (*i)->GetEffIndex() != 1)
|
||||
{
|
||||
sLog.outError("Spell structure of DD (%u) changed.",(*i)->GetId());
|
||||
continue;
|
||||
@@ -12973,9 +12973,9 @@ uint32 Unit::GetCreatePowers(Powers power) const
|
||||
{
|
||||
case POWER_MANA: return GetCreateMana();
|
||||
case POWER_RAGE: return 1000;
|
||||
case POWER_FOCUS: return (GetTypeId() == TYPEID_PLAYER || !((Creature const*)this)->isPet() || ((Pet const*)this)->getPetType()!=HUNTER_PET ? 0 : 100);
|
||||
case POWER_FOCUS: return (GetTypeId() == TYPEID_PLAYER || !((Creature const*)this)->isPet() || ((Pet const*)this)->getPetType() != HUNTER_PET ? 0 : 100);
|
||||
case POWER_ENERGY: return 100;
|
||||
case POWER_HAPPINESS: return (GetTypeId() == TYPEID_PLAYER || !((Creature const*)this)->isPet() || ((Pet const*)this)->getPetType()!=HUNTER_PET ? 0 : 1050000);
|
||||
case POWER_HAPPINESS: return (GetTypeId() == TYPEID_PLAYER || !((Creature const*)this)->isPet() || ((Pet const*)this)->getPetType() != HUNTER_PET ? 0 : 1050000);
|
||||
case POWER_RUNIC_POWER: return 1000;
|
||||
case POWER_RUNE: return 0;
|
||||
case POWER_HEALTH: return 0;
|
||||
|
||||
Reference in New Issue
Block a user