public TrashHandlerAcceptListGump(Mobile user, BaseTrashHandler handler, Gump parent = null) : base( user, parent, list: handler.Accepted, title: handler.GetType().Name + " Accept List", emptyText: "There are no Types in the list.") { TrashHandler = handler; }
public TrashHandlerIgnoreListGump(PlayerMobile user, BaseTrashHandler handler, Gump parent = null) : base( user, parent, list: handler.Ignored, title: handler.GetType().Name + " Ignore List", emptyText: "There are no Types in the list.") { TrashHandler = handler; }
private static void CMConfig() { var handlers = new List <BaseTrashHandler>(); int count = 0; HandlerTypes.ForEach( type => { BaseTrashHandler handler = type.CreateInstance <BaseTrashHandler>(); if (handler == null) { return; } handlers.Add(handler); if (CMOptions.ModuleDebug) { CMOptions.ToConsole( "Created trash handler '{0}' ({1})", handler.GetType().Name, handler.Enabled ? "Enabled" : "Disabled"); } ++count; }); CMOptions.ToConsole("Created {0:#,0} trash handler{1}", count, count != 1 ? "s" : String.Empty); handlers.ForEach( h => { if (!Handlers.ContainsKey(h.UID)) { Handlers.Add(h.UID, h); } else { Handlers[h.UID] = h; } }); ExtendedOPL.OnItemOPLRequest += AddTrashProperties; ExtendedOPL.OnMobileOPLRequest += AddTrashProperties; }