Fixed indentation
This commit is contained in:
parent
1524a1e85d
commit
2748d6f5c6
@ -4979,9 +4979,9 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||||||
if (!lockId)
|
if (!lockId)
|
||||||
{ return SPELL_FAILED_ALREADY_OPEN; }
|
{ return SPELL_FAILED_ALREADY_OPEN; }
|
||||||
|
|
||||||
// Is the lock within the spell max range?
|
// Is the lock within the spell max range?
|
||||||
if (!IsLockInRange(go))
|
if (!IsLockInRange(go))
|
||||||
{ return SPELL_FAILED_OUT_OF_RANGE; }
|
{ return SPELL_FAILED_OUT_OF_RANGE; }
|
||||||
}
|
}
|
||||||
else if (Item* item = m_targets.getItemTarget())
|
else if (Item* item = m_targets.getItemTarget())
|
||||||
{
|
{
|
||||||
@ -5004,7 +5004,6 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||||||
|
|
||||||
// check lock compatibility
|
// check lock compatibility
|
||||||
SpellCastResult res = CanOpenLock(SpellEffectIndex(i), lockId, skillId, reqSkillValue, skillValue);
|
SpellCastResult res = CanOpenLock(SpellEffectIndex(i), lockId, skillId, reqSkillValue, skillValue);
|
||||||
|
|
||||||
if (res != SPELL_CAST_OK)
|
if (res != SPELL_CAST_OK)
|
||||||
{ return res; }
|
{ return res; }
|
||||||
|
|
||||||
@ -6520,15 +6519,15 @@ bool SpellEvent::IsDeletable() const
|
|||||||
|
|
||||||
bool Spell::IsLockInRange(GameObject* go)
|
bool Spell::IsLockInRange(GameObject* go)
|
||||||
{
|
{
|
||||||
const SpellRangeEntry* srange = sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex);
|
const SpellRangeEntry* srange = sSpellRangeStore.LookupEntry(m_spellInfo->rangeIndex);
|
||||||
|
|
||||||
|
|
||||||
// This check is not related to bounding radius
|
// This check is not related to bounding radius
|
||||||
float dx = m_caster->GetPositionX() - go->GetPositionX();
|
float dx = m_caster->GetPositionX() - go->GetPositionX();
|
||||||
float dy = m_caster->GetPositionY() - go->GetPositionY();
|
float dy = m_caster->GetPositionY() - go->GetPositionY();
|
||||||
float dz = m_caster->GetPositionZ() - go->GetPositionZ();
|
float dz = m_caster->GetPositionZ() - go->GetPositionZ();
|
||||||
|
|
||||||
return (dx * dx + dy * dy + dz * dz < srange->maxRange);
|
return (dx * dx + dy * dy + dz * dz < srange->maxRange);
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellCastResult Spell::CanOpenLock(SpellEffectIndex effIndex, uint32 lockId, SkillType& skillId, int32& reqSkillValue, int32& skillValue)
|
SpellCastResult Spell::CanOpenLock(SpellEffectIndex effIndex, uint32 lockId, SkillType& skillId, int32& reqSkillValue, int32& skillValue)
|
||||||
|
@ -578,7 +578,7 @@ class Spell
|
|||||||
void DoAllEffectOnTarget(ItemTargetInfo* target);
|
void DoAllEffectOnTarget(ItemTargetInfo* target);
|
||||||
bool IsAliveUnitPresentInTargetList();
|
bool IsAliveUnitPresentInTargetList();
|
||||||
SpellCastResult CanOpenLock(SpellEffectIndex effIndex, uint32 lockid, SkillType& skillid, int32& reqSkillValue, int32& skillValue);
|
SpellCastResult CanOpenLock(SpellEffectIndex effIndex, uint32 lockid, SkillType& skillid, int32& reqSkillValue, int32& skillValue);
|
||||||
bool IsLockInRange(GameObject* go);
|
bool IsLockInRange(GameObject* go);
|
||||||
SpellCastResult CanTameUnit(bool isGM = false);
|
SpellCastResult CanTameUnit(bool isGM = false);
|
||||||
// -------------------------------------------
|
// -------------------------------------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user