Jump to content
  • Register Now

    Sign up and take advantage of the features of our community! Some forums are only accessible to our members!

  • 0

bug shopoffiline + new price


ByLost
Go to solution Solved by TMP4,

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

Link to post

4 answers to this question

Recommended Posts

  • 0
  • Solution
Posted (edited)

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 (see edit history)
  • Love 1
Link to post
  • 0

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 (see edit history)
  • Love 1
Link to post

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


×
×
  • 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.