Jump to content

bug shopoffiline + new price


Go to solution Solved by TMP4,

Recommended Posts

Version of Files XXX

Hi Devs :D

I have a problem in my shop offline and would like to solve.


spacer.png

 



I would also like to add two new coins in the shopoffline, if anyone can pass me a tutorial, I'm very grateful.

 

 

Thanks
By Lost :D

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Contributor
  • Solution

That bug is not actually caused by offline shop originally, just every offline shop uses the normal shop mechanism that already bugged.

It was presented in gayforge's servers too until ~2017 btw :D

The problem: Monsters can get the same vid what used a player/npc already with shop.

 

To fix for normal shops: uiprivateshopbuilder.py

 

search:

    def OnUpdate(self):
        if not self.vid:
            return
       
        if systemSetting.IsShowSalesText():

modify:

	def OnUpdate(self):
		if not self.vid:
			return
			
		if chr.GetInstanceType(self.vid) not in [chr.INSTANCE_TYPE_PLAYER,chr.INSTANCE_TYPE_NPC]:
			self.Hide()
			DeleteADBoard(self.vid)

		if systemSetting.IsShowSalesText():

For offline shop you have to do the same thing, maybe the DeleteADBoard can be different named but that's all. For Ken's shop it is not different.

 

----------------------------

 

Adding a new currency to offline shop is not something like can be done with "just pass me a tutorial" :D

We do not even know what version are u using, i know 4 different offline shop and some other what not public.

This won system have tutorial for Great's offline shop, maybe you can use it as a template if you're using Great's.

 

Edited by TMP4
  • Love 1
Link to comment
Share on other sites

  • Contributor

If you just clear g_privateShopAdvertisementBoardDict in def Clear(): that's not solve the problem 100%, the problem can still happens if the player not warping/reloging, e.g. staying on the same map. That's why most people solve it in OnUpdate with self.Hide & DeleteADBoard if it's not player or npc (offline shop).

 

Btw i know all of this just "masking" the problem, GF solved it in another way because they're not using def Clear() or OnUpdate() but they no longer have this bug.

(Also it was not a problem until r2089M, i think r34083 introduced it)

Edited by TMP4
  • Love 1
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.