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
Initial release of the cash shop sales #1825
Conversation
|
How to use this? '-' |
|
Forum discussion https://rathena.org/board/topic/108792-cash-shop-sale-system/ |
|
@Atemo tnx! |
conf/inter_athena.conf
Outdated
| @@ -143,6 +143,7 @@ mob_skill_db_re_db: mob_skill_db_re | |||
| mob_skill_db2_db: mob_skill_db2 | |||
| //mob_skill_db2_db: mob_skill_db2_re | |||
| mapreg_table: mapreg | |||
| sales_tabe: sales | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tabe -> table
|
best of the best =) Thank you a lot for release! |
|
Step 1: Set up an item to item_cash_db.txt (ex 8,512,99;) |
Also fixes the bug mentioned by @Angelic234. Thanks for reporting.
|
Step 1: Set up an item to item_cash_db.txt (ex 8,512,99;) |
|
A question |
|
@Angelic234 removed the column just now. This one was a leftover from development. :-) |
|
Thanks to @Angelic234 again! :)
* Follow up to c0339a9. Thanks to fictionx!
|
|
||
| if( SQL_ERROR == Sql_Query( mmysql_handle, "SELECT `nameid`, UNIX_TIMESTAMP(`start`), UNIX_TIMESTAMP(`end`), `amount` FROM `%s` WHERE `end` > now()", sales_table ) ){ | ||
| Sql_ShowDebug(mmysql_handle); | ||
| return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remenber but you don't need FreeResult ?? here
src/map/cashshop.c
Outdated
| clif_sale_end( sale_item, NULL, ALL_CLIENT ); | ||
|
|
||
| // Remove the timer so the sale end is not sent out again | ||
| delete_timer( sale_item->timer_end, sale_end_timer ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd delete the timer, before sending to all_client. It just look more secure. If you have tons of client or the broadcast is too slow you could have this rescheduled before the delete. (a strech I know but still)
| @@ -236,6 +567,7 @@ bool cashshop_buylist( struct map_session_data* sd, uint32 kafrapoints, int n, u | |||
| for( i = 0; i < n; ++i ){ | |||
| unsigned short nameid = *( item_list + i * 5 ); | |||
| uint32 quantity = *( item_list + i * 5 + 2 ); | |||
| uint16 tab = *(item_list + i * 5 + 4); | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't this be out of range for older client ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it was always there to begin with(i * 5). Only mistake here is that I used uint16 instead of uint8
# Conflicts: # conf/inter_athena.conf # src/map/cashshop.c # src/map/map.c
Fixes #1229
Merry christmas guys! :-)