Example #1
0
        public static CharacterNameClass Read(PacketHeader header, BinaryReader br)
        {
            CharacterNameClass dcp = new CharacterNameClass();

            dcp.Name = Utils.ReadByteString(br, 17);
            return(dcp);
        }
Example #2
0
        void SelectCharacter_Handler(Task t)
        {
            CharacterNameClass cnc = (CharacterNameClass)t.Args;
            int ID = t.Client.SelectCharacter(cnc.Name);

            t.Client.SendPacket(new SelectCharacterIDPacket(ID));
        }
Example #3
0
        void DeleteCharacter_Handler(Task t)
        {
            CharacterNameClass dcp = (CharacterNameClass)t.Args;
            int    id = t.Client.GetCharacterID(dcp.Name);
            string sql;

            if (id < 0)
            {
                sql = string.Format("DELETE FROM characters WHERE account_id={0} AND name=\"{1}\";", t.Client.AccountID, dcp.Name);
            }
            else
            {
                sql  = string.Format("DELETE FROM characters WHERE character_id={0};", id);
                sql += string.Format("DELETE FROM char_skills WHERE character_id={0};", id);
                sql += string.Format("DELETE FROM characters_toolbar WHERE character_id={0};", id);
            }
            AddDBQuery(sql, null, false);

            t.Client.SendPacket(new DeleteCharacterConfirmPacket());
        }
Example #4
0
 private void Client_OnSelectCharacter(object sender, CharacterNameClass e)
 {
     TaskProcessor.AddTask(new Task(Task.TaskType.SelectCharacter, (Connection)sender, e));
 }
Example #5
0
 public static CharacterNameClass Read(PacketHeader header, BinaryReader br)
 {
     CharacterNameClass dcp = new CharacterNameClass();
     dcp.Name = Utils.ReadByteString(br, 17);
     return dcp;
 }
Example #6
0
 void SelectCharacter_Handler(PacketHeader header, BinaryReader br)
 {
     OnSelectCharacter(this, CharacterNameClass.Read(header, br));
 }
Example #7
0
 private void Client_OnSelectCharacter(object sender, CharacterNameClass e)
 {
     TaskProcessor.AddTask(new Task(Task.TaskType.SelectCharacter, (Connection)sender, e));
 }