示例#1
0
文件: Character.cs 项目: uvbs/babbot
        private static void TestSlotName(string slot)
        {
            GItemHelper GIH  = new GItemHelper();
            long        guid = GIH.GetEquippedGUID(slot);
            string      name = G2I(guid);

            PPather.WriteLine(String.Format("{0} [{1}] -> {2}", slot, guid, name));
        }
示例#2
0
文件: Character.cs 项目: uvbs/babbot
        public static void GetEquippedItems()
        {
            GItemHelper GIH = new GItemHelper();

            if (CharacterSlots == null)
            {
                CharacterSlots = GetCharacterSlots();
            }

            CharacterFrame.ShowFrame();
            foreach (string slot in CharacterSlots)
            {
                string tooltipName = "none";
                PPather.Debug("\n\n == SLOT LOOKUP FOR {0} START ==", slot);
                List <string> tooltip = CharacterFrame.GetTooltip(slot);
                if (tooltip != null && tooltip.Count > 0)
                {
                    //foreach (string tip in tooltip)
                    //    PPather.WriteLine("Character: Tooltip[{0}]\t=>\t{1}", slot, tip);
                    tooltipName = tooltip[tooltip.Count - 1];
                }
                PPather.Debug("Character: Name for {0} = {1}", slot, tooltipName);
                if (tooltip == null || IsEmptySlotName(tooltipName))
                {
                    AddNullSlot(slot);
                }
                else
                {
                    Item i = ItemManager.get(tooltipName);
                    if (i == null)
                    {
                        AddNullSlot(slot);
                    }
                    else
                    {
                        GItem Item = (GItem)GObjectList.FindObject(GIH.GetEquippedGUID(slot));
                        if (Item == null)
                        {
                            continue;
                        }
                        EasyItem E = new EasyItem(Item, i, Item.GUID, tooltipName);
                        try
                        {
                            CurrentlyEquipped.Add(slot, E);
                            PPather.WriteLine(LOG_CATEGORY.INFORMATION, "Character: Item [{0}] equipped in '{1}'", tooltipName, slot);
                            PPather.Debug(String.Format("ToolTip[{0}]: {1}", i.Name, CleanToolTip(tooltip)));
                        }
                        catch (ArgumentException)
                        {
                            PPather.Debug("Character: " + tooltipName + " is already added to CurrentlyEquipped (skipping)");
                        }
                    }
                }
                PPather.Debug("\n=== SLOT LOOKUP FOR {0} END ===\n", slot);
            }
            CharacterFrame.HideFrame();
        }
示例#3
0
 private static void TestSlotName(string slot)
 {
     GItemHelper GIH = new GItemHelper();
     long guid = GIH.GetEquippedGUID(slot);
     string name = G2I(guid);
     PPather.WriteLine(String.Format("{0} [{1}] -> {2}", slot, guid, name));
 }
示例#4
0
        public static void GetEquippedItems()
        {
            GItemHelper GIH = new GItemHelper();

            if (CharacterSlots == null)
                CharacterSlots = GetCharacterSlots();

            CharacterFrame.ShowFrame();
            foreach (string slot in CharacterSlots)
            {
                string tooltipName = "none";
                PPather.Debug("\n\n == SLOT LOOKUP FOR {0} START ==", slot);
                List<string> tooltip = CharacterFrame.GetTooltip(slot);
                if (tooltip != null && tooltip.Count > 0)
                {
                    //foreach (string tip in tooltip)
                    //    PPather.WriteLine("Character: Tooltip[{0}]\t=>\t{1}", slot, tip);
                    tooltipName = tooltip[tooltip.Count - 1];
                }
                PPather.Debug("Character: Name for {0} = {1}", slot, tooltipName);
                if (tooltip == null || IsEmptySlotName(tooltipName))
                {
                    AddNullSlot(slot);
                }
                else
                {
                    Item i = ItemManager.get(tooltipName);
                    if (i == null)
                    {
                        AddNullSlot(slot);
                    }
                    else
                    {
                        GItem Item = (GItem)GObjectList.FindObject(GIH.GetEquippedGUID(slot));
                        if (Item == null) continue;
                        EasyItem E = new EasyItem(Item, i, Item.GUID, tooltipName);
                        try
                        {
                            CurrentlyEquipped.Add(slot,E);
                            PPather.WriteLine(LOG_CATEGORY.INFORMATION,"Character: Item [{0}] equipped in '{1}'", tooltipName, slot);
                            PPather.Debug(String.Format("ToolTip[{0}]: {1}", i.Name, CleanToolTip(tooltip)));
                        }
                        catch (ArgumentException)
                        {
                            PPather.Debug("Character: " + tooltipName + " is already added to CurrentlyEquipped (skipping)");
                        }
                    }
                }
                PPather.Debug("\n=== SLOT LOOKUP FOR {0} END ===\n", slot);
            }
            CharacterFrame.HideFrame();
        }