• Visit Rebornbuddy
  • Item.DesynthesisIndex Question

    Discussion in 'Community Developer Forum' started by mistahmikey, Nov 9, 2015.

    1. mistahmikey

      mistahmikey New Member

      Joined:
      Jun 29, 2015
      Messages:
      161
      Likes Received:
      3
      Trophy Points:
      0
      Can this be used to set the current desynthesis target for a stack of items?

      If so, would the following pseudo code snippet be a reasonable way to approach desynthesizing a stack of items?

      Code:
      <assumes bagSlot.Item.DesynthesisIndex is set to first stack item by default>
      
      while (bagSlot.Item.StackSize > 0)
      {
          var result = await CommonTasks.Desynthesize(bagSlot,<some delay>);
      
          <synchronization and error handling code>
      
          <assumes bagSlot.Item.DesynthesisIndex does not need to be explicitly called and is internally set to the new first stack item>
      }
      

      Thanks.
       
      Last edited: Nov 9, 2015
    2. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,232
      Likes Received:
      364
      Trophy Points:
      83
      DesynthesisIndex is a static property of the items data

      Just do

      Code:
      var OrginalId = bagSlot.TrueItemId;
      while(bagSlot.IsFilled && bagSlot.TrueItemId == OrginalId)
      {
      
      }
      
       
    3. mistahmikey

      mistahmikey New Member

      Joined:
      Jun 29, 2015
      Messages:
      161
      Likes Received:
      3
      Trophy Points:
      0
      I see. Does Item.StackSize decrease with each successful desynth - so I know the bagSlot state has changed before I try to do the next desynth?

      Also, can you tell me difference between TrueItemId and ItemId so I know when to use one over the other?

      Thanks!
       
    4. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,232
      Likes Received:
      364
      Trophy Points:
      83
      TrueItemId is different from rawitemid when dealing with a high quality or collectible item.

      All of the information in bagslot.Item.WHATEVER is static and unchanging as this is information about the actual item.
      Ie Stacksize is just the size an item can be stacked too, bagslot.Count is what you want to be using.

      You should be looking at the properties of the bagslot and not the item.
       
    5. mistahmikey

      mistahmikey New Member

      Joined:
      Jun 29, 2015
      Messages:
      161
      Likes Received:
      3
      Trophy Points:
      0
      Thanks for the clarification - very helpful.
       

    Share This Page