Пример #1
0
        public override void OnDead(GameObject attacker)
        {
            if (_job != null)
            {
                _job.Cancel = true;
                _job        = null;
            }
            base.OnDead(attacker);

            GameObject owner = attacker.GetOwner(); // 막타친거가 플레이어가 아닐 수 도 있음 (여기선 투사체)

            if (owner.ObjectType == GameObjectType.Player)
            {
                RewardData rewardData = GetRandomReward();
                if (rewardData != null)
                {
                    Player player = (Player)owner;
                    DbTransaction.RewardPlayer(player, rewardData, Room);
                }
            }
        }