public static void SendGump(Mobile from, MasterLooterBackpack backpack, int page) { CloseGump(from); if ( backpack == null || backpack.Deleted || !backpack.IsOwner(from as PlayerMobile)) return; from.SendGump(new MasterLooterSetupGump(backpack, page)); }
public override void OnClick() { if (backpack == null || !backpack.IsOwner(player)) { return; } backpack.AddCurrencyFromBackpack(player); }
public override void OnClick() { if (backpack == null || !backpack.IsOwner(player)) { return; } MasterLooterSetupGump.SendGump(player, backpack, 0); }
public static void SendGump(Mobile from, MasterLooterBackpack backpack, int page) { CloseGump(from); if (backpack == null || backpack.Deleted || !backpack.IsOwner(from as PlayerMobile)) { return; } from.SendGump(new MasterLooterSetupGump(backpack, page)); }
public static void Loot_OnCommand(CommandEventArgs e) { PlayerMobile player = e.Mobile as PlayerMobile; if (player == null || !CanPlayerLoot(player)) { return; } MasterLooterBackpack backpack = GetMasterLooter(player); if (backpack == null) { player.SendMessage("You must have a Master Looter in your backpack!"); return; } if (backpack.IsOwner(player)) { backpack.Loot(player); } }
///WARNING!!! may return null!!! public static MasterLooterBackpack GetMasterLooter(PlayerMobile player) { if (player == null || player.Backpack == null) { return(null); } Serial serial = player.Serial; MasterLooterBackpack bag = null; if (Daat99MasterLootersUtils.PlayersMasterLooterList.ContainsKey(serial)) { bag = Daat99MasterLootersUtils.PlayersMasterLooterList[serial]; if (bag.IsChildOf(player.Backpack) && !bag.Deleted) { return(bag); } else { Daat99MasterLootersUtils.PlayersMasterLooterList.Remove(serial); } } bag = player.Backpack.FindItemByType(typeof(MasterLooterBackpack), false) as MasterLooterBackpack; if (bag != null && bag.Deleted) { bag = null; } if (bag != null && bag.IsOwner(player)) { Daat99MasterLootersUtils.PlayersMasterLooterList.Add(serial, bag); return(bag); } else { return(null); } }
public static void SendGump(Mobile from, MasterLooterBackpack backpack) { CloseGump(from); if ( backpack == null || backpack.Deleted || (!backpack.GoldLedger && !backpack.TokenLedger) || !backpack.IsOwner(from as PlayerMobile)) return; from.SendGump(new MasterLooterLedgerGump(backpack)); }
public static void SendGump(Mobile from, MasterLooterBackpack backpack) { CloseGump(from); if (backpack == null || backpack.Deleted || (!backpack.GoldLedger && !backpack.TokenLedger) || !backpack.IsOwner(from as PlayerMobile)) { return; } from.SendGump(new MasterLooterLedgerGump(backpack)); }