summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-04-02 20:45:20 -0300
committershennetsind <ind@henn.et>2013-04-02 20:45:20 -0300
commit80e90568f0e20766ae4b753395d968bd7a1764f9 (patch)
tree737d35ca217b88c792ad30bef81196437806c916 /src/map
parent98b26ebbe6b4df336cfccc38821b7a52d5980d01 (diff)
downloadhercules-80e90568f0e20766ae4b753395d968bd7a1764f9.tar.gz
hercules-80e90568f0e20766ae4b753395d968bd7a1764f9.tar.bz2
hercules-80e90568f0e20766ae4b753395d968bd7a1764f9.tar.xz
hercules-80e90568f0e20766ae4b753395d968bd7a1764f9.zip
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 <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/map.h1
-rw-r--r--src/map/npc.c2
-rw-r--r--src/map/skill.c4
3 files changed, 5 insertions, 2 deletions
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.