• Visit Rebornbuddy
  • Issue with getting enhancement stats on items

    Discussion in 'Community Developer Forum' started by BobDole, Jan 27, 2015.

    1. BobDole

      BobDole Community Developer

      Joined:
      Jan 9, 2011
      Messages:
      53
      Likes Received:
      2
      Trophy Points:
      8
      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.
       
    2. Cryogenesis

      Cryogenesis Moderator Moderator

      Joined:
      Jul 13, 2010
      Messages:
      2,128
      Likes Received:
      13
      Trophy Points:
      38
      maybe there is no code behind it in the bot?

      *just a guess thow*
       
    3. BobDole

      BobDole Community Developer

      Joined:
      Jan 9, 2011
      Messages:
      53
      Likes Received:
      2
      Trophy Points:
      8
      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
      
      [​IMG]

      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)
      
      [​IMG]
       

      Attached Files:

      Last edited: Feb 4, 2015
    4. swtorasalife

      swtorasalife New Member

      Joined:
      Jan 21, 2015
      Messages:
      30
      Likes Received:
      0
      Trophy Points:
      0

      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!
       
    5. MasterLeon79

      MasterLeon79 New Member

      Joined:
      Dec 31, 2014
      Messages:
      213
      Likes Received:
      0
      Trophy Points:
      0
      I admire your courage posting your ingame name :)
       
    6. BobDole

      BobDole Community Developer

      Joined:
      Jan 9, 2011
      Messages:
      53
      Likes Received:
      2
      Trophy Points:
      8
      I might be blind, because I can't see it anywhere. Where is it showing?
       
    7. MasterLeon79

      MasterLeon79 New Member

      Joined:
      Dec 31, 2014
      Messages:
      213
      Likes Received:
      0
      Trophy Points:
      0
      Sorry mate.. I'm on this forum most of the time in the evening.. when sight is starting to blur :D
       

    Share This Page