Jump to content
×
×
  • Create New...
  • 0

bug shopoffiline + new price


ByLost

Question

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

4 answers to this question

Recommended Posts

  • 0
  • Distinguished Member

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

  • 0
  • Distinguished Member

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

  • 0
  • Premium

Idk bro, fixed by 3 years as I suggested. You can do lot of checks for the SHOP_SIGN srv side too.

Btw killed this problem years ago.

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


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.