增加刷新机制
This commit is contained in:
parent
928d94d5f3
commit
55fab505ec
@ -16,6 +16,8 @@ using Logic.AI;
|
||||
using Logic.CrashSight;
|
||||
using Logic.Skill;
|
||||
using MemoryPack;
|
||||
using TH1_Core.Events;
|
||||
using TH1_Core.Managers;
|
||||
using TH1_Logic.Core;
|
||||
using TH1_Logic.Net;
|
||||
using TH1_Logic.Steam;
|
||||
@ -137,14 +139,9 @@ namespace RuntimeData
|
||||
var hash128 = new Hash128();
|
||||
hash128.Append(bytes);
|
||||
var hash = hash128.ToString();
|
||||
if (string.IsNullOrEmpty(_hash))
|
||||
{
|
||||
_hash = hash;
|
||||
return;
|
||||
}
|
||||
if (hash == _hash) return;
|
||||
_hash = hash;
|
||||
|
||||
EventManager.Publish(new UpdateUIOutsideMultiplayRoomSetting());
|
||||
if (LobbyManager.Instance.Lobby.IsLobbyOwner())
|
||||
GameNetSender.Instance.UpdateLobbyData(Main.Instance.MapConfig);
|
||||
}
|
||||
|
||||
@ -200,8 +200,6 @@ namespace TH1_Logic.Steam
|
||||
if (!LobbyManager.Instance.Lobby.IsLobbyOwner()) return;
|
||||
if (message.Civ == null) return;
|
||||
Main.Instance.MapConfig.UpdateMemberCiv(message.Civ);
|
||||
Debug.Log("UpdateUIOutsideMultiplayRoomSetting");
|
||||
EventManager.Publish(new UpdateUIOutsideMultiplayRoomSetting());
|
||||
}
|
||||
|
||||
// 只有玩家会收到
|
||||
@ -215,7 +213,7 @@ namespace TH1_Logic.Steam
|
||||
if (LobbyManager.Instance.Lobby.IsLobbyOwner()) return;
|
||||
if (message.Config == null) return;
|
||||
Main.Instance.MapConfig = message.Config;
|
||||
EventManager.Publish(new UpdateUIOutsideMultiplayRoomSetting());
|
||||
Main.Instance.MapConfig.CheckMapConfigChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user