diff options
author | Emistry Haoyan <equinox1991@gmail.com> | 2020-03-08 05:18:26 +0800 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-02-14 15:40:16 -0300 |
commit | 46e3a24ef647e5be1e10ae448d6572c93fa6ddf8 (patch) | |
tree | 9ac5a1739187063859bb303fb20ffe988bd84238 /src/map/clif.c | |
parent | 121af65aca1025ef69bbbb1b41a84f500ca815c6 (diff) | |
download | hercules-46e3a24ef647e5be1e10ae448d6572c93fa6ddf8.tar.gz hercules-46e3a24ef647e5be1e10ae448d6572c93fa6ddf8.tar.bz2 hercules-46e3a24ef647e5be1e10ae448d6572c93fa6ddf8.tar.xz hercules-46e3a24ef647e5be1e10ae448d6572c93fa6ddf8.zip |
[TMW2 CHERRYPICK] Add NoPet mapflag
- allow to set nopet mapflag at any maps.
- mapflag to disable pet, and force return to egg.
Original commit d3c24f7d9ae
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 9f30408e4..3289e80c5 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7549,8 +7549,8 @@ static void clif_sendegg(struct map_session_data *sd) nullpo_retv(sd); 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." + if (map->list[sd->bl.m].flag.nopet != 0) { + clif->message(fd, msg_sd(sd, 866)); // "Pets are disabled in this map." return; } @@ -10621,11 +10621,11 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) // must use foreachinarea (CIRCULAR_AREA interferes with foreachinrange) map->foreachinarea(clif->getareachar, sd->bl.m, sd->bl.x-AREA_SIZE, sd->bl.y-AREA_SIZE, sd->bl.x+AREA_SIZE, sd->bl.y+AREA_SIZE, BL_ALL, sd); - // pet - if( sd->pd ) { - if( battle_config.pet_no_gvg && map_flag_gvg2(sd->bl.m) ) { //Return the pet to egg. [Skotlex] - clif->message(sd->fd, msg_sd(sd,866)); // "Pets are not allowed in Guild Wars." - pet->menu(sd, 3); //Option 3 is return to egg. + // Spawn pet. + if (sd->pd != NULL) { + if (map->list[sd->bl.m].flag.nopet != 0) { // Return the pet to egg. [Skotlex] + clif->message(sd->fd, msg_sd(sd, 866)); // Pets are not allowed in Guild Wars. + pet->menu(sd, 3); // Option 3 is return to egg. } else { map->addblock(&sd->pd->bl); clif->spawn(&sd->pd->bl); |