Esempio n. 1
0
 public static void Start()
 {
     Scores = new SafeDictionary<uint, Guild>(100);
     StartTime = DateTime.Now;
     LeftGate.Mesh = (ushort)(240 + LeftGate.Mesh % 10);
     RightGate.Mesh = (ushort)(270 + LeftGate.Mesh % 10);
     ServerBase.Kernel.SendWorldMessage(new Message("Guild war has began!", System.Drawing.Color.Black, Message.Center), ServerBase.Kernel.GamePool.Values);
     FirstRound = true;
     foreach (Guild guild in ServerBase.Kernel.Guilds.Values)
     {
         guild.WarScore = 0;
     }
     Update upd = new Update(true);
     upd.UID = LeftGate.UID;
     upd.Append(Update.Mesh, LeftGate.Mesh);
     upd.Append(Update.Hitpoints, LeftGate.Hitpoints);
     ServerBase.Kernel.SendWorldMessage(upd, ServerBase.Kernel.GamePool.Values, (ushort)1038);
     upd.Clear();
     upd.UID = RightGate.UID;
     upd.Append(Update.Mesh, RightGate.Mesh);
     upd.Append(Update.Hitpoints, RightGate.Hitpoints);
     ServerBase.Kernel.SendWorldMessage(upd, ServerBase.Kernel.GamePool.Values, (ushort)1038);
     IsWar = true;
 }
Esempio n. 2
0
        public static void Reset()
        {
            Scores = new SafeDictionary<uint, Guild>(100);

            LeftGate.Mesh = (ushort)(240 + LeftGate.Mesh % 10);
            RightGate.Mesh = (ushort)(270 + LeftGate.Mesh % 10);

            LeftGate.Hitpoints = LeftGate.MaxHitpoints;
            RightGate.Hitpoints = RightGate.MaxHitpoints;
            Pole.Hitpoints = Pole.MaxHitpoints;

            Update upd = new Update(true);
            upd.UID = LeftGate.UID;
            upd.Append(Update.Mesh, LeftGate.Mesh);
            upd.Append(Update.Hitpoints, LeftGate.Hitpoints);
            ServerBase.Kernel.SendWorldMessage(upd, ServerBase.Kernel.GamePool.Values, (ushort)1038);
            upd.Clear();
            upd.UID = RightGate.UID;
            upd.Append(Update.Mesh, RightGate.Mesh);
            upd.Append(Update.Hitpoints, RightGate.Hitpoints);
            ServerBase.Kernel.SendWorldMessage(upd, ServerBase.Kernel.GamePool.Values, (ushort)1038);

            foreach (Guild guild in ServerBase.Kernel.Guilds.Values)
            {
                guild.WarScore = 0;
            }

            IsWar = true;
        }