diff options
author | remoitnane <remoit(DOT)nane(AT)gmail(DOT)com> | 2010-07-05 01:25:40 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-07-06 01:08:12 -0600 |
commit | 9e28e286682dc0c958de4db57483483a460e93de (patch) | |
tree | 1fbe39dbbe72b1b0a1da745be72e8daa74942486 /src | |
parent | 3697be69b0dffc185c9b4cf8221c782f48546771 (diff) | |
download | tmwa-9e28e286682dc0c958de4db57483483a460e93de.tar.gz tmwa-9e28e286682dc0c958de4db57483483a460e93de.tar.bz2 tmwa-9e28e286682dc0c958de4db57483483a460e93de.tar.xz tmwa-9e28e286682dc0c958de4db57483483a460e93de.zip |
Add new map flag and condition for mob skills
Signed-off-by: Jared Adams <jaxad0127@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/map/map.h | 1 | ||||
-rw-r--r-- | src/map/mob.c | 5 | ||||
-rw-r--r-- | src/map/mob.h | 1 | ||||
-rw-r--r-- | src/map/npc.c | 6 |
4 files changed, 12 insertions, 1 deletions
diff --git a/src/map/map.h b/src/map/map.h index d7c0d44..9934fdf 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -594,6 +594,7 @@ struct map_data unsigned leaves:1; // [Valaris] unsigned rain:1; // [Valaris] unsigned no_player_drops:1; // [Jaxad0127] + unsigned town:1; // [remoitnane] } 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 f36d60e..d8e6ef8 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -4256,6 +4256,9 @@ int mobskill_use (struct mob_data *md, unsigned int tick, int event) mob_getfriendstatus (md, ms[i].cond1, ms[i].cond2)) != NULL); break; + case MSC_NOTINTOWN: // Only outside of towns. + flag = !map[md->bl.m].flag.town; + break; case MSC_SLAVELT: // slave < num flag = (mob_countslave (md) < c2); break; @@ -4836,6 +4839,8 @@ static int mob_readskilldb (void) { "friendstatusoff", MSC_FRIENDSTATUSOFF}, { + "notintown", MSC_NOTINTOWN}, + { "attackpcgt", MSC_ATTACKPCGT}, { "attackpcge", MSC_ATTACKPCGE}, diff --git a/src/map/mob.h b/src/map/mob.h index 14c359c..7351f2e 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -70,6 +70,7 @@ enum MSC_MYSTATUSOFF = 0x0021, MSC_FRIENDSTATUSON = 0x0030, MSC_FRIENDSTATUSOFF = 0x0031, + MSC_NOTINTOWN = 0x0032, MSC_ATTACKPCGT = 0x0100, MSC_ATTACKPCGE = 0x0101, diff --git a/src/map/npc.c b/src/map/npc.c index fc994f5..d302fe8 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2133,9 +2133,13 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4) map[m].flag.rain = 1; } else if (strcmpi (w3, "no_player_drops") == 0) - { // rain [Valaris] + { // no player drops [Jaxad0127] map[m].flag.no_player_drops = 1; } + else if (strcmpi (w3, "town") == 0) + { // town/safe zone [remoitnane] + map[m].flag.town = 1; + } return 0; } |