All pastes #944729 Raw Edit

Vermischtes

public diff v1 · immutable
·published 2008-03-16 11:16 UTC
rendered paste body
Index: src/game/Object.cpp===================================================================--- src/game/Object.cpp	(revision 5440)+++ src/game/Object.cpp	(working copy)@@ -1195,7 +1195,7 @@     return MapManager::Instance().GetBaseMap(GetMapId()); } -Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, float ang,TempSummonType spwtype,uint32 despwtime)+Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, float ang, TempSummonType spwtype,uint32 despwtime, float spawndist) {     TemporarySummon* pCreature = new TemporarySummon(this, GetGUID()); @@ -1210,7 +1210,7 @@         return NULL;     } -    pCreature->Summon(spwtype, despwtime);+    pCreature->Summon(spwtype, despwtime, spawndist);      //return the creature therewith the summoner has access to it     return pCreature;Index: src/game/SpellEffects.cpp===================================================================--- src/game/SpellEffects.cpp	(revision 5440)+++ src/game/SpellEffects.cpp	(working copy)@@ -2664,7 +2664,7 @@          TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_OR_DEAD_DESPAWN; -        m_caster->SummonCreature(creature_entry,px,py,pz,m_caster->GetOrientation(),summonType,duration);+        m_caster->SummonCreature(creature_entry,px,py,pz,m_caster->GetOrientation(),summonType,duration, 0.0f);     } } @@ -4816,7 +4816,7 @@     if (px == 0 || py == 0 || pz == 0)         m_caster->GetClosePoint(px, py, pz); -    Creature* Charmed = m_caster->SummonCreature(m_spellInfo->EffectMiscValue[i], px, py, pz, m_caster->GetOrientation(),TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,3600000);+    Creature* Charmed = m_caster->SummonCreature(m_spellInfo->EffectMiscValue[i], px, py, pz, m_caster->GetOrientation(),TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,3600000, 0.0f);     if (!Charmed)         return; Index: src/game/Object.h===================================================================--- src/game/Object.h	(revision 5440)+++ src/game/Object.h	(working copy)@@ -360,7 +360,7 @@          Map      * GetMap() const;         Map const* GetBaseMap() const;-        Creature* SummonCreature(uint32 id, float x, float y, float z, float ang,TempSummonType spwtype,uint32 despwtime);+        Creature* SummonCreature(uint32 id, float x, float y, float z, float ang, TempSummonType spwtype,uint32 despwtime, float spawndist);     protected:         explicit WorldObject( WorldObject *instantiator );         std::string m_name;Index: src/game/TemporarySummon.cpp===================================================================--- src/game/TemporarySummon.cpp	(revision 5440)+++ src/game/TemporarySummon.cpp	(working copy)@@ -152,12 +152,13 @@     Creature::Update( diff ); } -void TemporarySummon::Summon(TempSummonType type, uint32 lifetime)+void TemporarySummon::Summon(TempSummonType type, uint32 lifetime, float spawndist) {     m_type = type;     m_timer = lifetime;     m_lifetime = lifetime;-+    m_respawnradius = spawndist;+         MapManager::Instance().GetMap(GetMapId(), this)->Add((Creature*)this);      AIM_Initialize();Index: src/game/TemporarySummon.h===================================================================--- src/game/TemporarySummon.h	(revision 5440)+++ src/game/TemporarySummon.h	(working copy)@@ -28,7 +28,7 @@         explicit TemporarySummon( WorldObject *instantiator, uint64 summoner = 0);         virtual ~TemporarySummon(){};         void Update(uint32 time);-        void Summon(TempSummonType type, uint32 lifetime);+        void Summon(TempSummonType type, uint32 lifetime, float spawndist);         void UnSummon();         void SaveToDB();         Unit* GetSummoner() const { return m_summoner ? ObjectAccessor::GetUnit(*this, m_summoner) : NULL; }Index: src/game/World.cpp===================================================================--- src/game/World.cpp	(revision 5440)+++ src/game/World.cpp	(working copy)@@ -1328,8 +1328,9 @@                 float y = step.script->y;                 float z = step.script->z;                 float o = step.script->o;--                Creature* pCreature = summoner->SummonCreature(step.script->datalong, x, y, z, o,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,step.script->datalong2);+		float spawndist = 0.0f; //set random move/spawn for DB scripts to zero untill it's implemented+		+                Creature* pCreature = summoner->SummonCreature(step.script->datalong, x, y, z, o,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,step.script->datalong2, spawndist);                 if (!pCreature)                 {                     sLog.outError("SCRIPT_COMMAND_TEMP_SUMMON failed for creature (entry: %u).",step.script->datalong);