public override void OnDoubleClick(Mobile from) { if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } else { MasterLooterBackpack backpack = Daat99MasterLootersUtils.GetMasterLooter(from as PlayerMobile); if (backpack == null) { from.SendMessage("You must have your Master Looter in your backpack!"); } else if (backpack.TokenLedger) { from.SendMessage("You already have token ledger enabled on your master looter backpack."); } else if (!this.Deleted && !backpack.Deleted) { backpack.TokenLedger = true; this.Delete(); from.SendMessage("You enabled the token ledger on your master looter backpack."); } } }
public bool AddCurrency(Item currency) { if (!Daat99MasterLootersUtils.IsCurrencyType(currency.GetType())) { return(false); } if (currency is Gold && GoldLedger) { return(AddGoldPile(currency as Gold)); } if (currency is BankCheck && GoldLedger) { return(AddGoldCheck(currency as BankCheck)); } #if USE_TOKENS if (currency is Daat99Tokens && TokenLedger) { return(AddTokensPile(currency as Daat99Tokens)); } if (currency is TokenCheck && TokenLedger) { return(AddTokenCheck(currency as TokenCheck)); } #endif return(false); }
private bool isCorpseLootable(PlayerMobile player, Corpse corpse) { if (corpse.Owner == null || corpse.Deleted || corpse.Owner is PlayerMobile || (corpse.Owner is BaseCreature && ((BaseCreature)corpse.Owner).IsBonded) || !Daat99MasterLootersUtils.CheckLoot(corpse, player) || corpse.IsCriminalAction(player) ) { return(false); } return(true); }
internal bool isTypeLootable(Type itemType) { if (itemType == null) { return(false); } if (lootSettings == LootSettingsEnum.Everything) { return(true); } if (Daat99MasterLootersUtils.IsCurrencyType(itemType)) { return(true); } if (lootSettings == LootSettingsEnum.Currency_Only) { return(false); } if (activeLootTypes != null && activeLootTypes.Contains(itemType)) { return(true); } if (activeBaseTypes != null) { foreach (Type type in activeBaseTypes) { if (itemType.IsSubclassOf(type)) { return(true); } } } return(false); }