Пример #1
0
        // BaseResource.OnAttacked()
        public static void Gathering(BaseResource res, HitInfo info)
        {
            if (!Realm.Server())
            {
                return;
            }

            OnGathering.OnNext(new Events.GatherEvent(res, info));

            res.health -= info.damageAmount * info.resourceGatherProficiency;
            if ((double)res.health <= 0.0)
            {
                res.Kill(ProtoBuf.EntityDestroy.Mode.None, 0, 0.0f, new Vector3());
            }
            else
            {
                res.Invoke("UpdateNetworkStage", 0.1f);
            }
        }