Core: Continued cleanup
If and for whitespaces.
This commit is contained in:
@@ -495,13 +495,13 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
|
||||
DoneActualBenefit = caster->ApplyEffectModifiers(GetSpellProto(), m_effIndex, DoneActualBenefit);
|
||||
}
|
||||
// Fire Ward
|
||||
else if(GetSpellProto()->SpellFamilyFlags[0] & 0x8 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
|
||||
else if (GetSpellProto()->SpellFamilyFlags[0] & 0x8 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
|
||||
{
|
||||
// +80.68% from sp bonus
|
||||
DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f;
|
||||
}
|
||||
// Frost Ward
|
||||
else if(GetSpellProto()->SpellFamilyFlags[0] & 0x100 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
|
||||
else if (GetSpellProto()->SpellFamilyFlags[0] & 0x100 && GetSpellProto()->SpellFamilyFlags[2] & 0x8)
|
||||
{
|
||||
// +80.68% from sp bonus
|
||||
DoneActualBenefit += caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellProto)) * 0.8068f;
|
||||
@@ -2896,7 +2896,7 @@ void AuraEffect::HandleModStealth(AuraApplication const* aurApp, uint8 mode, boo
|
||||
|
||||
if (apply)
|
||||
{
|
||||
target->m_stealth.AddFlag( type);
|
||||
target->m_stealth.AddFlag(type);
|
||||
target->m_stealth.AddValue(type, GetAmount());
|
||||
|
||||
target->SetStandFlags(UNIT_STAND_FLAGS_CREEP);
|
||||
@@ -3283,7 +3283,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
// Disarm handling
|
||||
// If druid shifts while being disarmed we need to deal with that since forms aren't affected by disarm
|
||||
// and also HandleAuraModDisarm is not triggered
|
||||
if(!target->CanUseAttackType(BASE_ATTACK))
|
||||
if (!target->CanUseAttackType(BASE_ATTACK))
|
||||
{
|
||||
if (Item *pItem = target->ToPlayer()->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND))
|
||||
{
|
||||
@@ -6626,7 +6626,7 @@ void AuraEffect::HandleAuraModFakeInebriation(AuraApplication const* aurApp, uin
|
||||
|
||||
if (apply)
|
||||
{
|
||||
target->m_invisibilityDetect.AddFlag( INVISIBILITY_DRUNK);
|
||||
target->m_invisibilityDetect.AddFlag(INVISIBILITY_DRUNK);
|
||||
target->m_invisibilityDetect.AddValue(INVISIBILITY_DRUNK, GetAmount());
|
||||
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
|
||||
@@ -807,7 +807,7 @@ bool Aura::ModStackAmount(int32 num, AuraRemoveMode removeMode)
|
||||
if ((num > 0) && (stackAmount > int32(m_spellProto->StackAmount)))
|
||||
{
|
||||
// not stackable aura - set stack amount to 1
|
||||
if(!m_spellProto->StackAmount)
|
||||
if (!m_spellProto->StackAmount)
|
||||
stackAmount = 1;
|
||||
else
|
||||
stackAmount = m_spellProto->StackAmount;
|
||||
@@ -1713,7 +1713,7 @@ void Aura::LoadScripts()
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura::LoadScripts");
|
||||
sScriptMgr->CreateAuraScripts(m_spellProto->Id, m_loadedScripts);
|
||||
for(std::list<AuraScript *>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;)
|
||||
for (std::list<AuraScript *>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;)
|
||||
{
|
||||
if (!(*itr)->_Load(this))
|
||||
{
|
||||
@@ -1729,12 +1729,12 @@ void Aura::LoadScripts()
|
||||
|
||||
bool Aura::CallScriptCheckAreaTargetHandlers(Unit* target)
|
||||
{
|
||||
for(std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript*>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_CHECK_AREA_TARGET);
|
||||
std::list<AuraScript::CheckAreaTargetHandler>::iterator hookItrEnd = (*scritr)->DoCheckAreaTarget.end(), hookItr = (*scritr)->DoCheckAreaTarget.begin();
|
||||
for (; hookItr != hookItrEnd ; ++hookItr)
|
||||
if(!(*hookItr).Call(*scritr, target))
|
||||
if (!(*hookItr).Call(*scritr, target))
|
||||
return false;
|
||||
(*scritr)->_FinishScriptCall();
|
||||
}
|
||||
@@ -1744,11 +1744,11 @@ bool Aura::CallScriptCheckAreaTargetHandlers(Unit* target)
|
||||
bool Aura::CallScriptEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode)
|
||||
{
|
||||
bool preventDefault = false;
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_APPLY, aurApp);
|
||||
std::list<AuraScript::EffectApplyHandler>::iterator effEndItr = (*scritr)->OnEffectApply.end(), effItr = (*scritr)->OnEffectApply.begin();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, mode);
|
||||
@@ -1763,11 +1763,11 @@ bool Aura::CallScriptEffectApplyHandlers(AuraEffect const* aurEff, AuraApplicati
|
||||
bool Aura::CallScriptEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode)
|
||||
{
|
||||
bool preventDefault = false;
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_REMOVE, aurApp);
|
||||
std::list<AuraScript::EffectApplyHandler>::iterator effEndItr = (*scritr)->OnEffectRemove.end(), effItr = (*scritr)->OnEffectRemove.begin();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, mode);
|
||||
@@ -1781,11 +1781,11 @@ bool Aura::CallScriptEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplicat
|
||||
|
||||
void Aura::CallScriptAfterEffectApplyHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode)
|
||||
{
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_AFTER_APPLY, aurApp);
|
||||
std::list<AuraScript::EffectApplyHandler>::iterator effEndItr = (*scritr)->AfterEffectApply.end(), effItr = (*scritr)->AfterEffectApply.begin();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, mode);
|
||||
@@ -1796,11 +1796,11 @@ void Aura::CallScriptAfterEffectApplyHandlers(AuraEffect const* aurEff, AuraAppl
|
||||
|
||||
void Aura::CallScriptAfterEffectRemoveHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp, AuraEffectHandleModes mode)
|
||||
{
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_AFTER_REMOVE, aurApp);
|
||||
std::list<AuraScript::EffectApplyHandler>::iterator effEndItr = (*scritr)->AfterEffectRemove.end(), effItr = (*scritr)->AfterEffectRemove.begin();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, mode);
|
||||
@@ -1812,11 +1812,11 @@ void Aura::CallScriptAfterEffectRemoveHandlers(AuraEffect const* aurEff, AuraApp
|
||||
bool Aura::CallScriptEffectPeriodicHandlers(AuraEffect const* aurEff, AuraApplication const* aurApp)
|
||||
{
|
||||
bool preventDefault = false;
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_PERIODIC, aurApp);
|
||||
std::list<AuraScript::EffectPeriodicHandler>::iterator effEndItr = (*scritr)->OnEffectPeriodic.end(), effItr = (*scritr)->OnEffectPeriodic.begin();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff);
|
||||
@@ -1830,11 +1830,11 @@ bool Aura::CallScriptEffectPeriodicHandlers(AuraEffect const* aurEff, AuraApplic
|
||||
|
||||
void Aura::CallScriptEffectUpdatePeriodicHandlers(AuraEffect * aurEff)
|
||||
{
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_UPDATE_PERIODIC);
|
||||
std::list<AuraScript::EffectUpdatePeriodicHandler>::iterator effEndItr = (*scritr)->OnEffectUpdatePeriodic.end(), effItr = (*scritr)->OnEffectUpdatePeriodic.begin();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff);
|
||||
@@ -1845,11 +1845,11 @@ void Aura::CallScriptEffectUpdatePeriodicHandlers(AuraEffect * aurEff)
|
||||
|
||||
void Aura::CallScriptEffectCalcAmountHandlers(AuraEffect const* aurEff, int32 & amount, bool & canBeRecalculated)
|
||||
{
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_CALC_AMOUNT);
|
||||
std::list<AuraScript::EffectCalcAmountHandler>::iterator effEndItr = (*scritr)->DoEffectCalcAmount.end(), effItr = (*scritr)->DoEffectCalcAmount.begin();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, amount, canBeRecalculated);
|
||||
@@ -1860,11 +1860,11 @@ void Aura::CallScriptEffectCalcAmountHandlers(AuraEffect const* aurEff, int32 &
|
||||
|
||||
void Aura::CallScriptEffectCalcPeriodicHandlers(AuraEffect const* aurEff, bool & isPeriodic, int32 & amplitude)
|
||||
{
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_CALC_PERIODIC);
|
||||
std::list<AuraScript::EffectCalcPeriodicHandler>::iterator effEndItr = (*scritr)->DoEffectCalcPeriodic.end(), effItr = (*scritr)->DoEffectCalcPeriodic.begin();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, isPeriodic, amplitude);
|
||||
@@ -1875,11 +1875,11 @@ void Aura::CallScriptEffectCalcPeriodicHandlers(AuraEffect const* aurEff, bool &
|
||||
|
||||
void Aura::CallScriptEffectCalcSpellModHandlers(AuraEffect const* aurEff, SpellModifier *& spellMod)
|
||||
{
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_CALC_SPELLMOD);
|
||||
std::list<AuraScript::EffectCalcSpellModHandler>::iterator effEndItr = (*scritr)->DoEffectCalcSpellMod.end(), effItr = (*scritr)->DoEffectCalcSpellMod.begin();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, spellMod);
|
||||
@@ -1890,11 +1890,11 @@ void Aura::CallScriptEffectCalcSpellModHandlers(AuraEffect const* aurEff, SpellM
|
||||
|
||||
void Aura::CallScriptEffectAbsorbHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & /*defaultPrevented*/)
|
||||
{
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_ABSORB, aurApp);
|
||||
std::list<AuraScript::EffectAbsorbHandler>::iterator effEndItr = (*scritr)->OnEffectAbsorb.end(), effItr = (*scritr)->OnEffectAbsorb.begin();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, dmgInfo, absorbAmount);
|
||||
@@ -1905,11 +1905,11 @@ void Aura::CallScriptEffectAbsorbHandlers(AuraEffect * aurEff, AuraApplication c
|
||||
|
||||
void Aura::CallScriptEffectAfterAbsorbHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount)
|
||||
{
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_AFTER_ABSORB, aurApp);
|
||||
std::list<AuraScript::EffectAbsorbHandler>::iterator effEndItr = (*scritr)->AfterEffectAbsorb.end(), effItr = (*scritr)->AfterEffectAbsorb.begin();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, dmgInfo, absorbAmount);
|
||||
@@ -1920,11 +1920,11 @@ void Aura::CallScriptEffectAfterAbsorbHandlers(AuraEffect * aurEff, AuraApplicat
|
||||
|
||||
void Aura::CallScriptEffectManaShieldHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount, bool & /*defaultPrevented*/)
|
||||
{
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_MANASHIELD, aurApp);
|
||||
std::list<AuraScript::EffectManaShieldHandler>::iterator effEndItr = (*scritr)->OnEffectManaShield.end(), effItr = (*scritr)->OnEffectManaShield.begin();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, dmgInfo, absorbAmount);
|
||||
@@ -1935,11 +1935,11 @@ void Aura::CallScriptEffectManaShieldHandlers(AuraEffect * aurEff, AuraApplicati
|
||||
|
||||
void Aura::CallScriptEffectAfterManaShieldHandlers(AuraEffect * aurEff, AuraApplication const* aurApp, DamageInfo & dmgInfo, uint32 & absorbAmount)
|
||||
{
|
||||
for(std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
for (std::list<AuraScript *>::iterator scritr = m_loadedScripts.begin(); scritr != m_loadedScripts.end() ; ++scritr)
|
||||
{
|
||||
(*scritr)->_PrepareScriptCall(AURA_SCRIPT_HOOK_EFFECT_AFTER_MANASHIELD, aurApp);
|
||||
std::list<AuraScript::EffectManaShieldHandler>::iterator effEndItr = (*scritr)->AfterEffectManaShield.end(), effItr = (*scritr)->AfterEffectManaShield.begin();
|
||||
for(; effItr != effEndItr ; ++effItr)
|
||||
for (; effItr != effEndItr ; ++effItr)
|
||||
{
|
||||
if ((*effItr).IsEffectAffected(m_spellProto, aurEff->GetEffIndex()))
|
||||
(*effItr).Call(*scritr, aurEff, dmgInfo, absorbAmount);
|
||||
|
||||
@@ -297,10 +297,10 @@ void SpellCastTargets::read (ByteBuffer & data, Unit* caster)
|
||||
if (m_targetMask & (TARGET_FLAG_OBJECT))
|
||||
data.readPackGUID(m_GOTargetGUID);
|
||||
|
||||
if(m_targetMask & (TARGET_FLAG_ITEM | TARGET_FLAG_TRADE_ITEM))
|
||||
if (m_targetMask & (TARGET_FLAG_ITEM | TARGET_FLAG_TRADE_ITEM))
|
||||
data.readPackGUID(m_itemTargetGUID);
|
||||
|
||||
if(m_targetMask & (TARGET_FLAG_CORPSE | TARGET_FLAG_PVP_CORPSE))
|
||||
if (m_targetMask & (TARGET_FLAG_CORPSE | TARGET_FLAG_PVP_CORPSE))
|
||||
data.readPackGUID(m_CorpseTargetGUID);
|
||||
|
||||
if (m_targetMask & TARGET_FLAG_SOURCE_LOCATION)
|
||||
@@ -337,7 +337,7 @@ void SpellCastTargets::read (ByteBuffer & data, Unit* caster)
|
||||
m_dstPos.Relocate(caster);
|
||||
}
|
||||
|
||||
if(m_targetMask & TARGET_FLAG_STRING)
|
||||
if (m_targetMask & TARGET_FLAG_STRING)
|
||||
data >> m_strTarget;
|
||||
|
||||
Update(caster);
|
||||
@@ -358,20 +358,20 @@ void SpellCastTargets::write (ByteBuffer & data)
|
||||
}
|
||||
else if (m_targetMask & TARGET_FLAG_OBJECT)
|
||||
{
|
||||
if(m_GOTarget)
|
||||
if (m_GOTarget)
|
||||
data.append(m_GOTarget->GetPackGUID());
|
||||
else
|
||||
data << uint8(0);
|
||||
}
|
||||
else if (m_targetMask & ( TARGET_FLAG_CORPSE | TARGET_FLAG_PVP_CORPSE))
|
||||
else if (m_targetMask & (TARGET_FLAG_CORPSE | TARGET_FLAG_PVP_CORPSE))
|
||||
data.appendPackGUID(m_CorpseTargetGUID);
|
||||
else
|
||||
data << uint8(0);
|
||||
}
|
||||
|
||||
if (m_targetMask & ( TARGET_FLAG_ITEM | TARGET_FLAG_TRADE_ITEM))
|
||||
if (m_targetMask & (TARGET_FLAG_ITEM | TARGET_FLAG_TRADE_ITEM))
|
||||
{
|
||||
if(m_itemTarget)
|
||||
if (m_itemTarget)
|
||||
data.append(m_itemTarget->GetPackGUID());
|
||||
else
|
||||
data << uint8(0);
|
||||
@@ -1074,7 +1074,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
{
|
||||
uint8 farMask = 0;
|
||||
// create far target mask
|
||||
for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
if (IsFarUnitTargetEffect(m_spellInfo->Effect[i]))
|
||||
if ((1 << i) & mask)
|
||||
farMask |= (1 << i);
|
||||
@@ -1088,7 +1088,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
||||
|
||||
// do far effects on the unit
|
||||
// can't use default call because of threading, do stuff as fast as possible
|
||||
for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
if (farMask & (1 << i))
|
||||
HandleEffects(unit, NULL, NULL, i);
|
||||
return;
|
||||
@@ -4619,13 +4619,13 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||
if (bg->GetStatus() == STATUS_WAIT_LEAVE)
|
||||
return SPELL_FAILED_DONT_REPORT;
|
||||
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER && VMAP::VMapFactory::createOrGetVMapManager()->isLineOfSightCalcEnabled())
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && VMAP::VMapFactory::createOrGetVMapManager()->isLineOfSightCalcEnabled())
|
||||
{
|
||||
if(m_spellInfo->Attributes & SPELL_ATTR0_OUTDOORS_ONLY &&
|
||||
if (m_spellInfo->Attributes & SPELL_ATTR0_OUTDOORS_ONLY &&
|
||||
!m_caster->GetMap()->IsOutdoors(m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ()))
|
||||
return SPELL_FAILED_ONLY_OUTDOORS;
|
||||
|
||||
if(m_spellInfo->Attributes & SPELL_ATTR0_INDOORS_ONLY &&
|
||||
if (m_spellInfo->Attributes & SPELL_ATTR0_INDOORS_ONLY &&
|
||||
m_caster->GetMap()->IsOutdoors(m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ()))
|
||||
return SPELL_FAILED_ONLY_INDOORS;
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ void Spell::SpellDamageSchoolDmg(SpellEffIndex effIndex)
|
||||
case 52942:
|
||||
{
|
||||
// don't damage self and only players
|
||||
if(unitTarget->GetGUID() == m_caster->GetGUID() || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
if (unitTarget->GetGUID() == m_caster->GetGUID() || unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
float radius = GetSpellRadiusForHostile(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[0]));
|
||||
@@ -1385,7 +1385,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
Unit::AttackerSet attackers = unitTarget->getAttackers();
|
||||
|
||||
// remove invalid attackers
|
||||
for (Unit::AttackerSet::iterator aItr = attackers.begin(); aItr != attackers.end(); )
|
||||
for (Unit::AttackerSet::iterator aItr = attackers.begin(); aItr != attackers.end();)
|
||||
if (!(*aItr)->canAttack(m_caster))
|
||||
attackers.erase(aItr++);
|
||||
else
|
||||
@@ -5808,7 +5808,7 @@ void Spell::EffectResurrect(SpellEffIndex effIndex)
|
||||
return;
|
||||
}
|
||||
break;
|
||||
// Defibrillate ( Gnomish Army Knife) have 67% chance on success_list
|
||||
// Defibrillate (Gnomish Army Knife) have 67% chance on success_list
|
||||
case 54732:
|
||||
if (roll_chance_i(33))
|
||||
{
|
||||
@@ -6324,7 +6324,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
if (goinfo->type == GAMEOBJECT_TYPE_FISHINGNODE || goinfo->type == GAMEOBJECT_TYPE_FISHINGHOLE)
|
||||
{
|
||||
LiquidData liqData;
|
||||
if ( !cMap->IsInWater(fx, fy, fz + 1.f/* -0.5f */, &liqData)) // Hack to prevent fishing bobber from failing to land on fishing hole
|
||||
if (!cMap->IsInWater(fx, fy, fz + 1.f/* -0.5f */, &liqData)) // Hack to prevent fishing bobber from failing to land on fishing hole
|
||||
{ // but this is not proper, we really need to ignore not materialized objects
|
||||
SendCastResult(SPELL_FAILED_NOT_HERE);
|
||||
SendChannelUpdate(0);
|
||||
@@ -7113,5 +7113,5 @@ void Spell::EffectBind(SpellEffIndex effIndex)
|
||||
data.Initialize(SMSG_PLAYERBOUND, 8+4);
|
||||
data << uint64(player->GetGUID());
|
||||
data << uint32(area_id);
|
||||
player->SendDirectMessage( &data );
|
||||
player->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
@@ -1848,7 +1848,7 @@ int32 SpellMgr::CalculateSpellEffectAmount(SpellEntry const* spellEntry, uint8 e
|
||||
if (caster)
|
||||
{
|
||||
// bonus amount from combo points
|
||||
if (caster->m_movedPlayer)
|
||||
if (caster->m_movedPlayer)
|
||||
if (uint8 comboPoints = caster->m_movedPlayer->GetComboPoints())
|
||||
if (float comboDamage = spellEntry->EffectPointsPerComboPoint[effIndex])
|
||||
value += comboDamage * comboPoints;
|
||||
@@ -2797,7 +2797,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
|
||||
return DIMINISHING_NONE;
|
||||
case SPELLFAMILY_GENERIC:
|
||||
// some generic arena related spells have by some strange reason MECHANIC_TURN
|
||||
if (spellproto->Mechanic == MECHANIC_TURN)
|
||||
if (spellproto->Mechanic == MECHANIC_TURN)
|
||||
return DIMINISHING_NONE;
|
||||
switch (spellproto->Id)
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ uint8 _SpellScript::EffectHook::GetAffectedEffectsMask(SpellEntry const* spellEn
|
||||
uint8 mask = 0;
|
||||
if ((effIndex == EFFECT_ALL) || (effIndex == EFFECT_FIRST_FOUND))
|
||||
{
|
||||
for(uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if ((effIndex == EFFECT_FIRST_FOUND) && mask)
|
||||
return mask;
|
||||
|
||||
Reference in New Issue
Block a user