Core/Entities: Created factory methods to create new areatriggers, creatures and gameobjects
This commit is contained in:
@@ -707,9 +707,8 @@ namespace Game.Garrisons
|
||||
return null;
|
||||
}
|
||||
|
||||
Position pos = PacketInfo.PlotPos;
|
||||
GameObject go = new GameObject();
|
||||
if (!go.Create(entry, map, pos, Quaternion.WAxis, 255, GameObjectState.Active))
|
||||
GameObject go = GameObject.CreateGameObject(entry, map, PacketInfo.PlotPos, Quaternion.WAxis, 255, GameObjectState.Ready);
|
||||
if (!go)
|
||||
return null;
|
||||
|
||||
if (BuildingInfo.CanActivate() && BuildingInfo.PacketInfo.HasValue && !BuildingInfo.PacketInfo.Value.Active)
|
||||
@@ -718,8 +717,8 @@ namespace Game.Garrisons
|
||||
if (finalizeInfo != null)
|
||||
{
|
||||
Position pos2 = finalizeInfo.factionInfo[faction].Pos;
|
||||
GameObject finalizer = new GameObject();
|
||||
if (finalizer.Create(finalizeInfo.factionInfo[faction].GameObjectId, map, pos2, Quaternion.WAxis, 255, GameObjectState.Ready))
|
||||
GameObject finalizer = GameObject.CreateGameObject(finalizeInfo.factionInfo[faction].GameObjectId, map, pos2, Quaternion.WAxis, 255, GameObjectState.Ready);
|
||||
if (finalizer)
|
||||
{
|
||||
// set some spell id to make the object delete itself after use
|
||||
finalizer.SetSpellId(finalizer.GetGoInfo().Goober.spell);
|
||||
|
||||
Reference in New Issue
Block a user