Example #1
0
        public override void Die()
        {
            if (Dead)
            {
                return;
            }

            explosionDie();

            HP   = 0;
            Dead = true;

            //DeadTime = Envir.Time + DeadDelay;
            DeadTime = 0;

            Broadcast(new S.ObjectDied {
                ObjectID = ObjectID, Direction = Direction, Location = CurrentLocation, Type = (byte)2
            });

            if (EXPOwner != null && Master == null && EXPOwner.Race == ObjectType.Player)
            {
                EXPOwner.WinExp(Experience);
            }

            if (Respawn != null)
            {
                Respawn.Count--;
            }

            PoisonList.Clear();
            Envir.MonsterCount--;
            CurrentMap.MonsterCount--;
        }