|
@@ -14,25 +14,18 @@ namespace GFGGame
|
|
|
{
|
|
|
for (int i = 0; i < message.RoleInfos.Count; i++)
|
|
|
{
|
|
|
- if (LeagueDataManager.Instance.LeagueData.LeagueMemberDatas.ContainsKey(message.RoleInfos[i].RoleId))
|
|
|
+ if (message.RoleInfos[i] != null && LeagueDataManager.Instance.LeagueData.LeagueMemberDatas.ContainsKey(message.RoleInfos[i].RoleId))
|
|
|
{
|
|
|
- // UpdateRoleChange(LeagueDataManager.Instance.LeagueData.LeagueMemberDatas[message.RoleInfos[i].RoleId].RoleInfo, message.RoleInfos[i]);
|
|
|
- OtherRoleInfoData roleInfo = LeagueDataManager.Instance.LeagueData.LeagueMemberDatas[message.RoleInfos[i].RoleId].RoleInfo;
|
|
|
- roleInfo = RoleDataManager.GetOtherRoleInfoData(message.RoleInfos[i]);
|
|
|
+ LeagueDataManager.Instance.LeagueData.LeagueMemberDatas.TryGetValue(message.RoleInfos[i].RoleId, out var memberDatas);
|
|
|
+ if (memberDatas != null) {
|
|
|
+ var OtherMemberData = RoleDataManager.GetOtherRoleInfoData(message.RoleInfos[i]);
|
|
|
+ LeagueDataManager.Instance.LeagueData.LeagueMemberDatas[message.RoleInfos[i].RoleId].RoleInfo = OtherMemberData;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- EventAgent.DispatchEvent(ConstMessage.OTHER_ROLE_INFO_CHANGE);
|
|
|
+ //EventAgent.DispatchEvent(ConstMessage.OTHER_ROLE_INFO_CHANGE);
|
|
|
await ETTask.CompletedTask;
|
|
|
}
|
|
|
- // private void UpdateRoleChange(OtherRoleInfoData roleInfoData, OtherRoleInfoProto roleInfoProto)
|
|
|
- // {
|
|
|
- // roleInfoData.roleId = roleInfoProto.RoleId;
|
|
|
- // roleInfoData.roleLv = roleInfoProto.RoleLvl;
|
|
|
- // roleInfoData.roleName = roleInfoProto.RoleName;
|
|
|
- // roleInfoData.headId = roleInfoProto.HeadItemId;
|
|
|
- // roleInfoData.headBorderId = roleInfoProto.HeadBorderItemId;
|
|
|
- // roleInfoData.offlineTimeSec = roleInfoProto.OfflineTimeSec;
|
|
|
- // }
|
|
|
}
|
|
|
public static class RoleInfoSProxy
|
|
|
{
|