Пример #1
0
        public void LoadBountyLedger()
        {
            if (!Common.Utils.IsServer() || ZoneSystem.instance == null)
            {
                return;
            }

            var globalKeys      = ZoneSystem.instance.GetGlobalKeys();
            var ledgerGlobalKey = globalKeys.Find(x => x.StartsWith(LedgerIdentifier));
            var ledgerData      = ledgerGlobalKey?.Substring(LedgerIdentifier.Length);

            if (string.IsNullOrEmpty(ledgerData))
            {
                BountyLedger = new BountyLedger {
                    WorldID = ZNet.m_world.m_uid
                };
            }
            else
            {
                BountyLedger = JSON.ToObject <BountyLedger>(ledgerData, _saveLoadParams);
            }
        }
Пример #2
0
 public override void OnZNetDestroyed()
 {
     BountyLedger = null;
 }