Closed Romman closed 12 years ago
The right spell target fill is very hard. Try be self
as i think, need check target flag before fill map, if exist dst - fill by dst, else fill by src.
I think this commit should fix it and we can revert our code back to master https://github.com/mangos/mangos/commit/534a25dd675267a4a36717b61916feb06b6a2773
no. code from Shmoo only partially solve this problem. as well, that our solutions do not interfere with each other.
Describe an example of one spell with this Target.
Spell ID = 39844 (by item 32406) for quest 11008 ("Fires Over Skettis"):
m_targets = 32 (TARGET_FLAG_SOURCE_LOCATION) EffectImplicitTargetA = 7 (TARGET_AREAEFFECT_INSTANT)
TARGET_FLAG_SOURCE_LOCATION means that in
SpellCastTargets::read( ByteBuffer& data, Unit *caster )
we get coords, sent by client and define m_src CoordsWhen we try to fill targets:
Spell::SetTargetMap { ... switch (targetMode) { ... case TARGET_AREAEFFECT_INSTANT: { .... // fill real target list if no spell script target defined FillAreaTargets(bounds.first != bounds.second ? tempTargetUnitMap : targetUnitMap, radius, PUSH_DEST_CENTER, bounds.first != bounds.second ? SPELL_TARGETS_ALL : targetB);
with PUSH_DEST_CENTER we use m_dest Coords which are (0,0,0) by default (not defined)As Result the core doesnt know the correct point for searching targets
Maybe need apply
m_targets.setDestination(m_srcX, m_srcY, m_srcZ);
somewhere?