Example #1
0
 internal void CreatePortalTemp(Portal portal, int timeInSeconds = 0, bool isTemporary = false)
 {
     portal.SourceMapInstanceId = MapInstanceId;
     Portals.Add(portal);
     Broadcast(portal.GenerateGp());
     if (isTemporary)
     {
         Observable.Timer(TimeSpan.FromSeconds(timeInSeconds)).Subscribe(o =>
         {
             Portals.Remove(portal);
             MapClear();
         });
     }
 }
Example #2
0
 public void RemovePortal(Portal PT)
 {
     if (PT.Name == "sp")
     {
         SpawnPoints.Remove(PT.ID);
     }
     else if (PT.Name == "tp")
     {
         // TownPortal: Mystic Door
     }
     else
     {
         if (Portals.ContainsKey(PT.Name))
         {
             Console.WriteLine("Duplicate portal, Name: {0} MapID: {1}", PT.Name, ID);
         }
         else
         {
             Portals.Remove(PT.Name);
         }
     }
 }
Example #3
0
 private void RemoveZonePortalsFromList(int zoneId)
 {
     Portals.Where(p => p.Id.ToString().Substring(0, 2) == zoneId.ToString()).ToList().ForEach(x => Portals.Remove(x));
 }