What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Issue with getting enhancement stats on items

BobDole

Community Developer
Joined
Jan 9, 2011
Messages
53
While working on an auto-equipping plugin, I've found some erratic behavior on getting stats on the orange gear.

I use:

foreach (TorItem item in BuddyTor.Me.InventoryEquipment)
{
Dictionary<ModStat, float> stats = item.GetItemStats(true);
//Do stuff with item stats here
}

But it never gets to the "do stuff" section. It seems to exit out without throwing errors, even with a try/catch on it. On one orange item I had, it actually did complete, but it only showed the base stats. I'm not sure if there any that actually successfully pull the stats. I would need to get more orange items to test with.

If I remove the orange items, it runs through the entire list successfully. If I set it to false: "GetItemStats(false)", it runs successfully, but of course only grabs the orange items' base stats.
 
It's definitely something wonky in the core code. I did some more testing and made a sample plugin to try to generate stats from the prototype pieces. On some items, it will generate stats but the stats are the wrong amount. On other pieces, it will throw an exception error. I don't know if a BuddyWing dev will see this, but here are some snippets of what my code outputs and the screenshots of the items to compare the stats. I've attached the full log as well as my sample plugin that generates the error.

Code:
[02:15:01.795 N] [EquipTest] Checking Electromesh Combat Headgear -- EquipHumanFace,Inventory,Bank,Loot,Buyback,67
[02:15:01.825 N] [EquipTest] Cunning: 75
[02:15:01.825 N] [EquipTest] Endurance: 61
[02:15:01.825 N] [EquipTest] CriticalChanceRating: 26
[02:15:01.825 N] [EquipTest] CriticalDamageRating: 28
[02:15:01.825 N] [EquipTest] ArmorRating: 573
[02:15:01.825 N] [EquipTest] Done checking stats

KCsz7Md.png


Code:
[02:15:01.854 N] [EquipTest] Checking S-400 Stealth Saboteur -- EquipHumanRangedPrimary,Inventory,Bank,Loot,Buyback,67
[02:15:01.861 D] Exception while enabling plugin EquipMe: System.NullReferenceException: Object reference not set to an instance of an object.
   at EquipTest.EquipTest.OnEnabled() in d:\Users\Jerrick\Downloads\BuddyWing EquipMe\Plugins\EquipTest\EquipTest.cs:line 59
   at Buddy.Common.Plugins.PluginContainer.set_Enabled(Boolean value)

F6vFkfZ.png
 

Attachments

Last edited:
It's definitely something wonky in the core code. I did some more testing and made a sample plugin to try to generate stats from the prototype pieces. On some items, it will generate stats but the stats are the wrong amount. On other pieces, it will throw an exception error. I don't know if a BuddyWing dev will see this, but here are some snippets of what my code outputs and the screenshots of the items to compare the stats. I've attached the full log as well as my sample plugin that generates the error.


When inspecting people in game, a lot of times its completely wrong. People some times show stats and gear that are not actually whats on the toon!
 
Back
Top