diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 5 | ||||
-rw-r--r-- | src/map/clif.c | 5 | ||||
-rw-r--r-- | src/map/pc.c | 13 | ||||
-rw-r--r-- | src/map/status.c | 24 |
4 files changed, 23 insertions, 24 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index db2b8be3f..0bb50eb76 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1304,7 +1304,10 @@ static struct Damage battle_calc_weapon_attack( }
hitrate+= status_get_hit(src) - flee;
-
+
+ if((sc && sc->data[SC_FOGWALL].timer!=-1) || (tsc && tsc->data[SC_FOGWALL].timer!=-1))
+ hitrate-=50;
+
if(sd && flag.arrow)
hitrate += sd->arrow_hit;
if(skill_num)
diff --git a/src/map/clif.c b/src/map/clif.c index 6c7fe0142..3b3f47a7c 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10820,7 +10820,10 @@ void clif_parse_PMIgnoreList(int fd,struct map_session_data *sd) */
void clif_parse_NoviceDoriDori(int fd, struct map_session_data *sd) {
int level;
- sd->doridori_counter = 1;
+
+ if ((sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE)
+ sd->doridori_counter++;
+
if ((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON
&& sd->state.rest && (level = pc_checkskill(sd,TK_SPTIME)))
sc_start(&sd->bl,SkillStatusChangeTable[TK_SPTIME],100,level,skill_get_time(TK_SPTIME, level));
diff --git a/src/map/pc.c b/src/map/pc.c index 00f606051..ddf9a244e 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6817,7 +6817,7 @@ static int pc_natural_heal_sp(struct map_session_data *sd) if(sd->nshealsp > 0) {
if(sd->inchealsptick >= battle_config.natural_heal_skill_interval && sd->status.sp < sd->status.max_sp) {
- if(sd->doridori_counter && (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) {
+ if(sd->doridori_counter) {
bonus = sd->nshealsp*2;
sd->doridori_counter = 0;
} else
@@ -6858,12 +6858,6 @@ static int pc_spirit_heal_hp(struct map_session_data *sd) if(sd->inchealspirithptick >= interval) {
bonus_hp = sd->nsshealhp;
- if(sd->doridori_counter && pc_checkskill(sd,TK_HPTIME) > 0) {
- //TK_HPTIME doridori provided bonus [Dralnu]
- bonus_hp += sd->nsshealhp;
- if (!sd->nsshealsp) //If there's sp regen, this gets clear in the next function. [Skotlex]
- sd->doridori_counter = 0;
- }
while(sd->inchealspirithptick >= interval) {
if(pc_issit(sd)) {
sd->inchealspirithptick -= interval;
@@ -6904,11 +6898,6 @@ static int pc_spirit_heal_sp(struct map_session_data *sd) if(sd->inchealspiritsptick >= interval) {
bonus_sp = sd->nsshealsp;
- if(sd->doridori_counter && pc_checkskill(sd,TK_SPTIME) > 0) {
- //TK_SPTIME doridori provided bonus [Dralnu]
- bonus_sp += sd->nsshealsp;
- sd->doridori_counter = 0;
- }
while(sd->inchealspiritsptick >= interval) {
if(pc_issit(sd)) {
sd->inchealspiritsptick -= interval;
diff --git a/src/map/status.c b/src/map/status.c index f0b4797eb..87142832a 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1311,7 +1311,7 @@ int status_calc_pc(struct map_session_data* sd,int first) // Basic INT-MDEF value
sd->mdef2 += sd->paramc[3];
- // sd->mdef2 = status_calc_mdef2(&sd->bl,sd->mdef2);
+ sd->mdef2 = status_calc_mdef2(&sd->bl,sd->mdef2);
// Apply relative modifiers from equipment
if(sd->mdef2_rate != 100)
@@ -2953,20 +2953,24 @@ int status_get_mdef2(struct block_list *bl) int mdef2=0;
nullpo_retr(0, bl);
- if(bl->type == BL_PC)
- return ((struct map_session_data *)bl)->mdef2 + (((struct map_session_data *)bl)->paramc[2]>>1);
- else if(bl->type == BL_MOB)
- mdef2 = ((struct mob_data *)bl)->db->int_ + (((struct mob_data *)bl)->db->vit>>1);
- else if(bl->type == BL_PET) { //<Skotlex> Use pet's stats
- if (battle_config.pet_lv_rate && ((struct pet_data *)bl)->status)
- mdef2 = ((struct pet_data *)bl)->status->int_ +(((struct pet_data *)bl)->status->vit>>1);
+ switch(bl->type)
+ {
+ case BL_PC:
+ return ((TBL_PC*)bl)->mdef2 + (((TBL_PC*)bl)->paramc[2]>>1);
+ case BL_MOB:
+ mdef2 = ((TBL_MOB*)bl)->db->int_ + (((TBL_MOB*)bl)->db->vit>>1);
+ break;
+ case BL_PET:
+ //<Skotlex> Use pet's stats
+ if (battle_config.pet_lv_rate && ((TBL_PET*)bl)->status)
+ mdef2 = ((TBL_PET*)bl)->status->int_ +(((TBL_PET*)bl)->status->vit>>1);
else
- mdef2 = ((struct pet_data *)bl)->db->int_ + (((struct pet_data *)bl)->db->vit>>1);
+ mdef2 = ((TBL_PET*)bl)->db->int_ + (((TBL_PET*)bl)->db->vit>>1);
+ break;
}
mdef2 = status_calc_mdef2(bl,mdef2);
if(mdef2 < 0) mdef2 = 0;
-
return mdef2;
}
/*==========================================
|