Example #1
0
        public static void OnKilling(AbstractGameObject from, GameUnit target)
        {
            if (target.itemDrop.Length > 0)
            {
                Player owner = null;
                if (from != null)
                {
                    owner = from.Owner;
                }
                SpecialActions.SpawnItem(target.itemDrop, target.CurrentPos, owner);
            }

            if (target.IsMy())
            {
                // var myUnits = CreatureGroupManager.GetAllByPlayer(PlayersManager.GetMyPlayer());
                // var myBuildings = BuildingsGroupManager.GetAllByPlayer(PlayersManager.GetMyPlayer());
            }


            target.GroupObj.OnDeath(target, from);
        }