Exemplo n.º 1
0
 public MapChange(string IP, int Port, Portal Portal, string Map)
 {
     packet.Type(1709);
     packet.WriteString(IP);
     packet.WriteInt(Port);
     packet.WriteInt(Portal.MapId);
     packet.WriteInt(Portal.uInts1[1]);           //X?
     packet.WriteInt(Portal.uInts1[2]);           //Y?
     packet.WriteString(Map);
 }
Exemplo n.º 2
0
        public static void Load(string fileName)
        {
            if (PortalList.Count > 0) return;
            using (Stream s = File.OpenRead(fileName))
            {
                using (BitReader read = new BitReader(s))
                {

                    int count = read.ReadInt();
                    for (int i = 0; i < count; i++)
                    {
                        PortalCluster Cluster = new PortalCluster();
                        Cluster.Count = read.ReadInt();

                        for (int h = 0; h < Cluster.Count; h++)
                        {
                            Portal portal = new Portal();
                            portal.PortalId = read.ReadInt();

                            for (int j = 0; j < portal.uInts1.Length; j++)
                                portal.uInts1[j] = read.ReadInt();

                            portal.MapId = read.ReadInt();

                            for (int j = 0; j < portal.uInts2.Length; j++)
                                portal.uInts2[j] = read.ReadInt();

                            Cluster.Add(portal);
                        }
                        PortalList.Add(Cluster);
                    }
                }
            }
            Console.WriteLine("[PortalDB] Loaded {0} portals", PortalList.Count);
        }
Exemplo n.º 3
0
 public Position(Portal Portal)
 {
     this.Map = Portal.MapId;
     this.PosX = Portal.uInts2[0];
     this.PosY = Portal.uInts2[1];
 }
Exemplo n.º 4
0
 public void Add(Portal portal)
 {
     PortalList.Add(portal.PortalId, portal);
 }