Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cart Items need be saved before vending #441

Closed
hnomkeng opened this issue May 18, 2015 · 14 comments
Closed

Cart Items need be saved before vending #441

hnomkeng opened this issue May 18, 2015 · 14 comments

Comments

@hnomkeng
Copy link

@hnomkeng hnomkeng commented May 18, 2015

11251288_820368931372402_74167565396148733_n 1

@reigneil
Copy link

@reigneil reigneil commented May 18, 2015

is this supposed to be happen on official server., that it reminds you to relog?

@Akkarinage
Copy link
Member

@Akkarinage Akkarinage commented May 18, 2015

A little more information would be great..

@hnomkeng
Copy link
Author

@hnomkeng hnomkeng commented May 18, 2015

every vending is show text by picture.

@aleos89
Copy link
Contributor

@aleos89 aleos89 commented May 18, 2015

That was something implemented a while ago. When you add items from a cart before the character is saved to the server, you get that warning. It's to prevent any issues when opening a Vending Shop.

#50 - The warning that was added.

To avoid the warning we should probably add a clif_cartlist(sd); to refresh the index of the items in the cart.

@hnomkeng
Copy link
Author

@hnomkeng hnomkeng commented May 18, 2015

aleos89 ,thank you.

@landergate
Copy link

@landergate landergate commented May 19, 2015

@aleos89, @hnomkeng
AFAIK, cart items receiving their id in cart_inventory table as AUTO_INCREMENT.
So there is no way to get id for those items until char is being saved.

But having id for those items before opening vending is necessary, as 'autotrade persistency' tables are pointing to them at cart_inventory.

Edit:
Tried to add

chrif_save(sd,0);
clif_cartlist(sd);

at pc_cart_additem, but no success.

@aleos89
Copy link
Contributor

@aleos89 aleos89 commented May 19, 2015

I can play around with this when I get a little more free time.

@aleos89 aleos89 reopened this May 19, 2015
@landergate
Copy link

@landergate landergate commented May 19, 2015

@aleos89
Would be great =]
This message annoys lots of players.

@joelolopez
Copy link

@joelolopez joelolopez commented Jun 5, 2015

i confirm this

@cydh
Copy link
Contributor

@cydh cydh commented Jun 10, 2015

this is because when saving process for new items on cart, server only ask to save. the id (not item id) for items in cart_inventory are not updated although the cart items are saved.

something like map-server asks save -> char-server -> save process -> save by UPDATE or INSERT to SQL -> char-server only tells to map-server that cart items are saved without fetch the ids of latest records.
this happened since dinosaur era doomed, also for storage, inventory, and guild storage.

@julia40124009
Copy link

@julia40124009 julia40124009 commented Jan 28, 2016

why closed it !
it bothers me

@aleos89 aleos89 reopened this Jan 28, 2016
@Kemiro
Copy link

@Kemiro Kemiro commented Feb 8, 2016

As troubled me!

@cydh
Copy link
Contributor

@cydh cydh commented Feb 8, 2016

This is the 'price' that u pay for Autotrade Persistency, disable it and you don't have to relog (to make cart data re-sync'd)

aleos89 added a commit that referenced this issue Mar 25, 2016
* These storage types now mimic Guild Storage and can be loaded/saved whenever needed.
* Relieves mmo_charstatus from having to send storage types and lets the char-server handle it.
* All storage types now have a max of 1637 items each.
* Fixes #441 - Players will no longer be required to log out to resync cart item data before opening a Vending Store.
* Added script commands guildstoragecountitem[2] and guildstoragedelitem[2].
aleos89 added a commit that referenced this issue Mar 28, 2016
* These storage types now mimic Guild Storage and can be loaded/saved whenever needed.
* Relieves mmo_charstatus from having to send storage types and lets the char-server handle it.
* All storage types now have a max of 1637 items each.
* Fixes #441 - Players will no longer be required to log out to resync cart item data before opening a Vending Store.
* Added script commands guildstoragecountitem[2] and guildstoragedelitem[2].
aleos89 added a commit that referenced this issue Mar 29, 2016
* These storage types now mimic Guild Storage and can be loaded/saved whenever needed.
* Relieves mmo_charstatus from having to send storage types and lets the char-server handle it.
* All storage types now have an increased max amount.
* Fixes #441 - Players will no longer be required to log out to resync cart item data before opening a Vending Store.
* Refactored player weight and cart weight calculations into their own functions.
* Added script commands guildstoragecountitem[2] and guildstoragedelitem[2].
* Refactored several function return types as well as documentation.
Thanks to @lighta and @cydh for their help with it!
@cydh cydh changed the title Vending System new ? Cart Items need be saved before vending Nov 7, 2016
@cydh
Copy link
Contributor

@cydh cydh commented Nov 7, 2016

certainly related to #50 and #813
fixed for https://github.com/rathena/rathena/tree/cleanup/storages_optimization at #1551 800714a
and this is my .diff based on #1551 https://dl.dropboxusercontent.com/u/33456932/RO/mods/%21free/cart_sync_for_vending.diff (actually I made this first before that PR)

aleos89 added a commit that referenced this issue Nov 14, 2016
* These storage types now mimic Guild Storage and can be loaded/saved whenever needed.
* Relieves mmo_charstatus from having to send storage types and lets the char-server handle it.
* All storage types now have an increased max amount.
* Implemented Premium Storage System. Thanks to @cydh!
* Fixes #441 - Players will no longer be required to log out to resync cart item data before opening a Vending Store.
* Refactored player weight and cart weight calculations into their own functions.
* Added script commands openstorage2, guildstoragecountitem[2] and guildstoragedelitem[2].
* Refactored several function return types as well as documentation.
Thanks to @lighta and @cydh for their help with it!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants