diff options
-rw-r--r-- | conf/messages.conf | 7 | ||||
-rw-r--r-- | db/constants.conf | 3 | ||||
-rw-r--r-- | src/map/atcommand.c | 2 | ||||
-rw-r--r-- | src/map/map.h | 1 | ||||
-rw-r--r-- | src/map/mob.c | 1 | ||||
-rw-r--r-- | src/map/npc.c | 2 | ||||
-rw-r--r-- | src/map/script.c | 3 | ||||
-rw-r--r-- | src/map/script.h | 1 |
8 files changed, 17 insertions, 3 deletions
diff --git a/conf/messages.conf b/conf/messages.conf index abf1f5042..34d91d45c 100644 --- a/conf/messages.conf +++ b/conf/messages.conf @@ -607,7 +607,10 @@ 668: Shadow Chaser T 669: Summoner -//670-855 FREE (please start using from the top if you need, leave the 670+ range for new jobs) +//670-853 FREE (please start using from the top if you need, leave the 670+ range for new jobs) + +// Mapflag to disable Autoloot Commands +854: Auto loot item are disabled on this map. // MVP exp message issue clients 2013-12-23cRagexe and newer. 855: Congratulations! You are the MVP! Your reward EXP Points are %u !! @@ -856,7 +859,7 @@ 1060: NoWarp | 1061: NoWarpTo | 1062: NoReturn | -//1063 FREE +1063: NoAutoloot | 1064: NoMemo | 1065: No Exp Penalty: %s | No Zeny Penalty: %s 1066: On diff --git a/db/constants.conf b/db/constants.conf index dd280612c..27125bf71 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -426,7 +426,8 @@ constants_db: { mf_reset: 52 mf_notomb: 53 mf_nocashshop: 54 - mf_noviewid: 55 + mf_noautoloot: 55 + mf_noviewid: 56 comment__: "Cell Properties" cell_walkable: 0 diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 872c31330..6f367b406 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -3906,6 +3906,8 @@ ACMD(mapinfo) strcat(atcmd_output, msg_fd(fd,1096)); // PartyLock | if (map->list[m_id].flag.guildlock) strcat(atcmd_output, msg_fd(fd,1097)); // GuildLock | + if (map->list[m_id].flag.noautoloot) + strcat(atcmd_output, msg_fd(fd, 1063)); // NoAutoloot | if (map->list[m_id].flag.noviewid != EQP_NONE) strcat(atcmd_output, msg_fd(fd,1079)); // NoViewID | clif->message(fd, atcmd_output); diff --git a/src/map/map.h b/src/map/map.h index d4284b3f7..3221c73cd 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -852,6 +852,7 @@ struct map_data { unsigned noknockback : 1; unsigned notomb : 1; unsigned nocashshop : 1; + unsigned noautoloot : 1; uint32 noviewid; ///< noviewid (bitmask - @see enum equip_pos) } flag; struct point save; diff --git a/src/map/mob.c b/src/map/mob.c index 98f8865a9..42195def9 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1904,6 +1904,7 @@ void mob_item_drop(struct mob_data *md, struct item_drop_list *dlist, struct ite if( sd && (drop_rate <= sd->state.autoloot || pc->isautolooting(sd, ditem->item_data.nameid)) + && (!map->list[sd->bl.m].flag.noautoloot) && (battle_config.idle_no_autoloot == 0 || DIFF_TICK(sockt->last_tick, sd->idletime) < battle_config.idle_no_autoloot) && (battle_config.homunculus_autoloot?1:!flag) #ifdef AUTOLOOT_DISTANCE diff --git a/src/map/npc.c b/src/map/npc.c index 6beff2b77..ecf7f878f 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -4300,6 +4300,8 @@ const char *npc_parse_mapflag(const char *w1, const char *w2, const char *w3, co map->list[m].flag.reset=state; else if (!strcmpi(w3,"notomb")) map->list[m].flag.notomb=state; + else if (!strcmpi(w3, "noautoloot")) + map->list[m].flag.noautoloot = state; else if (!strcmpi(w3,"adjust_unit_duration")) { int skill_id, k; char skill_name[MAP_ZONE_MAPFLAG_LENGTH], modifier[MAP_ZONE_MAPFLAG_LENGTH]; diff --git a/src/map/script.c b/src/map/script.c index 8722fcdbe..d5a05164f 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -12833,6 +12833,7 @@ BUILDIN(getmapflag) case MF_RESET: script_pushint(st,map->list[m].flag.reset); break; case MF_NOTOMB: script_pushint(st,map->list[m].flag.notomb); break; case MF_NOCASHSHOP: script_pushint(st,map->list[m].flag.nocashshop); break; + case MF_NOAUTOLOOT: script_pushint(st, map->list[m].flag.noautoloot); break; case MF_NOVIEWID: script_pushint(st,map->list[m].flag.noviewid); break; } } @@ -12957,6 +12958,7 @@ BUILDIN(setmapflag) { case MF_RESET: map->list[m].flag.reset = 1; break; case MF_NOTOMB: map->list[m].flag.notomb = 1; break; case MF_NOCASHSHOP: map->list[m].flag.nocashshop = 1; break; + case MF_NOAUTOLOOT: map->list[m].flag.noautoloot = 1; break; case MF_NOVIEWID: map->list[m].flag.noviewid = (val <= 0) ? EQP_NONE : val; break; } } @@ -13044,6 +13046,7 @@ BUILDIN(removemapflag) { case MF_RESET: map->list[m].flag.reset = 0; break; case MF_NOTOMB: map->list[m].flag.notomb = 0; break; case MF_NOCASHSHOP: map->list[m].flag.nocashshop = 0; break; + case MF_NOAUTOLOOT: map->list[m].flag.noautoloot = 0; break; case MF_NOVIEWID: map->list[m].flag.noviewid = EQP_NONE; break; } } diff --git a/src/map/script.h b/src/map/script.h index 189122230..283afa496 100644 --- a/src/map/script.h +++ b/src/map/script.h @@ -336,6 +336,7 @@ enum { MF_RESET, MF_NOTOMB, MF_NOCASHSHOP, + MF_NOAUTOLOOT, MF_NOVIEWID }; |