sevenrosuport Posted September 3, 2012 Share Posted September 3, 2012 An aid personnel wanted to create a mapflag which causes the cast to be canceled even if the player card has fen Quote Link to comment Share on other sites More sharing options...
clydelion Posted September 4, 2012 Share Posted September 4, 2012 try this one, don't forget to activate it to a map Index: map.h =================================================================== --- map.h (revision 16138) +++ map.h (working copy) @@ -547,6 +547,7 @@ unsigned guildlock :1; unsigned src4instance : 1; // To flag this map when it's used as a src map for instances unsigned reset :1; // [Daegaladh] + unsigned nophen :1; } flag; struct point save; struct npc_data *npc[MAX_NPC_PER_MAP]; Index: npc.c =================================================================== --- npc.c (revision 16138) +++ npc.c (working copy) @@ -3206,6 +3206,8 @@ map[m].flag.guildlock=state; else if (!strcmpi(w3,"reset")) map[m].flag.reset=state; + else if (!strcmpi(w3,"nophen")) + map[m].flag.nophen=state; else ShowError("npc_parse_mapflag: unrecognized mapflag '%s' (file '%s', line '%d').\n", w3, filepath, strline(buffer,start-buffer)); Index: script.c =================================================================== --- script.c (revision 16138) +++ script.c (working copy) @@ -367,7 +367,8 @@ MF_MONSTER_NOTELEPORT, MF_PVP_NOCALCRANK, //50 MF_BATTLEGROUND, - MF_RESET + MF_RESET, + MF_NOPHEN }; const char* script_op2name(int op) @@ -10076,6 +10077,7 @@ 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_NOPHEN: script_pushint(st,map[m].flag.nophen); break; } } @@ -10154,6 +10156,7 @@ case MF_PVP_NOCALCRANK: map[m].flag.pvp_nocalcrank = 1; break; case MF_BATTLEGROUND: map[m].flag.battleground = (!val || atoi(val) < 0 || atoi(val) > 2) ? 1 : atoi(val); break; case MF_RESET: map[m].flag.reset = 1; break; + case MF_NOPHEN: map[m].flag.nophen = 1; break; } } @@ -10234,6 +10237,7 @@ 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_NOPHEN: map[m].flag.nophen = 0; break; } } Index: unit.c =================================================================== --- unit.c (revision 16138) +++ unit.c (working copy) @@ -1850,7 +1850,7 @@ return 0; if (sd && (sd->special_state.no_castcancel2 || - (sd->special_state.no_castcancel && !map_flag_gvg(bl->m) && !map[bl->m].flag.battleground))) //fixed flags being read the wrong way around [blackhole89] + (sd->special_state.no_castcancel && !map_flag_gvg(bl->m) && !map[bl->m].flag.battleground && !map[sd->bl.m].flag.nophen))) //fixed flags being read the wrong way around [blackhole89] return 0; } the mapflag is 'nophen' 1 Quote Link to comment Share on other sites More sharing options...
sevenrosuport Posted September 4, 2012 Author Share Posted September 4, 2012 Thank you, I owe you a lot ^ ^ Close. Quote Link to comment Share on other sites More sharing options...
An aid personnel wanted to create a mapflag which causes the cast to be canceled even if the player card has fen
Link to comment
Share on other sites