Skip to content
Permalink
Browse files
Initial release of the cash shop sales (#1825)
Added a permission for the cashshop sales

Thanks to @Angelic234 and everyone else who tested this feature while it was sleeping waiting in a pull request.
Thanks to @aleos89, @secretdataz and @lighta for reviewing and commenting.
  • Loading branch information
Lemongrass3110 committed Feb 15, 2017
1 parent 7cf081c commit aaa4ea919e79293f33c7f4e7cdde8ceb00ed9f2f
@@ -293,6 +293,7 @@ groups: (
item_unconditional: false
bypass_stat_onclone: true
bypass_max_stat: true
cashshop_sale: true
/* all_permission: true */
}
}
@@ -143,6 +143,7 @@ renewal-mob_skill_table: mob_skill_db_re
mob_skill2_table: mob_skill_db2
renewal-mob_skill2_table: mob_skill_db2_re
mapreg_table: mapreg
sales_table: sales
vending_table: vendings
vending_items_table: vending_items
market_table: market
@@ -13,6 +13,7 @@
// 5: Buff
// 6: Heal
// 7: Other
// 8: Sale
//
// Price:
// Item cost, in cash points (#CASHPOINTS).
@@ -2322,7 +2322,6 @@ packet_keys: 0x631C511C,0x111C111C,0x111C111C // [Shakto]
0x08A4,36,storagepassword,2:4:20
//New Packets
//0x097E,12 //ZC_UPDATE_RANKING_POINT
0x09B4,6,dull,0 //Cash Shop - Special Tab
0x09CE,102,itemmonster,2
0x09D4,2,npcshopclosed,0
//NPC Market
@@ -2336,6 +2335,19 @@ packet_keys: 0x631C511C,0x111C111C,0x111C111C // [Shakto]
0x098A,-1
0x098D,-1,clanchat,2:4
0x098E,-1
// Sale
0x09AC,-1,salesearch,2:4:8
0x09AD,8
0x09AE,17,saleadd,2:6:8:12:16
0x09AF,4
0x09B0,8,saleremove,2:6
0x09B1,4
0x09B2,8
0x09B3,4
0x09B4,6,saleopen,2
0x09BC,6,saleclose,2
0x09C3,8,salerefresh,2:6
0x09C4,8

// New Packet
0x097A,-1 // ZC_ALL_QUEST_LIST2
@@ -13,6 +13,7 @@
// 5: Buff
// 6: Heal
// 7: Other
// 8: Sale
//
// Price:
// Item cost, in cash points (#CASHPOINTS).
@@ -13,6 +13,7 @@
// 5: Buff
// 6: Heal
// 7: Other
// 8: Sale
//
// Price:
// Item cost, in cash points (#CASHPOINTS).
@@ -813,6 +813,18 @@ CREATE TABLE IF NOT EXISTS `mercenary_owner` (
PRIMARY KEY (`char_id`)
) ENGINE=MyISAM;

-- ----------------------------
-- Table structure for `sales`
-- ----------------------------

CREATE TABLE IF NOT EXISTS `sales` (
`nameid` smallint(5) unsigned NOT NULL,
`start` datetime NOT NULL,
`end` datetime NOT NULL,
`amount` int(11) NOT NULL,
PRIMARY KEY (`nameid`)
) ENGINE=MyISAM;

--
-- Table structure for table `sc_data`
--
@@ -0,0 +1,11 @@
-- ----------------------------
-- Table structure for `sales`
-- ----------------------------

CREATE TABLE IF NOT EXISTS `sales` (
`nameid` smallint(5) unsigned NOT NULL,
`start` datetime NOT NULL,
`end` datetime NOT NULL,
`amount` int(11) NOT NULL,
PRIMARY KEY (`nameid`)
) ENGINE=MyISAM;
@@ -31,6 +31,9 @@
/// Check if the client needs delete_date as remaining time and not the actual delete_date (actually it was tested for clients since 2013)
#define PACKETVER_CHAR_DELETEDATE (PACKETVER > 20130000 && PACKETVER < 20141016) || PACKETVER >= 20150826

// Check if the specified packetvresion supports the cashshop sale system
#define PACKETVER_SUPPORTS_SALES PACKETVER>=20131223

///Remove/Comment this line to disable sc_data saving. [Skotlex]
#define ENABLE_SC_SAVING
/** Remove/Comment this line to disable server-side hot-key saving support [Skotlex]

3 comments on commit aaa4ea9

@feltenc
Copy link

@feltenc feltenc commented on aaa4ea9 Feb 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

DC after trying to insert a new item.
Client: 2016-03-16RagexeRE
Git Hash: 8bdaf1e

@secretdataz
Copy link
Member

@secretdataz secretdataz commented on aaa4ea9 Feb 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@feltenc 2016 clients are not officially supported by rAthena, yet.

@theultramage
Copy link

@theultramage theultramage commented on aaa4ea9 Dec 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message does not mention the fix for an off-by-one crash that's exploitable remotely and on-demand.

@@ -15428,1 +15428,1 @@ void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) {
-	if( tab < 0 || tab > CASHSHOP_TAB_SEARCH )
+	if( tab < 0 || tab >= CASHSHOP_TAB_MAX )

Introduced in 2013-06-11 9942072257 by importing the faulty code code from HerculesWS/Hercules@cb9b70e. They patched it in 2015-01-17 HerculesWS/Hercules@348044f12d.

Please sign in to comment.