mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[8422] Implement far sight like spells work for long distance.
* Added basic infrastructure for visibility update in case difference player and current view point. Just for note: seletect additional arg way beacuse repeatable search object will slow but store pointer will not safe, so use middle case: get view point pointer early as possible at visibility updates. * Implement dynamic object and creature activisation while it's target of far sight spell effect * Use this for SPELL_AURA_BIND_SIGHT, SPELL_AURA_FAR_SIGHT and SPELL_EFFECT_ADD_FARSIGHT. * Note2: some spyglass like spells let look _around_ at long distance, this hard implement in current grid loading system Without additional changes and not implemented (you will see empty area without creatures in likes case) * Also fixed warning spam at CMSG_MOVE_SET_CAN_FLY_ACK receive by use proper packet sructure reading.
This commit is contained in:
parent
db1c9924a9
commit
45dd7140b5
28 changed files with 228 additions and 144 deletions
|
|
@ -1194,7 +1194,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||
{
|
||||
// for delayed spells ignore not visible explicit target
|
||||
if (m_spellInfo->speed > 0.0f && unit == m_targets.getUnitTarget() &&
|
||||
!unit->isVisibleForOrDetect(m_caster,false))
|
||||
!unit->isVisibleForOrDetect(m_caster,m_caster,false))
|
||||
{
|
||||
realCaster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_EVADE);
|
||||
return;
|
||||
|
|
@ -1204,9 +1204,9 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||
if (!(m_spellInfo->AttributesEx & SPELL_ATTR_EX_NOT_BREAK_STEALTH))
|
||||
unit->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
||||
|
||||
// can cause back attack (if detected)
|
||||
// can cause back attack (if detected), stealth removed at Spell::cast if spell break it
|
||||
if (!(m_spellInfo->AttributesEx & SPELL_ATTR_EX_NO_INITIAL_AGGRO) && !IsPositiveSpell(m_spellInfo->Id) &&
|
||||
m_caster->isVisibleForOrDetect(unit,false)) // stealth removed at Spell::cast if spell break it
|
||||
m_caster->isVisibleForOrDetect(unit,unit,false))
|
||||
{
|
||||
// use speedup check to avoid re-remove after above lines
|
||||
if (m_spellInfo->AttributesEx & SPELL_ATTR_EX_NOT_BREAK_STEALTH)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue