角色控制和房间进入推送
This commit is contained in:
@@ -4,7 +4,7 @@ using Fantasy.Network.Interface;
|
||||
|
||||
namespace NB.Map.Inner;
|
||||
|
||||
public class G2Map_EnterRequestHandler : RouteRPC<Scene, G2Map_EnterRoomRequest, Map2G_EnterRoomResponse>
|
||||
public class G2Map_EnterRoomRequestHandler : RouteRPC<Scene, G2Map_EnterRoomRequest, Map2G_EnterRoomResponse>
|
||||
{
|
||||
protected override async FTask Run(Scene entity, G2Map_EnterRoomRequest request, Map2G_EnterRoomResponse response,
|
||||
Action reply)
|
||||
@@ -54,9 +54,16 @@ public class G2Map_EnterRequestHandler : RouteRPC<Scene, G2Map_EnterRoomRequest,
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
response.ErrorCode = await room.Enter(request.AccountId);
|
||||
response.ErrorCode = await room.Enter(mapUnit);
|
||||
response.RoomCode = room.Code;
|
||||
if (response.ErrorCode == ErrorCode.Successful)
|
||||
{
|
||||
mapUnit.RoomId = room.Id;
|
||||
response.Units = room.ToMapUnitInfo();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
13
Hotfix/Map/Handler/Inner/G2Map_ExitRoomRequestHandler.cs
Normal file
13
Hotfix/Map/Handler/Inner/G2Map_ExitRoomRequestHandler.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Fantasy;
|
||||
using Fantasy.Async;
|
||||
using Fantasy.Network.Interface;
|
||||
|
||||
namespace NB.Map.Inner;
|
||||
|
||||
public class G2Map_ExitRoomRequestHandler : RouteRPC<Scene, G2Map_ExitRoomRequest, Map2G_ExiRoomResponse>
|
||||
{
|
||||
protected override async FTask Run(Scene entity, G2Map_ExitRoomRequest request, Map2G_ExiRoomResponse response,
|
||||
Action reply)
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user