Exemplo n.º 1
0
 public LocationTag(Location coord, World w)
 {
     Internal = new GameLocation(coord, w);
 }
Exemplo n.º 2
0
 public WorldTag(World w)
 {
     Internal = w;
 }
Exemplo n.º 3
0
 public GameLocation(Location coord, World w)
 {
     Coordinates = coord;
     World = w;
 }
Exemplo n.º 4
0
 public World LoadWorld(string name)
 {
     string nl = name.ToLowerFast();
     for (int i = 0; i < LoadedWorlds.Count; i++)
     {
         if (LoadedWorlds[i].Name == nl)
         {
             return LoadedWorlds[i];
         }
     }
     WorldLoadPreEventArgs e = new WorldLoadPreEventArgs() { WorldName = name };
     OnWorldLoadPreEvent.Fire(e);
     if (e.Cancelled)
     {
         return null;
     }
     World world = new World();
     world.Name = nl;
     world.TheServer = this;
     WorldLoadEventArgs e2 = new WorldLoadEventArgs() { TheWorld = world };
     OnWorldLoadEvent.Fire(e2);
     if (e.Cancelled)
     {
         world.UnloadFully(null);
         return null;
     }
     LoadedWorlds.Add(world);
     OnWorldLoadPostEvent.Fire(new WorldLoadPostEventArgs() { TheWorld = world });
     world.Start();
     return world;
 }