示例#1
0
 public void Invoke(Session _Session, IncomingPacket _Packet)
 {
     string _item = _Packet.GetString();
     string _tipop = _Packet.GetString();
     int _periodo = _Packet.GetInt();
     int _pre = _Packet.GetInt();
     _Session.Send(_Session.User.BuyItems(_item, _tipop, _periodo, _pre));
     _Session.Send(_Session.User.GetAvatars());
 }
示例#2
0
        public void Invoke(Session _Session, IncomingPacket _Packet)
        {
            string _ctmp = _Packet.GetString();

            string msj_f = HttpUtility.HtmlEncode(_ctmp.Replace("\\\"", "\""));

            StringBuilder sb = new StringBuilder();
            StringWriter sw = new StringWriter(sb);
            using (JsonWriter writer = new JsonTextWriter(sw))
            {
                writer.Formatting = Formatting.None;
                writer.WriteStartArray();
                writer.WriteValue((int)ServerOpcode.chat);
                writer.WriteValue(msj_f);
                writer.WriteValue(_Session.User.Name);

                if (_Session.User.rank >= 24)
                    writer.WriteValue(ChatType.CHAT_TYPE_GM); //type
                else
                    writer.WriteValue(0); //type

                if (_Session.User.guild > 0)
                    writer.WriteValue(_Session.User.guild_name);

                writer.WriteEndArray();
            }

            _Session.Broadcast(sb.ToString());
        }
示例#3
0
        public void Invoke(Session _Session, IncomingPacket _Packet)
        {
            int version = _Packet.GetInt();
            int user_id = _Packet.GetInt();
            string user_key = _Packet.GetString();

            _Session.Send("[" + (int)ServerOpcode.login_profile + "]");
            _Session.User.LoadUser(version, user_id, user_key);
            _Session.Send("[" + (int)ServerOpcode.login_avatars + "]");
            _Session.User.LoadinfoAvatars();
            _Session.Send(_Session.User.PlayerInfo());

            _Session.Send(_Session.User.UpdateBoddy());

            LogConsole.Show(LogType.INFO, "Version: {0} User_id: {1} User_key: {2}", version, user_id, user_key);
        }
示例#4
0
        public void Invoke(Session _Session, IncomingPacket _Packet)
        {
            string nname = _Packet.GetString();

            _Session.Send(_Session.User.ChangeName(nname));
        }