mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 01:37:05 +00:00
[10834] Cleanup shapeshift form code.
This commit is contained in:
parent
c3254c88ca
commit
4c02094737
10 changed files with 56 additions and 53 deletions
|
|
@ -2860,7 +2860,7 @@ void Spell::cast(bool skipCheck)
|
|||
case SPELLFAMILY_DRUID:
|
||||
{
|
||||
// Faerie Fire (Feral)
|
||||
if (m_spellInfo->Id == 16857 && m_caster->m_form != FORM_CAT)
|
||||
if (m_spellInfo->Id == 16857 && m_caster->GetShapeshiftForm() != FORM_CAT)
|
||||
AddTriggeredSpell(60089);
|
||||
// Berserk (Bear Mangle part)
|
||||
else if (m_spellInfo->Id == 50334)
|
||||
|
|
@ -4276,7 +4276,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
if (checkForm)
|
||||
{
|
||||
// Cannot be used in this stance/form
|
||||
SpellCastResult shapeError = GetErrorAtShapeshiftedCast(m_spellInfo, m_caster->m_form);
|
||||
SpellCastResult shapeError = GetErrorAtShapeshiftedCast(m_spellInfo, m_caster->GetShapeshiftForm());
|
||||
if(shapeError != SPELL_CAST_OK)
|
||||
return shapeError;
|
||||
|
||||
|
|
@ -5264,11 +5264,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
if (m_caster->GetTypeId() == TYPEID_PLAYER && !sMapStore.LookupEntry(m_caster->GetMapId())->IsMountAllowed() && !m_IsTriggeredSpell && !m_spellInfo->AreaGroupId)
|
||||
return SPELL_FAILED_NO_MOUNTS_ALLOWED;
|
||||
|
||||
ShapeshiftForm form = m_caster->m_form;
|
||||
if( form == FORM_CAT || form == FORM_TREE || form == FORM_TRAVEL ||
|
||||
form == FORM_AQUA || form == FORM_BEAR || form == FORM_DIREBEAR ||
|
||||
form == FORM_CREATUREBEAR || form == FORM_GHOSTWOLF || form == FORM_FLIGHT ||
|
||||
form == FORM_FLIGHT_EPIC || form == FORM_MOONKIN || form == FORM_METAMORPHOSIS )
|
||||
if (m_caster->IsInDisallowedMountForm())
|
||||
return SPELL_FAILED_NOT_SHAPESHIFT;
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue