Ejemplo n.º 1
0
        public JsonResult <IDtoOutObjects> Delete(DtoInAddFriend dtoInFriend)
        {
            if (ModelState.IsValid)
            {
                return(Json(friendModel.Delete(dtoInFriend)));
            }

            DtoOutError error = new DtoOutError();

            error.Exception = new ObjectIsNotValidException("AddFriend");
            error.Message   = "Object accept friend is not valid";
            return(Json((IDtoOutObjects)error));
        }
Ejemplo n.º 2
0
        public static void Handle(Packet packet)
        {
            /*
             * [Debug] - FriendDel: 000000: 54 00 45 00 53 00 54 00 49 00 4E 00 47 00 00 00  T · E · S · T · I · N · G · · ·
             * 000016: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  · · · · · · · · · · · · · · · ·
             * 000032: 00 00 00 00 00 00 00 00 00 00  · · · · · · · · · ·
             *
             * [Info] - Received FriendDel (id 235, 0xEB) on 11021.
             */
            var charName = packet.Reader.ReadUnicodeStatic(21);

            FriendModel.Delete(GameServer.Instance.Database.Connection, packet.Sender.User.ActiveCharacterId, charName);

            FriendList.Handle(packet);
        }
Ejemplo n.º 3
0
        public static void Handle(Packet packet)
        {
            var charName = packet.Reader.ReadUnicodeStatic(21);

            FriendModel.Delete(GameServer.Instance.Database.Connection, packet.Sender.User.ActiveCharacterId, charName);
        }