diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-02 14:19:56 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-02 14:19:56 +0000 |
commit | d90b2e20d916b9539060dcdb33d13bb41aa1bb89 (patch) | |
tree | f6779bc22680926c01a73fb2e69d74f0d2991452 /src | |
parent | c465de040071d547c25af3856683d3a137832e8e (diff) | |
download | hercules-d90b2e20d916b9539060dcdb33d13bb41aa1bb89.tar.gz hercules-d90b2e20d916b9539060dcdb33d13bb41aa1bb89.tar.bz2 hercules-d90b2e20d916b9539060dcdb33d13bb41aa1bb89.tar.xz hercules-d90b2e20d916b9539060dcdb33d13bb41aa1bb89.zip |
- Renamed nopenalty mapflag to noexppenalty. Using nopenalty will turn on/off both noexppenalty and nozenypenalty now.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8915 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 2 | ||||
-rw-r--r-- | src/map/map.h | 2 | ||||
-rw-r--r-- | src/map/npc.c | 6 | ||||
-rw-r--r-- | src/map/pc.c | 4 | ||||
-rw-r--r-- | src/map/script.c | 9 | ||||
-rw-r--r-- | src/map/skill.c | 2 |
6 files changed, 16 insertions, 9 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 5c579f05b..7b566ad61 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -5761,7 +5761,7 @@ int atcommand_mapinfo( strcat(atcmd_output, "NoMemo | ");
clif_displaymessage(fd, atcmd_output);
- sprintf(atcmd_output, "No Penalty: %s | No Zeny Penalty: %s", (map[m_id].flag.nopenalty) ? "On" : "Off", (map[m_id].flag.nozenypenalty) ? "On" : "Off");
+ sprintf(atcmd_output, "No Exp Penalty: %s | No Zeny Penalty: %s", (map[m_id].flag.noexppenalty) ? "On" : "Off", (map[m_id].flag.nozenypenalty) ? "On" : "Off");
clif_displaymessage(fd, atcmd_output);
if (map[m_id].flag.nosave) {
diff --git a/src/map/map.h b/src/map/map.h index d855f2d53..2448cf767 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -1084,7 +1084,7 @@ struct map_data { unsigned monster_noteleport : 1;
unsigned nosave : 1;
unsigned nobranch : 1;
- unsigned nopenalty : 1;
+ unsigned noexppenalty : 1;
unsigned pvp : 1;
unsigned pvp_noparty : 1;
unsigned pvp_noguild : 1;
diff --git a/src/map/npc.c b/src/map/npc.c index fc93207a8..1954b5d7f 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2384,7 +2384,8 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4) map[m].flag.nobranch=state;
}
else if (strcmpi(w3,"nopenalty")==0) {
- map[m].flag.nopenalty=state;
+ map[m].flag.noexppenalty=state;
+ map[m].flag.nozenypenalty=state;
}
else if (strcmpi(w3,"pvp")==0) {
map[m].flag.pvp=state;
@@ -2449,6 +2450,9 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4) map[m].flag.gvg_castle=state;
if (state) map[m].flag.pvp=0;
}
+ else if (strcmpi(w3,"noexppenalty")==0) {
+ map[m].flag.noexppenalty=state;
+ }
else if (strcmpi(w3,"nozenypenalty")==0) {
map[m].flag.nozenypenalty=state;
}
diff --git a/src/map/pc.c b/src/map/pc.c index cb641b3cf..822581272 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4822,7 +4822,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) if(sd->status.pet_id > 0 && sd->pd) { struct s_pet *pet = &sd->pd->pet; - if(!map[sd->bl.m].flag.nopenalty){ + if(!map[sd->bl.m].flag.noexppenalty){ pet->intimate -= sd->pd->petDB->die; if(pet->intimate < 0) pet->intimate = 0; @@ -4970,7 +4970,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) // changed penalty options, added death by player if pk_mode [Valaris] if(battle_config.death_penalty_type && sd->state.snovice_flag != 4 && (sd->class_&MAPID_UPPERMASK) != MAPID_NOVICE // only novices will receive no penalty - && !map[sd->bl.m].flag.nopenalty && !map_flag_gvg(sd->bl.m) + && !map[sd->bl.m].flag.noexppenalty && !map_flag_gvg(sd->bl.m) && sd->sc.data[SC_BABY].timer == -1) { unsigned int base_penalty =0; diff --git a/src/map/script.c b/src/map/script.c index 72d771e88..09fb80b32 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -205,7 +205,8 @@ enum { MF_BEXP, //40 MF_NOVENDING, MF_LOADEVENT, - MF_NOCHAT + MF_NOCHAT, + MF_NOEXPPENALTY }; //Reports on the console the src of an script error. @@ -8234,7 +8235,8 @@ int buildin_setmapflag(struct script_state *st) map[m].flag.nobranch=1; break; case MF_NOPENALTY: - map[m].flag.nopenalty=1; + map[m].flag.noexppenalty=1; + map[m].flag.nozenypenalty=1; break; case MF_NOZENYPENALTY: map[m].flag.nozenypenalty=1; @@ -8378,7 +8380,8 @@ int buildin_removemapflag(struct script_state *st) map[m].flag.nobranch=0; break; case MF_NOPENALTY: - map[m].flag.nopenalty=0; + map[m].flag.noexppenalty=0; + map[m].flag.nozenypenalty=0; break; case MF_PVP: map[m].flag.pvp=0; diff --git a/src/map/skill.c b/src/map/skill.c index fd86c929b..c8aeb689f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -3327,7 +3327,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in break; } skill_area_temp[0] = 5 - skill_area_temp[0]; // The actual penalty... - if (skill_area_temp[0] > 0 && !map[src->m].flag.nopenalty) { //Apply penalty + if (skill_area_temp[0] > 0 && !map[src->m].flag.noexppenalty) { //Apply penalty sd->status.base_exp -= pc_nextbaseexp(sd) * skill_area_temp[0] * 2/1000; //0.2% penalty per each. sd->status.job_exp -= pc_nextjobexp(sd) * skill_area_temp[0] * 2/1000; clif_updatestatus(sd,SP_BASEEXP); |