diff options
author | Dastgir <dastgir@users.noreply.github.com> | 2015-12-25 21:54:46 +0530 |
---|---|---|
committer | Dastgir <dastgir@users.noreply.github.com> | 2015-12-25 21:54:46 +0530 |
commit | 22d3fac0c9a9c39a4f3b544867ba1de4d8d2ecaa (patch) | |
tree | 3b5e3330375ef0c5533698a2deb70a8a20bbd638 /src/map/clif.c | |
parent | 87f3e94c164cdd3f4b0b656285140f931fb90860 (diff) | |
parent | 2dd2e23be8031e007708b6641736f5821c2abb82 (diff) | |
download | hercules-22d3fac0c9a9c39a4f3b544867ba1de4d8d2ecaa.tar.gz hercules-22d3fac0c9a9c39a4f3b544867ba1de4d8d2ecaa.tar.bz2 hercules-22d3fac0c9a9c39a4f3b544867ba1de4d8d2ecaa.tar.xz hercules-22d3fac0c9a9c39a4f3b544867ba1de4d8d2ecaa.zip |
Merge pull request #1009 from Jedzkie/ItemDB_Updates
ItemDB Updates
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 85206fac9..a26fece79 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -6774,29 +6774,30 @@ void clif_pet_roulette(struct map_session_data *sd,int data) /// Presents a list of pet eggs that can be hatched (ZC_PETEGG_LIST). /// 01a6 <packet len>.W { <index>.W }* -void clif_sendegg(struct map_session_data *sd) -{ - int i,n=0,fd; +void clif_sendegg(struct map_session_data *sd) { + int i, n, fd; nullpo_retv(sd); - fd=sd->fd; + fd = sd->fd; if (battle_config.pet_no_gvg && map_flag_gvg2(sd->bl.m)) { //Disable pet hatching in GvG grounds during Guild Wars [Skotlex] - clif->message(fd, msg_sd(sd,866)); // "Pets are not allowed in Guild Wars." + clif->message(fd, msg_sd(sd, 866)); // "Pets are not allowed in Guild Wars." return; } + WFIFOHEAD(fd, MAX_INVENTORY * 2 + 4); - WFIFOW(fd,0)=0x1a6; - for(i=0,n=0;i<MAX_INVENTORY;i++){ - if(sd->status.inventory[i].nameid<=0 || sd->inventory_data[i] == NULL || - sd->inventory_data[i]->type!=IT_PETEGG || - sd->status.inventory[i].amount<=0) + WFIFOW(fd,0) = 0x1a6; + for (i = n = 0; i < MAX_INVENTORY; i++) { + if (sd->status.inventory[i].nameid <= 0 || sd->inventory_data[i] == NULL || sd->inventory_data[i]->type!=IT_PETEGG || sd->status.inventory[i].amount <= 0) continue; - WFIFOW(fd,n*2+4)=i+2; + WFIFOW(fd, n * 2 + 4) = i + 2; n++; } - WFIFOW(fd,2)=4+n*2; - WFIFOSET(fd,WFIFOW(fd,2)); + + if (!n) return; + + WFIFOW(fd, 2) = 4 + n * 2; + WFIFOSET(fd, WFIFOW(fd, 2)); sd->menuskill_id = SA_TAMINGMONSTER; sd->menuskill_val = -1; @@ -10005,6 +10006,9 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, break; } + if (sd->sc.data[SC_SITDOWN_FORCE] || sd->sc.data[SC_BANANA_BOMB_SITDOWN_POSTDELAY]) + return; + if(pc_issit(sd)) { //Bugged client? Just refresh them. clif->sitting(&sd->bl); @@ -10028,6 +10032,10 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, clif->sitting(&sd->bl); break; case 0x03: // standup + + if (sd->sc.data[SC_SITDOWN_FORCE] || sd->sc.data[SC_BANANA_BOMB_SITDOWN_POSTDELAY]) + return; + if (!pc_issit(sd)) { //Bugged client? Just refresh them. clif->standing(&sd->bl); |