Beispiel #1
0
 public static void NewPlayerExec2(ClientInfo _cInfo)
 {
     try
     {
         if (GameManager.Instance.World.Players.dict.ContainsKey(_cInfo.entityId))
         {
             EntityPlayer _player = PersistentOperations.GetEntityPlayer(_cInfo.playerId);
             if (_player != null)
             {
                 if (_player.IsSpawned() && _player.IsAlive())
                 {
                     if (StartingItems.IsEnabled && StartingItems.ItemList.Count > 0)
                     {
                         StartingItems.Exec(_cInfo);
                     }
                     NewPlayerExec3(_cInfo, _player);
                 }
                 else
                 {
                     Timers.NewPlayerStartingItemsTimer(_cInfo);
                 }
             }
         }
     }
     catch (Exception e)
     {
         Log.Out(string.Format("[SERVERTOOLS] Error in API.NewPlayerExec2: {0}", e.Message));
     }
 }
Beispiel #2
0
 public static void NewPlayerExec1(ClientInfo _cInfo)
 {
     try
     {
         if (GameManager.Instance.World.Players.dict.ContainsKey(_cInfo.entityId))
         {
             EntityPlayer _player = GameManager.Instance.World.Players.dict[_cInfo.entityId];
             if (_player != null)
             {
                 if (_player.IsSpawned() && _player.IsAlive())
                 {
                     if (NewSpawnTele.IsEnabled && NewSpawnTele.New_Spawn_Tele_Position != "0,0,0")
                     {
                         NewSpawnTele.TeleNewSpawn(_cInfo, _player);
                         if (StartingItems.IsEnabled && StartingItems.ItemList.Count > 0)
                         {
                             Timers.NewPlayerStartingItemsTimer(_cInfo);
                         }
                         else
                         {
                             NewPlayerExec3(_cInfo, _player);
                         }
                     }
                     else
                     {
                         NewPlayerExec2(_cInfo);
                     }
                 }
                 else
                 {
                     Timers.NewPlayerExecTimer(_cInfo);
                 }
             }
         }
     }
     catch (Exception e)
     {
         Log.Out(string.Format("[SERVERTOOLS] Error in API.NewPlayerExec1: {0}", e.Message));
     }
 }
Beispiel #3
0
 public static void NewPlayerExec2(ClientInfo _cInfo, EntityPlayer _player)
 {
     try
     {
         if (_player.IsSpawned() && _player.IsAlive())
         {
             if (StartingItems.IsEnabled && StartingItems.ItemList.Count > 0)
             {
                 StartingItems.SpawnItems(_cInfo);
             }
             NewPlayerExec3(_cInfo, _player);
         }
         else
         {
             Timers.NewPlayerStartingItemsTimer(_cInfo, _player);
         }
     }
     catch (Exception e)
     {
         Log.Out(string.Format("[SERVERTOOLS] Error in API.NewPlayerExec2: {0}.", e.Message));
     }
 }