EDIT:
Uprating to 5 stars ? It works fine with the english client cause the code uses english names for the items and spells. Would be very nice if the fight classes are going to be compatible with all languages for the future.
Big thanks to the devs and creators for providing us this fight classes for free.
Orginal Post:
Only 4 Stars from my side for now, sorry ?
But here is why:
Mage class is useless in the lower levels, cause the conjure water and conjure food spell is spammed until the inventory is full.
You need to setup a check that is verifing the total count of drink and food item IDs that can be produced by the conjure water spell. (cause the spell is producing different Items depending on the spell level)
Here is the solution and fix (hope this will help in order to make the mage class usable ?)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Threading;
using robotManager;
using robotManager.FiniteStateMachine;
using robotManager.Helpful;
using wManager.Wow.Class;
using wManager.Wow.Helpers;
using wManager.Wow.ObjectManager;
using wManager.Wow.Bot.States;
using Timer = robotManager.Helpful.Timer;
using wManager.Wow.Enums;
public int getTotalWaterCount(){
int totalCount = 0;
List<uint> myTrinkets = new List<uint>();
# Conjured Water
myTrinkets.Add(5350);
# Conjured Fresh Water
myTrinkets.Add(2288);
# Conjured Purified Water
myTrinkets.Add(2136);
# Conjured Spring Water
myTrinkets.Add(3772);
# Conjured Mineral Water
myTrinkets.Add(8077);
# Conjured Sparkling Water
myTrinkets.Add(8078);
# Conjured Crystal Water
myTrinkets.Add(8079);
#Conjured Mountain Spring Water
myTrinkets.Add(30703);
# Conjured Glacier Water
myTrinkets.Add(22018);
# Conjured Mana Biscuit
myTrinkets.Add(34062);
foreach(var trinket in myTrinkets){
var count = ItemsManager.GetItemCountByIdLUA(trinket);
totalCount += count;
}
robotManager.Helpful.Logging.Write("Total Count of Drinks is: " + totalCount);
return totalCount;
}
public int getTotalFoodCount(){
int totalCount = 0;
# all food items that are produced between lvl 1-80 (you can check them on wowhead with their id)
List<uint> myFood = new List<uint>();
myFood.Add(5349);
myFood.Add(1113);
myFood.Add(1114);
myFood.Add(1487);
myFood.Add(8075);
myFood.Add(8076);
myFood.Add(22895);
myFood.Add(22019);
foreach(var trinket in myFood){
var count = ItemsManager.GetItemCountByIdLUA(trinket);
totalCount += count;
}
robotManager.Helpful.Logging.Write("Total Count of Food is: " + totalCount);
return totalCount;
}
# example spell call for water
var spellstate = new SpellState("Conjure Water", 21, context => this.getTotalWaterCount() <= 20 && !Fight.InFight && ObjectManager.Me.Level < 75, false, false, false, false, true, true, true, true, 0, false, false, false, false, false, false, wManager.Wow.Helpers.FightClassCreator.YesNoAuto.Auto, "", "none", true, true, false, false, false),