Пример #1
0
        public static void GuildWarEnd()
        {
            PlayerManager.SendToServer(new Packets.Game.TalkPacket(ChatType.GM, CurrentWinner + " has won! Congratulations to everyone for their efforts."));
            Running = false;

            SOB leftGate = MapManager.PullMapByID(1038).Search <SOB>(6701);


            leftGate.Life = 10000000;
            leftGate.Mesh = 241;
            leftGate.SendToScreen(Packets.Game.SpawnSob.Create(leftGate), true);

            SOB rightGate = MapManager.PullMapByID(1038).Search <SOB>(6702);

            rightGate.Life = 10000000;
            rightGate.Mesh = 241;
            rightGate.SendToScreen(Packets.Game.SpawnSob.Create(rightGate), true);

            var toUpdate = MapManager.PullMapByID(1038).Search <SOB>(6700);   //pole

            if (toUpdate != null)
            {
                if (CurrentWinner != null)
                {
                    toUpdate.Name = CurrentWinner.Name;
                }
                toUpdate.Life = 20000000;
                toUpdate.SendToScreen(Packets.Game.SpawnSob.Create(toUpdate), true);
            }


            GuildScores.Clear();
        }
Пример #2
0
        public static void RepairRightGate()
        {
            SOB rightGate = MapManager.PullMapByID(1038).Search <SOB>(6702);

            if (rightGate.Life == 1 && GuildWar.CurrentWinner.Money >= 2000000)
            {
                rightGate.MaximumLife = 10000000;
                rightGate.Life        = 10000000;
                rightGate.Mesh        = 241;
                rightGate.SendToScreen(Packets.Game.SpawnSob.Create(rightGate), true);

                GuildWar.CurrentWinner.Money -= 2000000;
            }
        }
Пример #3
0
        public static void KillRightGate()
        {
            try
            {
                SOB rightGate = MapManager.PullMapByID(1038).Search <SOB>(6702);

                //rightGate.MaxHP = 1;
                RightGateHp    = 1;// leftGate.Health;
                rightGate.Mesh = 287;
                rightGate.Life = 1;
                rightGate.SendToScreen(Packets.Game.SpawnSob.Create(rightGate), true);
            }
            catch (Exception P) { Console.WriteLine(P); }
        }
        public static SpawnSob Create(SOB who)
        {
            SpawnSob obj = new SpawnSob();

            obj.UID       = who.UID;
            obj.MaxHealth = who.MaximumLife;
            obj.Health    = (uint)who.Life;;
            obj.X         = who.X;
            obj.Y         = who.Y;
            obj.Mesh      = who.Mesh;
            obj.Flag      = who.Flag;
            obj.Type      = 17;
            obj.Name      = who.Name;
            //obj.Name = new NetStringPacker();
            //obj.Name.AddString(who.Name.ToString());
            return(obj);
        }
Пример #5
0
 public static bool ToggleRightGate()
 {
     try
     {
         SOB rightgate = MapManager.PullMapByID(1038).Search <SOB>(6702);
         if (rightgate.Mesh == 271)
         {
             RightGateHp    = rightgate.Life;
             rightgate.Mesh = 287;
             //rightgate.Life = 0;
             rightgate.SendToScreen(Packets.Game.SpawnSob.Create(rightgate), true);
         }
         else
         {
             rightgate.MaximumLife = 10000000;
             rightgate.Life        = RightGateHp;
             rightgate.Mesh        = 271;
             rightgate.SendToScreen(Packets.Game.SpawnSob.Create(rightgate), true);
         }
     }
     catch (Exception P) { Console.WriteLine(P); return(false); }
     return(true);
 }
Пример #6
0
 public static bool ToggleLeftGate()
 {
     try
     {
         SOB leftGate = MapManager.PullMapByID(1038).Search <SOB>(6701);
         if (leftGate.Mesh == 241)
         {
             //leftGate.MaximumLife = 0;
             LeftGateHp    = leftGate.Life;
             leftGate.Mesh = 251;
             //leftGate.Life = 0;
             leftGate.SendToScreen(Packets.Game.SpawnSob.Create(leftGate), true);
         }
         else
         {
             leftGate.MaximumLife = 10000000;
             leftGate.Life        = LeftGateHp;
             leftGate.Mesh        = 241;
             leftGate.SendToScreen(Packets.Game.SpawnSob.Create(leftGate), true);
         }
     }
     catch (Exception P) { Console.WriteLine(P); return(false); }
     return(true);
 }