What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

I need to get buff ID & Names

WoodenJester

Member
Joined
Jun 10, 2015
Messages
342
Reaction score
1
Hey

Just looking to get some information on the Buff properties, and I've already done some rooting around.

What i need at the moment for my current project is a list of all the buffs available, and their ID's.
I've tried the below to retrieve a list:
Code:
foreach(var buff in sqlCore.sqlBuffs)
     {
          Log(string.Format("ID:{0} | NAME:{1}",buff.id,buff.name));
     }
But always receive an error:
Code:
error CS1061: 'System.Collections.Generic.KeyValuePair<uint,ArcheBuddy.SQL.SqlBuff>' does not contain a definition for 'id' and no extension method 'id' accepting a first argument of type 'System.Collections.Generic.KeyValuePair<uint,ArcheBuddy.SQL.SqlBuff>' could be found (are you missing a using directive or an assembly reference?)

error CS1061: 'System.Collections.Generic.KeyValuePair<uint,ArcheBuddy.SQL.SqlBuff>' does not contain a definition for 'name' and no extension method 'name' accepting a first argument of type 'System.Collections.Generic.KeyValuePair<uint,ArcheBuddy.SQL.SqlBuff>' could be found (are you missing a using directive or an assembly reference?)

With looking at http://archebuddy.com/API/html/167357856.htm i assumed the use of buff.name and so on would be fine

I've also tried:

Code:
foreach(var buff in sqlCore.sqlBuffs)
            {
                Log(buff.ToString());
            }

It gives me something at-least, though it's only ID's as far as i can see:

Code:
[1, ArcheBuddy.SQL.SqlBuff]
[2, ArcheBuddy.SQL.SqlBuff]
[7, ArcheBuddy.SQL.SqlBuff]
[11, ArcheBuddy.SQL.SqlBuff]
[13, ArcheBuddy.SQL.SqlBuff]
[15, ArcheBuddy.SQL.SqlBuff]
[18, ArcheBuddy.SQL.SqlBuff]

This goes on up to around 16,000.

Could someone please point me in the right direction?
 
Maybe this works

Code:
Log(Convert.ToString(buff.id))

foreach(var buff in sqlCore.sqlBuffs)
     {
          Log("Name: " + buff.name + " | ID: " + Convert.ToString(buff.id));
     }
 
Maybe this works

Code:
Log(Convert.ToString(buff.id))

Tried it, receive the same error as before.

Code:
error CS1061: 'System.Collections.Generic.KeyValuePair<uint,ArcheBuddy.SQL.SqlBuff>' does not contain a definition for 'name' and no extension method 'name' accepting a first argument of type 'System.Collections.Generic.KeyValuePair<uint,ArcheBuddy.SQL.SqlBuff>' could be found (are you missing a using directive or an assembly reference?)
 
Managed to get it working in the end thanks to a friend!

Code:
foreach (var buff in sqlCore.sqlBuffs)
            {
                Log(string.Format("id:{0} name:{1}", buff.Value.id, buff.Value.name));
            }

End Result Snippet:
Code:
id:448 name:Toughened (Rank 4)
 
But you should change the code a little:

PHP:
foreach (var buff in sqlCore.sqlBuffs)
            {
                Log(string.Format("id:{0} name:{1}", buff.Value.id, buff.Value.name));
Thread.Sleep(25); //without this archebuddy will freeze until he finished the listing
            }
 
Back
Top