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

Socketed Gems RequiredStr/Dex/Int/Level always 0

alcor75

Community Developer
Joined
Nov 22, 2012
Messages
376
Reaction score
24
Hello
I'm becoming mad trying to figure if i can equip a item or not.
I iterate all item and gems in that item and check stast with my logic.

The problem is that all gems socketed in items have Required Int Dex Str Level 0, and the Item that hold them Requirement, do not count Gem Requirement.

Should i hardcode all gems require?? or is this a bug?

Code:
if (item.SocketCount > 0)
                {
                    var sockitem = item as SocketableItem;
                    foreach (var gem in sockitem.SocketedGems)
                    {
                        if (gem != null)
                        {
                            if (gem.RequiredStr > (meS - itS + itemtoeqS))  // <------- gem.RequiredStr is Always 0 ??????????
                            {

.....

Pls help if you can

/hat
 
Hello
I'm becoming mad trying to figure if i can equip a item or not.
I iterate all item and gems in that item and check stast with my logic.

The problem is that all gems socketed in items have Required Int Dex Str Level 0, and the Item that hold them Requirement, do not count Gem Requirement.

Should i hardcode all gems require?? or is this a bug?

Code:
if (item.SocketCount > 0)
                {
                    var sockitem = item as SocketableItem;
                    foreach (var gem in sockitem.SocketedGems)
                    {
                        if (gem != null)
                        {
                            if (gem.RequiredStr > (meS - itS + itemtoeqS))  // <------- gem.RequiredStr is Always 0 ??????????
                            {

.....

Pls help if you can

/hat

I'm working with gems atm, gonna log the infos on mines to see if it's confirmed, but that looks weird :D
 
Found a solution for it, to do it the way it was meant to be done :)

Code:
if (item.SocketCount > 0)
                {
                    var sockitem = item as SocketableItem;
                    foreach (var gem in sockitem.SocketedGems)
                    {
                        if (gem != null)
                        {
                            int RequiredStr = 0;
                            int RequiredDex = 0;
                            int RequiredInt = 0;
                            int RequiredLevel = 0;
                            gem.GetAttributeRequirements(out RequiredStr, out RequiredDex, out RequiredInt, out RequiredLevel, false);
                            if (RequiredStr > (meS - itS + itemtoeqS))
                            {


/hat
 
Back
Top