public override void OnResponse(NetState state, RelayInfo info) { Mobile from = state.Mobile; switch (info.ButtonID) { case 0: { from.CloseGump(typeof(MonstrousInterredGrizzleGump)); break; } case 1: //Case uses the ActionIDs defenied above. Case 1 defenies the actions for the button with the action id 1 { Party party = Party.Get(from); if (party != null) { for (int i = 0; i < party.Count; i++) { Mobile m = party[i].Mobile; if (Utility.InRange(from.Location, m.Location, 6)) { m.MoveToWorld(new Point3D(105, 1624, 90), Map.Malas); MonstrousInterredGrizzle mig = new MonstrousInterredGrizzle(); mig.MoveToWorld(new Point3D(103, 1612, 50), Map.Malas); m_Deed.Delete(); // Delete the deed } } } else { from.MoveToWorld(new Point3D(105, 1624, 90), Map.Malas); MonstrousInterredGrizzle mig = new MonstrousInterredGrizzle(); mig.MoveToWorld(new Point3D(103, 1612, 50), Map.Malas); m_Deed.Delete(); } break; } } }
public static int GetValue(Mobile m, AosAttribute attribute) { if (!Core.AOS) { return(0); } List <Item> items = m.Items; int value = 0; for (int i = 0; i < items.Count; ++i) { Item obj = items[i]; if (obj is BaseWeapon) { AosAttributes attrs = ((BaseWeapon)obj).Attributes; if (attrs != null) { value += attrs[attribute]; } if (attribute == AosAttribute.Luck) { value += ((BaseWeapon)obj).GetLuckBonus(); } } else if (obj is BaseArmor) { AosAttributes attrs = ((BaseArmor)obj).Attributes; if (attrs != null) { value += attrs[attribute]; } if (attribute == AosAttribute.Luck) { value += ((BaseArmor)obj).GetLuckBonus(); } } else if (obj is BaseJewel) { AosAttributes attrs = ((BaseJewel)obj).Attributes; if (attrs != null) { value += attrs[attribute]; } } else if (obj is BaseClothing) { AosAttributes attrs = ((BaseClothing)obj).Attributes; if (attrs != null) { value += attrs[attribute]; } } else if (obj is Spellbook) { AosAttributes attrs = ((Spellbook)obj).Attributes; if (attrs != null) { value += attrs[attribute]; } } else if (obj is BaseQuiver) { AosAttributes attrs = ((BaseQuiver)obj).Attributes; if (attrs != null) { value += attrs[attribute]; } } else if (obj is BaseTalisman) { AosAttributes attrs = ((BaseTalisman)obj).Attributes; if (attrs != null) { value += attrs[attribute]; } } #region Mondain's Legacy if (attribute == AosAttribute.WeaponDamage) { if (BaseMagicalFood.IsUnderInfluence(m, MagicalFood.WrathGrapes)) { value += 10; // TODO check } } else if (attribute == AosAttribute.SpellDamage) { if (BaseMagicalFood.IsUnderInfluence(m, MagicalFood.WrathGrapes)) { value += 5; // TODO check } } else if (attribute == AosAttribute.CastSpeed) { if (MonstrousInterredGrizzle.UnderCacophonicAttack(m) || LadyMelisande.UnderPutridNausea(m)) { value -= 3; // TODO check } } else if (attribute == AosAttribute.WeaponSpeed || LadyMelisande.UnderPutridNausea(m)) { if (MonstrousInterredGrizzle.UnderCacophonicAttack(m)) { value -= 3; // TODO check } } if (obj is ISetItem) { ISetItem item = (ISetItem)obj; AosAttributes attrs = item.SetAttributes; if (attrs != null && item.LastEquipped) { value += attrs[attribute]; } } #endregion } return(value); }