Jump to content

GetIdByName strange behavior (explained)


Recommended Posts

I would like to report a bug.

I've been working on a project non-stop today only to find out that GetIdByName is unreliable and apparently bugged.

How to reproduce this bug (tried 4 times in a row and been indeed able to reproduce it):

  1. Close WRobot and open it afresh
  2. Go to Development Tools
  3. Run this code --> it returns 0
    var itemID = wManager.Wow.Helpers.ItemsManager.GetIdByName("Pet Rock");
    Logging.WriteDebug("[ItemID] " + itemID);

     

  4. Now run this code --> it properly returns "Pet Rock"
    var NameID = wManager.Wow.Helpers.ItemsManager.GetNameById(20030);
    Logging.WriteDebug("[NameID] " + NameID);

     

  5. Now run the first code again and it now correctly returns Pet Rock's item id 20030.

 

Quote

[D] 23:43:58 - [ItemID] 0
[D] 23:44:03 - [NameID] Pet Rock
[D] 23:44:07 - [ItemID] 20030

 

Anyone who is reading this, I'd appreciate if you tried reproducing it and report back. Since we don't know if it's related to Vanilla only, any WoW version is fine for now.

Thanks

S.

 

EDIT: tried with Empty Wallet as well... same thing

Link to comment
Share on other sites

13 minutes ago, Droidz said:

Hello, it is not a bug, items names are server side, you need to have item in your bag (or request item info like when you "GetNameById) for that Wow request the item name at the server ( http://wowwiki.wikia.com/wiki/API_GetItemInfo )

Yea, figured it out with the guys on Discord. Let me update the description.

Thanks for getting back to me

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...