diff options
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r-- | src/game/SpellEffects.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 469f3f45357..468e79cb510 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3591,11 +3591,8 @@ void Spell::EffectAddFarsight(uint32 i) dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x80000002); m_caster->AddDynObject(dynObj); - Map* map = dynObj->GetMap(); - map->LoadGrid(dynObj->GetPositionX(), dynObj->GetPositionY()); // In case the spell is casted into a different grid by player - map->Add(dynObj); - map->SwitchGridContainers(dynObj, true); // Needed for forwarding player packets - dynObj->setActive(true); // Keep the grid updated even if there are no players in it + dynObj->setActive(true); //must before add to map to be put in world container + dynObj->GetMap()->Add(dynObj); //grid will also be loaded // Need to update visibility of object for client to accept farsight guid ((Player*)m_caster)->UpdateVisibilityOf(dynObj); |