fashion UnLock...
This commit is contained in:
parent
a95197a7b5
commit
1dfec462cc
|
@ -7,6 +7,18 @@ namespace AscNet.GameServer.Handlers
|
|||
{
|
||||
#region MsgPackScheme
|
||||
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
[MessagePackObject(true)]
|
||||
public class FashionUnLockRequest
|
||||
{
|
||||
public uint FashionId { get; set; }
|
||||
}
|
||||
|
||||
[MessagePackObject(true)]
|
||||
public class FashionUnLockResponse
|
||||
{
|
||||
public int Code { get; set; }
|
||||
}
|
||||
|
||||
[MessagePackObject(true)]
|
||||
public class FashionUseRequest
|
||||
{
|
||||
|
@ -40,5 +52,21 @@ namespace AscNet.GameServer.Handlers
|
|||
|
||||
session.SendResponse(new FashionUseResponse(), packet.Id);
|
||||
}
|
||||
|
||||
[RequestPacketHandler("FashionUnLockRequest")]
|
||||
public static void HandleFashionUnLockRequestHandler(Session session, Packet.Request packet)
|
||||
{
|
||||
FashionUnLockRequest req = packet.Deserialize<FashionUnLockRequest>();
|
||||
var fashion = session.character.Fashions.Find(x => x.Id == req.FashionId);
|
||||
if (fashion is not null && fashion.IsLock)
|
||||
{
|
||||
fashion.IsLock = false;
|
||||
FashionSyncNotify fashionSync = new();
|
||||
fashionSync.FashionList.Add(fashion);
|
||||
session.SendPush(fashionSync);
|
||||
}
|
||||
|
||||
session.SendResponse(new FashionUnLockResponse(), packet.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue