summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-28 19:22:13 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-28 19:22:13 +0000
commitd70d0a66866d8c41cf6a8c9df266c0d7ea29c3dc (patch)
tree07bf231018571a695d5836094836057a0387d736 /src/map/clif.c
parent5b2bc3e1c6914d9cce55ddf483ee61e956e09829 (diff)
downloadhercules-d70d0a66866d8c41cf6a8c9df266c0d7ea29c3dc.tar.gz
hercules-d70d0a66866d8c41cf6a8c9df266c0d7ea29c3dc.tar.bz2
hercules-d70d0a66866d8c41cf6a8c9df266c0d7ea29c3dc.tar.xz
hercules-d70d0a66866d8c41cf6a8c9df266c0d7ea29c3dc.zip
- The memory leak reports will now print out in the logs also the revision they belong to.
- Cleaned up the scriptable npc-shop code, it should be crash-proof now. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8525 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index b3decf5b3..ed66dbabf 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9420,10 +9420,8 @@ void clif_parse_NpcBuySellSelected(int fd,struct map_session_data *sd)
*/
void clif_parse_NpcBuyListSend(int fd,struct map_session_data *sd)
{
- int fail=0,n, i;
+ int fail=0,n;
unsigned short *item_list;
- unsigned char npc_ev[51];
- struct npc_data *nd;
RFIFOHEAD(fd);
n = (RFIFOW(fd,2)-4) /4;
@@ -9431,21 +9429,8 @@ void clif_parse_NpcBuyListSend(int fd,struct map_session_data *sd)
if (sd->state.trading|| !sd->npc_shopid)
fail = 1;
- else {
- if((nd = ((struct npc_data *)map_id2bl(sd->npc_shopid))->master_nd)){
- int regkey = add_str("@bought_nameid");
- int regkey2 = add_str("@bought_quantity");
- sprintf(npc_ev, "%s::OnBuyItem", nd->exname);
- for(i=0;i<n;i++){
- pc_setreg(sd,regkey+(i<<24),(int)item_list[i*2+1]);
- pc_setreg(sd,regkey2+(i<<24),(int)item_list[i*2]);
- }
- npc_event(sd, npc_ev, 0);
- fail = 0;
- }else{
- fail = npc_buylist(sd,n,item_list);
- }
- }
+ else
+ fail = npc_buylist(sd,n,item_list);
sd->npc_shopid = 0; //Clear shop data.
WFIFOHEAD(fd,packet_len_table[0xca]);