Example #1
0
 public static void GameFightPosition(World.Network.WorldClient client, string packet)
 {
     if (client.Character.Fighter != null)
     {
         if (client.Character.Fighter.Team.Fight.State == Game.Fights.Fight.FightState.PlacementsPhase)
         {
             client.Character.Fighter.Team.Fight.ChangePlayerPlace(client.Character.Fighter, int.Parse(packet.Substring(2)));
         }
     }
 }
Example #2
0
 public static void GameFightBlockSpectatorRequest(World.Network.WorldClient client, string packet)
 {
     if (client.Character.Fighter != null)
     {
         if (client.Character.Fighter.Team.Fight.BlockSpectator)
         {
             client.Character.Fighter.Team.Fight.Send("Im039");
             client.Character.Fighter.Team.Fight.BlockSpectator = false;
         }
         else
         {
             client.Character.Fighter.Team.Fight.Send("Im040");
             client.Character.Fighter.Team.Fight.BlockSpectator = true;
         }
     }
 }
Example #3
0
        public static void GameFightGroupBlock(World.Network.WorldClient client, string packet)
        {
            if (client.Character.Fighter != null)
            {
                if (client.Character.Fighter.Team.Fight.State == Game.Fights.Fight.FightState.PlacementsPhase)
                {
                    if (client.Character.Fighter.Team.Restrictions.OnlyParty)
                    {
                        client.Character.Fighter.Team.Restrictions.OnlyParty = false;
                        client.Character.Fighter.Team.Fight.Send("Im096;");

                    }
                    else
                    {
                        client.Character.Fighter.Team.Restrictions.OnlyParty = true;
                        client.Character.Fighter.Team.Fight.Send("Im095;");

                    }
                }
            }
        }
Example #4
0
 public static void GameFightFullBlock(World.Network.WorldClient client, string packet)
 {
     if (client.Character.Fighter != null)
     {
         if (client.Character.Fighter.Team.Fight.State == Game.Fights.Fight.FightState.PlacementsPhase)
         {
             if (client.Character.Fighter.Team.Restrictions.FullBlocked)
             {
                 client.Character.Fighter.Team.Restrictions.FullBlocked = false;
                 client.Character.Fighter.Team.Fight.Send("Im096;");
                 client.Character.Fighter.Team.Fight.Map.Send("Go-A" + client.Character.ID);
             }
             else
             {
                 client.Character.Fighter.Team.Restrictions.FullBlocked = true;
                 client.Character.Fighter.Team.Fight.Send("Im095;");
                 client.Character.Fighter.Team.Fight.Map.Send("Go+A" + client.Character.ID);
             }
         }
     }
 }
Example #5
0
 public static void GameFightQuit(World.Network.WorldClient client, string packet)
 {
     if (client.Character.Fighter != null)
     {
         if (packet.Length > 2)
         {
             int id = int.Parse(packet.Substring(2));
             var kickedFighter = client.Character.Fighter.Team.Fighters.FirstOrDefault(x => x.ID == id);
             if (kickedFighter != null && client.Character.Fighter.Team.Leader.ID == client.Character.ID)
             {
                 client.Character.Fighter.Team.Fight.QuitBattle(kickedFighter);
             }
         }
         else
         {
             client.Character.Fighter.Team.Fight.QuitBattle(client.Character.Fighter, true);
         }
     }
     else if(client.Action.Spectator != null)
     {
         client.Action.Spectator.WatchedFight.QuitSpectator(client.Action.Spectator);
         client.Action.Spectator = null;
     }
 }
Example #6
0
 public static void GameTurnFinishRequest(World.Network.WorldClient client, string packet)
 {
     if (client.Character.Fighter != null)
     {
         client.Character.Fighter.Team.Fight.FinishTurnRequest(client.Character.Fighter);
     }
 }
Example #7
0
 public static void GameReadyRequest(World.Network.WorldClient client, string packet)
 {
     if (client.Character.Fighter != null)
     {
         client.Character.Fighter.Team.Fight.ChangeReadyState(client.Character.Fighter, int.Parse(packet.Substring(2)));
     }
 }