fix hunter spell Mend pet out Range deduction MP problem (#147)
* fix hunter spell Mend pet out Range fix hunter spell Mend pet out Range deduction MP problem * fix hunter spell Mend pet out Range fix hunter spell Mend pet out Range deduction MP problem * Update SharedDefines.h
This commit is contained in:
parent
4811525de6
commit
c6b07dd3ac
@ -1063,6 +1063,8 @@ enum SpellRangeIndex
|
|||||||
SPELL_RANGE_IDX_SELF_ONLY = 1,
|
SPELL_RANGE_IDX_SELF_ONLY = 1,
|
||||||
/// 5.5 (but dynamic), seems to indicate melee range
|
/// 5.5 (but dynamic), seems to indicate melee range
|
||||||
SPELL_RANGE_IDX_COMBAT = 2,
|
SPELL_RANGE_IDX_COMBAT = 2,
|
||||||
|
/// 20 short range
|
||||||
|
SPELL_RANGE_IDX_SHORT = 3,
|
||||||
/// 500000 (anywhere)
|
/// 500000 (anywhere)
|
||||||
SPELL_RANGE_IDX_ANYWHERE = 13,
|
SPELL_RANGE_IDX_ANYWHERE = 13,
|
||||||
};
|
};
|
||||||
|
@ -5568,6 +5568,19 @@ SpellCastResult Spell::CheckRange(bool strict)
|
|||||||
}
|
}
|
||||||
break; // let continue in generic way for no target
|
break; // let continue in generic way for no target
|
||||||
}
|
}
|
||||||
|
case SPELL_RANGE_IDX_SHORT:
|
||||||
|
{
|
||||||
|
if ((m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && (m_spellInfo->SpellFamilyFlags & UI64LIT(0x00000080) || m_spellInfo->SpellFamilyFlags & 0x800000)))
|
||||||
|
{
|
||||||
|
Pet* pet = m_caster->GetPet();
|
||||||
|
if (pet)
|
||||||
|
{
|
||||||
|
float max_range = GetSpellMaxRange(sSpellRangeStore.LookupEntry(SPELL_RANGE_IDX_SHORT));
|
||||||
|
return m_caster->IsWithinDistInMap(pet, max_range) ? SPELL_CAST_OK : SPELL_FAILED_OUT_OF_RANGE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// add radius of caster and ~5 yds "give" for non stricred (landing) check
|
// add radius of caster and ~5 yds "give" for non stricred (landing) check
|
||||||
@ -6817,4 +6830,4 @@ SpellCastResult Spell::CanTameUnit(bool isGM)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return SPELL_CAST_OK;
|
return SPELL_CAST_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user