Пример #1
0
        public void LockFight()
        {
            GameFightOptionToggleMessage msg = new GameFightOptionToggleMessage(2);

            m_Account.SocketManager.Send(msg);
            m_Account.Log(new ActionTextInformation("Fermeture du combat"), 4);
        }
Пример #2
0
        public void LockFightForSpectators()
        {
            GameFightOptionToggleMessage msg = new GameFightOptionToggleMessage((byte)FightOptionsEnum.FIGHT_OPTION_SET_SECRET);

            m_Account.SocketManager.Send(msg);
            m_Account.Log(new ActionTextInformation("Combat spectator closed"), 4);
        }
Пример #3
0
        public void AskForHelpInFight()
        {
            GameFightOptionToggleMessage msg = new GameFightOptionToggleMessage((byte)FightOptionsEnum.FIGHT_OPTION_ASK_FOR_HELP);

            m_Account.SocketManager.Send(msg);
            m_Account.Log(new ActionTextInformation("Asking for help"), 4);
        }
Пример #4
0
        public void LockFighForParty()
        {
            GameFightOptionToggleMessage msg = new GameFightOptionToggleMessage((byte)FightOptionsEnum.FIGHT_OPTION_SET_TO_PARTY_ONLY);

            m_Account.SocketManager.Send(msg);
            m_Account.Log(new ActionTextInformation("Combat closed to party only"), 4);
        }
Пример #5
0
        public static void HandleGameFightOptionToggleMessage(WorldClient client, GameFightOptionToggleMessage message)
        {
            if (message.option == (sbyte)FightOptionsEnum.FIGHT_OPTION_SET_TO_PARTY_ONLY && client.Character.IsPartyLeader())
            {
                client.Character.Party.TogglePartyFightRestriction();
            }

            if (!client.Character.IsFighting())
            {
                return;
            }

            if (!client.Character.Fighter.IsTeamLeader())
            {
                return;
            }

            if (!client.Character.Fight.IsStarted)
            {
                client.Character.Team.ToggleOption((FightOptionsEnum)message.option);
            }

            if (message.option == (sbyte)FightOptionsEnum.FIGHT_OPTION_SET_SECRET)
            {
                client.Character.Fight.ToggleSpectatorClosed(client.Character, !client.Character.Fight.SpectatorClosed);
            }
        }
 public static void HandleFightOptionToggle(GameFightOptionToggleMessage message, WorldClient client)
 {
     if (client.Character.Fighting)
     {
         client.Character.Fighter.Team.Options.ToggleOption((FightOptionsEnum)message.option);
     }
 }
Пример #7
0
 public static void HandleGameFightOptionToggleMessage(WorldClient client, GameFightOptionToggleMessage message)
 {
     if (client.Character.IsFighting() && client.Character.Fighter.IsTeamLeader())
     {
         if (!client.Character.Fight.IsStarted)
         {
             client.Character.Team.ToggleOption((FightOptionsEnum)message.option);
         }
         else
         {
             if (message.option == 0)
             {
                 client.Character.Fight.ToggleSpectatorClosed(!client.Character.Fight.SpectatorClosed);
             }
         }
     }
 }
 public static void HandleFightOptions(GameFightOptionToggleMessage message, WorldClient client)
 {
     client.Character.FighterInstance.Fight.SetOption((FightOptionsEnum)message.option, client.Character.FighterInstance.Team);
 }