Esempio n. 1
0
        public void Reinitialize()
        {
            if (ZNet.instance.IsServer() || !ZNet.instance.IsServer() && !ZNet.instance.IsDedicated())
            {
                var pkgString = _zdo.GetString(BountyDataKey);
                var pkg       = new ZPackage(pkgString);
                try
                {
                    _bountyInfo = BountyInfo.FromPackage(pkg);
                }
                catch (Exception)
                {
                    Debug.LogError($"[EpicLoot] Error loading bounty info on creature ({name})! Possibly old or outdated bounty target, destroying creature.\nBountyData:\n{pkgString}");
                    _zdo.Set("BountyTarget", "");
                    _zdo.Set(BountyDataKey, "");
                    _character.m_nview.Destroy();
                    return;
                }
            }
            _monsterID = _zdo.GetString(MonsterIDKey);
            _isAdd     = _zdo.GetBool(IsAddKey);

            _character.m_name = _zdo.GetString(BountyTargetNameKey);
            _character.m_boss = !_zdo.GetBool(IsAddKey);
        }
Esempio n. 2
0
        public void Reinitialize()
        {
            var pkgString = _zdo.GetString(BountyDataKey);
            var pkg       = new ZPackage(pkgString);

            _bountyInfo = BountyInfo.FromPackage(pkg);

            _monsterID = _zdo.GetString(MonsterIDKey);
            _isAdd     = _zdo.GetBool(IsAddKey);

            _character.m_name = _zdo.GetString(BountyTargetNameKey);
            _character.m_boss = !_zdo.GetBool(IsAddKey);
        }