summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-10-27 04:52:28 +0300
committerAndrei Karas <akaras@inbox.ru>2017-10-30 04:39:52 +0300
commitaa8466c0b83f12599305032df5c86b8ec59ae444 (patch)
tree1a006e6b1bfc5d710549f55af0493868ac333682 /src/map/npc.c
parent9519c40b00802dfb22070884820ab4a26d7c5ba5 (diff)
downloadhercules-aa8466c0b83f12599305032df5c86b8ec59ae444.tar.gz
hercules-aa8466c0b83f12599305032df5c86b8ec59ae444.tar.bz2
hercules-aa8466c0b83f12599305032df5c86b8ec59ae444.tar.xz
hercules-aa8466c0b83f12599305032df5c86b8ec59ae444.zip
Add monster spawn boss flag for miniboss: miniboss_monster
also fix boss_monster flag for works as mvp and not like mini boss. unhide boss flag if hp bar disabled.
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index ecf7f878f..de5335302 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -3843,7 +3843,12 @@ const char *npc_parse_mob(const char *w1, const char *w2, const char *w3, const
memset(&mobspawn, 0, sizeof(struct spawn_data));
- mobspawn.state.boss = (strcmp(w2,"boss_monster") == 0 ? 1 : 0);
+ if (strcmp(w2, "boss_monster") == 0)
+ mobspawn.state.boss = BTYPE_MVP;
+ else if (strcmp(w2, "miniboss_monster") == 0)
+ mobspawn.state.boss = BTYPE_BOSS;
+ else
+ mobspawn.state.boss = BTYPE_NONE;
// w1=<map name>,<x>,<y>,<xs>,<ys>
// w3=<mob name>{,<mob level>}
@@ -4662,7 +4667,7 @@ int npc_parsesrcfile(const char* filepath, bool runOnInit) {
{
p = npc->parse_duplicate(w1,w2,w3,w4, p, buffer, filepath, (runOnInit?NPO_ONINIT:NPO_NONE), &success);
}
- else if( (strcmp(w2,"monster") == 0 || strcmp(w2,"boss_monster") == 0) )
+ else if (strcmp(w2,"monster") == 0 || strcmp(w2,"boss_monster") == 0 || strcmp(w2,"miniboss_monster") == 0)
{
p = npc->parse_mob(w1, w2, w3, w4, p, buffer, filepath, &success);
}