forgottenserver
forgottenserver copied to clipboard
[WIP] Store System
TODO:
- [x] Split getMountByName()
- [x] Able to return disabled reason OnRender Method (here)
- [ ] Improve outfit function
- [ ] Set best method to block store inbox usage
Maybe, static.otland set default images for this feature? Store Images
Amazing work @brunominervino !
Thanks
The bytes is currently updated for our version, 1097-1098?
@conde2 thank you bro!
@vankk yes!!
Before i review any code, you should consider to remove the word "Tibia" since it's a trademark word.
@PrinterLUA I completely forgot this. Already changed.
Now, there are some funny names there 😆
@Kamenuvol have any suggest? I'm not creative hahaha
I'm really compromised to release this new feature. But, I do not have the time I would like to dedicate myself for this improvements and to test them. I would like the help of all of you who share your knowledge with this repository, I believe that there is not much to finish. A TODO list has been inserted in the description, I'm open to suggestions.
Thank you guys.
I think you should rename 'onRender' to something else, and perhaps even change its data type (from boolean to string).
I'll cleanup code from mounts as soon as I get home
@ninjalulz I thought of something like that, if (!value.empty())
the offer is disabled and takes the string as reason, right?
What about splitting the changes for the store inbox functionality? (moving it to the source like @ninjalulz mentioned)
@Mkalo I'm agree with this.
Now, reason will display on details:
Im not that familiar with the store system but shouldnt they just be grayd out if you already bought the product?
@WibbenZ is working:
If you select details of this disabled offer, you will this "disabled reason".
You definitely should base it on #2010 for serving the images.
@brunominervino Hi, I have an issue. Store opens but when I press a category such as Items or mounts my char logs out. It doesn't debug client, doesn't show any error on server console nor does anything. Just kick my char out and I return to char list. Also I noted that when I transfer coins and the "you have successfully gifted tibia coins" message the client does the same thing, kicks me out. Last error I noticed is that the transaction type doesn't work. It should send something like this "account_id, type, coins, description, timestamp" But it keeps sending this "account_id,,coins, description, timestamp" I downloaded and compiled, nothing was modified by me. Is there any way to solve these problems?
@securmk I'll do some tests today to improvement the system.
@brunominervino take a look http://www.tibia.com/news/?subtopic=newsarchive&id=3681&fbegind=7&fbeginm=1&fbeginy=2015&fendd=6&fendm=2&fendy=2017&flist=11111111
I think that we should only care with the XP boost. The gold poncher and gold converter is an item that can be created by scripters using onMoveItem.
Now working:
@brunominervino I found this in the sources:
msg.add<uint16_t>(100); // base xp gain rate msg.add<uint16_t>(0); // xp voucher msg.add<uint16_t>(0); // low level bonus msg.add<uint16_t>(0); // xp boost msg.add<uint16_t>(100); // stamina multiplier (100 = x1.0)
and
msg.add<uint16_t>(0); // xp boost time (seconds) msg.addByte(0); // enables exp boost in the store
is the xp boost already programmed in the sources?
Hey, just saying that if you add an item to sell without image, the client crashes after you try to "go to next image"... Look:
(I don't know how to copy the stuffs on "error report", lol)
@MatheusGrilo There is no fix for this, you should have images for all offers, you could create a transparent image to use if you'd like having offers without an image.
@MatheusGrilo how pointed by @Mkalo, all offers should have images available.
@Mkalo @brunominervino I'm just saying that a var can be added like
if(empty(icons))
icons="noimage.png"
(ofc it's just an example)
@MatheusGrilo all images generate cache, it's not a good option, since all offers need a image. But, you can use this image setting on xml of your own store.
Found a bug. when you transfer tibia coins and the transfer is done the amount of tibia coins on the store not get update until you close and open the store again. for that you can transfer these coins again. ex: player A, have 500 coins. Player B, have 0 coins. player A, transfer 500 coins to player B player A, on the store still the balance of 500coins until you close and open the store again. player B, get the 500coins. player A, can transfer the 500 coins again. (10 times) Player A, close and open the store. Player A, balance of tibia coins -5000 Player B, balance of tibia coins 5000
Image.
https://fotos.subefotos.com/3f6c4527a3b3cec8aacfcfd0ab8e4de5o.png
@SavageCrown thats because the code is not updating the coin balance when you do some kind of transaction, you can easily add it.