public RuneCodexGump(PlayerMobile user, RuneCodex codex) : base(user) { CanDispose = false; Codex = codex; ScrollWidth = 5; ScrollHeight = 5; }
public RuneCodexGump(Mobile user, RuneCodex codex) : base(user) { CanDispose = false; Codex = codex; ScrollWidth = 5; ScrollHeight = 5; }
public override void OnAfterDuped(Item newItem) { base.OnAfterDuped(newItem); RuneCodex c = newItem as RuneCodex; if (c == null) { return; } c.AddLocked = AddLocked; c.EditLocked = EditLocked; c.RemoveLocked = RemoveLocked; c.CloneEntryChargeCost = CloneEntryChargeCost; c.RecallChargeCost = RecallChargeCost; c.GateChargeCost = GateChargeCost; c.Charges = Charges; c.Descripton = Descripton; c.Categories = new RuneCodexCategoryGrid(); c.ChargeTypes = new Dictionary <Type, int>(ChargeTypes); c.Users = new Dictionary <PlayerMobile, UICache>(); RuneCodexCategory cata, catb; RuneCodexEntry entrya, entryb; for (int cx = 0; cx < Categories.Width; cx++) { for (int cy = 0; cy < Categories.Height; cy++) { cata = Categories[cx, cy]; if (cata == null) { continue; } catb = new RuneCodexCategory(cata.Name, cata.Description, cata.Hue); c.Categories.SetContent(cx, cy, catb); for (int ex = 0; ex < cata.Entries.Width; ex++) { for (int ey = 0; ey < cata.Entries.Width; ey++) { entrya = cata.Entries[ex, ey]; if (entrya == null) { continue; } entryb = new RuneCodexEntry(entrya.Name, entrya.Description, entrya.Location); catb.Entries.SetContent(ex, ey, entryb); } } } } }