mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[11973] Various Cleanups
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
c243c42c3c
commit
f3f3349661
50 changed files with 153 additions and 134 deletions
|
|
@ -609,7 +609,7 @@ void Spell::FillTargetMap()
|
|||
default:
|
||||
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetA[i], tmpUnitLists[i /*==effToIndex[i]*/]);
|
||||
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetB[i], tmpUnitLists[i /*==effToIndex[i]*/]);
|
||||
break;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case TARGET_SELF2:
|
||||
|
|
@ -657,7 +657,7 @@ void Spell::FillTargetMap()
|
|||
}
|
||||
break;
|
||||
}
|
||||
} // End new target combination fill
|
||||
}
|
||||
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
|
|
@ -834,7 +834,7 @@ void Spell::AddUnitTarget(Unit* pVictim, SpellEffectIndex effIndex)
|
|||
if (targetGUID == ihit->targetGUID) // Found in list
|
||||
{
|
||||
if (!immuned)
|
||||
ihit->effectMask |= (1 << effIndex); // Add only effect mask if not immuned
|
||||
ihit->effectMask |= 1 << effIndex; // Add only effect mask if not immuned
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -1997,6 +1997,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
MaNGOS::UnitListSearcher<MaNGOS::AnyAoEVisibleTargetUnitInObjectRangeCheck> searcher(tempTargetUnitMap, u_check);
|
||||
Cell::VisitAllObjects(m_caster, searcher, max_range);
|
||||
}
|
||||
|
||||
if (tempTargetUnitMap.empty())
|
||||
break;
|
||||
|
||||
|
|
@ -2012,18 +2013,21 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
|
||||
while (t && next != tempTargetUnitMap.end())
|
||||
{
|
||||
if (!prev->IsWithinDist (*next,CHAIN_SPELL_JUMP_RADIUS))
|
||||
if (!prev->IsWithinDist(*next,CHAIN_SPELL_JUMP_RADIUS))
|
||||
break;
|
||||
if (!prev->IsWithinLOSInMap (*next))
|
||||
|
||||
if (!prev->IsWithinLOSInMap(*next))
|
||||
{
|
||||
++next;
|
||||
continue;
|
||||
}
|
||||
|
||||
prev = *next;
|
||||
targetUnitMap.push_back(prev);
|
||||
tempTargetUnitMap.erase(next);
|
||||
tempTargetUnitMap.sort(TargetDistanceOrderNear(prev));
|
||||
next = tempTargetUnitMap.begin();
|
||||
|
||||
--t;
|
||||
}
|
||||
}
|
||||
|
|
@ -2906,7 +2910,6 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
targetUnitMap.push_back(owner);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -4066,7 +4069,7 @@ void Spell::WriteAmmoToPacket(WorldPacket* data)
|
|||
break;
|
||||
}
|
||||
|
||||
if(ammoDisplayID)
|
||||
if (ammoDisplayID)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -4549,7 +4552,7 @@ void Spell::TakeReagents()
|
|||
return;
|
||||
|
||||
Player* p_caster = (Player*)m_caster;
|
||||
if (p_caster->CanNoReagentCast(m_spellInfo) )
|
||||
if (p_caster->CanNoReagentCast(m_spellInfo))
|
||||
return;
|
||||
|
||||
for(uint32 x = 0; x < MAX_SPELL_REAGENTS; ++x)
|
||||
|
|
@ -5012,7 +5015,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
//Must be behind the target.
|
||||
if (m_spellInfo->AttributesEx2 == SPELL_ATTR_EX2_UNK20 && m_spellInfo->HasAttribute(SPELL_ATTR_EX_UNK9) && target->HasInArc(M_PI_F, m_caster))
|
||||
{
|
||||
// Exclusion for Pounce: Facing Limitation was removed in 2.0.1, but it still uses the same, old Ex-Flags
|
||||
// Exclusion for Pounce: Facing Limitation was removed in 2.0.1, but it still uses the same, old Ex-Flags
|
||||
// Exclusion for Mutilate:Facing Limitation was removed in 2.0.1 and 3.0.3, but they still use the same, old Ex-Flags
|
||||
// Exclusion for Throw: Facing limitation was added in 3.2.x, but that shouldn't be
|
||||
if (!m_spellInfo->IsFitToFamily(SPELLFAMILY_DRUID, UI64LIT(0x0000000000020000)) &&
|
||||
|
|
@ -5251,7 +5254,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
return castResult;
|
||||
}
|
||||
|
||||
if(!m_IsTriggeredSpell) // triggered spell not affected by stun/etc
|
||||
if(!m_IsTriggeredSpell) // triggered spell not affected by stun/etc
|
||||
{
|
||||
SpellCastResult castResult = CheckCasterAuras();
|
||||
if(castResult != SPELL_CAST_OK)
|
||||
|
|
@ -6296,6 +6299,7 @@ SpellCastResult Spell::CheckPower()
|
|||
return SPELL_FAILED_CASTER_AURASTATE;
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
// Check valid power type
|
||||
if (m_spellInfo->powerType >= MAX_POWERS)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue