mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9913] Fix TARGET_SCRIPT searcher and also look for objects that are Pet*
Pet (guardian, mini-pet) may also be the target of TARGET_SCRIPT, and are not considered a grid object. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
6d5d8778fa
commit
fab9a3ae96
2 changed files with 3 additions and 2 deletions
|
|
@ -4491,7 +4491,8 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_caster, i_spellST->second.targetEntry, i_spellST->second.type != SPELL_TARGET_TYPE_DEAD, range);
|
MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck u_check(*m_caster, i_spellST->second.targetEntry, i_spellST->second.type != SPELL_TARGET_TYPE_DEAD, range);
|
||||||
MaNGOS::CreatureLastSearcher<MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(m_caster, p_Creature, u_check);
|
MaNGOS::CreatureLastSearcher<MaNGOS::NearestCreatureEntryWithLiveStateInObjectRangeCheck> searcher(m_caster, p_Creature, u_check);
|
||||||
|
|
||||||
Cell::VisitGridObjects(m_caster, searcher, range);
|
// Visit all, need to find also Pet* objects
|
||||||
|
Cell::VisitAllObjects(m_caster, searcher, range);
|
||||||
|
|
||||||
range = u_check.GetLastRange();
|
range = u_check.GetLastRange();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9912"
|
#define REVISION_NR "9913"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue