diff --git a/AlphanumComparator.cs b/AlphanumComparator.cs new file mode 100644 index 0000000..bff8cb9 --- /dev/null +++ b/AlphanumComparator.cs @@ -0,0 +1,161 @@ +/* + * The Alphanum Algorithm is an improved sorting algorithm for strings + * containing numbers. Instead of sorting numbers in ASCII order like + * a standard sort, this algorithm sorts numbers in numeric order. + * + * The Alphanum Algorithm is discussed at http://www.DaveKoelle.com + * + * Based on the Java implementation of Dave Koelle's Alphanum algorithm. + * Contributed by Jonathan Ruckwood + * + * Adapted by Dominik Hurnaus to + * - correctly sort words where one word starts with another word + * - have slightly better performance + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +using System; +using System.Collections; +using System.Text; + +/* + * Please compare against the latest Java version at http://www.DaveKoelle.com + * to see the most recent modifications + */ +namespace mudsort +{ + public class AlphanumComparator : IComparer + { + private enum ChunkType { Alphanumeric, Numeric }; + private bool InChunk(char ch, char otherCh) + { + ChunkType type = ChunkType.Alphanumeric; + + if (char.IsDigit(otherCh)) + { + type = ChunkType.Numeric; + } + + if ((type == ChunkType.Alphanumeric && char.IsDigit(ch)) + || (type == ChunkType.Numeric && !char.IsDigit(ch))) + { + return false; + } + + return true; + } + + public int Compare(object x, object y) + { + String s1 = x as string; + String s2 = y as string; + if (s1 == null || s2 == null) + { + return 0; + } + + int thisMarker = 0, thisNumericChunk = 0; + int thatMarker = 0, thatNumericChunk = 0; + + while ((thisMarker < s1.Length) || (thatMarker < s2.Length)) + { + if (thisMarker >= s1.Length) + { + return -1; + } + else if (thatMarker >= s2.Length) + { + return 1; + } + char thisCh = s1[thisMarker]; + char thatCh = s2[thatMarker]; + + StringBuilder thisChunk = new StringBuilder(); + StringBuilder thatChunk = new StringBuilder(); + + while ((thisMarker < s1.Length) && (thisChunk.Length == 0 || InChunk(thisCh, thisChunk[0]))) + { + thisChunk.Append(thisCh); + thisMarker++; + + if (thisMarker < s1.Length) + { + thisCh = s1[thisMarker]; + } + } + + while ((thatMarker < s2.Length) && (thatChunk.Length == 0 || InChunk(thatCh, thatChunk[0]))) + { + thatChunk.Append(thatCh); + thatMarker++; + + if (thatMarker < s2.Length) + { + thatCh = s2[thatMarker]; + } + } + + int result = 0; + // If both chunks contain numeric characters, sort them numerically + if (char.IsDigit(thisChunk[0]) && char.IsDigit(thatChunk[0])) + { + thisNumericChunk = Convert.ToInt32(thisChunk.ToString()); + thatNumericChunk = Convert.ToInt32(thatChunk.ToString()); + + if (thisNumericChunk < thatNumericChunk) + { + result = -1; + } + + if (thisNumericChunk > thatNumericChunk) + { + result = 1; + } + } + else + { + result = thisChunk.ToString().CompareTo(thatChunk.ToString()); + } + + if (result != 0) + { + return result; + } + } + + return 0; + } + } +} + + + + + + + + + + + + + + + + + + + diff --git a/Globals.cs b/Globals.cs new file mode 100644 index 0000000..26f2c7e --- /dev/null +++ b/Globals.cs @@ -0,0 +1,25 @@ +using System; + +using Decal.Adapter; +using Decal.Adapter.Wrappers; + +namespace mudsort +{ + public static class Globals + { + public static void Init(string pluginName, PluginHost host, CoreManager core) + { + PluginName = pluginName; + + Host = host; + + Core = core; + } + + public static string PluginName { get; private set; } + + public static PluginHost Host { get; private set; } + + public static CoreManager Core { get; private set; } + } +} diff --git a/MainView.cs b/MainView.cs new file mode 100644 index 0000000..a7548c4 --- /dev/null +++ b/MainView.cs @@ -0,0 +1,296 @@ +using System; +using VirindiViewService; +using Decal.Adapter; +using Decal.Adapter.Wrappers; +using VirindiViewService.Controls; + +namespace mudsort +{ + +class MainView : IDisposable +{ + + public static HudButton btnActivate; + public static HudCheckBox chkIdentifyOnLogin; + public static HudCheckBox chkReverseSortList; + public static HudCombo cmbObjClassFilters; + public static HudCombo cmbSortListFilters; + public static ControlGroup controls; + public static HudTextBox edtDestContainer; + public static HudTextBox edtInsertion; + public static HudTextBox edtSavedSortString1; + public static HudTextBox edtSavedSortString2; + public static HudTextBox edtSavedSortString3; + public static HudTextBox edtSortString; + public static HudTextBox edtSourceContainer; + public static HudList lstSortSettings; + public static HudProgressBar prgProgressBar; + public static ViewProperties properties; + public static HudView View; + + public void Dispose() + { + throw new NotImplementedException(); + } + + public static void lstSortSettings_Selected(Object s, int row, int col) + { + PluginCore.getInstance().lstSortSettings_Selected(s, row, col); + } + + public static void ViewInit() + { + VirindiViewService.XMLParsers.Decal3XMLParser parser = new VirindiViewService.XMLParsers.Decal3XMLParser(); + parser.ParseFromResource("mudsort.mainView.xml", out properties, out controls); + View = new VirindiViewService.HudView(properties, controls); + + edtSourceContainer = View != null ? (HudTextBox) View["edtSourceContainer"] : new HudTextBox(); + edtDestContainer = View != null ? (HudTextBox) View["edtDestContainer"] : new HudTextBox(); + edtInsertion = View != null ? (HudTextBox) View["edtInsertion"] : new HudTextBox(); + cmbObjClassFilters = View != null ? (HudCombo) View["cmbObjClassFilters"] : new HudCombo(new ControlGroup()); + edtSortString = View != null ? (HudTextBox) View["edtSortString"] : new HudTextBox(); + prgProgressBar = View != null ? (HudProgressBar) View["prgProgressBar"] : new HudProgressBar(); + btnActivate = View != null ? (HudButton) View["btnActivate"] : new HudButton(); + + cmbSortListFilters = View != null ? (HudCombo)View["cmbSortListFilters"] : new HudCombo(new ControlGroup()); + lstSortSettings = View != null ? (HudList)View["lstSortSettings"] : new HudList(); + + chkIdentifyOnLogin = View != null ? (HudCheckBox)View["chkIdentifyOnLogin"] : new HudCheckBox(); + chkReverseSortList = View != null ? (HudCheckBox)View["chkReverseSortList"] : new HudCheckBox(); + edtSavedSortString1 = View != null ? (HudTextBox)View["edtSavedSortString1"] : new HudTextBox(); + edtSavedSortString2 = View != null ? (HudTextBox)View["edtSavedSortString2"] : new HudTextBox(); + edtSavedSortString3 = View != null ? (HudTextBox)View["edtSavedSortString3"] : new HudTextBox(); + + VirindiViewService.TooltipSystem.AssociateTooltip(View["btnSourceContainer"], "Sets the source Backpack/Person/Chest for sorting to your current Selection"); + VirindiViewService.TooltipSystem.AssociateTooltip(edtSourceContainer, "The Backpack/Person/Chest the items will move from when sorted (Default = Your Character ID)"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["btnDestContainer"], "Sets the destination Backpack/Person/Chest for sorting to your current Selection"); + VirindiViewService.TooltipSystem.AssociateTooltip(edtDestContainer, "The Backpack/Person/Chest the items will move to when sorted (Default = Your Character ID)"); + VirindiViewService.TooltipSystem.AssociateTooltip(edtInsertion, "The slot # you wish to start inserting at when sorting (Default = 0)"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["btnCopySortString"], "Copies the Sort String below to your clipboard"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["btnPasteSortString"], "Pastes the contents of your clipboard into the box below"); + VirindiViewService.TooltipSystem.AssociateTooltip(edtSortString, "The Sort String to use when sorting. (Use Build tab to create a new one)"); + VirindiViewService.TooltipSystem.AssociateTooltip(cmbObjClassFilters, "Limit sorting to specific types of items"); + VirindiViewService.TooltipSystem.AssociateTooltip(btnActivate, "Begins the sorting process. Press again to cancel."); + + VirindiViewService.TooltipSystem.AssociateTooltip(cmbSortListFilters, "Limit filter based on key type"); + + VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderCode"], "Sort Flag Code (Used in Sort String)"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderName"], "Sort Flag Name"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderUp"], "Increase Sort Flag Priority"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderDown"], "Lower Sort Flag Priority"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderAdd"], "Add/Remove Sort Flag"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderOrder"], "Change Sort Flag Order (Trailing - in Sort String)"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["listHeaderKey"], "Sort Flag Key Type"); + + VirindiViewService.TooltipSystem.AssociateTooltip(View["btnPropertyDump"], "Dump ALL properties of Selected Item to chat"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["edtSavedSortString1"], "Saved Sort String #1"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["btnCopySavedSortString1"], "Copy Saved Sort String #1 to clipboard"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["btnPasteSavedSortString1"], "Paste contents of Clipboard into Saved Sort String #1"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["edtSavedSortString2"], "Saved Sort String #2"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["btnCopySavedSortString2"], "Copy Saved Sort String #2 to clipboard"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["btnPasteSavedSortString2"], "Paste contents of Clipboard into Saved Sort String #2"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["edtSavedSortString3"], "Saved Sort String #3"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["btnCopySavedSortString3"], "Copy Saved Sort String #3 to clipboard"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["btnPasteSavedSortString3"], "Paste contents of Clipboard into Saved Sort String #3"); + VirindiViewService.TooltipSystem.AssociateTooltip(View["btnSaveSettings"], "Save all settings"); + + if (View != null) + { + View.UserResizeable = true; + + chkIdentifyOnLogin.Checked = Properties.Settings.Default.IdentifyOnLogin; + chkReverseSortList.Checked = Properties.Settings.Default.ReverseSortList; + edtSortString.Text = Properties.Settings.Default.DefaultSortString; + edtSavedSortString1.Text = Properties.Settings.Default.SavedSortString1; + edtSavedSortString2.Text = Properties.Settings.Default.SavedSortString2; + edtSavedSortString3.Text = Properties.Settings.Default.SavedSortString3; + + View["btnSourceContainer"].Hit += (s, e) => + { + PluginCore.getInstance().setSourceContainer(); + }; + + View["btnDestContainer"].Hit += (s, e) => + { + PluginCore.getInstance().setDestContainer(); + }; + + View["edtInsertion"].KeyEvent += (s, e) => + { + int slot = 0; + try + { + slot = Convert.ToInt32(((HudTextBox)View["edtInsertion"]).Text); + } + catch (Exception ex) { Util.LogError(ex); } + PluginCore.getInstance().containerDestSlot = slot; + }; + + View["edtSortString"].KeyEvent += (s, e) => + { + try + { + Properties.Settings.Default.DefaultSortString = MainView.edtSortString.Text; + Properties.Settings.Default.Save(); + PluginCore.getInstance().createSortFlagListFromString(((HudTextBox)View["edtSortString"]).Text); + PluginCore.getInstance().rebuildLstSortSettings(); + } + catch (Exception ex) { Util.LogError(ex); } + }; + + View["btnCopySortString"].Hit += (s, e) => + { + try { System.Windows.Forms.Clipboard.SetText(edtSortString.Text); }catch (Exception ex) { Util.LogError(ex); } + }; + + View["btnPasteSortString"].Hit += (s, e) => + { + edtSortString.Text = System.Windows.Forms.Clipboard.GetText(); + PluginCore.getInstance().createSortFlagListFromString(edtSortString.Text); + PluginCore.getInstance().rebuildLstSortSettings(); + }; + + View["btnActivate"].Hit += (s, e) => + { + if (((HudButton) View["btnActivate"]).Text.Equals("Cancel")) + { + ((HudButton)View["btnActivate"]).Text = "Activate"; + PluginCore.getInstance().cancel(); + } + else + { + ((HudButton)View["btnActivate"]).Text = "Cancel"; + PluginCore.getInstance().activate(); + } + }; + + ((HudCombo)View["cmbSortListFilters"]).Change += (s, e) => + { + PluginCore.getInstance().createSortFlagListFromString(edtSortString.Text); + PluginCore.getInstance().rebuildLstSortSettings(); + }; + + + ((HudList)View["lstSortSettings"]).Click += new HudList.delClickedControl(lstSortSettings_Selected); + + ((HudCheckBox) View["chkIdentifyOnLogin"]).Change += (s, e) => + { + Properties.Settings.Default.IdentifyOnLogin = ((HudCheckBox)View["chkIdentifyOnLogin"]).Checked; + Properties.Settings.Default.Save(); + }; + + ((HudCheckBox)View["chkReverseSortList"]).Change += (s, e) => + { + Properties.Settings.Default.ReverseSortList = ((HudCheckBox)View["chkReverseSortList"]).Checked; + Properties.Settings.Default.Save(); + }; + + View["btnPropertyDump"].Hit += (s, e) => + { + try + { + foreach (SortFlag sf in SortFlag.sortedFlagList.Values) + { + sf.propertyDumpSelection(); + } + } + catch (Exception ex) { Util.LogError(ex); } + }; + + edtSavedSortString1.KeyEvent += (s, e) => + { + try + { + Properties.Settings.Default.SavedSortString1 = edtSavedSortString1.Text; + Properties.Settings.Default.Save(); + } + catch (Exception ex) { Util.LogError(ex); } + }; + + edtSavedSortString2.KeyEvent += (s, e) => + { + try + { + Properties.Settings.Default.SavedSortString2 = edtSavedSortString2.Text; + Properties.Settings.Default.Save(); + } + catch (Exception ex) { Util.LogError(ex); } + }; + + edtSavedSortString3.KeyEvent += (s, e) => + { + try + { + Properties.Settings.Default.SavedSortString3 = edtSavedSortString3.Text; + Properties.Settings.Default.Save(); + } + catch (Exception ex) { Util.LogError(ex); } + }; + + View["btnCopySavedSortString1"].Hit += (s, e) => + { + try + { + System.Windows.Forms.Clipboard.SetText(edtSavedSortString1.Text); + } + catch (Exception ex) { Util.LogError(ex); } + }; + + View["btnPasteSavedSortString1"].Hit += (s, e) => + { + try + { + edtSavedSortString1.Text = System.Windows.Forms.Clipboard.GetText(); + } + catch (Exception ex) { Util.LogError(ex); } + }; + + View["btnCopySavedSortString2"].Hit += (s, e) => + { + try + { + System.Windows.Forms.Clipboard.SetText(edtSavedSortString2.Text); + } + catch (Exception ex) { Util.LogError(ex); } + }; + + View["btnPasteSavedSortString2"].Hit += (s, e) => + { + try + { + edtSavedSortString2.Text = System.Windows.Forms.Clipboard.GetText(); + } + catch (Exception ex) { Util.LogError(ex); } + }; + + View["btnCopySavedSortString3"].Hit += (s, e) => + { + try + { + System.Windows.Forms.Clipboard.SetText(edtSavedSortString3.Text); + } + catch (Exception ex) { Util.LogError(ex); } + }; + + View["btnPasteSavedSortString3"].Hit += (s, e) => + { + try + { + edtSavedSortString3.Text = System.Windows.Forms.Clipboard.GetText(); + } + catch (Exception ex) { Util.LogError(ex); } + }; + + View["btnSaveSettings"].Hit += (s, e) => + { + try + { + Properties.Settings.Default.Save(); + Util.WriteToChat("Settings Saved!"); + } + catch (Exception ex) { Util.LogError(ex); } + }; + } + } +} +} diff --git a/PluginCore.cs b/PluginCore.cs new file mode 100644 index 0000000..0970769 --- /dev/null +++ b/PluginCore.cs @@ -0,0 +1,454 @@ +using System; +using System.Collections; + +using Decal.Adapter; +using Decal.Adapter.Wrappers; +using VirindiViewService.Controls; +using System.Collections.Generic; + +/* + * Template created by Mag-nus. 8/19/2011, VVS added by Virindi-Inquisitor. + * Plugin created by mudzereli 2012/12 +*/ + +namespace mudsort +{ + +[WireUpBaseEvents] +[FriendlyName("mudsort")] +public class PluginCore : PluginBase +{ + + const int ICON_ADD = 0x60011F9; // GREEN CIRCLE + const int ICON_MOVE_DOWN = 0x60028FD; // RED DOWN ARROW + const int ICON_MOVE_UP = 0x60028FC; // GREEN UP ARROW + const int ICON_REMOVE = 0x60011F8; //RED CIRCLE SLASH + private static PluginCore instance; + public int containerDest = 0; + public int containerDestSlot = 0; + public int containerSource = 0; + private State CURRENT_STATE = State.IDLE; + private ArrayList sortFlags = new ArrayList(); + private ArrayList sortList = new ArrayList(); + private Queue sortQueue = new Queue(); + + public static PluginCore getInstance() + { + return instance; + } + + public void activate() + { + try + { + CURRENT_STATE = State.INITIATED; + sortQueue.Clear(); + sortList.Clear(); + foreach (WorldObject worldObject in Core.WorldFilter.GetByContainer(containerSource)) + { + if (worldObject.Values(LongValueKey.EquippedSlots, 0) == 0 && Core.WorldFilter[worldObject.Id].Values(LongValueKey.Slot) != -1 && !worldObject.ObjectClass.Equals(ObjectClass.Foci) && (MainView.cmbObjClassFilters.Current == 0 || worldObject.ObjectClass.ToString().Equals(((HudStaticText)MainView.cmbObjClassFilters[MainView.cmbObjClassFilters.Current]).Text))) + { + addWorldObject(sortList, worldObject, false); + } + } + Util.WriteToChat(sortList.Count + " items added to sort list..."); + CoreManager.Current.RenderFrame += new EventHandler(Current_RenderFrame_Sort); + } + catch (Exception e) { Util.LogError(e); } + } + + public void addWorldObject(System.Collections.IList toList, WorldObject worldObject, bool recursive) + { + if (!worldObject.HasIdData) + { + Core.IDQueue.AddToQueue(worldObject.Id); + } + if (worldObject.ObjectClass.Equals(ObjectClass.Container)) + { + if (recursive) + { + foreach (WorldObject obj in Core.WorldFilter.GetByContainer(worldObject.Id)) + { + addWorldObject(toList, obj, recursive); + } + } + } + else + { + toList.Add(worldObject); + } + } + + public void cancel() + { + try + { + sortQueue.Clear(); + CURRENT_STATE = State.IDLE; + CoreManager.Current.RenderFrame -= new EventHandler(Current_RenderFrame_Sort); + MainView.prgProgressBar.Position = 0; + MainView.prgProgressBar.PreText = ""; + } + catch (Exception ex) { Util.LogError(ex); } + } + + [BaseEvent("LoginComplete", "CharacterFilter")] + private void CharacterFilter_LoginComplete(object sender, EventArgs e) + { + try + { + Util.WriteToChat("Plugin online."); + cancel(); + createSortFlagListFromString(MainView.edtSortString.Text); + rebuildLstSortSettings(); + + if (Properties.Settings.Default.IdentifyOnLogin) + { + foreach (WorldObject obj in Core.WorldFilter.GetByContainer(Core.CharacterFilter.Id)) + { + if (obj.ObjectClass.Equals(ObjectClass.Container)) + { + foreach (WorldObject o in Core.WorldFilter.GetByContainer(obj.Id)) + { + Core.IDQueue.AddToQueue(obj.Id); + } + } + Core.IDQueue.AddToQueue(obj.Id); + } + } + + MainView.edtSourceContainer.Text = Core.CharacterFilter.Id.ToString(); + containerSource = Core.CharacterFilter.Id; + MainView.edtDestContainer.Text = Core.CharacterFilter.Id.ToString(); + containerDest = Core.CharacterFilter.Id; + } + catch (Exception ex) { Util.LogError(ex); } + } + + [BaseEvent("Logoff", "CharacterFilter")] + private void CharacterFilter_Logoff(object sender, EventArgs e) + { + try + { + cancel(); + Util.WriteToChat("Plugin offline."); + } + catch (Exception ex) { Util.LogError(ex); } + } + + public void createSortFlagListFromString(String str) + { + sortFlags.Clear(); + + foreach (SortFlag sf in SortFlag.sortedFlagList.Values) + { + sf.descending = false; + } + + String[] sortKeys = str.Split(','); + for (int i = 0; i < sortKeys.Length; i++) + { + try + { + SortFlag sf = SortFlag.decode(sortKeys[i]); + sf.descending = sortKeys[i].Length == 3 && sortKeys[i].Substring(2, 1).Equals("-"); + sortFlags.Add(sf); + } + catch (Exception e) { Util.LogError(e); } + } + } + + private void Current_RenderFrame_Sort(object sender, EventArgs e) + { + try + { + if (CURRENT_STATE == State.IDLE) + { + CoreManager.Current.RenderFrame -= new EventHandler(Current_RenderFrame_Sort); + } + else if (CURRENT_STATE == State.INITIATED) + { + bool identifying = false; + MainView.prgProgressBar.Max = sortList.Count; + MainView.prgProgressBar.PreText = "identifying..."; + foreach (WorldObject obj in sortList) + { + if (!obj.HasIdData) + { + identifying = true; + MainView.prgProgressBar.Position = sortList.IndexOf(obj) + 1; + break; + } + } + if (!identifying) + { + CURRENT_STATE = State.BUILDING_LIST; + MainView.prgProgressBar.Position = MainView.prgProgressBar.Max; + } + } + else if (CURRENT_STATE == State.BUILDING_LIST) + { + String[] sortKeys = MainView.edtSortString.Text.Split(','); + System.Collections.ArrayList sortValueList = new System.Collections.ArrayList(); + for (int i = sortKeys.Length - 1; i >= 0; i--) + { + foreach (WorldObject worldObject in sortList) + { + SortFlag sf = SortFlag.decode(sortKeys[i]); + String sortMetric = sf.valueOf(worldObject); + if (!sortValueList.Contains(sortMetric)) + { + sortValueList.Add(sortMetric); + } + } + sortValueList.Sort(new AlphanumComparator()); + System.Collections.ArrayList newSortList = new System.Collections.ArrayList(); + if (!(sortKeys[i].Length == 3 && sortKeys[i].Substring(2, 1).Equals("-"))) + { + sortValueList.Reverse(); + } + foreach (Object sortValue in sortValueList) + { + foreach (WorldObject worldObject in sortList) + { + String sortMetric = SortFlag.decode(sortKeys[i]).valueOf(worldObject); + if (sortMetric.Equals(sortValue)) + { + newSortList.Add(worldObject); + } + } + } + sortList = newSortList; + if (i == 0) + { + if (Properties.Settings.Default.ReverseSortList) + { + sortList.Reverse(); + } + foreach (WorldObject worldObject in sortList) + { + sortQueue.Enqueue(worldObject); + } + } + } + Util.WriteToChat(sortQueue.Count + " items in queue..."); + CURRENT_STATE = State.MOVING_ITEMS; + MainView.prgProgressBar.PreText = "working..."; + MainView.prgProgressBar.Max = sortQueue.Count; + } + else if (CURRENT_STATE == State.MOVING_ITEMS) + { + if (sortQueue.Count > 0) + { + if (Core.Actions.BusyState == 0) + { + MainView.prgProgressBar.Position = MainView.prgProgressBar.Max - sortQueue.Count; + WorldObject obj = (WorldObject)sortQueue.Dequeue(); + if (containerDest != Core.CharacterFilter.Id && Core.WorldFilter[containerDest].ObjectClass.Equals(ObjectClass.Player)) + { + Globals.Host.Actions.GiveItem(obj.Id, containerDest); + } + else + { + Globals.Host.Actions.MoveItem(obj.Id, containerDest, containerDestSlot, true); + } + } + } + else + { + CURRENT_STATE = State.IDLE; + MainView.prgProgressBar.PreText = "done!"; + MainView.prgProgressBar.Position = MainView.prgProgressBar.Max; + MainView.btnActivate.Text = "Activate"; + Util.WriteToChat("done sorting items!"); + } + } + } + catch (Exception ex) { Util.LogError(ex); } + } + + public void lstSortSettings_Selected(object sender, int row, int col) + { + try + { + HudList.HudListRowAccessor acc = MainView.lstSortSettings[row]; + String code = ((HudStaticText) acc[0]).Text.ToString(); + SortFlag flag = SortFlag.decode(code); + bool changed = false; + if (col < 2) // DUMP PROPERTIES + { + flag.propertyDumpSelection(); + } else if (col == 2) // MOVE UP + { + if (sortFlags.Contains(flag)) + { + int index = sortFlags.IndexOf(flag); + if (index > 0) + { + SortFlag f = (SortFlag)sortFlags[index - 1]; + sortFlags[index - 1] = sortFlags[index]; + sortFlags[index] = f; + changed = true; + } + } + } else if (col == 3) // MOVE DOWN + { + if (sortFlags.Contains(flag)) + { + int index = sortFlags.IndexOf(flag); + if (index < sortFlags.Count - 1) + { + SortFlag f = (SortFlag)sortFlags[index + 1]; + sortFlags[index + 1] = sortFlags[index]; + sortFlags[index] = f; + changed = true; + } + } + } + else if (col == 4) // REMOVE + { + if (sortFlags.Contains(flag)) + { + sortFlags.Remove(flag); + flag.descending = false; + } + else + { + sortFlags.Add(flag); + } + changed = true; + } + else if (col == 5) + { + if (sortFlags.Contains(flag)) + { + flag.descending = !flag.descending; + changed = true; + } + } + if (changed) + { + MainView.edtSortString.Text = sortFlagListToString(); + rebuildLstSortSettings(); + } + } + catch (Exception ex) { Util.LogError(ex); } + } + + public void rebuildLstSortSettings() + { + MainView.lstSortSettings.ClearRows(); + foreach (SortFlag iFlag in sortFlags) + { + HudList.HudListRowAccessor row = MainView.lstSortSettings.AddRow(); + ((HudStaticText)row[0]).Text = iFlag.code; + ((HudStaticText)row[1]).Text = iFlag.name; + ((HudPictureBox)row[2]).Image = ICON_MOVE_UP; + ((HudPictureBox)row[3]).Image = ICON_MOVE_DOWN; + ((HudPictureBox)row[4]).Image = ICON_REMOVE; + ((HudPictureBox)row[5]).Image = iFlag.descending ? ICON_MOVE_DOWN : ICON_MOVE_UP; + ((HudPictureBox)row[6]).Image = iFlag.keyIcon; + VirindiViewService.TooltipSystem.AssociateTooltip((HudStaticText)row[0], "Click To Dump Selected Item's " + iFlag.key.ToString() + " To Chat"); + VirindiViewService.TooltipSystem.AssociateTooltip((HudStaticText)row[1], "Click To Dump Selected Item's " + iFlag.key.ToString() + " To Chat"); + VirindiViewService.TooltipSystem.AssociateTooltip((HudPictureBox)row[2], "Click To Increase Sort Priority Of " + iFlag.key.ToString()); + VirindiViewService.TooltipSystem.AssociateTooltip((HudPictureBox)row[3], "Click To Decrease Sort Priority Of " + iFlag.key.ToString()); + VirindiViewService.TooltipSystem.AssociateTooltip((HudPictureBox)row[4], "Click To Remove Sorting By " + iFlag.key.ToString()); + VirindiViewService.TooltipSystem.AssociateTooltip((HudPictureBox)row[5], "Click To Reverse Sort Order Of " + iFlag.key.ToString()); + VirindiViewService.TooltipSystem.AssociateTooltip((HudPictureBox)row[6], iFlag.key.GetType().Name); + } + foreach (SortFlag iFlag in SortFlag.sortedFlagList.Values) + { + int id = 6; + if (iFlag.key is StringValueKey) { + id = 2; + } else if (iFlag.key is LongValueKey) { + id = 3; + } else if (iFlag.key is DoubleValueKey) { + id = 4; + } else if (iFlag.key is BoolValueKey) { + id = 5; + } + bool common = false; + if (SortFlag.CommonFlags.Contains(iFlag.name)) + { + common = true; + } + if (!sortFlags.Contains(iFlag) && ((MainView.cmbSortListFilters.Current == 0 && common) || MainView.cmbSortListFilters.Current == 1 || MainView.cmbSortListFilters.Current == id)) + { + HudList.HudListRowAccessor row = MainView.lstSortSettings.AddRow(); + ((HudStaticText)row[0]).Text = iFlag.code; + ((HudStaticText)row[1]).Text = iFlag.name; + ((HudPictureBox)row[2]).Image = null; + ((HudPictureBox)row[3]).Image = null; + ((HudPictureBox)row[4]).Image = ICON_ADD; + ((HudPictureBox)row[5]).Image = null; + ((HudPictureBox)row[6]).Image = iFlag.keyIcon; + VirindiViewService.TooltipSystem.AssociateTooltip((HudStaticText)row[0], "Click To Dump Selected Item's " + iFlag.key.ToString() + " To Chat"); + VirindiViewService.TooltipSystem.AssociateTooltip((HudStaticText)row[1], "Click To Dump Selected Item's " + iFlag.key.ToString() + " To Chat"); + VirindiViewService.TooltipSystem.AssociateTooltip((HudPictureBox)row[4], "Click To Sort By " + iFlag.key.ToString()); + VirindiViewService.TooltipSystem.AssociateTooltip((HudPictureBox)row[6], iFlag.key.GetType().Name); + } + + } + } + + public void setDestContainer() + { + try + { + int selected = Core.Actions.CurrentSelection; + if (selected != 0 && Core.WorldFilter[selected].Values(LongValueKey.ItemSlots) > 0) + { + containerDest = selected; + } + else + { + containerDest = 0; + } + MainView.edtDestContainer.Text = containerDest != 0 ? containerDest.ToString() : "invalid!"; + } + catch (Exception ex) { Util.LogError(ex); } + } + + public void setSourceContainer() + { + try + { + int selected = Core.Actions.CurrentSelection; + if (selected != 0 && Core.WorldFilter[selected].Values(LongValueKey.ItemSlots) > 0) + { + containerSource = selected; + } + else + { + containerSource = 0; + } + MainView.edtSourceContainer.Text = containerSource != 0 ? containerSource.ToString() : "invalid!"; + } + catch (Exception ex) { Util.LogError(ex); } + } + + protected override void Shutdown(){} + + private String sortFlagListToString() + { + String s = ""; + foreach (SortFlag iFlag in sortFlags) + { + s = s + iFlag.code + (iFlag.descending ? "-" : "") + (sortFlags.IndexOf(iFlag) != sortFlags.Count - 1 ? "," : ""); + } + return s; + } + + protected override void Startup() + { + try + { + instance = this; + Globals.Init("mudsort", Host, Core); + MainView.ViewInit(); + } + catch (Exception ex) { Util.LogError(ex); } + } +} +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b003e8b --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MudSort")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Mudzereli")] +[assembly: AssemblyProduct("MudSort")] +[assembly: AssemblyCopyright("Copyright © Mudzereli 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("0a2f484b-54a6-4084-8286-c374231148a6")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.5.0.0")] +[assembly: AssemblyFileVersion("1.5.0.0")] diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..e27eddd --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,98 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.18444 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace mudsort.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("OC,ES,CV,AL-,AB-,DG-,ED-,ML,MA,NM")] + public string DefaultSortString { + get { + return ((string)(this["DefaultSortString"])); + } + set { + this["DefaultSortString"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool IdentifyOnLogin { + get { + return ((bool)(this["IdentifyOnLogin"])); + } + set { + this["IdentifyOnLogin"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool ReverseSortList { + get { + return ((bool)(this["ReverseSortList"])); + } + set { + this["ReverseSortList"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("OC,EP,MA,AL-,MX-")] + public string SavedSortString1 { + get { + return ((string)(this["SavedSortString1"])); + } + set { + this["SavedSortString1"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("AL-,MX-")] + public string SavedSortString2 { + get { + return ((string)(this["SavedSortString2"])); + } + set { + this["SavedSortString2"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("BR-")] + public string SavedSortString3 { + get { + return ((string)(this["SavedSortString3"])); + } + set { + this["SavedSortString3"] = value; + } + } + } +} diff --git a/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..b03fdb3 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,24 @@ + + + + + + OC,ES,CV,AL-,AB-,DG-,ED-,ML,MA,NM + + + False + + + False + + + OC,EP,MA,AL-,MX- + + + AL-,MX- + + + BR- + + + \ No newline at end of file diff --git a/Settings.cs b/Settings.cs new file mode 100644 index 0000000..7d9b0ef --- /dev/null +++ b/Settings.cs @@ -0,0 +1,28 @@ +namespace mudsort.Properties { + + + // This class allows you to handle specific events on the settings class: + // The SettingChanging event is raised before a setting's value is changed. + // The PropertyChanged event is raised after a setting's value is changed. + // The SettingsLoaded event is raised after the setting values are loaded. + // The SettingsSaving event is raised before the setting values are saved. + internal sealed partial class Settings { + + public Settings() { + // // To add event handlers for saving and changing settings, uncomment the lines below: + // + // this.SettingChanging += this.SettingChangingEventHandler; + // + // this.SettingsSaving += this.SettingsSavingEventHandler; + // + } + + private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { + // Add code to handle the SettingChangingEvent event here. + } + + private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { + // Add code to handle the SettingsSaving event here. + } + } +} diff --git a/SortFlag.cs b/SortFlag.cs new file mode 100644 index 0000000..a57dab8 --- /dev/null +++ b/SortFlag.cs @@ -0,0 +1,211 @@ +using System; +using System.Collections; +using Decal.Adapter.Wrappers; +using System.Collections.Generic; + +namespace mudsort +{ + public class SortFlag + { + public static SortedList sortedFlagList = new SortedList(new AlphanumComparator()); + + public static SortFlag OBJECT_CLASS = new SortFlag("ObjectClass",0x29D1,"OC", "OC"); + + public String name; + public String code; + public Object key; + public bool descending = false; + public int keyIcon; + public static ArrayList CommonFlags = new ArrayList(); + + static SortFlag() { + try + { + CommonFlags.Add("ObjectClass"); + CommonFlags.Add("EquipableSlots"); + CommonFlags.Add("Coverage"); + CommonFlags.Add("ArmorLevel"); + CommonFlags.Add("AttackBonus"); + CommonFlags.Add("DamageBonus"); + CommonFlags.Add("ElementalDmgBonus"); + CommonFlags.Add("MinLevelRestrict"); + CommonFlags.Add("Material"); + CommonFlags.Add("Name"); + CommonFlags.Add("ActivationReqSkillId"); + CommonFlags.Add("ArmorSet"); + CommonFlags.Add("Attuned"); + CommonFlags.Add("Bonded"); + CommonFlags.Add("Burden"); + CommonFlags.Add("CurrentMana"); + CommonFlags.Add("DamageType"); + CommonFlags.Add("Heritage"); + CommonFlags.Add("Icon"); + CommonFlags.Add("MaxDamage"); + CommonFlags.Add("RareId"); + CommonFlags.Add("SkilLevelReq"); + CommonFlags.Add("SlayerSpecies"); + CommonFlags.Add("StackCount"); + CommonFlags.Add("Value"); + CommonFlags.Add("WieldReqAttribute"); + CommonFlags.Add("WieldReqType"); + CommonFlags.Add("WieldReqValue"); + CommonFlags.Add("Workmanship"); + CommonFlags.Add("MeleeDefenseBonus"); + CommonFlags.Add("Variance"); + ArrayList codes = new ArrayList(); + codes.Add("OC"); + ArrayList enums = new ArrayList(); + enums.AddRange(Enum.GetValues(typeof(StringValueKey))); + enums.AddRange(Enum.GetValues(typeof(LongValueKey))); + enums.AddRange(Enum.GetValues(typeof(DoubleValueKey))); + enums.AddRange(Enum.GetValues(typeof(BoolValueKey))); + foreach (var key in enums) + { + String name = key.ToString(); + String code = ""; + foreach (Char c in name) + { + if ("ABCDEFGHIJKLMNOPQRSTUVWXYZ".Contains(c.ToString())) + { + code = code + c; + if (code.Length == 2) + { + if (codes.Contains(code)) + { + code = code.Substring(0, 1); + } + else + { + break; + } + } + } + } + if (code.Length < 2) + { + foreach (Char c in name) + { + if ("bcdfghjklmnpqrstvwxyz".Contains(c.ToString())) + { + code = code + c; + } + if (code.Length == 2) + { + if (codes.Contains(code.ToUpper())) + { + code = code.Substring(0, 1); + } + else + { + break; + } + } + } + code = code.ToUpper(); + } + if (code.Length < 2) + { + code = name.Substring(0, 2); + code = code.ToUpper(); + } + int keyIcon = 0x29D1; + if (key is StringValueKey) + { + keyIcon = 0x29CC; + } + else if (key is LongValueKey) + { + keyIcon = 0x29CD; + } + else if (key is DoubleValueKey) + { + keyIcon = 0x29CE; + } + else if (key is BoolValueKey) + { + keyIcon = 0x29CF; + } + if (!codes.Contains(code) && !sortedFlagList.ContainsKey(keyIcon + name)) + { + codes.Add(code); + new SortFlag(name, keyIcon, code, key); + } + else + { + Util.Log("duplicate code entry : " + code); + } + } + } + catch (Exception e) { Util.LogError(e); } + } + + public SortFlag(String name, int keyIcon, String code, Object key) + { + this.name = name; + this.code = code; + this.key = key; + this.keyIcon = keyIcon; + sortedFlagList.Add(keyIcon + name, this); + } + + public static SortFlag decode(String decode) + { + foreach (SortFlag flag in sortedFlagList.Values) + { + if (decode.Length >= 2 && flag.code.Equals(decode.Substring(0,2))) + { + return flag; + } + } + return null; + } + + public String valueOf(WorldObject obj) + { + if (key is DoubleValueKey) + { + return (((int) ((Double) directValueOf(obj) * 100)).ToString()); + } + else + { + return directValueOf(obj).ToString(); + } + } + + public Object directValueOf(WorldObject obj) + { + if (key.Equals("OC")) + { + return obj.ObjectClass; + } + else if (key is StringValueKey) + { + return obj.Values((StringValueKey)key); + } + else if (key is LongValueKey) + { + return obj.Values((LongValueKey)key); + } + else if (key is DoubleValueKey) + { + return obj.Values((DoubleValueKey)key); + } + else if (key is BoolValueKey) + { + return obj.Values((BoolValueKey)key); + } + else + { + return obj; + } + } + + public String propertyDumpSelection() + { + WorldObject obj = Globals.Core.WorldFilter[Globals.Core.Actions.CurrentSelection]; + String props = obj.Values(StringValueKey.Name) + " : " + name.ToString() + " : " + directValueOf(obj); + Util.WriteToChat(props); + return props; + } + } +} \ No newline at end of file diff --git a/State.cs b/State.cs new file mode 100644 index 0000000..1af8902 --- /dev/null +++ b/State.cs @@ -0,0 +1,11 @@ +namespace mudsort +{ + public enum State + { + IDLE, + INITIATED, + IDENTIFYING, + BUILDING_LIST, + MOVING_ITEMS + } +} \ No newline at end of file diff --git a/Util.cs b/Util.cs new file mode 100644 index 0000000..bf802b2 --- /dev/null +++ b/Util.cs @@ -0,0 +1,58 @@ +using System; +using System.IO; + +namespace mudsort +{ + public static class Util + { + public static void Log(String message) + { + try + { + using (StreamWriter writer = new StreamWriter(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + @"\Asheron's Call\" + Globals.PluginName + " log.txt", true)) + { + writer.WriteLine(DateTime.Now.ToString() + ": " + message); + writer.Close(); + } + } + catch + { + } + } + + public static void LogError(Exception ex) + { + try + { + using (StreamWriter writer = new StreamWriter(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + @"\Asheron's Call\" + Globals.PluginName + " errors.txt", true)) + { + writer.WriteLine("============================================================================"); + writer.WriteLine(DateTime.Now.ToString()); + writer.WriteLine("Error: " + ex.Message); + writer.WriteLine("Source: " + ex.Source); + writer.WriteLine("Stack: " + ex.StackTrace); + if (ex.InnerException != null) + { + writer.WriteLine("Inner: " + ex.InnerException.Message); + writer.WriteLine("Inner Stack: " + ex.InnerException.StackTrace); + } + writer.WriteLine("============================================================================"); + writer.WriteLine(""); + writer.Close(); + } + } + catch + { + } + } + + public static void WriteToChat(string message) + { + try + { + Globals.Host.Actions.AddChatText("## " + Globals.PluginName + " ##: " + message, 5); + } + catch (Exception ex) { LogError(ex); } + } + } +} diff --git a/app.config b/app.config new file mode 100644 index 0000000..f2b2eaf --- /dev/null +++ b/app.config @@ -0,0 +1,30 @@ + + + + +
+ + + + + + OC,ES,CV,AL-,AB-,DG-,ED-,ML,MA,NM + + + False + + + False + + + OC,EP,MA,AL-,MX- + + + AL-,MX- + + + BR- + + + + \ No newline at end of file diff --git a/bin/Release/Decal.Adapter.dll b/bin/Release/Decal.Adapter.dll new file mode 100644 index 0000000..16afabf Binary files /dev/null and b/bin/Release/Decal.Adapter.dll differ diff --git a/bin/Release/Decal.Adapter.xml b/bin/Release/Decal.Adapter.xml new file mode 100644 index 0000000..45fd223 --- /dev/null +++ b/bin/Release/Decal.Adapter.xml @@ -0,0 +1,2529 @@ + + + + Decal.Adapter + + + + + + + + + + A doubly-linked list with a Dictionary index. Duplicate items are not allowed. + -Add is O(1) + -Contains is O(1) + -Remove is O(1) + -Get/set by index is O(n) + -Insert is O(n) + -RemoveAt is O(n) + Additionally, a cached pointer (with associated index) is kept pointing to the last used index item. + When looking up an item by index, the list is walked from the head, tail, or cached index pointer. + Thus, doing multiple operations in index order is O(1) even without an enumerator. + + + + + + This method gets the node corresponding to a particular index. To get there, + the list is traversed from the head, tail, or cached index pointer (if valid). + + + + + + + An IDQueue that is fair with respect to plugins and round-robin with respect to ID requests. + + + + + A scheduler: callers request actions. Multiple callers can request the same action. + -Each caller gets one action, then the other callers get a turn. + -If a new caller arrives, it is given priority in the turns list. + -Everytime a caller gets a turn, it selects its next available action in round-robin fashion. + -If all of a caller's actions are unavailable when it is that caller's turn, its turn is lost and it must wait in line again. + -If no caller can take a turn, the null action is returned. + Thus if multiple callers request the same action, it will be tried more often + since the attempt will occur during the turns of multiple callers. + + + + + + + + + The most times an action can be attempted before it fails. + An ACTIONTYPE to return when no action is available. + + + + Adds a request to the queue. + + The game object ID to identify. + + + + Adds a request to the queue with a timeout time. + Note: if something else requests this ID while this request is still pending, + the later of the two timeouts will prevail. + + The game object ID to identify. + + + + + Send an ID request which bypasses the queue. + ***CURRENTLY NOT IMPLEMENTED*** + + The game object ID to identify. + + + + Used for internal wiring up of base-class variables. + Called by FilterProxy + + Host (pluginsite) object + + + + + + + + + Sorts of events to be fired by the PluginProxy + + + + + Base class used to create Decal Plugins + + + + + Default Constructor for the Base class. Should be called by all decendants. + + + + + Called by the base class to Wire Up events. + + + + + Called by the base class to Unwire events + + + + + Used for internal wiring up of base-class variables. + Called by PluginProxy + + Host (pluginsite) object + + + + Loads a new view into the internal list (should only be called internally) + + view name + resource path + + + + Retrieves a view from the internal list + + view name + the specified view or null + + + + Wrapper Object to the Host. + Similar to IPluginSite + + + + + The Default view + + + + + BindingFlags for internal scanning + + + + + Defines a response to a message request + + + + + Create a new AdapterMessageResponse + + Did these actions succeed? + + + + Whether or not the actions take due to the message succeeded + + + + + Whether or not all handlers have completed processing + + + + + The base from which Adapter messages derive + + + + + Acknowledges that the object intends to process the message + + The object that will do the processing + + + + Signals completion of message processing + + The object that handled the message + The message response + + + + Fires for each handler that completes processing of the message + + + + + Decal Message Factory Implementation + + + + + Construct a new MessageFacytory instance + + + + + Creates an IMessage2 instance from the provided raw packet data + + Pointer to the raw packet bytes + Size of pData in bytes + Packet direction + IMessage2 instance to navigate the packet + + + + IMessageIterator base implementation + + + + + IMessage2 Implementation + + + + + Public constructor... + + + + + Internal constructor to wrap the Adapter parser + + Adapter Message instance + + + + Get the field name for the specified index + + message member index + field name + + + + Return the raw bytes for the specified member + + Member index (string or int) + Byte array containing the member data + + + + Return the specified member struct + + Member index (string or int) + Member data + + + + Return the specified member data + + Member index (string or int) + Member data + + + + Return an IMessageIterator instance for this packet + + + + + Return the number of items within this structure + + + + + Return the raw bytes of this structure + + + + + Return the message type + + + + + + + + + + Lifetime Service required for the .NET Surrogate to function. + + + + + Get Mapped Keyboard Key + + Name to retrive mapping for. + Mapped Key + + + + Load the Assembly requested, first checking our internal cache + + Assembly name to load + Path to the assembly + Loaded Assembly, from cache if already loaded + + + + Returns if the service was initialized by Decal. + + + + + Returns the Singleton instance of the Service + (Initializes if necessary) + + + + + Tracing level for Decal.Adapter, and all loaded plugins. + + + + + FileService (Decal.FileService) + + + + + Decal Hotkey System + + + + + Character Filter + + + + + Direct3D Service + + + + + + + + + + Message Direction + + + + + Server to Client message + + + + + Client to Server message + + + + + Protocol Message Data + + + + + Represents Message data + + + + + Return the field name for the specified index + + Field index + Name of the field + + + + Returns the passed in value? + + + + + + + Returns the specified child structure + + Field index + MessageStruct for the specified field + + + + Returns the specified child structure + + Field name + MessageStruct for the specified field + + + + Returns the specified field value + + Type of the field + Field index + Field value cast to the specified FieldType + + + + Returns the specified field value + + Type of the field + Field name + Field value cast to the specified FieldType + + + + Returns the raw bytes of the specified field + + Field index + Raw field value + + + + Returns the raw bytes of the specified field + + Field name + Raw field value + + + + Returns the number of fields (or vector length) + + + + + Returns the specified field data + + Field index + Field value + + + + Returns the specified field data + + Field name + Field value + + + + Returns the raw bytes for this field + + + + + Returns the next object in the (parent) vector + + + + + Returns the parent field + + + + + Return the field name for the specified index + + Field index + Name of the field + + + + Returns the passed in value? + + + + + + + Returns the specified child structure + + Field index + MessageStruct for the specified field + + + + Returns the specified child structure + + Field name + MessageStruct for the specified field + + + + Returns the specified field value + + Type of the field + Field index + Field value cast to the specified FieldType + + + + Returns the specified field value + + Type of the field + Field name + Field value cast to the specified FieldType + + + + Returns the raw bytes of the specified field + + Field index + Raw field value + + + + Returns the raw bytes of the specified field + + Field name + Raw field value + + + + Message Type + + + + + Returns the number of fields (or vector length) + + + + + Returns the specified field data + + Field index + Field value + + + + Returns the specified field data + + Field name + Field value + + + + Returns the raw bytes for this field + + + + + Returns the next object in the (parent) vector + + + + + Returns the parent field + + + + + Name named attribute + + + + + Defines a plugin view + + + + + Constructs a new view from the specified resource + + Embedded resource path + + + + The resource to load + + + + + ControlReference AutoWireup + + + + + Construct a new ControlReference + + Control to reference + + + + The Control Name + + + + + ControlReferenceArray AutoWireup + + + + + Constructs a new ControlReference array + + Names of the controls to put in the array + + + + Control collection + + + + + ControlEvent AutoWireup + + + + + Constructs the ControlEvent + + Control Name + Event to Wire + + + + Control Name + + + + + Event to Wire + + + + + Makes a new D3DObj + + + + + Creates an arrow that points to an object + + Object ID + Color + + + + Creates an arrow that points to specified Coordinates + + Latitude + Longitude + Altitude + Color + + + + Mark an Object with an Icon + + Object ID + Portal.dat Icon + + + + Mark an Object with a Shape + + Object ID + D3DShape + Color + + + + Mark an Object with a Shape + + Object ID + Mesh filename + Color + + + + Mark an Object with 2DText + + Object ID + Text + Font + zero or more option flags from DecalPlugins::eFontOptions + + + + Mark an Object with 3DText + + Object ID + Text + Font + zero or more option flags from DecalPlugins::eFontOptions + + + + Mark specified Coordinates with Icon + + Latitude + Longitude + Altitude + Portal.dat Icon + + + + Mark specified Coordinates with Icon + + Latitude + Longitude + Altitude + Icon filename + + + + Mark specified Coordinates with Shape + + Latitude + Longitude + Altitude + D3DShape + Color + + + + Mark specified Coordinates with Shape + + Latitude + Longitude + Altitude + Mesh filename + Color + + + + Mark specified Coordinates with 2DText + + Latitude + Longitude + Altitude + Text + Font + zero or more option flags from DecalPlugins::eFontOptions + + + + Mark specified Coordinates with 3DText + + Latitude + Longitude + Altitude + Text + Font + zero or more option flags from DecalPlugins::eFontOptions + + + + Orients to the Camera + + Vertical Tilt + + + + Orients to the specified Coordinates + + Latitude + Longitude + Altitude + Vertical Tilt + + + + Orients to the specified Object + + Object ID + Relative Position + Vertical Tilt + + + + Orients to the Current Player + + Vertical Tilt + + + + Anchors to the specified Coordinates + + Latitude + Longitude + Altitude + + + + Anchors to the specified Object + + Object ID + Height + x offset + y offset + z offset + + + + Displays 2D text using the Arial font + + Text to display + + + + Displays 2D text using the specified font + + Text to display + Font to use + + + + Displays 2D text using the specified font and options + + Text to display + Font to use + Options + + + + Displays text + + Type of text (2D/3D) + Text to display + Font to use + Options + + + + Sets the icon to the portal file id + + portal file id + + + + Sets the icon from the specified file + + file containing the icon + + + + Sets the icon from a resource dll + + module handle of the dll + resource id + + + + Sets the shape to that specified + + Shape to use + + + + Sets the shape to that contained in the file + + File containing the shape definition + + + + Sets the shape from a resource dll + + module handle of the dll + resource id + + + + Colors + + + + + Autoscale + + + + + DrawBackface + + + + + HBounce + + + + + PBounce + + + + + PFade + + + + + POrbit + + + + + PSpin + + + + + ROrbit + + + + + ScaleX + + + + + ScaleY + + + + + ScaleZ + + + + + Visible + + + + + AnimationPhaseOffset + + + + + Fires when the client receives a message from the server + + + + + Fires when the client sends a message to the server + + + + + Defines the WorldObjectCollection filter for all objects + + + + + Defines the WorldObjectCollection filter for inventory objects + + + + + Defines the WorldObjectCollection filter for landscape objects + + + + + Defines the WorldObjectCollection filter for objects in a container + + + + + Creates a new filter + + + + + Creates a new filter using the specified container + + Id of the container + + + + Id of the container filtered by + + + + + Defines the WorldObjectCollection filter for all objects owned by a character + + + + + Creates a new filter + + + + + Creates a new filter using the specified owner + + Id of the owner + + + + Id of the owner of the objects + + + + + Defines the WorldObjectCollection filter for objects having the same category + + + + + Creates a new filter + + + + + Creates a new filter using the specified category + + Category to filter by + + + + Category of the items in this collection + + + + + Defines the WorldObjectCollection filter for objects of the same type/class + + + + + Creates a new filter + + + + + Creates a new filter using the specified ObjectClass + + Class of the items + + + + Class of the items in this collection + + + + + Defines the WorldObjectCollection filter for objects having the specified name + + + + + Creates a new filter + + + + + Creates a new filter using the specified name + + Name of the object + + + + Name of the objects in this collection + + + + + Defines the WorldObjectCollection filter for objects containing the specified name + + + + + Apply a filter to this collection to limit what it returns + + filter object + + + + The indentifier for this merchant + + + + + The maximum value of an item this vendor will purchase + + + + + The rate at which this vendor sells items + + + + + The rate at which this vendor buys items + + + + + The item categories that this vendor buys + + + + + Returns the number of items in the collection + + + + + Returns the number of items represented by the collection, taking into account stacks of items. + + + + + Defines a collection of WorldObjects + + + + + Apply a filter to this collection to limit what it returns + + filter object + + + + Returns the number of items in the collection + + + + + Returns the number of items represented by the collection, taking into account stacks of items. + + + + + Defines an object in the world + + + + + Gets the spell ID of one of the active spells on this object. + + The index in the list of active spells. + The spell ID. + + + + Determines whether this object has the specified property. + + The property to check. + true if this object has the specified property. + + + + Determines whether this object has the specified property. + + The property to check. + true if this object has the specified property. + + + + Determines whether this object has the specified property. + + The property to check. + true if this object has the specified property. + + + + Determines whether this object has the specified property. + + The property to check. + true if this object has the specified property. + + + + Gets the value of the specified property, if it exists. + + The property to get. + Set to the value of the property, if it exists. + true if this object has the specified property. + + + + Gets the value of the specified property, if it exists. + + The property to get. + Set to the value of the property, if it exists. + true if this object has the specified property. + + + + Gets the value of the specified property, if it exists. + + The property to get. + Set to the value of the property, if it exists. + true if this object has the specified property. + + + + Gets the value of the specified property, if it exists. + + The property to get. + Set to the value of the property, if it exists. + true if this object has the specified property. + + + + Gets the value of the specified property, or false if this + object doesn't have the property. + + The property to get. + The property's value. + + + + Gets the value of the specified property, or 0.0 if this + object doesn't have the property. + + The property to get. + The property's value. + + + + Gets the value of the specified property, or 0 if this + object doesn't have the property. + + The property to get. + The property's value. + + + + Gets the value of the specified property, or "" if this + object doesn't have the property. + + The property to get. + The property's value. + + + + Gets the value of the specified property, or defaultValue + if this object doesn't have the property. + + The property to get. + The value to return if this object + doesn't have the property. + The property's value. + + + + Gets the value of the specified property, or defaultValue + if this object doesn't have the property. + + The property to get. + The value to return if this object + doesn't have the property. + The property's value. + + + + Gets the value of the specified property, or defaultValue + if this object doesn't have the property. + + The property to get. + The value to return if this object + doesn't have the property. + The property's value. + + + + Gets the value of the specified property, or defaultValue + if this object doesn't have the property. + + The property to get. + The value to return if this object + doesn't have the property. + The property's value. + + + + Gets the coordinates of this object, or null if this + object doesn't have coordinates (if it's in a container, etc.) + + The coordinates of this object, or null if this + object doesn't have coordinates. + + + + Gets this object's current offset in its landblock, or null + if this object doesn't have an offset (if it's in a container, etc.) + + The offset of this object, or null if this object + doesn't have an offset. + + + + Gets a quaternion representing the orientation of this object, or + null if this object doesn't have an orientation (if it's in + a container, etc.) + + The orientation of this object, or null if this + object doesn't have an orientation. + + + + Gets the raw coordinates of this object, or null if this + object doesn't have coordinates (if it's in a container, etc.) + + The raw coordinates of this object, or null if this + object doesn't have coordinates. + + + + Gets the spell ID of one of the spells that this object casts. + + The index in the list of spells. + The spell ID. + + + + Gets the number of active spells on this object. + + + + + Gets the number of spells that this object casts. + + + + + Function to get a COM object by path from Decal. + + The decal services path to resolve the COM object + instance of the object requested + + + + Get Mapped Keyboard Key + + Name to retrive mapping for. + Mapped Key + + + + Initializes an already exisint viewhandler (plugins) + + the handler to init + + + + Load a view handler of the specified type + + type of handler to load + the new handler + + + + Load a view in the current assembly using the specified resource + + path of the embedded view xml resource + the new view + + + + Load a view in the specified assembly using the specified resource + + path of the embedded view xml resource + assembly containing the resource + the new view + + + + Load a view from the specified XML element + + XmlElement containing the view schema + the new view + + + + Load a view from the specified XML string + + string containing the view schema + the new view + + + + Get a COM based filter object. + (Similar to GetObject, but requires only ProgID instead of full path) + + + + + + + Wrapped Decal OM + + + + + Wrapped version of the ACHooks interface + + + + + Wrapped version of the DecalRenderService + + + + + Support class for HooksWrapper + This class + + + + + Provides direct access to functions and properties in the AC client. + + + + + Releases the resources used by this HooksWrapper. No plugin or + filter should use this function! + + + + + Adds a line of text to the default chat window for the specified + text color. + + The text to add to the chat window. + The color ID of the text to add. This also + determines in which chat window the text will appear, as per the + user's chat settings. + + + + Adds a line of text to the specified chat window. + + The text to add to the chat window. + The color ID of the text to add. + The chat window where the text will appear. + 0 is the default chat window for the given color, 1 is main + chat, and 2-5 are chat tabs #1-4, respectively. + + + + Adds text to the default chat window for the specified text color. + + The text to add to the chat window. + The color ID of the text to add. This also + determines in which chat window the text will appear, as per the + user's chat settings. + + + + Adds text to the specified chat window. + + The text to add to the chat window. + The color ID of the text to add. + The chat window where the text will appear. + 0 is the default chat window for the given color, 1 is main + chat, and 2-5 are chat tabs #1-4, respectively. + + + + Adds a red status message to the status area at the top of the + screen. + + The status message. + + + + Uses one item on another (for crafting, etc.) + This command will fail if the player is busy using an item, + casting a spell, etc. If you are using multiple items, you must + wait until the previous action is complete before attempting to + use the next item. + + The GUID of the item to use. + The GUID of the target. + + + + + Attempts to wield an item + This command will fail if the player is busy using an item, + casting a spell, etc. If you are using multiple items, you must + wait until the previous action is complete before attempting to + use the next item. + + The GUID of the item to use. + + + + + Attempts to wield an item + This command will fail if the player is busy using an item, + casting a spell, etc. If you are using multiple items, you must + wait until the previous action is complete before attempting to + use the next item. + + The GUID of the item to use. + The slot to use + 1 if explicit placement, 0 if automatic placement + 0 if explic is 1, 1 if explic is 0 + + + + + Attempts to wield an item + This command will fail if the player is busy using an item, + casting a spell, etc. If you are using multiple items, you must + wait until the previous action is complete before attempting to + use the next item. + + The GUID of the item to use. + The slot to use + 1 if explicit placement, 0 if automatic placement + 0 if explic is 1, 1 if explic is 0 + Zero + Zero + + + + + Causes the player to attempt to cast a spell. The player must be + in spellcasting mode and the spell must be in his spellbook. + + The ID of the spell to cast. + The GUID of the target. This is ignored for + non-targeted spells, such as self spells and ring spells. + + + + Drop an item from the player's inventory onto the ground. + + The GUID of the item to drop. + + + + Causes the player to turn to the specified heading. + + The desired heading (in degrees). + Unknown. + Always returns true. + + + + Causes the player to turn to the specified heading. + + The desired heading (in radians). + Unknown + + + + + Recruit someone to your fellowship. + + The GUID of the character to recruit. + + + + Give fellowship leadership to a player. + + The GUID of the character to become the leader. + + + + Opens or closes the fellowship. + + True if the fellowship should be made open, false if it should be made closed. + + + + Quits the current fellowship. + + + + + Disbands the current fellowship. + + + + + Dismisses another player from the fellowship. + + The GUID of the character to remove from the fellowship. + + + + Gives an object from the player's inventory to another player or + NPC. + + The GUID of the object to give. + The GUID of the player or NPC to receive + the object. + + + + Adds an identify-request to the end of the request queue. + + The GUID of the object to request an ID for. + + + + Sends text to AC's chat parser as if the user had typed the text + into the chat bar. This text will not be sent to other + plugins via the + event, so + this function cannot be used to send chat commands to other plugins. + + The text to send. + + + + Checks if the AC client knows about an object GUID. The client + must know about an object for it to be used in other HooksWrapper + functions. + + The GUID of the object to check. + true if the client knows about an object, or + false if not. + + + + Logs out the current character and returns to the character + selection screen. + + + + + Moves an item to the specified pack in the player's inventory. + This command will fail if the player is busy moving an item, + casting a spell, etc. If you are moving multiple items, you must + wait until the previous action is complete before attempting to + move the next item. + + The GUID of the object to move. + The GUID of the destination container. + The slot within the pack, where 0 is the first + slot. If this number is greater than the number of items in the + pack, the object will be placed in the first unused slot in the + pack. + A flag indicating whether to add the object to + a stack in the pack, if one exists. + + + + Moves an item to the front of the specified container. If the item + is not in the player's inventory, the destination must be the + player's main pack (the GUID of the player), or one of his side + packs. + This command will fail if the player is busy moving an item, + casting a spell, etc. If you are moving multiple items, you must + wait until the previous action is complete before attempting to + move the next item. + + The GUID of the item to move. + The GUID of the destination container. + + + + Moves an item to the specified container, with flags indicating + how the move should be performed. + This command will fail if the player is busy moving an item, + casting a spell, etc. If you are moving multiple items, you must + wait until the previous action is complete before attempting to + move the next item. + + The GUID of the object to move. + The GUID of the destination container. + Flags indicating how the move should be + performed. + + + + Adds a salvagable item to the salvage panel. + The salvage panel does not need to be open for this command, + but it does need to be open for + , and opening the salvage panel + after adding items to it will clear the panel. + + The GUID of the object to add. + + + + Salvages the items in the salvage panel. The salvage panel must + be open. + + + + + Selects an item. + + The GUID of the object to select, or 0 to + clear the current selection. + + + + Turns player's autorun on or off. + + true to turn on autorun; + false to turn it off. + + + + Attempts to put the player in the specified combat stance. The + player must be wielding the proper weapon type (melee, bow, + magic caster) for the given combat stance. + + The desired combat stance. + 1 is out of combat mode; + 2 is melee attack mode; + 4 is missile attack mode; + 8 is magic casting mode. + + + + Moves the mouse cursor to the given coordinates, relative to the + AC window. + + The X-coordinate. + The Y-coordinate. + + + + Sets the amount of time that the player can be idle (no mouse or + keyboard input) before AC automatically logs out. The default + value is 1200 seconds (20 minutes). + + The idle timeout (in seconds). + + + + Adds a spell to the specified tab on the player's spell bar. The + spell must be in the player's spell book. Each spell tab can + contain only one copy of each spell. Putting a spell onto a tab + that already contains that spell will just move the spell to the + new index. + + + This function does not always work if you call it multiple times + in a loop. Consider putting the loop in the + event of a + , and then running the + timer for one tick. + + The zero-based tab index to add the spell. + The zero-based slot on the tab to add the spell. + If this index is greater than the number of spells on the tab, the + spell will be added to the first unused slot. + The ID of the spell to be added. + + + + Removes a spell from the specified tab on the player's spell bar. + This function can safely be called multiple times in a row with no + time delay between calls. + + The tab from which to remove the spell. + The ID of the spell to be removed. + + + + Accepts a trade with another player. + + + + + Adds an object to the trade window with another player. The object + must be in the player's inventory. + + The GUID of the object to add. + + + + Gets a physics object. + + The ID of the physics object. + A pointer to a physics object. + + + + Gets a weenie object. + + The ID of the weenie object. + A pointer to the weenie object. + + + + Declines (un-accepts) a trade with another player. + + + + + Clears the contents of the trade window. + + + + + Ends the current trade, leaving the trade window open. + + + + + Gets a UIElement instance. + + The TypeID of the UIElement instance. + A pointer to the UIElement instance. + + + + Sets the position of a UIElement region in the AC window. + + The TypeID of the UIElement instance. + The x-axis position the UIElement instance. + The y-axis position of the UIElement instance. + + + + Sets the position of a UIElement region in the AC window. + + The TypeID of the UIElement instance. + The width of the UIElement instance. + The height of the UIElement instance. + + + + Gets the bounding box of a UIElement region in the AC window. + + + + + Uses an item, such as a potion, healing kit, etc. + + + This command will fail if the player is busy using an item, + casting a spell, etc. If you are using multiple items, you must + wait until the previous action is complete before attempting to + use the next item. + + The GUID of the item to use. + The purpose of this argument is not + entirely known. Valid values appear to be 0 and 1: 0 uses + an item by itself (like a potion); 1 uses an item on the current + selection. + + + + Uses an item, such as a potion, healing kit, casts the spell on a + wand/orb, etc. + + + This command will fail if the player is busy using an item, + casting a spell, etc. If you are using multiple items, you must + wait until the previous action is complete before attempting to + use the next item. + + The GUID of the item to use. + The purpose of this argument is not + entirely known. Valid values appear to be 0 and 1: 0 uses + an item by itself (like a potion); 1 uses an item on the current + selection. + The purpose of this argument is not + entirely known. It may be a target GUID for wand/orb spells, or + some other flag + + + + Buys all of the items in the buy-list. The player must have + enough pyreals and slots in the main pack to hold all of the items + being bought. + + + + + Adds an item to the list of things to buy from a vendor. A vendor + window must be open to use this command. + + The GUID of the item template or item in + the vendor's inventory. Templates are the generic items sold by + vendors, such as spell components or trade notes. + The number of the specified item to add to the + buy-list. + + + + Clears the buy-list. + + + + + Sells all of the items in the sell-list. The player must have + enough slots in the main pack to hold all of the stacks of pyreals + obtained from the sale. + + + + + Adds an item to the list of things to sell to a vendor. A vendor + window must be open, and the item must be in the player's inventory. + + The GUID of the item to add to the sell-list. + + + + Clears the sell-list. + + + + + Spends experience points on a skill. + + The skill to raise. + The number of experience points to spend. + Cannot be more than the player's unspent experience. + + + + + + Spends experience points on an attribute. + + The attribute to raise. + The number of experience points to spend. + Cannot be more than the player's unspent experience. + + + + + + Spends experience points on a vital. + + The vital to raise. + The number of experience points to spend. + Cannot be more than the player's unspent experience. + + + + + + Gets a value indicating how the player is moving an item, or 0 + if the player is not moving an item. There are different values + for moving an item, combining/splitting a stack, picking + up/dropping an item, etc. + + + Here are some known values for BusyState: + 0: Idle. + 1: Combining a stack. + 2: Splitting a stack. + 3: ??? + 4: Picking up an item from the ground. + 5: Moving or unequipping an item. + 6: Dropping an item to the ground. + 7: Equipping an item. + + + + + Gets the GUID of the object that the player is moving, or 0 if the + player is not currently moving any object. + + + + + Returns true if the chat bar at the bottom of the screen + currently has keyboard focus. Doesn't apply to floating chat + windows. + + + + + Gets a value indicating the player's combat stance. + 1 is out of combat mode; + 2 is melee attack mode; + 4 is missile attack mode; + 8 is magic casting mode. + + + + + Returns a pointer to the CommandInterpreter object + + + + + Gets or sets the GUID of the selected item. A GUID of 0 indicates + no item selected. + + + + + Gets or sets the compass heading of the player (in degrees). + North is 0, East is 90, etc. Setting the heading will cause the + player to turn. + + + + + Gets or sets the compass heading of the player (in radians). + North is 0, East is pi/2, etc. Setting the heading will cause the + player to turn. + + + + + Gets the ID of the player's current landcell (a.k.a. landblock). + + + Here is a description of landblocks from + David Simpson's + Dereth Cartography, from the header comment in his mapac.c +
+ The map in Asheron's Call is 254 by 254 landblocks. Each landblock contains + a 9 by 9 grid of data points which makes for an 8 by 8 group of land squares + in game. Each landblock has a unique id, which is a word in length, and + has the format xxyyFFFF. In game, xx is the east-west position, and yy is the + north-south position. Landblock 0000FFFF is located in the southwest corner of + the map. Use /loc to find out which landblock you are on. Each square in a + landblock is 0.1 wide and tall, making each landblock 0.8 by 0.8. Although + each landblock contains 9 by 9 points, the points on the edges are redundant + with adjacent landblocks. The entire map is 2041 by 2041 data points, making + 2040 by 2040 squares. Lastly, each square is 24.0 by 24.0 units, whatever + they may be. +
+
+ + This example shows how to calculate coordinates from + , , and + . North and east are positive, south and + west are negative. Round the result to one decimal place to get + identical coordinates to the ones AC reports. + = 0 ? "N" : "S") + ", " + Math.Abs(EW).ToString("0.0") + (EW >= 0 ? "E" : "W"); + ]]> + + +
+ + + Gets the player's X-offset within the current landcell, measured in + meters. On the landscape, values range from 0 (west side of + landcell) to 192 (east side). In dungeons, values are unbounded. + + + + + Gets the player's Y-offset within the current landcell, measured in + meters. On the landscape, values range from 0 (south side of + landcell) to 192 (north side). In dungeons, values are unbounded. + + + + + Gets the player's altitude, measured in meters. 0 is sea-level. + + + + + Gets the total number of items in the currently selected stack. + + + + + Gets the GUID of the currently opened container, such as a chest or + corpse. Returns 0 if no container is currently opened. + + + + + Gets the ID of the current mouse pointer graphics. This number + corresponds to an image in client_portal.dat. + + + Here are some known values of PointerState: + 0x6004D68: Brown idle cursor. + 0x6004D69: Brown idle cursor with yellow outline. + 0x6004D6A: Red combat mode cursor. + 0x6004D6B: Red combat mode cursor with yellow outline. + 0x6004D6C: Blue magic mode cursor. + 0x6004D6D: Blue magic mode cursor with yellow outline. + 0x6004D71: Magnifying glass cursor. + 0x6004D72: Hand cursor. + 0x6004D74: Hour glass cursor. + 0x6004D75: Hour glass cursor with yellow outline. + + + + + Gets or sets the GUID of the previously-selected item. Setting + this will cause the given GUID to be selected when the user + presses the "select previous item" key. + + + + + Gets the bounding box of the 3D region in the AC window. The 3D + region is the area of the window where landscape and characters + are visible. + + + + + Gets the bounding box of the entire AC window, including the 2D + parts of the GUI. This is the resolution set on the settings tab + in AC. + + + + + Gets or sets the number of items in the currently selected stack. + Must be between 1 and . If + this is less than , then + moving the current selection will split the stack. + + + + + Gets the GUID of the currently open vendor, or 0 if no vendor is + open. + + + + + Gets the level an attribute. "Current" values include buffs, + vitae, etc. + + + + + Gets the number of times a attribute has been raised above its + starting (innate) level. + + + + + Gets the starting (innate) level of an attribute. + + + + + Gets the total amount of XP spent on an attribute. + + + + + Gets the value of a hook by its ID. + + + + + Gets the level a skill. "Current" values include buffs, vitae, etc. + + + + + Gets the number of times a skill has been raised above the level + calculated from the skill's attribute formula plus free points. + + + + + Gets the number of free points for a skill. Specialized skills + have 10 free points. + + + + + Gets the total amount of XP spent on a skill. + + + + + Gets the level to which a skill is trained. + 0 is untrained; 1 is trained; 2 is specialized. + + + + + Gets the level a vital. "Current" values include buffs, vitae, etc. + + + + + Gets the number of times a vital has been raised above the level + calculated from the vital's attribute formula. + + + + + Gets the total amount of XP spent on a vital. + + + + + FontWeight for use in HUD Rendering + + + + + Formats to use when writing text to HUDs + + + + + Implies Top and Left + + + + + RenderServiceWrapper is a wrapper for RenderService + + + + + Create a new Background object to be used as a background in HUDS + + The rectangle to use for the size of the background + Newly created and wrapped RenderService.HUDBackground + + + + Create a new HUD. New huds need to be made visible before they render. + + Size and location of where the HUD should be rendered + Newly created and wrapped RenderService.HUDView + + + + Remove a HUD from the render pipeline + + HUD To remove + + + + Begin rendering to this object, must be paired with EndRender + + + + + Begin rendering to this object, must be paired with EndRender + + True to enable texture filtering during rendering + + + + End rendering to this object, must be paired with BeginRender + + + + + Begin writing text + + Name of the font to use for writing text + Height in pixels to use when writing text + + + + Begin writing text + + Name of the font to use for writing text + Height in pixels to use when writing text + Bold, Strong, etc, indicator for text to be written + Write text in italics? + + + + Display text,using the full rectangle of the render target as the area. + This overload will draw the text in black. + + Text to display + + + + Display text,using the full rectangle of the render target as the area. + + Text to display + Color to use to display the text. (Including alpha channel) + + + + Display text,using the full rectangle of the render target as the area. + + Text to display + Color to use to display the text. (Including alpha channel) + Format specifiers, including centered, etc. + Rectangle relative to this object to use to bound the text + + + + Display text,using the full rectangle of the render target as the area. + + Text to display + Color to use to display the text. (Including alpha channel) + Format specifiers, including centered, etc. + Rectangle relative to this object to use to bound the text + + + + End drawing of text. + + + + + Scales the Hud to fill the area specified + + Area for the Hud to encompass + + + + Returns the Area scaling has caused the Hud to encompass + + + + + Scale the width and height of the Hud by the specified value keeping the current position. + This will not return 'good' values when using ScaleTo + + + + + Specifies whether or not Scaling is occuring (setting to false disables scaling) + + + + + Angle in Radians for rotation of the HUD + + + + + Alpha for entire hud + + + + + Calculates the straight-line distance between these coordinates + and the given coordinates. + + The coordinates to calculate the + distance to. + The distance between these coordinates and the given + coordinates. + + + + Calculates the angle from these coordinates to the given + coordinates, in degrees. North is 0, east is 90, south is 180, + and west is 270. + + The coordinates to calculate the + angle to. + The angle between these coordinates and the given + coordinates. + + + + Calculates the angle from these coordinates to the given + coordinates, in radians. North is 0, east is pi/2, south is pi, + and west is 3*pi/2. + + + + + + Formats the coordinates like "0.0N, 0.0E" + The formatted coordinate string. + + + + Formats the coordinates using the number style you choose to + format the NorthSouth and EastWest numbers. + + The format for the NorthSouth and + EastWest numbers. This can be any format string used by + double.ToString(). E.g., use "0.00" for 2-digit precision on + the coordinates. + The formatted coordinate string. + + + + The north or south component of these coordinates. North is + positive and south is negative. + + + + + The east or west component of these coordinates. East is positive + and west is negative. + + + + + Returns the 2D distance between two items + + Id of the first item + Id of the second item + The distance between the items + + + + Returns the distance between two items + + Id of the first item + Id of the second item + Whether or not height is taken into account + The distance between the items + + + + Gets all of the items in the player's inventory. + + WorldObjectCollection containing the items in the character's inventory + + + + Gets all of the items known to WorldFilter. + + WorldObjectCollection containing all of the items in the world + + + + Gets all of the items known to WorldFilter that don't have a container. + + WorldObjectCollection containing all of the items on the landscape + + + + Gets all of the items in the given container. + + Id of the container + WorldObjectCollection containing the items in the container + + + + Gets all of the items with the specified category. + + Category + WorldObjectCollection containing the items in the category + + + + Gets all of the items that have the specified name. + + Name of the items + WorldObjectCollection containing the items with the name + + + + Gets all of the items with names that contain the specified string. + + Partial name of items + WorldObjectCollection containing the items with the name part + + + + Gets all of the items in the object class + + class of the objects + WorldObjectCollection containing the items in the class + + + + Gets the items owned by the specified character + + Id of the owning character + WorldObjectCollection containing the items owned by the character + + + + Returns the currently open vendor object. You **MUST** dispose this object when finished with it. + + + + + Reads the class's view attributes and loads the requested views + + handler to scan + True when views are created, False otherwise + + + + Reads the class for ControlEvents and hooks them up + + handler to scan + + + + Reads the class for ControlReferences and adds them + + handler to scan + + + + Used for the registration and creation of control wrappers + + + + + Scans an assembly and registers all of its control wrappers + + the assembly to scan + + + + Creates a control wrapper for the passed in control + + the control to wrap + the new wrapper + +
+
diff --git a/bin/Release/Decal.Interop.Core.DLL b/bin/Release/Decal.Interop.Core.DLL new file mode 100644 index 0000000..4b834db Binary files /dev/null and b/bin/Release/Decal.Interop.Core.DLL differ diff --git a/bin/Release/Decal.Interop.Filters.DLL b/bin/Release/Decal.Interop.Filters.DLL new file mode 100644 index 0000000..c6021d0 Binary files /dev/null and b/bin/Release/Decal.Interop.Filters.DLL differ diff --git a/bin/Release/Decal.Interop.Net.DLL b/bin/Release/Decal.Interop.Net.DLL new file mode 100644 index 0000000..c4ea345 Binary files /dev/null and b/bin/Release/Decal.Interop.Net.DLL differ diff --git a/bin/Release/System.Data.SQLite.dll b/bin/Release/System.Data.SQLite.dll new file mode 100644 index 0000000..3a04bb8 Binary files /dev/null and b/bin/Release/System.Data.SQLite.dll differ diff --git a/bin/Release/VirindiViewService.dll b/bin/Release/VirindiViewService.dll new file mode 100644 index 0000000..1e3f4fc Binary files /dev/null and b/bin/Release/VirindiViewService.dll differ diff --git a/bin/Release/VirindiViewService.xml b/bin/Release/VirindiViewService.xml new file mode 100644 index 0000000..c43230e --- /dev/null +++ b/bin/Release/VirindiViewService.xml @@ -0,0 +1,386 @@ + + + + VirindiViewService + + + + + Implies Top and Left + + + + + Provides theme elements, which can be drawn by controls. + + + + + Displays an element from the current theme. + + + + + The base class for all Virindi Views controls. + + + + + Called after this control is added to a ControlGroup. This is when the Name and details have been set. + + + + + Add and initialize a child control of this control. The child may be removed by disposing it. + + + + + + Called when a child of this control is disposed. + + + + + + Recursively disposes all children and removes this control from the view, if it is initialized. + + + + + Handles a mouse wheel event. Parent controls must pass this on to applicable children if necessary. + + + + + + + Fires the MouseEvent event for mouse down, and sets this control as the focus control if CanTakeFocus is true. + + Parent controls must pass this on to applicable children if necessary. + + + + + + Fires the MouseEvent event for mouse up as well as the Hit event. + + Parent controls must pass this on to applicable children if necessary. + + + + + + + Fired when the mousedown originated outside the current view. The base version of this method + passes on the event to all children if the 'up' point is within its saved rect. + + Mouseup point + + + + Tracks mouseover and fires the MouseOverChange event, as well as the MouseEvent event for mouse move. + + Parent controls must pass this on to applicable children if necessary. + + + + + + Parses a key message and fires the specific key event methods. + + Key events are only sent to the control with focus. + + + + + + + + + WARNING: ONLY A PARENT CONTROL SHOULD CALL THIS METHOD. + + This method is overridden in derived controls to handle the actual control drawing. Overridden methods should call + the base, draw, and recursively call this method on all child controls. + + + + + + WARNING: ONLY A PARENT CONTROL SHOULD CALL THIS METHOD. + + Notifies a control of changed saved draw options. This method saves its parameters in the Savedxxx properties. + Parent controls should override this method and recursively notify children of their new draw options, altering + their pClipRegion to reflect their new position in the View. + + This base method also fires the DrawStateChange and ThemeChanged events. + + This control's area, relative to the view area. + The theme applied to this control. + The context of this control, eg. inside a listbox. + The position of the View, in game window coordinates. + + + + WARNING: ONLY A PARENT CONTROL SHOULD SET THIS PROPERTY. + + + + + List of XmlAttributes present on the XmlNode that was used to construct this control, if the control was loaded from XML. Otherwise, empty. + + + + + The XmlNode used to construct this control, if the control was loaded from XML. Otherwise, null. + + + + + The name that this control will be initialized with. + + + + + A multiline uneditable scrolling text box. + + + + + A single image control. + + + + + A button using custom images. + + + + + A doubly-linked list with a Dictionary index. Duplicate items are not allowed. + -Add is O(1) + -Contains is O(1) + -Remove is O(1) + -Get/set by index is O(n) + -Insert is O(n) + -RemoveAt is O(n) + Additionally, a cached pointer (with associated index) is kept pointing to the last used index item. + When looking up an item by index, the list is walked from the head, tail, or cached index pointer. + Thus, doing multiple operations in index order is O(1) even without an enumerator. + + + + + + This method gets the node corresponding to a particular index. To get there, + the list is traversed from the head, tail, or cached index pointer (if valid). + + + + + + + Web browser control, using Awesomium (free license version) + + + + + A horizontal scrollbar. + + + + + Summary description for ByteCursor. + + + + + A checkbox with optional associated text. Uses its parent to provide the background. + + + + + A single-line text input box. + + + + + Called before render so the required size of the new target area can be calculated. + The returned value is the size of the desired draw area, not including outer borders and + style-dependent padding. This size must be less than or equal to MaximumSize in each dimension. + + + + + + + Draw this element. When this is called, the background and borders will already have been drawn, and + target will already be in BeginRender. This method should leave the target in render mode. + + + + + + + + A renderer for string-only tooltips. + + + + + Represents an unordered set of items. Duplicates are not allowed. + (This is really just a dictionary which only holds keys.) + Should be used when a collection of non-duplicate items is needed and + the order doesn't matter. + + + + + A series of titled tabs along the top, each one having an associated control which appears + on the bottom when its tab is enabled. + + + + + A progressbar. + + + + + A regular pushbutton-style control. + + + + + Calls the non-hooked IDirect3DDevice9::BeginScene function. When rendering inside a VVS view or texture, use DxTexture.BeginRender() instead. + + + + + + Calls the non-hooked IDirect3DDevice9::EndScene function. When rendering inside a VVS view or texture, use DxTexture.EndRender() instead. + + + + + + Gets the current instance of the VVS bar. + + + + + A console containing game chat. + + + + + Initializes Direct3D drawing and sets the rendertarget to this texture. Calls to this method should be minimized to improve performance. DxTexture.EndRender() must be called after calling this method. + + + + + + + + + + Ends Direct3D rendering and resets the rendertarget. Must be called after DxTexture.BeginRender(). + + + + + Note: Before use, FlushSprite() may need to be called to ensure correct ordering. + + + + + + + + + Note: Before use, you must call BeginUserDrawOperation(). + + + + + + + + + Note: Before use, you must call BeginUserDrawOperation(). + + + + + + + + + + A vertically scrolling list, containing a number of rows and columns. Every row + has the same number and types of columns. Each column contains a specified control type. + + + + + A number of images on top of each other, which always draw in the proper order. + + + + + A simple text display control. Uses its parent to provide the background. + + + + + A container for multiple controls with set locations and sizes within. + + + + + A dropdown list. + + + + + If the context menu is not visible, it is created at the specified point. + + + + + If the context menu is not visible, it is created at the specified point with the specified theme. + + + + + Provides information about an associated tooltip. + + + + + The HudControl that the tip is attached to. + + + + + Deprecated. + Returns the text associated with a tooltip only if the tip contains a cStringRenderer. + + + + + A vertical scrollbar. + + + + + A horizontal slider. + + + + + A control that allows easy access to underlying draw methods. + + + + diff --git a/bin/Release/WebControlWrapper.dll b/bin/Release/WebControlWrapper.dll new file mode 100644 index 0000000..f7d6ddd Binary files /dev/null and b/bin/Release/WebControlWrapper.dll differ diff --git a/bin/Release/mudsort.dll b/bin/Release/mudsort.dll new file mode 100644 index 0000000..54eb994 Binary files /dev/null and b/bin/Release/mudsort.dll differ diff --git a/bin/Release/mudsort.dll.config b/bin/Release/mudsort.dll.config new file mode 100644 index 0000000..f2b2eaf --- /dev/null +++ b/bin/Release/mudsort.dll.config @@ -0,0 +1,30 @@ + + + + +
+ + + + + + OC,ES,CV,AL-,AB-,DG-,ED-,ML,MA,NM + + + False + + + False + + + OC,EP,MA,AL-,MX- + + + AL-,MX- + + + BR- + + + + \ No newline at end of file diff --git a/bin/Release/mudsort.pdb b/bin/Release/mudsort.pdb new file mode 100644 index 0000000..453c944 Binary files /dev/null and b/bin/Release/mudsort.pdb differ diff --git a/docs/assets/beforeafter.jpg b/docs/assets/beforeafter.jpg new file mode 100644 index 0000000..fd4c12e Binary files /dev/null and b/docs/assets/beforeafter.jpg differ diff --git a/docs/assets/plugin-build.png b/docs/assets/plugin-build.png new file mode 100644 index 0000000..b52c085 Binary files /dev/null and b/docs/assets/plugin-build.png differ diff --git a/docs/assets/plugin-build.xcf b/docs/assets/plugin-build.xcf new file mode 100644 index 0000000..139bbf7 Binary files /dev/null and b/docs/assets/plugin-build.xcf differ diff --git a/docs/assets/plugin-options.png b/docs/assets/plugin-options.png new file mode 100644 index 0000000..c118abf Binary files /dev/null and b/docs/assets/plugin-options.png differ diff --git a/docs/assets/plugin-options.xcf b/docs/assets/plugin-options.xcf new file mode 100644 index 0000000..52b55ed Binary files /dev/null and b/docs/assets/plugin-options.xcf differ diff --git a/docs/assets/plugin-sort.png b/docs/assets/plugin-sort.png new file mode 100644 index 0000000..3150198 Binary files /dev/null and b/docs/assets/plugin-sort.png differ diff --git a/docs/assets/plugin-sort.xcf b/docs/assets/plugin-sort.xcf new file mode 100644 index 0000000..ab08e23 Binary files /dev/null and b/docs/assets/plugin-sort.xcf differ diff --git a/mainView.xml b/mainView.xml new file mode 100644 index 0000000..05a8833 --- /dev/null +++ b/mainView.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mudsort.csproj b/mudsort.csproj new file mode 100644 index 0000000..d89712b --- /dev/null +++ b/mudsort.csproj @@ -0,0 +1,148 @@ + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {C2880823-67E7-4B3D-A481-9ADC9847C39C} + Library + Properties + mudsort + mudsort + v2.0 + 512 + + + true + full + false + bin\Debug\ + TRACE;DEBUG;VVS_REFERENCED + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE;VVS_REFERENCED + prompt + 4 + + + true + bin\x64\Debug\ + TRACE;DEBUG;VVS_REFERENCED + full + x64 + prompt + false + + + bin\x64\Release\ + TRACE;VVS_REFERENCED + true + pdbonly + x64 + prompt + false + + + true + bin\x86\Debug\ + TRACE;DEBUG;VVS_REFERENCED + full + x86 + prompt + false + false + + + bin\x86\Release\ + TRACE;VVS_REFERENCED + true + pdbonly + x86 + prompt + false + false + + + + E:\ac\decal\Decal.Adapter.dll + + + + + + + E:\ac\decal\plugins\VirindiViewService\VirindiViewService.dll + + + + + + + True + True + Settings.settings + + + + + + + + + + + + Designer + + + + + {FF7F5F6D-34E0-4B6F-B3BB-8141DE2EF732} + 2 + 0 + 0 + primary + False + True + + + {DA16DAA9-7F16-45D9-A59F-8C45A7F2ACB1} + 2 + 0 + 0 + primary + False + True + + + {572B87C4-93BD-46B3-A291-CD58181D25DC} + 2 + 0 + 0 + primary + False + True + + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + \ No newline at end of file diff --git a/mudsort.csproj.user b/mudsort.csproj.user new file mode 100644 index 0000000..2c220e6 --- /dev/null +++ b/mudsort.csproj.user @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/mudsort.sln b/mudsort.sln new file mode 100644 index 0000000..9623c38 --- /dev/null +++ b/mudsort.sln @@ -0,0 +1,32 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mudsort", "mudsort.csproj", "{C2880823-67E7-4B3D-A481-9ADC9847C39C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C2880823-67E7-4B3D-A481-9ADC9847C39C}.Debug|Any CPU.ActiveCfg = Release|Any CPU + {C2880823-67E7-4B3D-A481-9ADC9847C39C}.Debug|Any CPU.Build.0 = Release|Any CPU + {C2880823-67E7-4B3D-A481-9ADC9847C39C}.Debug|x64.ActiveCfg = Debug|x64 + {C2880823-67E7-4B3D-A481-9ADC9847C39C}.Debug|x64.Build.0 = Debug|x64 + {C2880823-67E7-4B3D-A481-9ADC9847C39C}.Debug|x86.ActiveCfg = Debug|x86 + {C2880823-67E7-4B3D-A481-9ADC9847C39C}.Debug|x86.Build.0 = Debug|x86 + {C2880823-67E7-4B3D-A481-9ADC9847C39C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C2880823-67E7-4B3D-A481-9ADC9847C39C}.Release|Any CPU.Build.0 = Release|Any CPU + {C2880823-67E7-4B3D-A481-9ADC9847C39C}.Release|x64.ActiveCfg = Release|x64 + {C2880823-67E7-4B3D-A481-9ADC9847C39C}.Release|x64.Build.0 = Release|x64 + {C2880823-67E7-4B3D-A481-9ADC9847C39C}.Release|x86.ActiveCfg = Release|Any CPU + {C2880823-67E7-4B3D-A481-9ADC9847C39C}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/mudsort.suo b/mudsort.suo new file mode 100644 index 0000000..559d559 Binary files /dev/null and b/mudsort.suo differ diff --git a/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..5ef3e27 Binary files /dev/null and b/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..d60c088 Binary files /dev/null and b/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/obj/Debug/ResolveAssemblyReference.cache b/obj/Debug/ResolveAssemblyReference.cache new file mode 100644 index 0000000..0cbabc2 Binary files /dev/null and b/obj/Debug/ResolveAssemblyReference.cache differ diff --git a/obj/Debug/SamplePlugin.csproj.FileListAbsolute.txt b/obj/Debug/SamplePlugin.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..68658e3 --- /dev/null +++ b/obj/Debug/SamplePlugin.csproj.FileListAbsolute.txt @@ -0,0 +1,13 @@ +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\SamplePluginVVS.dll +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\SamplePluginVVS.pdb +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\Decal.Adapter.dll +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\VirindiViewService.dll +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\WebControlWrapper.dll +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\System.Data.SQLite.dll +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\Decal.Adapter.xml +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\VirindiViewService.xml +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\Decal.Interop.Core.DLL +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\Debug\ResolveAssemblyReference.cache +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\Debug\SamplePlugin.csproj.ResolveComReference.cache +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\Debug\SamplePluginVVS.dll +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\Debug\SamplePluginVVS.pdb diff --git a/obj/Debug/SamplePlugin.csproj.ResolveComReference.cache b/obj/Debug/SamplePlugin.csproj.ResolveComReference.cache new file mode 100644 index 0000000..92d8b40 Binary files /dev/null and b/obj/Debug/SamplePlugin.csproj.ResolveComReference.cache differ diff --git a/obj/Debug/mudsort.csproj.FileListAbsolute.txt b/obj/Debug/mudsort.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..52670e1 --- /dev/null +++ b/obj/Debug/mudsort.csproj.FileListAbsolute.txt @@ -0,0 +1,15 @@ +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\mudsort.dll.config +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\mudsort.dll +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\mudsort.pdb +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\VirindiViewService.dll +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\WebControlWrapper.dll +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\System.Data.SQLite.dll +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\VirindiViewService.xml +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\Decal.Interop.Core.DLL +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\Debug\ResolveAssemblyReference.cache +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\Debug\mudsort.csproj.ResolveComReference.cache +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\Debug\mudsort.dll +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\Debug\mudsort.pdb +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\Decal.Interop.Filters.DLL +D:\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\Debug\Decal.Interop.Net.DLL +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\Debug\mudsort.csproj.ResolveComReference.cache diff --git a/obj/Debug/mudsort.csproj.ResolveComReference.cache b/obj/Debug/mudsort.csproj.ResolveComReference.cache new file mode 100644 index 0000000..a86967c Binary files /dev/null and b/obj/Debug/mudsort.csproj.ResolveComReference.cache differ diff --git a/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..c237b63 Binary files /dev/null and b/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/obj/Release/mudsort.csproj.FileListAbsolute.txt b/obj/Release/mudsort.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..5d224c5 --- /dev/null +++ b/obj/Release/mudsort.csproj.FileListAbsolute.txt @@ -0,0 +1,17 @@ +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\Release\mudsort.csproj.ResolveComReference.cache +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\Release\mudsort.csprojResolveAssemblyReference.cache +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\Release\mudsort.dll.config +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\Release\mudsort.dll +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\Release\mudsort.pdb +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\Release\Decal.Adapter.dll +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\Release\VirindiViewService.dll +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\Release\WebControlWrapper.dll +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\Release\System.Data.SQLite.dll +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\Release\Decal.Adapter.xml +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\Release\VirindiViewService.xml +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\Release\Decal.Interop.Core.DLL +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\Release\Decal.Interop.Filters.DLL +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\Release\Decal.Interop.Net.DLL +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\obj\Release\mudsort.csproj.ResolveComReference.cache +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\obj\Release\mudsort.dll +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\obj\Release\mudsort.pdb diff --git a/obj/Release/mudsort.csproj.ResolveComReference.cache b/obj/Release/mudsort.csproj.ResolveComReference.cache new file mode 100644 index 0000000..a86967c Binary files /dev/null and b/obj/Release/mudsort.csproj.ResolveComReference.cache differ diff --git a/obj/Release/mudsort.dll b/obj/Release/mudsort.dll new file mode 100644 index 0000000..54eb994 Binary files /dev/null and b/obj/Release/mudsort.dll differ diff --git a/obj/Release/mudsort.pdb b/obj/Release/mudsort.pdb new file mode 100644 index 0000000..453c944 Binary files /dev/null and b/obj/Release/mudsort.pdb differ diff --git a/obj/x64/Release/DesignTimeResolveAssemblyReferencesInput.cache b/obj/x64/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..e42c307 Binary files /dev/null and b/obj/x64/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/obj/x64/Release/build.force b/obj/x64/Release/build.force new file mode 100644 index 0000000..e69de29 diff --git a/obj/x64/Release/mudsort.csproj.FileListAbsolute.txt b/obj/x64/Release/mudsort.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..5814054 --- /dev/null +++ b/obj/x64/Release/mudsort.csproj.FileListAbsolute.txt @@ -0,0 +1,2 @@ +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\x64\Release\mudsort.csprojResolveAssemblyReference.cache +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\x64\Release\mudsort.csproj.ResolveComReference.cache diff --git a/obj/x64/Release/mudsort.csproj.ResolveComReference.cache b/obj/x64/Release/mudsort.csproj.ResolveComReference.cache new file mode 100644 index 0000000..cf0e304 Binary files /dev/null and b/obj/x64/Release/mudsort.csproj.ResolveComReference.cache differ diff --git a/obj/x64/Release/mudsort.csprojResolveAssemblyReference.cache b/obj/x64/Release/mudsort.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..bdb7eae Binary files /dev/null and b/obj/x64/Release/mudsort.csprojResolveAssemblyReference.cache differ diff --git a/obj/x86/Release/DesignTimeResolveAssemblyReferences.cache b/obj/x86/Release/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..a3e7f0b Binary files /dev/null and b/obj/x86/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache b/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..6de56ca Binary files /dev/null and b/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/obj/x86/Release/mudsort.csproj.FileListAbsolute.txt b/obj/x86/Release/mudsort.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..0f8539f --- /dev/null +++ b/obj/x86/Release/mudsort.csproj.FileListAbsolute.txt @@ -0,0 +1,31 @@ +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\x86\Release\mudsort.dll.config +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\x86\Release\mudsort.dll +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\x86\Release\mudsort.pdb +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\x86\Release\Decal.Adapter.dll +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\x86\Release\VirindiViewService.dll +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\x86\Release\WebControlWrapper.dll +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\x86\Release\System.Data.SQLite.dll +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\x86\Release\Decal.Adapter.xml +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\x86\Release\VirindiViewService.xml +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\x86\Release\Decal.Interop.Core.DLL +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\x86\Release\Decal.Interop.Filters.DLL +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\bin\x86\Release\Decal.Interop.Net.DLL +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\x86\Release\mudsort.csproj.ResolveComReference.cache +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\x86\Release\mudsort.dll +C:\Users\mudzereli\Dropbox\Public\asheron\SamplePlugin\SamplePlugin-VVS\obj\x86\Release\mudsort.pdb +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\x86\Release\mudsort.dll.config +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\x86\Release\mudsort.dll +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\x86\Release\mudsort.pdb +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\x86\Release\Decal.Adapter.dll +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\x86\Release\VirindiViewService.dll +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\x86\Release\WebControlWrapper.dll +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\x86\Release\System.Data.SQLite.dll +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\x86\Release\Decal.Adapter.xml +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\x86\Release\VirindiViewService.xml +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\x86\Release\Decal.Interop.Core.DLL +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\x86\Release\Decal.Interop.Filters.DLL +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\bin\x86\Release\Decal.Interop.Net.DLL +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\obj\x86\Release\mudsort.csprojResolveAssemblyReference.cache +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\obj\x86\Release\mudsort.csproj.ResolveComReference.cache +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\obj\x86\Release\mudsort.dll +C:\Users\mudzereli\Dropbox\Public\asheron\mudsort\obj\x86\Release\mudsort.pdb diff --git a/obj/x86/Release/mudsort.csproj.ResolveComReference.cache b/obj/x86/Release/mudsort.csproj.ResolveComReference.cache new file mode 100644 index 0000000..a86967c Binary files /dev/null and b/obj/x86/Release/mudsort.csproj.ResolveComReference.cache differ diff --git a/obj/x86/Release/mudsort.csprojResolveAssemblyReference.cache b/obj/x86/Release/mudsort.csprojResolveAssemblyReference.cache new file mode 100644 index 0000000..51f4b36 Binary files /dev/null and b/obj/x86/Release/mudsort.csprojResolveAssemblyReference.cache differ diff --git a/obj/x86/Release/mudsort.dll b/obj/x86/Release/mudsort.dll new file mode 100644 index 0000000..66512de Binary files /dev/null and b/obj/x86/Release/mudsort.dll differ diff --git a/obj/x86/Release/mudsort.pdb b/obj/x86/Release/mudsort.pdb new file mode 100644 index 0000000..2b1072b Binary files /dev/null and b/obj/x86/Release/mudsort.pdb differ diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..d4bac2c --- /dev/null +++ b/readme.md @@ -0,0 +1,67 @@ +#MudSort + +Asheron's Call Inventory Management Decal Plugin + +##What Can It Do? + +![sorted-inventory](https://raw.githubusercontent.com/mudzereli/mudsort/master/docs/assets/beforeafter.jpg "Sorted Inventory Screenshot") + +Mudsort is a VERY powerful sorting plugin for Decal. Some example uses: + +1. Move all salvage from one character to another and sort it in the process +2. Move items from your backpack to a chest while sorting them in the process +3. Sort the contents of a chest +4. Grab all of a certain type of item from a chest while sorting them +5. And of course sort your inventory + +##Requirements + +1. [Asheron's Call](http://www.asheronscall.com/en) +2. [Decal 2.9.7.5](http://www.decaldev.com/) +3. [Virindi Views](http://virindi.net/plugins/) (Comes in Virindi Bundle) +4. [mudsort.dll](https://github.com/mudzereli/mudsort/raw/master/bin/Release/mudsort.dll) + +##Installation + +1. Download [mudsort.dll](https://github.com/mudzereli/mudsort/raw/master/bin/Release/mudsort.dll) +2. Open Decal +3. Click `Add` in Decal +4. Click `Browse` in Decal +5. Find and select `mudsort.dll` +6. Make sure you have `Virindi View Service Bootstrapper` running under `Services` in Decal +7. Start Asheron's Call and enjoy! + +##Plugin Usage + +The best way to find out how to use the plugin is log in and play with it (there are tooltips for everything, so it kind of explains as you go). +It will really save you a lot of time! + +###Sort Tab + +![plugin-sort-screenshot](https://raw.githubusercontent.com/mudzereli/mudsort/master/docs/assets/plugin-sort.png "Sort Tab Screenshot") + +1. **Source Container** -- The container the items you want to sort are in (Can be either your Character, a Backpack, or an Opened Chest). Use the button to set it to your current selection. +2. **Destination Container** -- The container that you want your items to go into when sorting them (Can be your Character, a Backpack, an Opened Chest, or Another Player). Use the button to set it to your current selection. +3. **Insert Position** -- The `Slot ID` to start inserting at in the `Destination Container` (Default = 0) +4. **Sort String** -- The String to use when Sorting. Can be typed in manually or build on the `Build` tab +5. **Object Class Filter** -- Use this to only sort a particular type of item, like Armor/Notes/Gems/Salvage/etc +6. **Progress Bar** -- Items need to be identified before they are sorted, this progress bar tracks the identifying and sorting +7. **Activate Button** -- Begins the sorting process, or cancels it if it's already running. + +###Build Tab + +![plugin-build-screenshot](https://raw.githubusercontent.com/mudzereli/mudsort/master/docs/assets/plugin-build.png "Build Tab Screenshot") + +1. **Sort List Filter** -- Filter Sort Flags by type (Commonly Used/Word/Number/etc) +2. **Added Sort Flags** -- Sort Flags that will be used to create the current Sort String in the Sort tab +3. **Remaining Sort Flags** -- The additional Sort Flags in the filtered list that can be added to Sort by + +###Options Tab + +![plugin-options-screenshot](https://raw.githubusercontent.com/mudzereli/mudsort/master/docs/assets/plugin-options.png "Options Tab Screenshot") + +1. **Identify Inventory On Login** -- If checked, your inventory will be queued up for ID when you log in, so that when you go to sort them later, you won't have to wait for them to identify. +2. **Reverse Sort List** -- This reverses the sorting string completely +3. **Property Dump Selection** -- Select an item and then click this to view ALL of its properties +4. **Saved Sort Strings** -- Use this area to save your favorite Sort Strings (fancy I know) +5. **Save** -- Save all settings and Sort Strings \ No newline at end of file