From 50e31d2860fe8f754d186a35ac1b4b61f653af5a Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 27 Mar 2006 14:54:40 +0000 Subject: - Pet catching now uses the menuskill variables to prevent item usage from disrupting the catch process. - Added Safetywall to the list not blocked by Dispell. - Added some include limits.h required by window compiles. - Corrected Wedding rings being trade-able. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5772 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 1e7f6baa9..45142ae29 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9,6 +9,7 @@ #include #include #include +#include #ifdef __WIN32 #define __USE_W32_SOCKETS #include @@ -6863,7 +6864,11 @@ int clif_catch_process(struct map_session_data *sd) WFIFOHEAD(fd,packet_len_table[0x19e]); WFIFOW(fd,0)=0x19e; WFIFOSET(fd,packet_len_table[0x19e]); - + sd->menuskill_id = SA_TAMINGMONSTER; + if (sd->ud.skillid == SA_TAMINGMONSTER) + sd->menuskill_lv = 0; //Free catch + else + sd->menuskill_lv = sd->itemid; //Consume catch return 0; } @@ -6915,7 +6920,7 @@ int clif_sendegg(struct map_session_data *sd) WFIFOSET(fd,WFIFOW(fd,2)); sd->menuskill_id = SA_TAMINGMONSTER; - sd->menuskill_lv = n; + sd->menuskill_lv = -1; return 0; } @@ -10955,7 +10960,7 @@ void clif_parse_CatchPet(int fd, struct map_session_data *sd) { void clif_parse_SelectEgg(int fd, struct map_session_data *sd) { RFIFOHEAD(fd); - if (sd->menuskill_id != SA_TAMINGMONSTER) + if (sd->menuskill_id != SA_TAMINGMONSTER || sd->menuskill_lv != -1) return; pet_select_egg(sd,RFIFOW(fd,2)-2); sd->menuskill_lv = sd->menuskill_id = 0; -- cgit v1.2.3-70-g09d2