Jump to content

Gaya Shop Sash proplem


Recommended Posts

Hello guys, 

I search for the last days a solution for my proplem with SASH in gaya Shop. 

 

Here my syserr :

 

 

1206 23:35:56952 :: Traceback (most recent call last):

1206 23:35:56952 ::   File "ui.py", line 1755, in OnOverInItem

1206 23:35:56953 ::   File "ui.py", line 87, in __call__

1206 23:35:56954 ::   File "ui.py", line 78, in __call__

1206 23:35:56954 ::   File "uisystemgems.py", line 283, in OverInItem

1206 23:35:56955 ::   File "uiToolTip.py", line 1118, in AddItemData

1206 23:35:56956 :: TypeError
1206 23:35:56956 :: : 
1206 23:35:56956 :: 'int' object has no attribute '__getitem__'
1206 23:35:56956 ::

 

 

The ui system gem file line :

 

 
def OverInItem(self, slotIndex):
        if None != self.tooltipItem:
            self.tooltipItem.ClearToolTip()
            self.tooltipItem.AddItemData(int(self.items[slotIndex][0]),0)

 

The tooltip part 

 

 
absChance = int(metinSlot[sash.ABSORPTION_SOCKET])

 


 
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

This is complete wrong.. you didn't understand how the metinSlot[sash.ABSOPRTION_SOCKET] works.

 

Of course you can't use:

absChance = int(metinSlot[sash.ABSORPTION_SOCKET])

In this case.

 

Instead:

 

You have to take the Sash Grade and make a List that have the default Abs Rate like:

	argGrade = item.GetValue(0)

	sashAbsByGrade = ( 1, 5, 10, (11, 25) )[argGrade - 1] 

	if shop.isGayaShop:
		if sashAbsGrade < 4:
		   self.AppendTextLine("Sash Abs %d" % (sashAbsByGrade))
		elif sashAbsGrade == 4:
		   self.AppendTextLine("Sash Abs %d ~ %d" % sashAbsByGrade)
	else:
	   absChance = int(metinSlot[sash.ABSORPTION_SOCKET])

	   # [...]

# [...] The rest of the with code that you have in the ToolTip (Sash Abs Part).

 

About the shop.IsGayaShop function is just a example what you need to add there, if you can't make a function by yourself, simply put in a arg in the def of the tooltip like isGayaShop = False and when you send the AddItemData from the Gaya.py add at the end the arg isGayaShop = True (not only (True) i think there is more thinks in order to avoid any issues).

def AddItemData(arg, arg, arg, isGayaShop = False):
self.tooltipItem.AddItemData(int(self.items[slotIndex][0]), isGayaShop = True)

And rename the shop.isGayaShop -> isGayaShop only.

 

Is easy solution and i think could be working in Shops / Cube also (Not tested).

 

Edited by HITRON
Link to comment
Share on other sites

4 hours ago, HITRON said:

This is complete wrong.. you didn't understand how the metinSlot[sash.ABSOPRTION_SOCKET] works.

 

Of course you can't use:


absChance = int(metinSlot[sash.ABSORPTION_SOCKET])

In this case.

 

Instead:

 

You have to take the Sash Grade and make a List that have the default Abs Rate like:


	argGrade = item.GetValue(0)

	sashAbsByGrade = ( 1, 5, 10, (11, 25) )[argGrade - 1] 

	if shop.isGayaShop:
		if sashAbsGrade < 4:
		   self.AppendTextLine("Sash Abs %d" % (sashAbsByGrade))
		elif sashAbsGrade == 4:
		   self.AppendTextLine("Sash Abs %d ~ %d" % sashAbsByGrade)
	else:
	   absChance = int(metinSlot[sash.ABSORPTION_SOCKET])

	   # [...]

# [...] The rest of the with code that you have in the ToolTip (Sash Abs Part).

 

About the shop.IsGayaShop function is just a example what you need to add there, if you can't make a function by yourself, simply put in a arg in the def of the tooltip like isGayaShop = False and when you send the AddItemData from the Gaya.py add at the end the arg isGayaShop = True (not only (True) i think there is more thinks in order to avoid any issues).


def AddItemData(arg, arg, arg, isGayaShop = False):

self.tooltipItem.AddItemData(int(self.items[slotIndex][0]), isGayaShop = True)

And rename the shop.isGayaShop -> isGayaShop only.

 

Is easy solution and i think could be working in Shops / Cube also (Not tested).

 

First thanks for posting more informatios I will try 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.