diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellEffects.cpp | 6 | ||||
-rw-r--r-- | src/game/Unit.cpp | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 283de99612c..6d16cba265b 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3117,6 +3117,9 @@ void Spell::EffectPersistentAA(uint32 i) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius); Unit *caster = m_caster->GetEntry() == WORLD_TRIGGER ? m_originalCaster : m_caster; + // Caster not in world, might be spell triggered from aura removal + if (!caster->IsInWorld()) + return; DynamicObject* dynObj = new DynamicObject; if(!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), caster, m_spellInfo->Id, m_targets.m_dstPos, radius, false)) { @@ -3874,6 +3877,9 @@ void Spell::EffectAddFarsight(uint32 i) float radius = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); int32 duration = GetSpellDuration(m_spellInfo); + // Caster not in world, might be spell triggered from aura removal + if (!m_caster->IsInWorld()) + return; DynamicObject* dynObj = new DynamicObject; if(!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), m_caster, m_spellInfo->Id, m_targets.m_dstPos, radius, true)) { diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 2ef69144086..1c9afc1538a 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -15731,6 +15731,11 @@ void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId) ((Player*)this)->StopCastingBindSight(); ((Player*)this)->Unmount(); ((Player*)this)->RemoveAurasByType(SPELL_AURA_MOUNTED); + + // drop flag at invisible in bg + if(((Player*)this)->InBattleGround()) + if(BattleGround *bg = ((Player*)this)->GetBattleGround()) + bg->EventPlayerDroppedFlag((Player*)this); } assert(!m_vehicle); |