protected override bool OnBeforeDeath() { if (!base.OnBeforeDeath()) { return(false); } m_Spawner.OnNavreyKilled(); return(true); }
public override void OnDeath(Container c) { base.OnDeath(c); if (m_Spawner != null) m_Spawner.OnNavreyKilled(); if (Utility.RandomBool()) c.AddItem(new UntranslatedAncientTome()); if (0.1 >= Utility.RandomDouble()) c.AddItem(ScrollOfTranscendence.CreateRandom(30, 30)); if (0.1 >= Utility.RandomDouble()) c.AddItem(new TatteredAncientScroll()); if (Utility.RandomDouble() < 0.10) c.DropItem(new LuckyCoin()); if (Utility.RandomDouble() < 0.025) DistributeRandomArtifact(this, m_Artifact); // distribute quest items for the 'Green with Envy' quest given by Vernix List<DamageStore> rights = GetLootingRights(); for (int i = rights.Count - 1; i >= 0; --i) { DamageStore ds = rights[i]; if (!ds.m_HasRight) rights.RemoveAt(i); } // for each with looting rights... give an eye of navrey if they have the quest foreach (DamageStore d in rights) { PlayerMobile pm = d.m_Mobile as PlayerMobile; if (null != pm) { foreach (BaseQuest quest in pm.Quests) { if (quest is GreenWithEnvyQuest) { Container pack = pm.Backpack; Item item = new EyeOfNavrey(); if (pack == null || !pack.TryDropItem(pm, item, false)) pm.BankBox.DropItem(item); pm.SendLocalizedMessage(1095155); // As Navrey Night-Eyes dies, you find and claim one of her eyes as proof of her demise. break; } } } } }