获取角色信息相关
This commit is contained in:
@@ -47,6 +47,7 @@ message RoleInfo
|
|||||||
repeated KeyValueInt64 Currency = 6; //货币信息
|
repeated KeyValueInt64 Currency = 6; //货币信息
|
||||||
repeated KeyValueInt64 Slots = 7; //插槽使用情况
|
repeated KeyValueInt64 Slots = 7; //插槽使用情况
|
||||||
repeated SkillInfo Skills = 8; //技能信息
|
repeated SkillInfo Skills = 8; //技能信息
|
||||||
|
repeated GearInfo Gears = 9; //钓组信息
|
||||||
int32 MapId = 9; //当前所在地图
|
int32 MapId = 9; //当前所在地图
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,4 +114,16 @@ message SkillInfo
|
|||||||
int32 ConfigId = 1; //技能配置id
|
int32 ConfigId = 1; //技能配置id
|
||||||
int32 Level = 2; //技能等级
|
int32 Level = 2; //技能等级
|
||||||
int32 Exp = 3; //技能经验
|
int32 Exp = 3; //技能经验
|
||||||
|
}
|
||||||
|
|
||||||
|
///玩家当前使用钓组信息
|
||||||
|
message GearInfo
|
||||||
|
{
|
||||||
|
int64 Rod = 1;
|
||||||
|
int64 Line = 2;
|
||||||
|
int64 Bobber = 3;
|
||||||
|
int64 Hook = 4;
|
||||||
|
int64 Bait = 5;
|
||||||
|
int64 Weight = 6;
|
||||||
|
int64 Reel = 7;
|
||||||
}
|
}
|
||||||
17
Hotfix/Game/Handler/C2Game_GetRoleInfoRequestHandler.cs
Normal file
17
Hotfix/Game/Handler/C2Game_GetRoleInfoRequestHandler.cs
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
using Fantasy;
|
||||||
|
using Fantasy.Async;
|
||||||
|
using Fantasy.Network.Interface;
|
||||||
|
using NB.Map;
|
||||||
|
|
||||||
|
namespace NB.Game;
|
||||||
|
|
||||||
|
public class C2Game_GetRoleInfoRequestHandler : RouteRPC<Player, C2Game_GetRoleInfoRequest, Game2C_GetRoleInfoResponse>
|
||||||
|
{
|
||||||
|
protected override async FTask Run(Player entity, C2Game_GetRoleInfoRequest request,
|
||||||
|
Game2C_GetRoleInfoResponse response, Action reply)
|
||||||
|
{
|
||||||
|
response.RoomId = 0;
|
||||||
|
response.RoleInfo = entity.GetRoleInfo();
|
||||||
|
await FTask.CompletedTask;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -115,9 +115,7 @@ public static class PlayerManageComponentSystem
|
|||||||
{
|
{
|
||||||
if (account.SessionRunTimeId == sessionId)
|
if (account.SessionRunTimeId == sessionId)
|
||||||
{
|
{
|
||||||
//退出的是当前的
|
await PlayerHelper.Disconnect(self.Scene, account.Id);
|
||||||
await account.Save();
|
|
||||||
self.Remove(accountId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,8 +139,7 @@ public static class PlayerHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 结构转换
|
#region 结构转换
|
||||||
|
|
||||||
public static RoleSimpleInfo GetRoleSimpleInfo(this Player self)
|
public static RoleSimpleInfo GetRoleSimpleInfo(this Player self)
|
||||||
@@ -160,6 +159,7 @@ public static class PlayerHelper
|
|||||||
{
|
{
|
||||||
var info = new RoleInfo();
|
var info = new RoleInfo();
|
||||||
info.BaseInfo = GetRoleBaseInfo(self);
|
info.BaseInfo = GetRoleBaseInfo(self);
|
||||||
|
info.RoleId = self.RouteId;
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Game\Handler\" />
|
|
||||||
<Folder Include="Game\Helper\" />
|
<Folder Include="Game\Helper\" />
|
||||||
<Folder Include="Social\Chat\" />
|
<Folder Include="Social\Chat\" />
|
||||||
<Folder Include="Social\Club\" />
|
<Folder Include="Social\Club\" />
|
||||||
|
|||||||
Reference in New Issue
Block a user