forgottenserver icon indicating copy to clipboard operation
forgottenserver copied to clipboard

[WIP] Store System

Open brunominervino opened this issue 8 years ago • 41 comments

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

brunominervino avatar Jan 31 '17 22:01 brunominervino

Amazing work @brunominervino !

Thanks

conde2 avatar Feb 01 '17 01:02 conde2

The bytes is currently updated for our version, 1097-1098?

vankk avatar Feb 01 '17 03:02 vankk

@conde2 thank you bro!

@vankk yes!!

brunominervino avatar Feb 01 '17 11:02 brunominervino

Before i review any code, you should consider to remove the word "Tibia" since it's a trademark word.

PrinterLUA avatar Feb 01 '17 14:02 PrinterLUA

@PrinterLUA I completely forgot this. Already changed.

brunominervino avatar Feb 01 '17 16:02 brunominervino

Now, there are some funny names there 😆

Kamenuvol avatar Feb 01 '17 16:02 Kamenuvol

@Kamenuvol have any suggest? I'm not creative hahaha

brunominervino avatar Feb 01 '17 17:02 brunominervino

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.

brunominervino avatar Feb 03 '17 10:02 brunominervino

I think you should rename 'onRender' to something else, and perhaps even change its data type (from boolean to string).

dbjorkholm avatar Feb 03 '17 11:02 dbjorkholm

I'll cleanup code from mounts as soon as I get home

ranisalt avatar Feb 03 '17 11:02 ranisalt

@ninjalulz I thought of something like that, if (!value.empty()) the offer is disabled and takes the string as reason, right?

brunominervino avatar Feb 03 '17 11:02 brunominervino

What about splitting the changes for the store inbox functionality? (moving it to the source like @ninjalulz mentioned)

Mkalo avatar Feb 04 '17 14:02 Mkalo

@Mkalo I'm agree with this.

brunominervino avatar Feb 04 '17 14:02 brunominervino

Now, reason will display on details: Disabled Reason

brunominervino avatar Feb 04 '17 16:02 brunominervino

Im not that familiar with the store system but shouldnt they just be grayd out if you already bought the product?

WibbenZ avatar Feb 04 '17 17:02 WibbenZ

@WibbenZ is working: image

If you select details of this disabled offer, you will this "disabled reason".

brunominervino avatar Feb 04 '17 17:02 brunominervino

You definitely should base it on #2010 for serving the images.

ranisalt avatar Feb 05 '17 18:02 ranisalt

@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 avatar Feb 06 '17 00:02 securmk

@securmk I'll do some tests today to improvement the system.

brunominervino avatar Feb 06 '17 10:02 brunominervino

@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

joseluis2g avatar Feb 06 '17 20:02 joseluis2g

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.

vankk avatar Feb 06 '17 21:02 vankk

Now working: image

brunominervino avatar Feb 07 '17 00:02 brunominervino

@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?

securmk avatar Feb 08 '17 05:02 securmk

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: Error (I don't know how to copy the stuffs on "error report", lol) Part 1 Part 2

MatheusGrilo avatar Feb 21 '17 00:02 MatheusGrilo

@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.

Mkalo avatar Feb 21 '17 00:02 Mkalo

@MatheusGrilo how pointed by @Mkalo, all offers should have images available.

brunominervino avatar Feb 23 '17 15:02 brunominervino

@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) noimage.png from Tibia

MatheusGrilo avatar Feb 23 '17 16:02 MatheusGrilo

@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.

brunominervino avatar Feb 23 '17 17:02 brunominervino

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 avatar Mar 17 '17 20:03 SavageCrown

@SavageCrown thats because the code is not updating the coin balance when you do some kind of transaction, you can easily add it.

joseluis2g avatar Mar 17 '17 23:03 joseluis2g