public LoginOkMessage(Client client) : base (client)
        {
            SetMessageType(20104);
            SetMessageVersion(1);

            Unknown11 = "someid2";//"108457211027966753069";
        }
        public AvatarNameChangeOkMessage(Client client) : base(client)
        {
            SetMessageType(24111);

            m_vServerCommandType = 0x03;
            m_vAvatarName = "Megapumba";
        }
Esempio n. 3
0
 /// <summary>
 /// This function add a client in the m_vClients list.
 /// </summary>
 /// <param name="c">The client data.</param>
 /// <param name="IP">The IP of the client.</param>
 public static void AddClient(Client c, string IP)
 {
     var socketHandle = c.Socket.Handle.ToInt64();
     c.CIPAddress = IP;
     if (!m_vClients.ContainsKey(socketHandle))
         m_vClients.TryAdd(socketHandle, c);
 }
 public OutOfSyncMessage(Client client)
     : base(client)
 {
     SetMessageType(24104);
     Console.WriteLine("OutOfSync Save on " + DateTime.Now.ToString());
     client.GetLevel().SaveToJSON();
 }
        public LeaveAllianceOkMessage(Client client, Alliance alliance)
            : base(client)
        {
            SetMessageType(24111);

            m_vServerCommandType = 0x02;
            m_vAlliance = alliance;
        }
Esempio n. 6
0
 public Message(Client c)
 {
     Client = c;
     m_vType = 0;
     m_vLength = -1;
     m_vMessageVersion = 0;
     m_vData = null;
 }
Esempio n. 7
0
 public void SendCommandFailedMessage(Client c)
 {
     var p = new GlobalChatLineMessage(c);
     p.SetChatMessage("Command failed. Insufficient privileges.");
     p.SetPlayerId(0);
     p.SetPlayerName("SERVER ADMIN");
     PacketManager.ProcessOutgoingPacket(p);
 }
        public EnemyHomeDataMessage(Client client, Level ownerLevel, Level visitorLevel)
            : base(client)
        {
            SetMessageType(24107);

            m_vOwnerLevel = ownerLevel;
            m_vVisitorLevel = visitorLevel;
        }
        public GlobalChatLineMessage(Client client) : base(client)
        {
            SetMessageType(24715);

            m_vMessage = "default";
            m_vPlayerName = "default";
            m_vHomeId = 1;
            m_vCurrentHomeId = 1;
        }
 public void SendCommandFailedMessage(Client c)
 {
     //Debugger.WriteLine("GameOp command failed. Insufficient privileges.");
     var p = new GlobalChatLineMessage(c);
     p.SetChatMessage("GameOp command failed. Insufficient privileges.");
     p.SetPlayerId(0);
     p.SetPlayerName("Ultrapowa Clash Server");
     PacketManager.ProcessOutgoingPacket(p);
 }
Esempio n. 11
0
 public Message(Client c, Message m) //Clone
 {
     m_vType = m.GetMessageType();
     m_vLength = m.GetLength();
     m_vData = new byte[m.GetLength()];
     Array.Copy(m.GetData(), m_vData, m.GetLength());
     m_vMessageVersion = m.GetMessageVersion();
     this.Client = c;
 }
Esempio n. 12
0
 public Message(Client c, BinaryReader br)
 {
     Client = c;
     m_vType = br.ReadUInt16WithEndian();
     var tempLength = br.ReadBytes(3);
     m_vLength = (0x00 << 24) | (tempLength[0] << 16) | (tempLength[1] << 8) | tempLength[2];
     m_vMessageVersion = br.ReadUInt16WithEndian();
     m_vData = br.ReadBytes(m_vLength);
 }
        public NpcDataMessage(Client client, Level level, AttackNpcMessage cnam) : base (client)
        {
            SetMessageType(24133);

            this.Player = level;

            JsonBase = ObjectManager.NpcLevels[(int)cnam.LevelId - 0x01036640];
          
            LevelId = cnam.LevelId;
        }
Esempio n. 14
0
 public void SendCommandFailedMessage(Client c)
 {
     //Debugger.WriteLine("GameOp command failed. Insufficient privileges.");
     var p = new GlobalChatLineMessage(c);
     p.SetChatMessage("GameOp command failed. Insufficient privileges.");
     p.SetPlayerId(0);
     p.SetLeagueId(22);
     p.SetPlayerName("UCS System Admin");
     PacketManager.ProcessOutgoingPacket(p);
 }
Esempio n. 15
0
 public static object Read(Client c, BinaryReader br, int packetType)
 {
     if (m_vMessages.ContainsKey(packetType))
     {
         return Activator.CreateInstance(m_vMessages[packetType], c, br);
     }
     else
     {
         Console.ForegroundColor = ConsoleColor.Red;
         Console.WriteLine("[U] " + packetType.ToString() + " Unhandled Message (ignored)");
         Console.ResetColor();
         return null;
     }
 }
        private string m_vReason;//68
        
        public LoginFailedMessage(Client client) : base(client)
        {
            SetMessageType(20103);
            //SetMessageVersion(3);

            //errorcodes:
            //9: removeredirectdomain
            //8: new game version available (removeupdateurl)
            //7: removeresourcefingerprintdata
            //10: maintenance
            //11: banni temporairement
            //12: played too much
            //13: compte verrouillé
        }
Esempio n. 17
0
        private string m_vUpdateURL; //64

        #endregion Fields

        #region Constructors

        public LoginFailedMessage(Client client)
            : base(client)
        {
            SetMessageType(20103);
            SetMessageVersion(3);

            //errorcodes:
            //9: remove redirect domain
            //8: new game version available (removeupdateurl)
            //7: remove resource fingerprint data
            //10: maintenance
            //11: temporarily banned
            //12: played too much
            //13: locked account
        }
 public JoinableAllianceListMessage(Client client) : base(client)
 {
     SetMessageType(24304);
     m_vAlliances = new List<Alliance>();
 }
 public ChangeAvatarNameMessage(Client client, BinaryReader br) : base (client, br)
 {
 }
 public AskForJoinableAlliancesListMessage(Client client, BinaryReader br) : base(client, br)
 {
     //Empty pack
 }
 public LeaveAllianceMessage(Client client, BinaryReader br)
     : base(client, br)
 {
 }
 public SessionKeyMessage(Client client)
     : base(client)
 {
     SetMessageType(20000);
     Key = new byte[] { 0xD7, 0x16, 0x28, 0xA8, 0x08, 0xD2, 0x3C, 0x1D, 0xD9, 0x26, 0xA4, 0xB2, 0x1C, 0xB4, 0xB9, 0x32 };
 }
 public AllianceDataMessage(Client client, Alliance alliance)
     : base(client)
 {
     SetMessageType(24301);
     m_vAlliance = alliance;
 }
 public SearchAlliancesMessage(Client client, BinaryReader br)
     : base(client, br)
 {
 }
 public AvatarProfileMessage(Client client)
     : base(client)
 {
     SetMessageType(24334);
 }
Esempio n. 26
0
 public KeepAliveOkMessage(Client client, KeepAliveMessage cka)
     : base(client)
 {
     SetMessageType(20108);
 }
Esempio n. 27
0
 public Askfor20100(Client client, BinaryReader br)
     : base(client, br)
 {
     //Not sure if there should be something here o.O
 }
Esempio n. 28
0
 public BanChatTrigger(Client client)
     : base(client)
 {
     SetMessageType(20118);
 }
Esempio n. 29
0
 public LoginMessage(Client client, BinaryReader br)
     : base(client, br)
 {
     Decrypt();
 }
Esempio n. 30
0
 public ExecuteCommandsMessage(Client client, BinaryReader br)
     : base(client, br)
 {
     Decrypt();
 }