sinterlkaas
New Member
- Joined
- Jan 17, 2012
- Messages
- 536
- Reaction score
- 14
Tested this at char selection screen but it does not give the right information...
Logging.Write("Num Heroes: " + ZetaDia.Service.GameAccount.NumHeroes);
Logger.Write("Max slots: " + ZetaDia.Service.GameAccount.MaxHeroSlots);
Logger.Write("Empty slots: " + ZetaDia.Service.GameAccount.NumEmptyHeroSlots);
[07:29:20.754 N] Num Heroes: 128
[07:29:20.754 N] Max slots: 0
[07:29:20.755 N] Empty slots: -128
anyway this does work switches to each hero gets there name, class and level info but .. ofc it will cause an error when I get to the end of my hero list causing a D3 soft error: 300014 Which will be tricky if I would use this to often cause a normal user would not trigger this alot ...
is there a other way to get the list of heroes available ?
Logging.Write("Num Heroes: " + ZetaDia.Service.GameAccount.NumHeroes);
Logger.Write("Max slots: " + ZetaDia.Service.GameAccount.MaxHeroSlots);
Logger.Write("Empty slots: " + ZetaDia.Service.GameAccount.NumEmptyHeroSlots);
[07:29:20.754 N] Num Heroes: 128
[07:29:20.754 N] Max slots: 0
[07:29:20.755 N] Empty slots: -128
Code:
int numheroes = ZetaDia.Service.GameAccount.NumHeroes; // returns 128 heroes ?
string lastname = "";
for (int i = 0; i < numheroes; i++)
{
ZetaDia.Service.GameAccount.SwitchHero(i);
Thread.Sleep(1000);
h.id = i;
h.name = ZetaDia.Service.CurrentHero.Name;
h.aClass = ZetaDia.Service.CurrentHero.Class;
h.level = ZetaDia.Service.CurrentHero.Level;
if (lastname.Equals(h.name))
break;
lastname = h.name;
HeroList.Add(h);
}
anyway this does work switches to each hero gets there name, class and level info but .. ofc it will cause an error when I get to the end of my hero list causing a D3 soft error: 300014 Which will be tricky if I would use this to often cause a normal user would not trigger this alot ...
is there a other way to get the list of heroes available ?