aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobmaps <spambot42@yandex.ru>2011-07-15 07:12:54 +0700
committertobmaps <spambot42@yandex.ru>2011-07-15 07:12:54 +0700
commit944fb4c1b77ca2a021c135100219fdc2bc62f0a8 (patch)
tree4a4ad7e194bc8d5aefe1fcef3e9f9b9ca48127c5
parent26b3f00dac39b44e00fc1b2dfc9109c517284bd3 (diff)
Core/Misc: Minor cleanup and code style fix
-rwxr-xr-xsrc/server/game/Spells/Auras/SpellAuraEffects.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 5200738fca4..a59ce6e7f32 100755
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -420,7 +420,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
if (!amount && caster)
if (uint64 itemGUID = GetBase()->GetCastItemGUID())
if (Player* playerCaster = caster->ToPlayer())
- if (Item *castItem = playerCaster->GetItemByGuid(itemGUID))
+ if (Item* castItem = playerCaster->GetItemByGuid(itemGUID))
if (castItem->GetItemSuffixFactor())
{
ItemRandomSuffixEntry const* item_rand_suffix = sItemRandomSuffixStore.LookupEntry(abs(castItem->GetItemRandomPropertyId()));
@@ -523,7 +523,7 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
float bonus = 0.8068f;
// Borrowed Time
- if (AuraEffect const* pAurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_PRIEST, 2899, 1))
+ if (AuraEffect const* pAurEff = caster->GetDummyAuraEffect(SPELLFAMILY_PRIEST, 2899, 1))
bonus += CalculatePctN(1.0f, pAurEff->GetAmount());
DoneActualBenefit += caster->SpellBaseHealingBonus(GetSpellSchoolMask(m_spellProto)) * bonus;
@@ -1026,7 +1026,7 @@ void AuraEffect::HandleEffect(AuraApplication * aurApp, uint8 mode, bool apply)
void AuraEffect::HandleEffect(Unit* target, uint8 mode, bool apply)
{
- AuraApplication * aurApp = GetBase()->GetApplicationOfTarget(target->GetGUID());
+ AuraApplication* aurApp = GetBase()->GetApplicationOfTarget(target->GetGUID());
ASSERT(aurApp);
HandleEffect(aurApp, mode, apply);
}
@@ -1054,7 +1054,7 @@ void AuraEffect::ApplySpellMod(Unit* target, bool apply)
Unit::AuraApplicationMap & auras = target->GetAppliedAuras();
for (Unit::AuraApplicationMap::iterator iter = auras.begin(); iter != auras.end(); ++iter)
{
- Aura * aura = iter->second->GetBase();
+ Aura* aura = iter->second->GetBase();
// only passive auras-active auras should have amount set on spellcast and not be affected
// if aura is casted by others, it will not be affected
if ((aura->IsPassive() || aura->GetSpellProto()->AttributesEx2 & SPELL_ATTR2_ALWAYS_APPLY_MODIFIERS) && aura->GetCasterGUID() == guid && sSpellMgr->IsAffectedByMod(aura->GetSpellProto(), m_spellmod))
@@ -1063,23 +1063,23 @@ void AuraEffect::ApplySpellMod(Unit* target, bool apply)
{
for (uint8 i = 0; i<MAX_SPELL_EFFECTS; ++i)
{
- if (AuraEffect * aurEff = aura->GetEffect(i))
+ if (AuraEffect* aurEff = aura->GetEffect(i))
aurEff->RecalculateAmount();
}
}
else if (GetMiscValue() == SPELLMOD_EFFECT1)
{
- if (AuraEffect * aurEff = aura->GetEffect(0))
+ if (AuraEffect* aurEff = aura->GetEffect(0))
aurEff->RecalculateAmount();
}
else if (GetMiscValue() == SPELLMOD_EFFECT2)
{
- if (AuraEffect * aurEff = aura->GetEffect(1))
+ if (AuraEffect* aurEff = aura->GetEffect(1))
aurEff->RecalculateAmount();
}
else //if (modOp == SPELLMOD_EFFECT3)
{
- if (AuraEffect * aurEff = aura->GetEffect(2))
+ if (AuraEffect* aurEff = aura->GetEffect(2))
aurEff->RecalculateAmount();
}
}
@@ -1152,7 +1152,7 @@ void AuraEffect::UpdatePeriodic(Unit* caster)
if (!caster || caster->GetTypeId() != TYPEID_PLAYER)
return;
// Get SPELL_AURA_MOD_POWER_REGEN aura from spell
- if (AuraEffect * aurEff = GetBase()->GetEffect(0))
+ if (AuraEffect* aurEff = GetBase()->GetEffect(0))
{
if (aurEff->GetAuraType() != SPELL_AURA_MOD_POWER_REGEN)
{
@@ -1205,7 +1205,7 @@ void AuraEffect::UpdatePeriodic(Unit* caster)
break;
case 66823: case 67618: case 67619: case 67620: // Paralytic Toxin
// Get 0 effect aura
- if (AuraEffect *slow = GetBase()->GetEffect(0))
+ if (AuraEffect* slow = GetBase()->GetEffect(0))
{
int32 newAmount = slow->GetAmount() - 10;
if (newAmount < -100)
@@ -1226,7 +1226,7 @@ void AuraEffect::UpdatePeriodic(Unit* caster)
if (GetSpellProto()->SpellFamilyFlags[1] & 0x00004000)
{
// Get 0 effect aura
- if (AuraEffect *slow = GetBase()->GetEffect(0))
+ if (AuraEffect* slow = GetBase()->GetEffect(0))
{
int32 newAmount = slow->GetAmount() + GetAmount();
if (newAmount > 0)
@@ -2008,7 +2008,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
{
// get furor proc chance
uint32 FurorChance = 0;
- if (AuraEffect const *dummy = target->GetDummyAuraEffect(SPELLFAMILY_DRUID, 238, 0))
+ if (AuraEffect const* dummy = target->GetDummyAuraEffect(SPELLFAMILY_DRUID, 238, 0))
FurorChance = std::max(dummy->GetAmount(), 0);
switch (GetMiscValue())
@@ -2117,7 +2117,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
if (target->getClass() == CLASS_DRUID)
{
// Dash
- if (AuraEffect * aurEff =target->GetAuraEffect(SPELL_AURA_MOD_INCREASE_SPEED, SPELLFAMILY_DRUID, 0, 0, 0x8))
+ if (AuraEffect* aurEff = target->GetAuraEffect(SPELL_AURA_MOD_INCREASE_SPEED, SPELLFAMILY_DRUID, 0, 0, 0x8))
aurEff->RecalculateAmount();
// Disarm handling
@@ -2125,7 +2125,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
// and also HandleAuraModDisarm is not triggered
if (!target->CanUseAttackType(BASE_ATTACK))
{
- if (Item *pItem = target->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND))
+ if (Item* pItem = target->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND))
{
target->ToPlayer()->_ApplyWeaponDamage(EQUIPMENT_SLOT_MAINHAND, pItem->GetTemplate(), NULL, apply);
}
@@ -2561,7 +2561,7 @@ void AuraEffect::HandleAuraModDisarm(AuraApplication const* aurApp, uint8 mode,
// Handle damage modification, shapeshifted druids are not affected
if (target->GetTypeId() == TYPEID_PLAYER && !target->IsInFeralForm())
{
- if (Item *pItem = target->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
+ if (Item* pItem = target->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, slot))
{
uint8 attacktype = Player::GetAttackBySlot(slot);
@@ -2770,7 +2770,7 @@ void AuraEffect::HandleAuraModPetTalentsPoints(AuraApplication const* aurApp, ui
return;
// Recalculate pet talent points
- if (Pet *pet = target->ToPlayer()->GetPet())
+ if (Pet* pet = target->ToPlayer()->GetPet())
pet->InitTalentForLevel();
}
@@ -3449,7 +3449,7 @@ void AuraEffect::HandleAuraModEffectImmunity(AuraApplication const* aurApp, uint
{
if (target->ToPlayer()->InBattleground())
{
- if (Battleground *bg = target->ToPlayer()->GetBattleground())
+ if (Battleground* bg = target->ToPlayer()->GetBattleground())
bg->EventPlayerDroppedFlag(target->ToPlayer());
}
else
@@ -4650,7 +4650,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
return;
// ..while they are casting
if (target->IsNonMeleeSpellCasted(false, false, true, false, false))
- if (AuraEffect * aurEff = caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARRIOR, 2775, 0))
+ if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARRIOR, 2775, 0))
switch (aurEff->GetId())
{
// Unrelenting Assault, rank 1
@@ -4684,8 +4684,8 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
target->CastSpell(target, 34027, true, NULL, this);
// set 3 stacks and 3 charges (to make all auras not disappear at once)
- Aura * owner_aura = target->GetAura(34027, GetCasterGUID());
- Aura * pet_aura = pet->GetAura(58914, GetCasterGUID());
+ Aura* owner_aura = target->GetAura(34027, GetCasterGUID());
+ Aura* pet_aura = pet->GetAura(58914, GetCasterGUID());
if (owner_aura)
{
owner_aura->SetStackAmount(owner_aura->GetSpellProto()->StackAmount);
@@ -4719,7 +4719,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
{
target->CastSpell(target, 55166, true, NULL, this);
// set 3 stacks and 3 charges (to make all auras not disappear at once)
- Aura * owner_aura = target->GetAura(55166, GetCasterGUID());
+ Aura* owner_aura = target->GetAura(55166, GetCasterGUID());
if (owner_aura)
{
// This aura lasts 2 sec, need this hack to properly proc spells
@@ -4766,7 +4766,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
break;
case 49028:
if (caster)
- if (AuraEffect *aurEff = caster->GetAuraEffect(63330, 0)) // glyph of Dancing Rune Weapon
+ if (AuraEffect* aurEff = caster->GetAuraEffect(63330, 0)) // glyph of Dancing Rune Weapon
GetBase()->SetDuration(GetBase()->GetDuration() + aurEff->GetAmount());
break;
case 52916: // Honor Among Thieves
@@ -4848,7 +4848,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
case 2584: // Waiting to Resurrect
// Waiting to resurrect spell cancel, we must remove player from resurrect queue
if (target->GetTypeId() == TYPEID_PLAYER)
- if (Battleground *bg = target->ToPlayer()->GetBattleground())
+ if (Battleground* bg = target->ToPlayer()->GetBattleground())
bg->RemovePlayerFromResurrectQueue(target->GetGUID());
break;
case 36730: // Flame Strike
@@ -5012,7 +5012,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
if (!caster)
break;
- Unit *owner = caster->GetOwner();
+ Unit* owner = caster->GetOwner();
if (owner && owner->GetTypeId() == TYPEID_PLAYER)
{
if (apply)
@@ -5028,7 +5028,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
if (!caster)
break;
- Unit *owner = caster->GetOwner();
+ Unit* owner = caster->GetOwner();
if (owner && owner->GetTypeId() == TYPEID_PLAYER)
{
if (apply)
@@ -5195,7 +5195,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
uint64 guid = caster->m_SummonSlot[3];
if (guid)
{
- Creature *totem = caster->GetMap()->GetCreature(guid);
+ Creature* totem = caster->GetMap()->GetCreature(guid);
if (totem && totem->isTotem())
caster->ToPlayer()->CastSpell(totem, 6277, true);
}
@@ -5235,7 +5235,7 @@ void AuraEffect::HandleAuraDummy(AuraApplication const* aurApp, uint8 mode, bool
if (apply)
{
if (!target->HasAura(48266) && !target->HasAura(63611))
- target->CastSpell(target, 63611, true);
+ target->CastSpell(target, 63611, true, NULL, this);
}
else
target->RemoveAurasDueToSpell(63611);
@@ -5282,7 +5282,7 @@ void AuraEffect::HandleChannelDeathItem(AuraApplication const* aurApp, uint8 mod
if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (GetSpellProto()->SpellFamilyFlags[0] & 0x00004000))
{
// Glyph of Drain Soul - chance to create an additional Soul Shard
- if (AuraEffect *aur = caster->GetAuraEffect(58070, 0))
+ if (AuraEffect* aur = caster->GetAuraEffect(58070, 0))
if (roll_chance_i(aur->GetMiscValue()))
caster->CastSpell(caster, 58068, true, 0, aur); // We _could_ simply do ++count here, but Blizz does it this way :)
}
@@ -5632,7 +5632,7 @@ void AuraEffect::HandlePeriodicDummyAuraTick(Unit* target, Unit* caster) const
if (target->GetMap()->IsDungeon() && int(target->GetAppliedAuras().count(62399)) >= (target->GetMap()->IsHeroic() ? 4 : 2))
{
target->CastSpell(target, 62475, true); // System Shutdown
- if (Unit *veh = target->GetVehicleBase())
+ if (Unit* veh = target->GetVehicleBase())
veh->CastSpell(target, 62475, true);
}
break;
@@ -6218,7 +6218,7 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
{
caster->CastSpell(caster, 43836, true, 0, this);
// Glyph of Drain Soul - chance to create an additional Soul Shard
- if (AuraEffect *aur = caster->GetAuraEffect(58070, 0))
+ if (AuraEffect* aur = caster->GetAuraEffect(58070, 0))
if (roll_chance_i(aur->GetMiscValue()))
caster->CastSpell(caster, 58068, true, 0, aur);
}
@@ -6715,7 +6715,7 @@ void AuraEffect::HandleProcTriggerSpellWithValueAuraProc(AuraApplication* aurApp
Unit* triggerTarget = eventInfo.GetProcTarget();
uint32 triggerSpellId = GetSpellProto()->EffectTriggerSpell[m_effIndex];
- if (SpellEntry const *triggeredSpellInfo = sSpellStore.LookupEntry(triggerSpellId))
+ if (SpellEntry const* triggeredSpellInfo = sSpellStore.LookupEntry(triggerSpellId))
{
int32 basepoints0 = GetAmount();
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Triggering spell %u with value %d from aura %u proc", triggeredSpellInfo->Id, basepoints0, GetId());