5
5
using MHServerEmu . Games . Entities . Locomotion ;
6
6
using MHServerEmu . Games . GameData ;
7
7
using MHServerEmu . Games . GameData . Prototypes ;
8
- using MHServerEmu . Games . GameData . Prototypes . Markers ;
9
- using MHServerEmu . Games . Generators . Population ;
10
8
using MHServerEmu . Games . MetaGames ;
11
9
using MHServerEmu . Games . Network ;
12
10
using MHServerEmu . Games . Properties ;
@@ -69,7 +67,7 @@ public WorldEntity CreateWorldEntity(Cell cell, PrototypeId prototypeId, Propert
69
67
else if ( proto is TransitionPrototype transitionProto )
70
68
worldEntity = new Transition ( baseData , properties , Destination . FindDestination ( cell , transitionProto ) ) ;
71
69
else
72
- worldEntity = new ( baseData , AOINetworkPolicyValues . AOIChannelDiscovery , properties ) ;
70
+ worldEntity = new WorldEntity ( baseData , AOINetworkPolicyValues . AOIChannelDiscovery , properties ) ;
73
71
worldEntity . RegionId = regionId ;
74
72
worldEntity . EnterWorld ( cell , position , orientation ) ;
75
73
_entityDict . Add ( baseData . EntityId , worldEntity ) ;
@@ -78,16 +76,16 @@ public WorldEntity CreateWorldEntity(Cell cell, PrototypeId prototypeId, Propert
78
76
79
77
public WorldEntity CreateWorldEntityEmpty ( ulong regionId , PrototypeId prototypeId , Vector3 position , Orientation orientation )
80
78
{
81
- EntityBaseData baseData = new EntityBaseData ( GetNextEntityId ( ) , prototypeId , position , orientation ) ;
82
- WorldEntity worldEntity = new ( baseData , AOINetworkPolicyValues . AOIChannelProximity , new ( _game . CurrentRepId ) ) ;
79
+ EntityBaseData baseData = new ( GetNextEntityId ( ) , prototypeId , position , orientation ) ;
80
+ WorldEntity worldEntity = new ( baseData , AOINetworkPolicyValues . AOIChannelProximity , new ( _game . CurrentRepId ) ) ;
83
81
worldEntity . RegionId = regionId ;
84
82
_entityDict . Add ( baseData . EntityId , worldEntity ) ;
85
83
return worldEntity ;
86
84
}
87
85
88
86
public MetaGame CreateMetaGame ( PrototypeId metaGameRef , ulong regionId )
89
87
{
90
- EntityBaseData baseData = new EntityBaseData ( GetNextEntityId ( ) , metaGameRef , null , null ) ;
88
+ EntityBaseData baseData = new ( GetNextEntityId ( ) , metaGameRef , null , null ) ;
91
89
ReplicatedVariable < string > metaname = new ( 0 , "" ) ;
92
90
MetaGame metaGame = new ( baseData , AOINetworkPolicyValues . AOIChannelProximity , new ( _game . CurrentRepId ) , metaname )
93
91
{
@@ -125,41 +123,6 @@ public Item CreateInvItem(PrototypeId itemProto, InventoryLocation invLoc, Proto
125
123
return item ;
126
124
}
127
125
128
- public Transition SpawnTargetTeleport ( Cell cell , TransitionPrototype transitionProto , Vector3 position , Orientation orientation ,
129
- bool requiresEnterGameWorld , PrototypeId targetRef , bool OverrideSnapToFloor )
130
- {
131
- if ( cell == null ) return default ;
132
- Region region = cell . GetRegion ( ) ;
133
- ulong regionId = region . Id ;
134
- int mapAreaId = ( int ) cell . Area . Id ;
135
- int mapCellId = ( int ) cell . Id ;
136
- PrototypeId contextAreaRef = ( PrototypeId ) cell . Area . PrototypeId ;
137
-
138
- EntityBaseData baseData = ( requiresEnterGameWorld == false )
139
- ? new EntityBaseData ( GetNextEntityId ( ) , transitionProto . DataRef , position , orientation , OverrideSnapToFloor )
140
- : new EntityBaseData ( GetNextEntityId ( ) , transitionProto . DataRef , null , null ) ;
141
-
142
- Destination destination = null ;
143
-
144
- if ( targetRef != PrototypeId . Invalid )
145
- destination = Destination . DestinationFromTarget ( targetRef , region , transitionProto ) ;
146
-
147
- ReplicatedPropertyCollection properties = new ( _game . CurrentRepId ) ;
148
- properties [ PropertyEnum . MapPosition ] = position ;
149
- properties [ PropertyEnum . MapAreaId ] = mapAreaId ;
150
- properties [ PropertyEnum . MapRegionId ] = regionId ;
151
- properties [ PropertyEnum . MapCellId ] = mapCellId ;
152
- properties [ PropertyEnum . ContextAreaRef ] = contextAreaRef ;
153
-
154
- Transition transition = new ( baseData , properties , destination ) ;
155
-
156
- transition . RegionId = regionId ;
157
- transition . EnterWorld ( cell , position , orientation ) ;
158
- _entityDict . Add ( baseData . EntityId , transition ) ;
159
-
160
- return transition ;
161
- }
162
-
163
126
public void DestroyEntity ( Entity entity )
164
127
{
165
128
// TODO
0 commit comments