Fix crash when adding new gameobject with command.
This commit is contained in:
@@ -950,7 +950,7 @@ namespace Game.Entities
|
||||
Cypher.Assert(data.spawnId == m_spawnId);
|
||||
|
||||
data.Id = GetEntry();
|
||||
data.spawnPoint.WorldRelocate(this);
|
||||
data.spawnPoint = new WorldLocation(this);
|
||||
data.rotation = m_worldRotation;
|
||||
data.spawntimesecs = (int)(m_spawnedByDefault ? m_respawnDelayTime : -m_respawnDelayTime);
|
||||
data.animprogress = GetGoAnimProgress();
|
||||
|
||||
@@ -3481,7 +3481,7 @@ namespace Game.Entities
|
||||
Cypher.Assert(!IsResurrectRequested());
|
||||
_resurrectionData = new ResurrectionData();
|
||||
_resurrectionData.GUID = caster.GetGUID();
|
||||
_resurrectionData.Location.WorldRelocate(caster);
|
||||
_resurrectionData.Location = new WorldLocation(caster);
|
||||
_resurrectionData.Health = health;
|
||||
_resurrectionData.Mana = mana;
|
||||
_resurrectionData.Aura = appliedAura;
|
||||
|
||||
@@ -4401,6 +4401,7 @@ namespace Game
|
||||
{
|
||||
if (!gameObjectDataStorage.ContainsKey(guid))
|
||||
gameObjectDataStorage[guid] = new GameObjectData();
|
||||
|
||||
return gameObjectDataStorage[guid];
|
||||
}
|
||||
public GameObjectTemplate GetGameObjectTemplate(uint entry)
|
||||
|
||||
@@ -45,7 +45,6 @@ namespace Game.Maps
|
||||
public uint ScriptId;
|
||||
public bool dbData = true;
|
||||
|
||||
|
||||
public SpawnData(SpawnObjectType t)
|
||||
{
|
||||
type = t;
|
||||
|
||||
Reference in New Issue
Block a user