diff --git a/conf/msg_conf/map_msg.conf b/conf/msg_conf/map_msg.conf index a5e8b40e8e..d28483cf0f 100644 --- a/conf/msg_conf/map_msg.conf +++ b/conf/msg_conf/map_msg.conf @@ -695,7 +695,7 @@ 666: Pets are not allowed in Guild Wars. 667: You're not dead. 668: Your actual memo positions are: -//669 free +669: You can't catch any pet on this map. 670: You can't leave battleground guilds. 671: Friend already exists. 672: Name not found in list. diff --git a/conf/msg_conf/map_msg_chn.conf b/conf/msg_conf/map_msg_chn.conf index 2b55b049c1..dcb801277d 100644 --- a/conf/msg_conf/map_msg_chn.conf +++ b/conf/msg_conf/map_msg_chn.conf @@ -642,7 +642,7 @@ 666: 公會戰不允許有寵物 667: 你沒死亡 668: 你實際儲存點是: -//669 free +669: You can't catch any pet on this map. 670: 你無法離開戰場公會 671: 這朋友已存在 672: 該名稱不在清單內 diff --git a/conf/msg_conf/map_msg_frn.conf b/conf/msg_conf/map_msg_frn.conf index 5a4148e21f..62b85bfbc4 100644 --- a/conf/msg_conf/map_msg_frn.conf +++ b/conf/msg_conf/map_msg_frn.conf @@ -654,7 +654,7 @@ 666: Pets non-autoriss lors d'une guerre entre guilde. 667: Vous n'tes pas mort(e). 668: Votre position memo actuelle est: -//669 free +669: You can't catch any pet on this map. 670: Vous ne pouvez pas quitter votre guilde. 671: Cette personne est dj dans votre liste d'ami. 672: Nom introuvable dans la liste. diff --git a/conf/msg_conf/map_msg_grm.conf b/conf/msg_conf/map_msg_grm.conf index a4ba0ae3ab..9ef51c8392 100644 --- a/conf/msg_conf/map_msg_grm.conf +++ b/conf/msg_conf/map_msg_grm.conf @@ -573,6 +573,7 @@ 659: Todes Zeitpunkt : ^EE0000%s^000000 660: Besiegt von 661: [^EE0000%s^000000] +669: You can't catch any pet on this map. 681: Rune Knight T 682: Warlock T diff --git a/conf/msg_conf/map_msg_idn.conf b/conf/msg_conf/map_msg_idn.conf index 01bbf48e28..c12efa1a3d 100644 --- a/conf/msg_conf/map_msg_idn.conf +++ b/conf/msg_conf/map_msg_idn.conf @@ -688,7 +688,7 @@ 666: Peliharaan tidak diperbolehkan di Guild Wars. 667: Kamu tidak mati. 668: Posisi memomu saat ini adalah: -//669 kosong +669: You can't catch any pet on this map. 670: Kamu tidak dapat meninggalkan guild battleground. 671: Teman sudah ada. 672: Nama tidak ditemukan di daftar. diff --git a/conf/msg_conf/map_msg_por.conf b/conf/msg_conf/map_msg_por.conf index f747198032..bab2209ac8 100644 --- a/conf/msg_conf/map_msg_por.conf +++ b/conf/msg_conf/map_msg_por.conf @@ -699,7 +699,7 @@ 666: Bichinhos de estimao no so permitidos na Guerra de Cls. 667: Voc no est morto. 668: Seu ponto de retorno atual : -//669 livre +669: You can't catch any pet on this map. 670: Voc no pode deixar os campos de batalha em uma guerra. 671: Amigo j existente. 672: Nome no encontrado na lista. diff --git a/conf/msg_conf/map_msg_rus.conf b/conf/msg_conf/map_msg_rus.conf index e048a5488d..c3b9853a65 100644 --- a/conf/msg_conf/map_msg_rus.conf +++ b/conf/msg_conf/map_msg_rus.conf @@ -654,7 +654,7 @@ 666: . 667: . 668: : -//669 +669: You can't catch any pet on this map. 670: . 671: . 672: . diff --git a/conf/msg_conf/map_msg_spn.conf b/conf/msg_conf/map_msg_spn.conf index 53f63f029a..daa3536564 100644 --- a/conf/msg_conf/map_msg_spn.conf +++ b/conf/msg_conf/map_msg_spn.conf @@ -689,7 +689,7 @@ 666: Las mascotas estn prohibidas en la guerra de clanes. 667: No ests muerto. 668: Tus puntos de memorizacin actuales son los siguientes: -//669 vaco +669: You can't catch any pet on this map. 670: No puedes abandonar un clan especial de battleground. 671: Ese jugador ya es amigo tuyo. 672: No se ha encontrado el nombre que has introducido. diff --git a/conf/msg_conf/map_msg_tha.conf b/conf/msg_conf/map_msg_tha.conf index 09a3894df0..f8c101ad2f 100644 --- a/conf/msg_conf/map_msg_tha.conf +++ b/conf/msg_conf/map_msg_tha.conf @@ -648,7 +648,7 @@ 666: ѵ§١Ѻ͹حҵ㹾鹷 Guild Wars. 667: س. 668: ˹觷سѹ֡մѧ: -//669 free +669: You can't catch any pet on this map. 670: سö͡ҡ Guild 㹢 battleground. 671: ͹. 672: 辺¡. diff --git a/doc/mapflags.txt b/doc/mapflags.txt index cdeb77ec2b..7af58254bf 100644 --- a/doc/mapflags.txt +++ b/doc/mapflags.txt @@ -235,6 +235,50 @@ player who has group level below it. --------------------------------------- + +*nomapchannelautojoin + +Stops players from automatically joining the #map channel on a map. + +This only applies if map channels are enabled and 'map_local_channel_autojoin' is true +in '/conf/channels.conf'. + +--------------------------------------- + +*notomb + +Disables MVP tombs from appearing on a map. + +--------------------------------------- + +*nocostume + +Disables costume sprites on a map. + +This only disables the sprites and not the effect of the items. +If a player logs out on a nocostume map the costume sprites will also not be shown in the +character server. + +--------------------------------------- + +*norenewaldroppenalty + +Disable renewal drop rate penalty due to level difference on a map. + +--------------------------------------- + +*norenewalexppenalty + +Disable renewal experience penalty due to level difference on a map. + +--------------------------------------- + +*nopetcapture + +Disable the ability to capture pets on a map. + +--------------------------------------- + ===================== | 2. Battle-related | ===================== @@ -403,46 +447,9 @@ atcommand is enabled on all maps by default. --------------------------------------- -*nomapchannelautojoin - -Stops players from automatically joining the #map channel on a map. - -This only applies if map channels are enabled and 'map_local_channel_autojoin' is true -in '/conf/channels.conf'. - ---------------------------------------- - -*notomb - -Disables MVP tombs from appearing on a map. - ---------------------------------------- - -*nocostume - -Disables costume sprites on a map. - -This only disables the sprites and not the effect of the items. -If a player logs out on a nocostume map the costume sprites will also not be shown in the -character server. - ---------------------------------------- - *hidemobhpbar Hides monster's HP bar on a map. Ignores config value of 'monster_hp_bars_info'. --------------------------------------- - -*norenewaldroppenalty - -Disable renewal drop rate penalty due to level difference on a map. - ---------------------------------------- - -*norenewalexppenalty - -Disable renewal experience penalty due to level difference on a map. - ---------------------------------------- \ No newline at end of file diff --git a/src/map/map.hpp b/src/map/map.hpp index 22429b0110..df6d3a25dd 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -647,6 +647,7 @@ enum e_mapflag : int16 { MF_NORODEX, MF_NORENEWALEXPPENALTY, MF_NORENEWALDROPPENALTY, + MF_NOPETCAPTURE, MF_MAX }; diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 7abc5c1d52..46c67339f9 100755 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -5843,6 +5843,11 @@ int pc_useitem(struct map_session_data *sd,int n) return 0;/* regardless, effect is not run */ } + if (pet_db_search(id->nameid, PET_CATCH) != nullptr && map_getmapflag(sd->bl.m, MF_NOPETCAPTURE)) { + clif_displaymessage(sd->fd, msg_txt(sd, 669)); // You can't catch any pet on this map. + return 0; + } + sd->itemid = item.nameid; sd->itemindex = n; if(sd->catch_target_class != PET_CATCH_FAIL) //Abort pet catching. diff --git a/src/map/pet.cpp b/src/map/pet.cpp index e34b0390c9..2342a7ab36 100644 --- a/src/map/pet.cpp +++ b/src/map/pet.cpp @@ -1219,6 +1219,11 @@ int pet_catch_process1(struct map_session_data *sd,int target_class) { nullpo_ret(sd); + if (map_getmapflag(sd->bl.m, MF_NOPETCAPTURE)) { + clif_displaymessage(sd->fd, msg_txt(sd, 669)); // You can't catch any pet on this map. + return 0; + } + sd->catch_target_class = target_class; clif_catch_process(sd); @@ -1248,6 +1253,15 @@ int pet_catch_process2(struct map_session_data* sd, int target_id) return 1; } + if (map_getmapflag(sd->bl.m, MF_NOPETCAPTURE)) { + clif_pet_roulette(sd, 0); + sd->catch_target_class = PET_CATCH_FAIL; + sd->itemid = 0; + sd->itemindex = -1; + clif_displaymessage(sd->fd, msg_txt(sd, 669)); // You can't catch any pet on this map. + return 1; + } + //FIXME: delete taming item here, if this was an item-invoked capture and the item was flagged as delay-consume [ultramage] std::shared_ptr pet = pet_db.find(md->mob_id); diff --git a/src/map/script_constants.hpp b/src/map/script_constants.hpp index 63baa5d0e2..29c62083cc 100644 --- a/src/map/script_constants.hpp +++ b/src/map/script_constants.hpp @@ -533,6 +533,7 @@ export_constant(MF_NORODEX); export_constant(MF_NORENEWALDROPPENALTY); export_constant(MF_NORENEWALEXPPENALTY); + export_constant(MF_NOPETCAPTURE); /* setcell types */ export_constant(CELL_WALKABLE);