diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-11 20:03:22 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-11 20:03:22 +0000 |
commit | a3cd04965d83f00ee9ca0020f60bea1f5c83ac6b (patch) | |
tree | 63da4f4d60806a5eb790b7d1072e042d38872b3a /src/map/clif.c | |
parent | 7eaf99edd466011a1ac3c909157b0422120cae4e (diff) | |
download | hercules-a3cd04965d83f00ee9ca0020f60bea1f5c83ac6b.tar.gz hercules-a3cd04965d83f00ee9ca0020f60bea1f5c83ac6b.tar.bz2 hercules-a3cd04965d83f00ee9ca0020f60bea1f5c83ac6b.tar.xz hercules-a3cd04965d83f00ee9ca0020f60bea1f5c83ac6b.zip |
- Changed a bit the MAX_ZENY checks in trade.c to prevent overflows.
- Rewrote npc_selllist for a more proper-clean implementation.
- Increased NPC_POWERUP's dex bonus to +25*lv
- Moved TK_DOWNKICK's stun time from time to time2
- Added TK_TURNKICK's stun to splash-pushed mobs. Duration is 2secs (time2)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6557 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index b020d3f9f..75f374abf 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9272,30 +9272,18 @@ void clif_parse_NpcBuyListSend(int fd,struct map_session_data *sd) */
void clif_parse_NpcSellListSend(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;
item_list = (unsigned short*)RFIFOP(fd,4);
- if (sd->state.trading|| !sd->npc_shopid)
+ if (sd->state.trading || !sd->npc_shopid)
fail = 1;
- else{
- if((nd = ((struct npc_data *)map_id2bl(sd->npc_shopid))->master_nd)){
- sprintf(npc_ev, "%s::OnSellItem", nd->exname);
- for(i=0;i<n;i++){
- setd_sub(sd, "@sold_nameid", i, (void *)((int)sd->status.inventory[item_list[i*2]-2].nameid));
- setd_sub(sd, "@sold_quantity", i, (void *)((int)item_list[i*2+1]));
- }
- npc_event(sd, npc_ev, 0);
- fail = 0;
- }else{
- fail = npc_selllist(sd,n,item_list);
- }
- }
+ else
+ fail = npc_selllist(sd,n,item_list);
+
sd->npc_shopid = 0; //Clear shop data.
WFIFOHEAD(fd,packet_len_table[0xcb]);
|