summaryrefslogtreecommitdiff
path: root/src/map/vending.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-01-30 10:24:10 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-01-30 10:24:10 +0000
commitb125b7649ed421ed4689f9a1176810876a858aa6 (patch)
treee04b925dab30ea7845fdf428e1a81bdd7cb03576 /src/map/vending.c
parentc1ee0a550d2e2d34a9d179f3e44a19fcd781b2aa (diff)
downloadhercules-b125b7649ed421ed4689f9a1176810876a858aa6.tar.gz
hercules-b125b7649ed421ed4689f9a1176810876a858aa6.tar.bz2
hercules-b125b7649ed421ed4689f9a1176810876a858aa6.tar.xz
hercules-b125b7649ed421ed4689f9a1176810876a858aa6.zip
- Added support for PACKETVER 20100105, which updates the vending related packets.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14234 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/vending.c')
-rw-r--r--src/map/vending.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/vending.c b/src/map/vending.c
index a6ea1d84b..9cc691f70 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -56,14 +56,18 @@ void vending_vendinglistreq(struct map_session_data* sd, int id)
/*==========================================
* Purchase item(s) from a shop
*------------------------------------------*/
-void vending_purchasereq(struct map_session_data* sd, int id, const uint8* data, int count)
+void vending_purchasereq(struct map_session_data* sd, int aid, int cid, const uint8* data, int count)
{
int i, j, cursor, w, new_ = 0, blank, vend_list[MAX_VENDING];
double z;
struct s_vending vending[MAX_VENDING]; // against duplicate packets
- struct map_session_data* vsd = map_id2sd(id);
+ struct map_session_data* vsd = map_id2sd(aid);
nullpo_retv(sd);
+#if PACKETVER >= 20100105
+ if( vsd->status.char_id != cid )
+ return; //Char-ID check
+#endif
if( vsd == NULL || vsd->vender_id == 0 || vsd->vender_id == sd->bl.id )
return; // invalid shop