Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            WoWClient client = new WoWClient(new Region(Region.Regions.US));
            Task<Character> characterAsync = client.getCharacter("area-52", "napalmuid");
            characterAsync.Wait();
            Character character = characterAsync.Result;
            String characterString = character.toString();

            System.IO.StreamWriter file = new System.IO.StreamWriter("./printOut.txt");
            file.WriteLine(character.toString());
            file.Flush();
            file.Close();

            System.Console.WriteLine("Press any button to continue...");
            System.Console.ReadKey();
        }
Ejemplo n.º 2
0
        private async void createCharacter(String characterName, String realm)
        {
            client = new WoWClient(new Region(Region.Regions.US));
            character = await client.getCharacter(realm, characterName);

            equippedItemDictionary.TryAdd("imageHead", character.EquippedItems.Head);
            equippedItemDictionary.TryAdd("imageNeck", character.EquippedItems.Neck);
            equippedItemDictionary.TryAdd("imageShoulder", character.EquippedItems.Shoulder);
            equippedItemDictionary.TryAdd("imageBack", character.EquippedItems.Back);
            equippedItemDictionary.TryAdd("imageChest", character.EquippedItems.Chest);
            //  equippedItemDictionary.TryAdd("imageShirt", character.EquippedItems.Shirt);
            //  equippedItemDictionary.TryAdd("imageTabard", character.EquippedItems.Tabard);
            equippedItemDictionary.TryAdd("imageWrist", character.EquippedItems.Wrist);
            equippedItemDictionary.TryAdd("imageHands", character.EquippedItems.Hands);
            equippedItemDictionary.TryAdd("imageWaist", character.EquippedItems.Waist);
            equippedItemDictionary.TryAdd("imageLegs", character.EquippedItems.Legs);
            equippedItemDictionary.TryAdd("imageFeet", character.EquippedItems.Feet);
            equippedItemDictionary.TryAdd("imageFinger1", character.EquippedItems.Finger1);
            equippedItemDictionary.TryAdd("imageFinger2", character.EquippedItems.Finger2);
            equippedItemDictionary.TryAdd("imageTrinket1", character.EquippedItems.Trinket1);
            equippedItemDictionary.TryAdd("imageTrinket2", character.EquippedItems.Trinket2);
            equippedItemDictionary.TryAdd("imageMainHand", character.EquippedItems.MainHand);
            equippedItemDictionary.TryAdd("imageOffHand", character.EquippedItems.OffHand);
            this.InitializeComponent();
            characterTitle.Text = character.Name + "  -  " + character.Realm;

            foreach (KeyValuePair<String, EquippedItem> entry in equippedItemDictionary)
            {
                if (entry.Value == null)
                {
                    continue;
                }
                Item item = await client.getItem(entry.Value.ID);
                itemDictionary.TryAdd(entry.Value, item);
            }



        }
Ejemplo n.º 3
0
 private WoWLookup()
 {
     client = new WoWClient(new Region(BlizzAPI.Region.Regions.US));
 }