summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-13 00:07:24 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-13 00:07:24 +0000
commite0fff5c212007819f29a3406629967d36bc6ede1 (patch)
tree1f7d447baa3ca8e9191069033c7b81c11a841365 /src/map/clif.c
parent95c694908ba1c7636e28f93f181e23927c5f8c5f (diff)
downloadhercules-e0fff5c212007819f29a3406629967d36bc6ede1.tar.gz
hercules-e0fff5c212007819f29a3406629967d36bc6ede1.tar.bz2
hercules-e0fff5c212007819f29a3406629967d36bc6ede1.tar.xz
hercules-e0fff5c212007819f29a3406629967d36bc6ede1.zip
- A bit more work on Ticket #41.
- Added 'r' (variable reference) to the script argument definitions. - Added a simple define for suspitious actions. (empty at the moment) - Added clif_clearcart and moved sending cart packets to pc_setoption. - clif_parse_ChangeCart checking the player level. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9857 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index fdd548913..26312a138 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -2391,6 +2391,15 @@ void clif_cartlist(struct map_session_data *sd)
return;
}
+/// Client behaviour:
+/// Closes the cart storage and removes all it's items from memory.
+/// The Num & Weight values of the cart are left untouched and the cart is NOT removed.
+void clif_clearcart(int fd)
+{
+ WFIFOHEAD(fd, packet_len(0x12b));
+ WFIFOW(fd,0) = 0x12b;
+}
+
// Guild XY locators [Valaris]
int clif_guild_xy(struct map_session_data *sd)
{
@@ -9612,8 +9621,19 @@ void clif_parse_RemoveOption(int fd,struct map_session_data *sd)
*/
void clif_parse_ChangeCart(int fd,struct map_session_data *sd)
{
+ int type;
+
RFIFOHEAD(fd);
- pc_setcart(sd,RFIFOW(fd,2));
+ type = (int)RFIFOW(fd,2);
+
+ if( (type == 5 && sd->status.base_level <= 90) ||
+ (type == 4 && sd->status.base_level <= 80) ||
+ (type == 3 && sd->status.base_level <= 65) ||
+ (type == 2 && sd->status.base_level <= 40) ||
+ pc_setcart(sd,type) )
+ {
+ LOG_SUSPICIOUS(sd,"clif_parse_ChangeCart: player doesn't have the required level");
+ }
}
/*==========================================