- Some small cleanups on status_calc_pet
- Fixed one valgrind error report. - Added back the Freeze/Petrify adjustments of -50%def and +25%mdef (when where these lost?) git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6903 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
2c4bcef25a
commit
459b2a672f
@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
|
||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||
|
||||
2006/05/31
|
||||
* Added back the Freeze/Petrify adjustments of -50%def and +25%mdef (when
|
||||
where these lost?). Thanks to Buuyo for pointing it out. [Skotlex]
|
||||
* Corrected the mob_ai&2 setting triggering rude-attacked due to can't walk
|
||||
delay. [Skotlex]
|
||||
* Made the char_name_option char_athena.conf setting apply to parties and
|
||||
|
@ -638,7 +638,7 @@ int mob_spawn (struct mob_data *md)
|
||||
{ //Monster can be spawned on an area.
|
||||
short x, y, xs, ys;
|
||||
if (md->spawn->x == 0 && md->spawn->y == 0)
|
||||
xs = ys = -1;
|
||||
x = y = xs = ys = -1;
|
||||
else {
|
||||
x = md->spawn->x;
|
||||
y = md->spawn->y;
|
||||
|
@ -1205,11 +1205,8 @@ int status_calc_pet(struct pet_data *pd, int first)
|
||||
status->dex = (bstat->dex*lv)/pd->db->lv;
|
||||
status->luk = (bstat->luk*lv)/pd->db->lv;
|
||||
|
||||
if(status->rhw.atk > battle_config.pet_max_atk1)
|
||||
status->rhw.atk = battle_config.pet_max_atk1;
|
||||
if(status->rhw.atk2 > battle_config.pet_max_atk2)
|
||||
status->rhw.atk2 = battle_config.pet_max_atk2;
|
||||
|
||||
status->rhw.atk = cap_value(status->rhw.atk, 1, battle_config.pet_max_atk1);
|
||||
status->rhw.atk2 = cap_value(status->rhw.atk2, 2, battle_config.pet_max_atk2);
|
||||
status->str = cap_value(status->str,1,battle_config.pet_max_stats);
|
||||
status->agi = cap_value(status->agi,1,battle_config.pet_max_stats);
|
||||
status->vit = cap_value(status->vit,1,battle_config.pet_max_stats);
|
||||
@ -1220,7 +1217,7 @@ int status_calc_pet(struct pet_data *pd, int first)
|
||||
status->batk = status_base_atk(&pd->bl, &pd->status);
|
||||
status_calc_misc(&pd->status, lv);
|
||||
if (!battle_config.pet_str)
|
||||
pd->status.batk = 0;
|
||||
status->batk = 0;
|
||||
if (!first) //Not done the first time because the pet is not visible yet
|
||||
clif_send_petstatus(sd);
|
||||
}
|
||||
@ -3027,12 +3024,16 @@ static unsigned char status_calc_def(struct block_list *bl, struct status_change
|
||||
def += sc->data[SC_DRUMBATTLE].val3;
|
||||
if(sc->data[SC_INCDEFRATE].timer!=-1)
|
||||
def += def * sc->data[SC_INCDEFRATE].val1/100;
|
||||
if(sc->data[SC_FREEZE].timer!=-1)
|
||||
def >>=1;
|
||||
if(sc->data[SC_STONE].timer!=-1 && sc->opt1 == OPT1_STONE)
|
||||
def >>=1;
|
||||
if(sc->data[SC_SIGNUMCRUCIS].timer!=-1)
|
||||
def -= def * sc->data[SC_SIGNUMCRUCIS].val2/100;
|
||||
if(sc->data[SC_CONCENTRATION].timer!=-1)
|
||||
def -= def * sc->data[SC_CONCENTRATION].val4/100;
|
||||
if(sc->data[SC_SKE].timer!=-1)
|
||||
def -= def * 50/100;
|
||||
def >>=1;
|
||||
if(sc->data[SC_PROVOKE].timer!=-1 && bl->type != BL_PC) // Provoke doesn't alter player defense.
|
||||
def -= def * sc->data[SC_PROVOKE].val4/100;
|
||||
if(sc->data[SC_STRIPSHIELD].timer!=-1)
|
||||
@ -3088,6 +3089,10 @@ static unsigned char status_calc_mdef(struct block_list *bl, struct status_chang
|
||||
return 90;
|
||||
if(sc->data[SC_SKA].timer != -1) // [marquis007]
|
||||
return 90;
|
||||
if(sc->data[SC_FREEZE].timer!=-1)
|
||||
mdef += 25*mdef/100;
|
||||
if(sc->data[SC_STONE].timer!=-1 && sc->opt1 == OPT1_STONE)
|
||||
mdef += 25*mdef/100;
|
||||
if(sc->data[SC_ENDURE].timer!=-1 && sc->data[SC_ENDURE].val4 == 0)
|
||||
mdef += sc->data[SC_ENDURE].val1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user