Пример #1
0
        public void RemoveObject(MapObject ob)
        {
            Objects.Remove(ob);

            switch (ob.Race)
            {
            case ObjectType.Player:
                Players.Remove((PlayerObject)ob);
                break;

            case ObjectType.Item:
                break;

            case ObjectType.NPC:
                NPCs.Remove((NPCObject)ob);
                break;

            case ObjectType.Spell:
                break;

            case ObjectType.Monster:
                MonsterObject mob = (MonsterObject)ob;
                if (mob.MonsterInfo.IsBoss)
                {
                    Bosses.Remove(mob);
                }
                break;
            }
        }
Пример #2
0
        private void SpawnBoss()
        {
            if (Bosses == null)
            {
                return;
            }

            Point3D p = SpawnPoints[0];

            ConvertOffset(ref p);

            CurrentBoss = Activator.CreateInstance(Bosses[0]) as ShadowguardBoss;
            Bosses.Remove(Bosses[0]);

            if (CurrentBoss != null)
            {
                CurrentBoss.MoveToWorld(p, Map.TerMur);
            }

            if (Bosses.Count == 0)
            {
                CurrentBoss.IsLastBoss = true;
            }

            if (Minax != null && Minax.Alive)
            {
                if (CurrentBoss is Juonar)
                {
                    Minax.Say(1156258); // You shall burn as Trinsic burned at the hands of the Vile Lich Juo'nar!
                }
                else if (CurrentBoss is Anon)
                {
                    Minax.Say(1156259); // Oh Anon my dear! Deal with these pesky intruders will you? Burn them to ASH!
                }
                else if (CurrentBoss is Virtuebane)
                {
                    Minax.Say(1156260); // You didn't think that ridiculous pie trick would work twice in a row? Virtuebane I command thee destroy these vile creatures!
                }
                else
                {
                    Minax.Say(1156261); // And now you shall bow to the King of Kings! Suffer at the hands of the Feudal Lord Ozymandias!
                }
            }
        }