Esempio n. 1
0
        public static void PlayerStatusUpdateMessageTreatment(Message message, byte[] packetDatas, AccountUC account)
        {
            PlayerStatusUpdateMessage msg = (PlayerStatusUpdateMessage)message;

            using (BigEndianReader reader = new BigEndianReader(packetDatas))
            {
                msg.Deserialize(reader);
            }
            if (msg.playerId == account.CharacterBaseInformations.id)
            {
                switch (msg.status.statusId)
                {
                case 10:
                    account.Log(new ActionTextInformation("Statut disponible activé."), 3);
                    break;

                case 20:
                    account.Log(new ActionTextInformation("Statut absent activé."), 3);
                    PlayerStatusUpdateRequestMessage nmsg = new PlayerStatusUpdateRequestMessage(new PlayerStatus(10));
                    account.SocketManager.Send(nmsg);
                    break;

                case  40:
                    account.Log(new ActionTextInformation("Statut solo activé."), 3);
                    break;

                case 30:
                    account.Log(new ActionTextInformation("Statut privé activé."), 3);
                    break;
                }
            }
        }
 public static void HandePlayerStatusChangeRequest(PlayerStatusUpdateRequestMessage message, WorldClient client)
 {
     client.Character.PlayerStatus = message.status;
     if((PlayerStatusEnum)message.status.statusId == PlayerStatusEnum.PLAYER_STATUS_AFK || (PlayerStatusEnum)message.status.statusId == PlayerStatusEnum.PLAYER_STATUS_PRIVATE || (PlayerStatusEnum)message.status.statusId == PlayerStatusEnum.PLAYER_STATUS_SOLO)
     {
         if(DungeonPartyProvider.Instance.GetDPCByCharacterId(client.Character.Id) != null)
         {
             DungeonPartyProvider.Instance.RemoveCharacter(client.Character);
         }
     }
     client.Send(new PlayerStatusUpdateMessage(client.Character.Record.AccountId, (uint)client.Character.Id, message.status));
 }
 public static void HandePlayerStatusChangeRequest(PlayerStatusUpdateRequestMessage message, WorldClient client)
 {
     client.Character.PlayerStatus = message.status;
     if ((PlayerStatusEnum)message.status.statusId == PlayerStatusEnum.PLAYER_STATUS_AFK || (PlayerStatusEnum)message.status.statusId == PlayerStatusEnum.PLAYER_STATUS_PRIVATE || (PlayerStatusEnum)message.status.statusId == PlayerStatusEnum.PLAYER_STATUS_SOLO)
     {
         if (DungeonPartyProvider.Instance.GetDPCByCharacterId(client.Character.Id) != null)
         {
             DungeonPartyProvider.Instance.RemoveCharacter(client.Character);
         }
     }
     client.Send(new PlayerStatusUpdateMessage(client.Character.Record.AccountId, (uint)client.Character.Id, message.status));
 }
 public static void HandlePlayerStatusUpdateRequestMessage(PlayerStatusUpdateRequestMessage message, WorldClient client)
 {
 }
Esempio n. 5
0
 public static void HandlePlayerStatusUpdateRequestMessage(WorldClient client, PlayerStatusUpdateRequestMessage message)
 {
     client.Character.SetStatus((PlayerStatusEnum)message.status.statusId);
 }