summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-23 21:33:35 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-23 21:33:35 +0000
commit8304213efbff057813e058a588cfac7a8168dca1 (patch)
tree6f7332a3f335a33365e1119d327faf98ad4ab7e9 /src/map/clif.c
parent58ad1a1aeecbfd9e33e9361b0f5713b35f483c4b (diff)
downloadhercules-8304213efbff057813e058a588cfac7a8168dca1.tar.gz
hercules-8304213efbff057813e058a588cfac7a8168dca1.tar.bz2
hercules-8304213efbff057813e058a588cfac7a8168dca1.tar.xz
hercules-8304213efbff057813e058a588cfac7a8168dca1.zip
- Added mob skill conditions myhpinrate and friendhpinrate for using HP ranges instead of a fixed "less than" condition.
- Added mob_ai condition &16, enables skills that are normally used on 'friends' to also pick up caster as target. - Fixed npc_shopid not being reset to 0 when buying/selling. FIXME: The client sends a packet when you cancel? It is required so that npc_shopid will be cleared and prevent the player from being stuck. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5380 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 9ccb2b2c8..4b2b8e099 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9805,11 +9805,12 @@ void clif_parse_NpcBuyListSend(int fd,struct map_session_data *sd)
n = (RFIFOW(fd,2)-4) /4;
item_list = (unsigned short*)RFIFOP(fd,4);
- if (sd->trade_partner != 0)
+ if (sd->trade_partner || !sd->npc_shopid)
fail = 1;
else
fail = npc_buylist(sd,n,item_list);
+ sd->npc_shopid = 0; //Clear shop data.
WFIFOHEAD(fd,packet_len_table[0xca]);
WFIFOW(fd,0)=0xca;
WFIFOB(fd,2)=fail;
@@ -9829,10 +9830,11 @@ void clif_parse_NpcSellListSend(int fd,struct map_session_data *sd)
n = (RFIFOW(fd,2)-4) /4;
item_list = (unsigned short*)RFIFOP(fd,4);
- if (sd->trade_partner != 0)
+ if (sd->trade_partner || !sd->npc_shopid)
fail = 1;
else
fail = npc_selllist(sd,n,item_list);
+ sd->npc_shopid = 0; //Clear shop data.
WFIFOHEAD(fd,packet_len_table[0xcb]);
WFIFOW(fd,0)=0xcb;