diff options
author | shennetsind <notind@gmail.com> | 2013-06-27 10:36:11 -0700 |
---|---|---|
committer | shennetsind <notind@gmail.com> | 2013-06-27 10:36:11 -0700 |
commit | 15398c9b90693707c3e49c349e24e6dd655f12a9 (patch) | |
tree | 8ba6c03f3e6f8775e854fd109d31ae6b64110e1a /src | |
parent | e5b1d3bdff66c9475755651a94d20057fc4d02dd (diff) | |
parent | ee23711201ddbcd9d92712e8d2b9c1e3c05e7194 (diff) | |
download | hercules-15398c9b90693707c3e49c349e24e6dd655f12a9.tar.gz hercules-15398c9b90693707c3e49c349e24e6dd655f12a9.tar.bz2 hercules-15398c9b90693707c3e49c349e24e6dd655f12a9.tar.xz hercules-15398c9b90693707c3e49c349e24e6dd655f12a9.zip |
Merge pull request #48 from CairoLee/master
Implemented notomb Mapflag
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 4 | ||||
-rw-r--r-- | src/map/map.h | 1 | ||||
-rw-r--r-- | src/map/mob.c | 2 | ||||
-rw-r--r-- | src/map/npc.c | 2 | ||||
-rw-r--r-- | src/map/script.c | 6 |
5 files changed, 12 insertions, 3 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index ae65d46b0..f1b4a3ed6 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -7568,6 +7568,7 @@ return true;\ checkflag(nojobexp); checkflag(nomobloot); checkflag(nomvploot); checkflag(nightenabled); checkflag(nodrop); checkflag(novending); checkflag(loadevent); checkflag(nochat); checkflag(partylock); checkflag(guildlock); checkflag(src4instance); + checkflag(notomb); clif->message(sd->fd," "); clif->message(sd->fd,msg_txt(1312)); // Usage: "@mapflag monster_noteleport 1" (0=Off | 1=On) clif->message(sd->fd,msg_txt(1313)); // Type "@mapflag available" to list the available mapflags. @@ -7604,6 +7605,7 @@ return true;\ setflag(nojobexp); setflag(nomobloot); setflag(nomvploot); setflag(nightenabled); setflag(nodrop); setflag(novending); setflag(loadevent); setflag(nochat); setflag(partylock); setflag(guildlock); setflag(src4instance); + setflag(notomb); clif->message(sd->fd,msg_txt(1314)); // Invalid flag name or flag. clif->message(sd->fd,msg_txt(1312)); // Usage: "@mapflag monster_noteleport 1" (0=Off | 1=On) @@ -7615,7 +7617,7 @@ return true;\ clif->message(sd->fd,"nozenypenalty, notrade, noskill, nowarp, nowarpto, noicewall, snow, clouds, clouds2,"); clif->message(sd->fd,"fog, fireworks, sakura, leaves, nobaseexp, nojobexp, nomobloot,"); clif->message(sd->fd,"nomvploot, nightenabled, nodrop, novending, loadevent, nochat, partylock,"); - clif->message(sd->fd,"guildlock, src4instance"); + clif->message(sd->fd,"guildlock, src4instance, notomb"); #undef checkflag #undef setflag diff --git a/src/map/map.h b/src/map/map.h index 1b15b477d..3b53b71cc 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -605,6 +605,7 @@ struct map_data { unsigned reset :1; // [Daegaladh] unsigned chsysnolocalaj : 1; unsigned noknockback : 1; + unsigned notomb : 1; } flag; struct point save; struct npc_data *npc[MAX_NPC_PER_MAP]; diff --git a/src/map/mob.c b/src/map/mob.c index 3f282bf7e..93ef81811 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2629,7 +2629,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) return 5; // Note: Actually, it's 4. Oh well... // MvP tomb [GreenBox] - if (battle_config.mvp_tomb_enabled && md->spawn->state.boss) + if (battle_config.mvp_tomb_enabled && md->spawn->state.boss && map[md->bl.m].flag.notomb != 1) mvptomb_create(md, mvp_sd ? mvp_sd->status.name : NULL, time(NULL)); if( !rebirth ) { diff --git a/src/map/npc.c b/src/map/npc.c index 2dd02e88f..df9a9426f 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3372,6 +3372,8 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char map[m].flag.guildlock=state; else if (!strcmpi(w3,"reset")) map[m].flag.reset=state; + else if (!strcmpi(w3,"notomb")) + map[m].flag.notomb=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 06830704b..f63202834 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -238,7 +238,8 @@ enum { MF_MONSTER_NOTELEPORT, MF_PVP_NOCALCRANK, //50 MF_BATTLEGROUND, - MF_RESET + MF_RESET, + MF_NOTOMB }; const char* script_op2name(int op) @@ -10344,6 +10345,7 @@ BUILDIN(getmapflag) case MF_PVP_NOCALCRANK: script_pushint(st,map[m].flag.pvp_nocalcrank); break; case MF_BATTLEGROUND: script_pushint(st,map[m].flag.battleground); break; case MF_RESET: script_pushint(st,map[m].flag.reset); break; + case MF_NOTOMB: script_pushint(st,map[m].flag.notomb); break; } } @@ -10460,6 +10462,7 @@ BUILDIN(setmapflag) case MF_PVP_NOCALCRANK: map[m].flag.pvp_nocalcrank = 1; break; case MF_BATTLEGROUND: map[m].flag.battleground = (val <= 0 || val > 2) ? 1 : val; break; case MF_RESET: map[m].flag.reset = 1; break; + case MF_NOTOMB: map[m].flag.notomb = 1; break; } } @@ -10548,6 +10551,7 @@ BUILDIN(removemapflag) case MF_PVP_NOCALCRANK: map[m].flag.pvp_nocalcrank = 0; break; case MF_BATTLEGROUND: map[m].flag.battleground = 0; break; case MF_RESET: map[m].flag.reset = 0; break; + case MF_NOTOMB: map[m].flag.notomb = 0; break; } } |