From 80e90568f0e20766ae4b753395d968bd7a1764f9 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Tue, 2 Apr 2013 20:45:20 -0300 Subject: Introducing New/Official Mapflag: noknockback Used officially in gvg and battleground maps (implemented under their respective zones) Special Thanks to Muad_Dib! Signed-off-by: shennetsind --- db/pre-re/map_zone_db.conf | 5 ++++- db/re/map_zone_db.conf | 5 ++++- src/map/map.h | 1 + src/map/npc.c | 2 ++ src/map/skill.c | 4 ++-- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/db/pre-re/map_zone_db.conf b/db/pre-re/map_zone_db.conf index 36659ac87..5ee8ba0b1 100644 --- a/db/pre-re/map_zone_db.conf +++ b/db/pre-re/map_zone_db.conf @@ -81,7 +81,8 @@ zones: ( Pty_Assumptio_Scroll: true } /* 5 second duration increase on GvG */ - mapflags: ( "invincible_time_inc 5000" ) + /* knockback disabled */ + mapflags: ( "invincible_time_inc 5000", "noknockback" ) }, { /* Battlegrounds zone is applied to all maps with a battlegrounds mapflag */ @@ -126,6 +127,8 @@ zones: ( Assumptio_5_Scroll: true Pty_Assumptio_Scroll: true } + /* knockback disabled */ + mapflags: ( "noknockback" ) }, { name: "Aldebaran Turbo Track" diff --git a/db/re/map_zone_db.conf b/db/re/map_zone_db.conf index 36659ac87..5ee8ba0b1 100644 --- a/db/re/map_zone_db.conf +++ b/db/re/map_zone_db.conf @@ -81,7 +81,8 @@ zones: ( Pty_Assumptio_Scroll: true } /* 5 second duration increase on GvG */ - mapflags: ( "invincible_time_inc 5000" ) + /* knockback disabled */ + mapflags: ( "invincible_time_inc 5000", "noknockback" ) }, { /* Battlegrounds zone is applied to all maps with a battlegrounds mapflag */ @@ -126,6 +127,8 @@ zones: ( Assumptio_5_Scroll: true Pty_Assumptio_Scroll: true } + /* knockback disabled */ + mapflags: ( "noknockback" ) }, { name: "Aldebaran Turbo Track" diff --git a/src/map/map.h b/src/map/map.h index 148c4ac0f..964bee736 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -587,6 +587,7 @@ struct map_data { unsigned src4instance : 1; // To flag this map when it's used as a src map for instances unsigned reset :1; // [Daegaladh] unsigned chsysnolocalaj : 1; + unsigned noknockback : 1; } flag; struct point save; struct npc_data *npc[MAX_NPC_PER_MAP]; diff --git a/src/map/npc.c b/src/map/npc.c index b9bc28eaa..92285118d 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -3460,6 +3460,8 @@ const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char map[m].flag.chsysnolocalaj = state; } else if ( !strcmpi(w3,"invincible_time_inc") ) { map[m].invincible_time_inc = (state) ? atoi(w4) : 0; + } else if ( !strcmpi(w3,"noknockback") ) { + map[m].flag.noknockback = state; } else ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').\n", w3, filepath, strline(buffer,start-buffer)); diff --git a/src/map/skill.c b/src/map/skill.c index ca3b28656..d686bef7f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2049,8 +2049,8 @@ int skill_blown(struct block_list* src, struct block_list* target, int count, in nullpo_ret(src); - if (src != target && (map_flag_gvg(target->m) || map[target->m].flag.battleground)) - return 0; //No knocking back in WoE + if (src != target && map[src->m].flag.noknockback) + return 0; //No knocking if (count == 0) return 0; //Actual knockback distance is 0. -- cgit v1.2.3-70-g09d2