Index: trunk/src/game/Object.cpp
===================================================================
--- trunk/src/game/Object.cpp (revision 141)
+++ trunk/src/game/Object.cpp (revision 145)
@@ -1484,5 +1484,9 @@
 
     if(pCreature->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER && pCreature->m_spells[0])
+    {
+        if(GetTypeId() == TYPEID_UNIT || GetTypeId() == TYPEID_PLAYER)
+            pCreature->setFaction(((Unit*)this)->getFaction());
         pCreature->CastSpell(pCreature, pCreature->m_spells[0], true, 0, 0, GetGUID());
+    }
 
     //return the creature therewith the summoner has access to it
Index: trunk/src/game/SpellEffects.cpp
===================================================================
--- trunk/src/game/SpellEffects.cpp (revision 144)
+++ trunk/src/game/SpellEffects.cpp (revision 145)
@@ -1979,5 +1979,6 @@
     }
     // Init dest coordinates
-    uint32 mapid = m_targets.m_mapId;
+    int32 mapid = m_targets.m_mapId;
+    if(mapid < 0) mapid = (int32)unitTarget->GetMapId();
     float x = m_targets.m_destX;
     float y = m_targets.m_destY;
Index: trunk/src/game/GameObject.h
===================================================================
--- trunk/src/game/GameObject.h (revision 102)
+++ trunk/src/game/GameObject.h (revision 145)
@@ -573,4 +573,6 @@
 
         GridReference<GameObject> &GetGridRef() { return m_gridRef; }
+
+        void CastSpell(Unit *target, uint32 spell);
     protected:
         uint32      m_charges;                              // Spell charges for GAMEOBJECT_TYPE_SPELLCASTER (22)
Index: trunk/src/game/GameObject.cpp
===================================================================
--- trunk/src/game/GameObject.cpp (revision 120)
+++ trunk/src/game/GameObject.cpp (revision 145)
@@ -342,7 +342,8 @@
                 if (ok)
                 {
-                    Unit *caster =  owner ? owner : ok;
-
-                    caster->CastSpell(ok, goInfo->trap.spellId, true);
+                    //Unit *caster =  owner ? owner : ok;
+
+                    //caster->CastSpell(ok, goInfo->trap.spellId, true);
+                    CastSpell(ok, goInfo->trap.spellId);
                     m_cooldownTime = time(NULL) + 4;        // 4 seconds
 
@@ -1264,2 +1265,15 @@
     spell->prepare(&targets);
 }
+
+void GameObject::CastSpell(Unit* target, uint32 spell)
+{
+    //summon world trigger
+    Creature *trigger = SummonCreature(12999, GetPositionX(), GetPositionY(), GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 1);
+    if(!trigger) return;
+
+    Unit *owner = GetOwner();
+    if(owner) trigger->setFaction(owner->getFaction());
+    else trigger->setFaction(14);
+    trigger->SetVisibility(VISIBILITY_OFF); //should this be true?
+    trigger->CastSpell(target, spell, true, 0, 0, owner->GetGUID());
+}
Index: trunk/src/game/Spell.h
===================================================================
--- trunk/src/game/Spell.h (revision 142)
+++ trunk/src/game/Spell.h (revision 145)
@@ -112,5 +112,5 @@
             //m_srcZ = target.m_srcZ;
 
-            m_mapId = 0;
+            m_mapId = -1;
             m_destX = target.m_destX;
             m_destY = target.m_destY;
@@ -128,5 +128,5 @@
         Unit *getUnitTarget() const { return m_unitTarget; }
         void setUnitTarget(Unit *target);
-        void setDestination(float x, float y, float z, bool send = true, uint32 mapId = 0);
+        void setDestination(float x, float y, float z, bool send = true, int32 mapId = -1);
         void setDestination(Unit *target, bool send = true);
 
@@ -156,5 +156,5 @@
 
         float m_srcX, m_srcY, m_srcZ;
-        uint32 m_mapId;
+        int32 m_mapId;
         float m_destX, m_destY, m_destZ;
         bool m_hasDest;
Index: trunk/src/game/Spell.cpp
===================================================================
--- trunk/src/game/Spell.cpp (revision 142)
+++ trunk/src/game/Spell.cpp (revision 145)
@@ -95,5 +95,5 @@
 }
 
-void SpellCastTargets::setDestination(float x, float y, float z, bool send, uint32 mapId)
+void SpellCastTargets::setDestination(float x, float y, float z, bool send, int32 mapId)
 {
     m_destX = x;
@@ -103,5 +103,5 @@
     if(send)
         m_targetMask |= TARGET_FLAG_DEST_LOCATION;
-    if(mapId)
+    if(mapId >= 0)
         m_mapId = mapId;
 }
@@ -416,18 +416,6 @@
         std::list<Unit*> tmpUnitMap;
 
-        // Note: this hack with search required until GO casting not implemented
-        // environment damage spells already have around enemies targeting but this not help in case not existed GO casting support
-        // currently each enemy selected explicitly and self cast damage
-        if(m_spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_AROUND_CASTER
-            && m_spellInfo->EffectImplicitTargetB[i]==TARGET_ALL_ENEMY_IN_AREA 
-            && m_spellInfo->Effect[i]==SPELL_EFFECT_ENVIRONMENTAL_DAMAGE)
-        {
-            tmpUnitMap.push_back(m_targets.getUnitTarget());
-        }
-        else
-        {
-            SetTargetMap(i,m_spellInfo->EffectImplicitTargetA[i],tmpUnitMap);
-            SetTargetMap(i,m_spellInfo->EffectImplicitTargetB[i],tmpUnitMap);
-        }
+        SetTargetMap(i,m_spellInfo->EffectImplicitTargetA[i],tmpUnitMap);
+        SetTargetMap(i,m_spellInfo->EffectImplicitTargetB[i],tmpUnitMap);
 
         if(m_targets.HasDest())
@@ -717,5 +705,8 @@
 
     // Calculate hit result
-    target.missCondition = m_caster->SpellHitResult(pVictim, m_spellInfo, m_canReflect);
+    if(m_originalCaster)
+        target.missCondition = m_originalCaster->SpellHitResult(pVictim, m_spellInfo, m_canReflect);
+    else
+        target.missCondition = SPELL_MISS_NONE;
     if (target.missCondition == SPELL_MISS_NONE)
         ++m_countOfHit;
@@ -1455,5 +1446,5 @@
                     || m_spellInfo->Effect[1] == SPELL_EFFECT_TELEPORT_UNITS
                     || m_spellInfo->Effect[2] == SPELL_EFFECT_TELEPORT_UNITS)
-                    m_targets.setDestination(st->target_X, st->target_Y, st->target_Z, true, st->target_mapId);
+                    m_targets.setDestination(st->target_X, st->target_Y, st->target_Z, true, (int32)st->target_mapId);
                 else if(st->target_mapId == m_caster->GetMapId())
                     m_targets.setDestination(st->target_X, st->target_Y, st->target_Z);
Index: trunk/src/game/CreatureAIRegistry.cpp
===================================================================
--- trunk/src/game/CreatureAIRegistry.cpp (revision 102)
+++ trunk/src/game/CreatureAIRegistry.cpp (revision 145)
@@ -38,5 +38,5 @@
     void Initialize()
     {
-        (new CreatureAIFactory<NullCreatureAI>("NullAI"))->RegisterSelf();
+        (new CreatureAIFactory<NullCreatureAI>("NullCreatureAI"))->RegisterSelf();
         (new CreatureAIFactory<AggressorAI>("AggressorAI"))->RegisterSelf();
         (new CreatureAIFactory<ReactorAI>("ReactorAI"))->RegisterSelf();
