Merge remote-tracking branch 'upstream/master' into upgrade/c++14
This commit is contained in:
commit
6923b0da57
1
.github/workflows/analysis_codeql.yml
vendored
1
.github/workflows/analysis_codeql.yml
vendored
@ -6,6 +6,7 @@ concurrency:
|
|||||||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|||||||
1
.github/workflows/build_servers_clang.yml
vendored
1
.github/workflows/build_servers_clang.yml
vendored
@ -6,6 +6,7 @@ concurrency:
|
|||||||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|||||||
1
.github/workflows/build_servers_cmake.yml
vendored
1
.github/workflows/build_servers_cmake.yml
vendored
@ -6,6 +6,7 @@ concurrency:
|
|||||||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|||||||
1
.github/workflows/build_servers_gcc.yml
vendored
1
.github/workflows/build_servers_gcc.yml
vendored
@ -6,6 +6,7 @@ concurrency:
|
|||||||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|||||||
1
.github/workflows/build_servers_modes.yml
vendored
1
.github/workflows/build_servers_modes.yml
vendored
@ -6,6 +6,7 @@ concurrency:
|
|||||||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|||||||
1
.github/workflows/build_servers_msbuild.yml
vendored
1
.github/workflows/build_servers_msbuild.yml
vendored
@ -6,6 +6,7 @@ concurrency:
|
|||||||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|||||||
@ -6,6 +6,7 @@ concurrency:
|
|||||||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|||||||
1
.github/workflows/build_servers_vip.yml
vendored
1
.github/workflows/build_servers_vip.yml
vendored
@ -6,6 +6,7 @@ concurrency:
|
|||||||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|||||||
1
.github/workflows/npc_db_validation.yml
vendored
1
.github/workflows/npc_db_validation.yml
vendored
@ -9,6 +9,7 @@ concurrency:
|
|||||||
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|||||||
@ -121,11 +121,13 @@ int Sql_Connect(Sql* self, const char* user, const char* passwd, const char* hos
|
|||||||
|
|
||||||
StringBuf_Clear(&self->buf);
|
StringBuf_Clear(&self->buf);
|
||||||
|
|
||||||
|
#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID) && MYSQL_VERSION_ID >= 50710
|
||||||
unsigned int md = SSL_MODE_DISABLED;
|
unsigned int md = SSL_MODE_DISABLED;
|
||||||
|
|
||||||
if( mysql_options( &self->handle, MYSQL_OPT_SSL_MODE, &md ) ){
|
if( mysql_options( &self->handle, MYSQL_OPT_SSL_MODE, &md ) ){
|
||||||
ShowSQL( "Your MySQL version does not understand \"MYSQL_OPT_SSL_MODE\" yet. Please consider upgrading - especially if you encounter SSL related error messages from your MySQL server.\n" );
|
ShowSQL( "Your MySQL version does not understand \"MYSQL_OPT_SSL_MODE\" yet. Please consider upgrading - especially if you encounter SSL related error messages from your MySQL server.\n" );
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if( !mysql_real_connect(&self->handle, host, user, passwd, db, (unsigned int)port, NULL/*unix_socket*/, 0/*clientflag*/) )
|
if( !mysql_real_connect(&self->handle, host, user, passwd, db, (unsigned int)port, NULL/*unix_socket*/, 0/*clientflag*/) )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1247,7 +1247,7 @@ bool battle_status_block_damage(struct block_list *src, struct block_list *targe
|
|||||||
(skill_id == 0 && (status_get_status_data(src))->rhw.ele == ELE_GHOST))
|
(skill_id == 0 && (status_get_status_data(src))->rhw.ele == ELE_GHOST))
|
||||||
{
|
{
|
||||||
if (skill_id == WL_SOULEXPANSION)
|
if (skill_id == WL_SOULEXPANSION)
|
||||||
damage <<= 1; // If used against a player in White Imprison, the skill deals double damage.
|
damage *= 2; // If used against a player in White Imprison, the skill deals double damage.
|
||||||
status_change_end(target, SC_WHITEIMPRISON); // Those skills do damage and removes effect
|
status_change_end(target, SC_WHITEIMPRISON); // Those skills do damage and removes effect
|
||||||
} else {
|
} else {
|
||||||
d->dmg_lv = ATK_BLOCK;
|
d->dmg_lv = ATK_BLOCK;
|
||||||
@ -1480,12 +1480,12 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
|
|||||||
// Damage increasing effects
|
// Damage increasing effects
|
||||||
#ifdef RENEWAL // Flat +400% damage from melee
|
#ifdef RENEWAL // Flat +400% damage from melee
|
||||||
if (sc->getSCE(SC_KAITE) && (flag&(BF_SHORT|BF_MAGIC)) == BF_SHORT)
|
if (sc->getSCE(SC_KAITE) && (flag&(BF_SHORT|BF_MAGIC)) == BF_SHORT)
|
||||||
damage <<= 2;
|
damage *= 4;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (sc->getSCE(SC_AETERNA) && skill_id != PF_SOULBURN) {
|
if (sc->getSCE(SC_AETERNA) && skill_id != PF_SOULBURN) {
|
||||||
if (src->type != BL_MER || !skill_id)
|
if (src->type != BL_MER || !skill_id)
|
||||||
damage <<= 1; // Lex Aeterna only doubles damage of regular attacks from mercenaries
|
damage *= 2; // Lex Aeterna only doubles damage of regular attacks from mercenaries
|
||||||
|
|
||||||
#ifndef RENEWAL
|
#ifndef RENEWAL
|
||||||
if( skill_id != ASC_BREAKER || !(flag&BF_WEAPON) )
|
if( skill_id != ASC_BREAKER || !(flag&BF_WEAPON) )
|
||||||
@ -1537,7 +1537,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sc->getSCE(SC_SOUNDOFDESTRUCTION))
|
if (sc->getSCE(SC_SOUNDOFDESTRUCTION))
|
||||||
damage <<= 1;
|
damage *= 2;
|
||||||
if (sc->getSCE(SC_DARKCROW) && (flag&(BF_SHORT|BF_MAGIC)) == BF_SHORT) {
|
if (sc->getSCE(SC_DARKCROW) && (flag&(BF_SHORT|BF_MAGIC)) == BF_SHORT) {
|
||||||
int bonus = sc->getSCE(SC_DARKCROW)->val2;
|
int bonus = sc->getSCE(SC_DARKCROW)->val2;
|
||||||
if( sc->getSCE(SC_BURNT) && status_get_element(src) == ELE_FIRE )
|
if( sc->getSCE(SC_BURNT) && status_get_element(src) == ELE_FIRE )
|
||||||
@ -1560,7 +1560,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
|
|||||||
if( map_flag_vs(bl->m) )
|
if( map_flag_vs(bl->m) )
|
||||||
damage = (int64)damage*2/3; //Receive 66% damage
|
damage = (int64)damage*2/3; //Receive 66% damage
|
||||||
else
|
else
|
||||||
damage >>= 1; //Receive 50% damage
|
damage /= 2; //Receive 50% damage
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1580,7 +1580,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
|
|||||||
if(flag&BF_SKILL) //25% reduction
|
if(flag&BF_SKILL) //25% reduction
|
||||||
damage -= damage * 25 / 100;
|
damage -= damage * 25 / 100;
|
||||||
else if ((flag&(BF_LONG|BF_WEAPON)) == (BF_LONG|BF_WEAPON))
|
else if ((flag&(BF_LONG|BF_WEAPON)) == (BF_LONG|BF_WEAPON))
|
||||||
damage >>= 2; //75% reduction
|
damage /= 4; //75% reduction
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sc->getSCE(SC_SPORE_EXPLOSION) && (flag & BF_LONG) == BF_LONG)
|
if (sc->getSCE(SC_SPORE_EXPLOSION) && (flag & BF_LONG) == BF_LONG)
|
||||||
@ -1768,7 +1768,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
|
|||||||
break;
|
break;
|
||||||
case RC2_OGH_ATK_DEF:
|
case RC2_OGH_ATK_DEF:
|
||||||
if (sc->getSCE(SC_GLASTHEIM_ATK))
|
if (sc->getSCE(SC_GLASTHEIM_ATK))
|
||||||
damage <<= 1;
|
damage *= 2;
|
||||||
break;
|
break;
|
||||||
case RC2_BIO5_SWORDMAN_THIEF:
|
case RC2_BIO5_SWORDMAN_THIEF:
|
||||||
if (sce = sc->getSCE(SC_LHZ_DUN_N1))
|
if (sce = sc->getSCE(SC_LHZ_DUN_N1))
|
||||||
@ -2795,7 +2795,7 @@ static bool is_attack_critical(struct Damage* wd, struct block_list *src, struct
|
|||||||
cri -= tstatus->luk * ((!sd && tsd) ? 3 : 2);
|
cri -= tstatus->luk * ((!sd && tsd) ? 3 : 2);
|
||||||
|
|
||||||
if( tsc && tsc->getSCE(SC_SLEEP) )
|
if( tsc && tsc->getSCE(SC_SLEEP) )
|
||||||
cri <<= 1;
|
cri *= 2;
|
||||||
|
|
||||||
switch(skill_id) {
|
switch(skill_id) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -2808,7 +2808,7 @@ static bool is_attack_critical(struct Damage* wd, struct block_list *src, struct
|
|||||||
(battle_config.auto_counter_type&src->type))
|
(battle_config.auto_counter_type&src->type))
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
cri <<= 1;
|
cri *= 2;
|
||||||
break;
|
break;
|
||||||
case SN_SHARPSHOOTING:
|
case SN_SHARPSHOOTING:
|
||||||
case MA_SHARPSHOOTING:
|
case MA_SHARPSHOOTING:
|
||||||
@ -4062,7 +4062,7 @@ static int battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list *
|
|||||||
case AS_SONICBLOW:
|
case AS_SONICBLOW:
|
||||||
#ifdef RENEWAL
|
#ifdef RENEWAL
|
||||||
skillratio += 100 + 100 * skill_lv;
|
skillratio += 100 + 100 * skill_lv;
|
||||||
if (tstatus->hp < tstatus->max_hp >> 1)
|
if (tstatus->hp < (tstatus->max_hp / 2))
|
||||||
skillratio += skillratio / 2;
|
skillratio += skillratio / 2;
|
||||||
#else
|
#else
|
||||||
skillratio += 300 + 40 * skill_lv;
|
skillratio += 300 + 40 * skill_lv;
|
||||||
@ -4245,7 +4245,7 @@ static int battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list *
|
|||||||
case LK_JOINTBEAT:
|
case LK_JOINTBEAT:
|
||||||
skillratio += 10 * skill_lv - 50;
|
skillratio += 10 * skill_lv - 50;
|
||||||
if (wd->miscflag & BREAK_NECK || (tsc && tsc->getSCE(SC_JOINTBEAT) && tsc->getSCE(SC_JOINTBEAT)->val2 & BREAK_NECK)) // The 2x damage is only for the BREAK_NECK ailment.
|
if (wd->miscflag & BREAK_NECK || (tsc && tsc->getSCE(SC_JOINTBEAT) && tsc->getSCE(SC_JOINTBEAT)->val2 & BREAK_NECK)) // The 2x damage is only for the BREAK_NECK ailment.
|
||||||
skillratio <<= 1;
|
skillratio *= 2;
|
||||||
break;
|
break;
|
||||||
#ifdef RENEWAL
|
#ifdef RENEWAL
|
||||||
// Renewal: skill ratio applies to entire damage [helvetica]
|
// Renewal: skill ratio applies to entire damage [helvetica]
|
||||||
@ -4839,7 +4839,7 @@ static int battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list *
|
|||||||
if (sd) {
|
if (sd) {
|
||||||
skillratio += pc_checkskill(sd, WM_LESSON) * 50; // !TODO: Confirm bonus
|
skillratio += pc_checkskill(sd, WM_LESSON) * 50; // !TODO: Confirm bonus
|
||||||
if (skill_check_pc_partner(sd, skill_id, &skill_lv, AREA_SIZE, 0) > 0)
|
if (skill_check_pc_partner(sd, skill_id, &skill_lv, AREA_SIZE, 0) > 0)
|
||||||
skillratio <<= 1;
|
skillratio *= 2;
|
||||||
}
|
}
|
||||||
RE_LVL_DMOD(100);
|
RE_LVL_DMOD(100);
|
||||||
break;
|
break;
|
||||||
@ -5053,7 +5053,7 @@ static int battle_calc_attack_skill_ratio(struct Damage* wd, struct block_list *
|
|||||||
case SU_PICKYPECK:
|
case SU_PICKYPECK:
|
||||||
case SU_PICKYPECK_DOUBLE_ATK:
|
case SU_PICKYPECK_DOUBLE_ATK:
|
||||||
skillratio += 100 + 100 * skill_lv;
|
skillratio += 100 + 100 * skill_lv;
|
||||||
if (status_get_hp(target) < status_get_max_hp(target) >> 1)
|
if (status_get_hp(target) < (status_get_max_hp(target) / 2))
|
||||||
skillratio *= 2;
|
skillratio *= 2;
|
||||||
if (sd && pc_checkskill(sd, SU_SPIRITOFLIFE))
|
if (sd && pc_checkskill(sd, SU_SPIRITOFLIFE))
|
||||||
skillratio += skillratio * status_get_hp(src) / status_get_max_hp(src);
|
skillratio += skillratio * status_get_hp(src) / status_get_max_hp(src);
|
||||||
@ -6192,7 +6192,7 @@ static struct Damage initialize_weapon_data(struct block_list *src, struct block
|
|||||||
wd.amotion = (skill_id && skill_get_inf(skill_id)&INF_GROUND_SKILL)?0:sstatus->amotion; //Amotion should be 0 for ground skills.
|
wd.amotion = (skill_id && skill_get_inf(skill_id)&INF_GROUND_SKILL)?0:sstatus->amotion; //Amotion should be 0 for ground skills.
|
||||||
// counter attack DOES obey ASPD delay on official, uncomment if you want the old (bad) behavior [helvetica]
|
// counter attack DOES obey ASPD delay on official, uncomment if you want the old (bad) behavior [helvetica]
|
||||||
/*if(skill_id == KN_AUTOCOUNTER)
|
/*if(skill_id == KN_AUTOCOUNTER)
|
||||||
wd.amotion >>= 1; */
|
wd.amotion /= 2; */
|
||||||
wd.dmotion = tstatus->dmotion;
|
wd.dmotion = tstatus->dmotion;
|
||||||
wd.blewcount =skill_get_blewcount(skill_id,skill_lv);
|
wd.blewcount =skill_get_blewcount(skill_id,skill_lv);
|
||||||
wd.miscflag = wflag;
|
wd.miscflag = wflag;
|
||||||
@ -8088,7 +8088,8 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
|
|||||||
md.damage = (int)((int64)7*tstatus->vit*sstatus->int_*sstatus->int_ / (10*(tstatus->vit+sstatus->int_)));
|
md.damage = (int)((int64)7*tstatus->vit*sstatus->int_*sstatus->int_ / (10*(tstatus->vit+sstatus->int_)));
|
||||||
else
|
else
|
||||||
md.damage = 0;
|
md.damage = 0;
|
||||||
if (tsd) md.damage>>=1;
|
if (tsd)
|
||||||
|
md.damage /= 2;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case NJ_ZENYNAGE:
|
case NJ_ZENYNAGE:
|
||||||
|
|||||||
@ -2618,7 +2618,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
|
|||||||
//TODO: Determine if this should go before calculating the MVP player instead of after.
|
//TODO: Determine if this should go before calculating the MVP player instead of after.
|
||||||
if (UINT_MAX - md->dmglog[0].dmg > md->tdmg) {
|
if (UINT_MAX - md->dmglog[0].dmg > md->tdmg) {
|
||||||
md->tdmg += md->dmglog[0].dmg;
|
md->tdmg += md->dmglog[0].dmg;
|
||||||
md->dmglog[0].dmg<<=1;
|
md->dmglog[0].dmg *= 2;
|
||||||
} else {
|
} else {
|
||||||
md->dmglog[0].dmg+= UINT_MAX - md->tdmg;
|
md->dmglog[0].dmg+= UINT_MAX - md->tdmg;
|
||||||
md->tdmg = UINT_MAX;
|
md->tdmg = UINT_MAX;
|
||||||
|
|||||||
@ -10389,7 +10389,7 @@ int pc_itemheal(map_session_data *sd, t_itemid itemid, int hp, int sp)
|
|||||||
int bonus, tmp, penalty = 0;
|
int bonus, tmp, penalty = 0;
|
||||||
|
|
||||||
if (hp) {
|
if (hp) {
|
||||||
bonus = 100 + (sd->battle_status.vit << 1) + pc_checkskill(sd, SM_RECOVERY) * 10 + pc_checkskill(sd, AM_LEARNINGPOTION) * 5;
|
bonus = 100 + (sd->battle_status.vit * 2) + pc_checkskill(sd, SM_RECOVERY) * 10 + pc_checkskill(sd, AM_LEARNINGPOTION) * 5;
|
||||||
// A potion produced by an Alchemist in the Fame Top 10 gets +50% effect [DracoRPG]
|
// A potion produced by an Alchemist in the Fame Top 10 gets +50% effect [DracoRPG]
|
||||||
if (potion_flag == 2) {
|
if (potion_flag == 2) {
|
||||||
bonus += bonus * 50 / 100;
|
bonus += bonus * 50 / 100;
|
||||||
@ -10425,7 +10425,7 @@ int pc_itemheal(map_session_data *sd, t_itemid itemid, int hp, int sp)
|
|||||||
hp = tmp;
|
hp = tmp;
|
||||||
}
|
}
|
||||||
if (sp) {
|
if (sp) {
|
||||||
bonus = 100 + (sd->battle_status.int_ << 1) + pc_checkskill(sd, MG_SRECOVERY) * 10 + pc_checkskill(sd, AM_LEARNINGPOTION) * 5;
|
bonus = 100 + (sd->battle_status.int_ * 2) + pc_checkskill(sd, MG_SRECOVERY) * 10 + pc_checkskill(sd, AM_LEARNINGPOTION) * 5;
|
||||||
// A potion produced by an Alchemist in the Fame Top 10 gets +50% effect [DracoRPG]
|
// A potion produced by an Alchemist in the Fame Top 10 gets +50% effect [DracoRPG]
|
||||||
if (potion_flag == 2)
|
if (potion_flag == 2)
|
||||||
bonus += bonus * 50 / 100;
|
bonus += bonus * 50 / 100;
|
||||||
|
|||||||
@ -1234,7 +1234,7 @@ enum e_mado_type : uint16 {
|
|||||||
#define pc_leftside_def(sd) ((sd)->battle_status.def)
|
#define pc_leftside_def(sd) ((sd)->battle_status.def)
|
||||||
#define pc_rightside_def(sd) ((sd)->battle_status.def2)
|
#define pc_rightside_def(sd) ((sd)->battle_status.def2)
|
||||||
#define pc_leftside_mdef(sd) ((sd)->battle_status.mdef)
|
#define pc_leftside_mdef(sd) ((sd)->battle_status.mdef)
|
||||||
#define pc_rightside_mdef(sd) ( (sd)->battle_status.mdef2 - ((sd)->battle_status.vit>>1) )
|
#define pc_rightside_mdef(sd) ( (sd)->battle_status.mdef2 - ((sd)->battle_status.vit / 2) )
|
||||||
#define pc_leftside_matk(sd) \
|
#define pc_leftside_matk(sd) \
|
||||||
(\
|
(\
|
||||||
((sd)->sc.getSCE(SC_MAGICPOWER) && (sd)->sc.getSCE(SC_MAGICPOWER)->val4) \
|
((sd)->sc.getSCE(SC_MAGICPOWER) && (sd)->sc.getSCE(SC_MAGICPOWER)->val4) \
|
||||||
|
|||||||
@ -1630,7 +1630,7 @@ int pet_food(map_session_data *sd, struct pet_data *pd)
|
|||||||
k = pet_db_ptr->r_hungry;
|
k = pet_db_ptr->r_hungry;
|
||||||
|
|
||||||
if( pd->pet.hungry > PET_HUNGRY_NEUTRAL) {
|
if( pd->pet.hungry > PET_HUNGRY_NEUTRAL) {
|
||||||
k >>= 1;
|
k /= 2;
|
||||||
k = max(k, 1);
|
k = max(k, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1753,7 +1753,7 @@ static int pet_ai_sub_hard(struct pet_data *pd, map_session_data *sd, t_tick tic
|
|||||||
if (DIFF_TICK(tick, pd->ud.canmove_tick) < 0)
|
if (DIFF_TICK(tick, pd->ud.canmove_tick) < 0)
|
||||||
return 0; // Can't move yet.
|
return 0; // Can't move yet.
|
||||||
|
|
||||||
pd->status.speed = (sd->battle_status.speed>>1);
|
pd->status.speed = (sd->battle_status.speed / 2);
|
||||||
|
|
||||||
if(pd->status.speed == 0)
|
if(pd->status.speed == 0)
|
||||||
pd->status.speed = 1;
|
pd->status.speed = 1;
|
||||||
|
|||||||
@ -601,7 +601,7 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, uint16 sk
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( (!heal || (target && target->type == BL_MER)) && skill_id != NPC_EVILLAND )
|
if( (!heal || (target && target->type == BL_MER)) && skill_id != NPC_EVILLAND )
|
||||||
hp >>= 1;
|
hp /= 2;
|
||||||
|
|
||||||
if (sd) {
|
if (sd) {
|
||||||
if (pc_checkskill(sd, SU_POWEROFSEA) > 0) {
|
if (pc_checkskill(sd, SU_POWEROFSEA) > 0) {
|
||||||
@ -2704,7 +2704,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
|
|||||||
|
|
||||||
//Physical range attacks only trigger autospells half of the time
|
//Physical range attacks only trigger autospells half of the time
|
||||||
if ((attack_type&(BF_WEAPON|BF_LONG)) == (BF_WEAPON|BF_LONG))
|
if ((attack_type&(BF_WEAPON|BF_LONG)) == (BF_WEAPON|BF_LONG))
|
||||||
autospl_rate>>=1;
|
autospl_rate /= 2;
|
||||||
|
|
||||||
dstsd->state.autocast = 1;
|
dstsd->state.autocast = 1;
|
||||||
if ( skill_isNotOk(autospl_skill_id, dstsd) ) {
|
if ( skill_isNotOk(autospl_skill_id, dstsd) ) {
|
||||||
@ -9224,13 +9224,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
|
|||||||
} else {
|
} else {
|
||||||
if( potion_hp > 0 ) {
|
if( potion_hp > 0 ) {
|
||||||
hp = potion_hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
|
hp = potion_hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
|
||||||
hp = hp * (100 + (tstatus->vit<<1)) / 100;
|
hp = hp * (100 + (tstatus->vit * 2)) / 100;
|
||||||
if( dstsd )
|
if( dstsd )
|
||||||
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
|
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
|
||||||
}
|
}
|
||||||
if( potion_sp > 0 ) {
|
if( potion_sp > 0 ) {
|
||||||
sp = potion_sp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
|
sp = potion_sp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)*bonus/10000;
|
||||||
sp = sp * (100 + (tstatus->int_<<1)) / 100;
|
sp = sp * (100 + (tstatus->int_ * 2)) / 100;
|
||||||
if( dstsd )
|
if( dstsd )
|
||||||
sp = sp * (100 + pc_checkskill(dstsd,MG_SRECOVERY)*10) / 100;
|
sp = sp * (100 + pc_checkskill(dstsd,MG_SRECOVERY)*10) / 100;
|
||||||
}
|
}
|
||||||
@ -9257,7 +9257,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
|
|||||||
default: hp = 325; break;
|
default: hp = 325; break;
|
||||||
}
|
}
|
||||||
hp = (hp + rnd()%(skill_lv*20+1)) * (150 + skill_lv*10) / 100;
|
hp = (hp + rnd()%(skill_lv*20+1)) * (150 + skill_lv*10) / 100;
|
||||||
hp = hp * (100 + (tstatus->vit<<1)) / 100;
|
hp = hp * (100 + (tstatus->vit * 2)) / 100;
|
||||||
if( dstsd )
|
if( dstsd )
|
||||||
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
|
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
|
||||||
}
|
}
|
||||||
@ -9520,7 +9520,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
|
|||||||
status_zap(bl, hp, sp);
|
status_zap(bl, hp, sp);
|
||||||
|
|
||||||
if (hp && skill_lv >= 5)
|
if (hp && skill_lv >= 5)
|
||||||
hp>>=1; //Recover half damaged HP at level 5 [Skotlex]
|
hp /= 2; //Recover half damaged HP at level 5 [Skotlex]
|
||||||
else
|
else
|
||||||
hp = 0;
|
hp = 0;
|
||||||
|
|
||||||
@ -10058,8 +10058,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui
|
|||||||
break;
|
break;
|
||||||
if (potion_hp || potion_sp) {
|
if (potion_hp || potion_sp) {
|
||||||
int hp = potion_hp, sp = potion_sp;
|
int hp = potion_hp, sp = potion_sp;
|
||||||
hp = hp * (100 + (tstatus->vit<<1))/100;
|
hp = hp * (100 + (tstatus->vit * 2))/100;
|
||||||
sp = sp * (100 + (tstatus->int_<<1))/100;
|
sp = sp * (100 + (tstatus->int_ * 2))/100;
|
||||||
if (dstsd) {
|
if (dstsd) {
|
||||||
if (hp)
|
if (hp)
|
||||||
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10 + pc_skillheal2_bonus(dstsd, skill_id))/100;
|
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10 + pc_skillheal2_bonus(dstsd, skill_id))/100;
|
||||||
@ -21979,6 +21979,7 @@ bool skill_produce_mix(map_session_data *sd, uint16 skill_id, t_itemid nameid, i
|
|||||||
default:
|
default:
|
||||||
if (skill_produce_db[idx].itemlv > 10 && skill_produce_db[idx].itemlv <= 20 ) { //Cooking items.
|
if (skill_produce_db[idx].itemlv > 10 && skill_produce_db[idx].itemlv <= 20 ) { //Cooking items.
|
||||||
clif_specialeffect(&sd->bl, EF_COOKING_FAIL, AREA);
|
clif_specialeffect(&sd->bl, EF_COOKING_FAIL, AREA);
|
||||||
|
// todo: What in the world is this calculation
|
||||||
pc_setparam(sd, SP_COOKMASTERY, sd->cook_mastery - ( 1 << ((skill_produce_db[idx].itemlv - 11) / 2) ) - ( ( ( 1 << ((skill_produce_db[idx].itemlv - 11) / 2) ) >> 1 ) * 3 ));
|
pc_setparam(sd, SP_COOKMASTERY, sd->cook_mastery - ( 1 << ((skill_produce_db[idx].itemlv - 11) / 2) ) - ( ( ( 1 << ((skill_produce_db[idx].itemlv - 11) / 2) ) >> 1 ) * 3 ));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -1513,7 +1513,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 dhp, in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if(sc->getSCE(SC_DANCING) && (unsigned int)hp > status->max_hp>>2)
|
if(sc->getSCE(SC_DANCING) && hp > (status->max_hp / 4))
|
||||||
status_change_end(target, SC_DANCING);
|
status_change_end(target, SC_DANCING);
|
||||||
if(sc->getSCE(SC_CLOAKINGEXCEED) && --(sc->getSCE(SC_CLOAKINGEXCEED)->val2) <= 0)
|
if(sc->getSCE(SC_CLOAKINGEXCEED) && --(sc->getSCE(SC_CLOAKINGEXCEED)->val2) <= 0)
|
||||||
status_change_end(target, SC_CLOAKINGEXCEED);
|
status_change_end(target, SC_CLOAKINGEXCEED);
|
||||||
@ -1533,7 +1533,7 @@ int status_damage(struct block_list *src,struct block_list *target,int64 dhp, in
|
|||||||
if (sc && hp && status->hp) {
|
if (sc && hp && status->hp) {
|
||||||
if (sc->getSCE(SC_AUTOBERSERK) &&
|
if (sc->getSCE(SC_AUTOBERSERK) &&
|
||||||
(!sc->getSCE(SC_PROVOKE) || !sc->getSCE(SC_PROVOKE)->val4) &&
|
(!sc->getSCE(SC_PROVOKE) || !sc->getSCE(SC_PROVOKE)->val4) &&
|
||||||
status->hp < status->max_hp>>2)
|
status->hp < status->max_hp / 4)
|
||||||
sc_start4(src,target,SC_PROVOKE,100,10,0,0,1,0);
|
sc_start4(src,target,SC_PROVOKE,100,10,0,0,1,0);
|
||||||
if (sc->getSCE(SC_BERSERK) && status->hp <= 100)
|
if (sc->getSCE(SC_BERSERK) && status->hp <= 100)
|
||||||
status_change_end(target, SC_BERSERK);
|
status_change_end(target, SC_BERSERK);
|
||||||
@ -1751,7 +1751,7 @@ int status_heal(struct block_list *bl,int64 hhp,int64 hsp, int64 hap, int flag)
|
|||||||
sc->getSCE(SC_AUTOBERSERK) &&
|
sc->getSCE(SC_AUTOBERSERK) &&
|
||||||
sc->getSCE(SC_PROVOKE) &&
|
sc->getSCE(SC_PROVOKE) &&
|
||||||
sc->getSCE(SC_PROVOKE)->val4==1 &&
|
sc->getSCE(SC_PROVOKE)->val4==1 &&
|
||||||
status->hp>=status->max_hp>>2
|
status->hp >= status->max_hp / 4
|
||||||
) // End auto berserk.
|
) // End auto berserk.
|
||||||
status_change_end(bl, SC_PROVOKE);
|
status_change_end(bl, SC_PROVOKE);
|
||||||
|
|
||||||
@ -2598,7 +2598,7 @@ void status_calc_misc(struct block_list *bl, struct status_data *status, int lev
|
|||||||
status->def2 = cap_value(stat, 0, SHRT_MAX);
|
status->def2 = cap_value(stat, 0, SHRT_MAX);
|
||||||
// Mdef2
|
// Mdef2
|
||||||
stat = status->mdef2;
|
stat = status->mdef2;
|
||||||
stat += status->int_ + (status->vit>>1);
|
stat += status->int_ + (status->vit / 2);
|
||||||
status->mdef2 = cap_value(stat, 0, SHRT_MAX);
|
status->mdef2 = cap_value(stat, 0, SHRT_MAX);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2738,18 +2738,18 @@ int status_calc_mob_(struct mob_data* md, uint8 opt)
|
|||||||
|
|
||||||
if (flag&2 && battle_config.mob_size_influence) { // Change for sized monsters [Valaris]
|
if (flag&2 && battle_config.mob_size_influence) { // Change for sized monsters [Valaris]
|
||||||
if (md->special_state.size == SZ_MEDIUM) {
|
if (md->special_state.size == SZ_MEDIUM) {
|
||||||
status->max_hp >>= 1;
|
status->max_hp /= 2;
|
||||||
status->max_sp >>= 1;
|
status->max_sp /= 2;
|
||||||
if (!status->max_hp) status->max_hp = 1;
|
if (!status->max_hp) status->max_hp = 1;
|
||||||
if (!status->max_sp) status->max_sp = 1;
|
if (!status->max_sp) status->max_sp = 1;
|
||||||
status->hp = status->max_hp;
|
status->hp = status->max_hp;
|
||||||
status->sp = status->max_sp;
|
status->sp = status->max_sp;
|
||||||
status->str >>= 1;
|
status->str /= 2;
|
||||||
status->agi >>= 1;
|
status->agi /= 2;
|
||||||
status->vit >>= 1;
|
status->vit /= 2;
|
||||||
status->int_ >>= 1;
|
status->int_ /= 2;
|
||||||
status->dex >>= 1;
|
status->dex /= 2;
|
||||||
status->luk >>= 1;
|
status->luk /= 2;
|
||||||
if (!status->str) status->str = 1;
|
if (!status->str) status->str = 1;
|
||||||
if (!status->agi) status->agi = 1;
|
if (!status->agi) status->agi = 1;
|
||||||
if (!status->vit) status->vit = 1;
|
if (!status->vit) status->vit = 1;
|
||||||
@ -2757,16 +2757,16 @@ int status_calc_mob_(struct mob_data* md, uint8 opt)
|
|||||||
if (!status->dex) status->dex = 1;
|
if (!status->dex) status->dex = 1;
|
||||||
if (!status->luk) status->luk = 1;
|
if (!status->luk) status->luk = 1;
|
||||||
} else if (md->special_state.size == SZ_BIG) {
|
} else if (md->special_state.size == SZ_BIG) {
|
||||||
status->max_hp <<= 1;
|
status->max_hp *= 2;
|
||||||
status->max_sp <<= 1;
|
status->max_sp *= 2;
|
||||||
status->hp = status->max_hp;
|
status->hp = status->max_hp;
|
||||||
status->sp = status->max_sp;
|
status->sp = status->max_sp;
|
||||||
status->str <<= 1;
|
status->str *= 2;
|
||||||
status->agi <<= 1;
|
status->agi *= 2;
|
||||||
status->vit <<= 1;
|
status->vit *= 2;
|
||||||
status->int_ <<= 1;
|
status->int_ *= 2;
|
||||||
status->dex <<= 1;
|
status->dex *= 2;
|
||||||
status->luk <<= 1;
|
status->luk *= 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4208,7 +4208,7 @@ int status_calc_pc_sub(map_session_data* sd, uint8 opt)
|
|||||||
} else {
|
} else {
|
||||||
if((sd->class_&MAPID_BASEMASK) == MAPID_NOVICE && !(sd->class_&JOBL_2)
|
if((sd->class_&MAPID_BASEMASK) == MAPID_NOVICE && !(sd->class_&JOBL_2)
|
||||||
&& battle_config.restart_hp_rate < 50)
|
&& battle_config.restart_hp_rate < 50)
|
||||||
base_status->hp = base_status->max_hp>>1;
|
base_status->hp = base_status->max_hp / 2;
|
||||||
else
|
else
|
||||||
base_status->hp = (int64)base_status->max_hp * battle_config.restart_hp_rate/100;
|
base_status->hp = (int64)base_status->max_hp * battle_config.restart_hp_rate/100;
|
||||||
if(!base_status->hp)
|
if(!base_status->hp)
|
||||||
@ -4336,7 +4336,7 @@ int status_calc_pc_sub(map_session_data* sd, uint8 opt)
|
|||||||
if((skill=pc_checkskill(sd,TF_MISS))>0)
|
if((skill=pc_checkskill(sd,TF_MISS))>0)
|
||||||
base_status->flee += skill*(sd->class_&JOBL_2 && (sd->class_&MAPID_BASEMASK) == MAPID_THIEF? 4 : 3);
|
base_status->flee += skill*(sd->class_&JOBL_2 && (sd->class_&MAPID_BASEMASK) == MAPID_THIEF? 4 : 3);
|
||||||
if((skill=pc_checkskill(sd,MO_DODGE))>0)
|
if((skill=pc_checkskill(sd,MO_DODGE))>0)
|
||||||
base_status->flee += (skill*3)>>1;
|
base_status->flee += (skill*3) / 2;
|
||||||
if (pc_checkskill(sd, SU_POWEROFLIFE) > 0)
|
if (pc_checkskill(sd, SU_POWEROFLIFE) > 0)
|
||||||
base_status->flee += 20;
|
base_status->flee += 20;
|
||||||
if ((skill = pc_checkskill(sd, SHC_SHADOW_SENSE)) > 0)
|
if ((skill = pc_checkskill(sd, SHC_SHADOW_SENSE)) > 0)
|
||||||
@ -5105,7 +5105,7 @@ void status_calc_regen(struct block_list *bl, struct status_data *status, struct
|
|||||||
|
|
||||||
val = 1 + (status->int_/6) + (status->max_sp/100);
|
val = 1 + (status->int_/6) + (status->max_sp/100);
|
||||||
if( status->int_ >= 120 )
|
if( status->int_ >= 120 )
|
||||||
val += ((status->int_-120)>>1) + 4;
|
val += ((status->int_-120) / 2) + 4;
|
||||||
|
|
||||||
if( sd && sd->sprecov_rate != 100 )
|
if( sd && sd->sprecov_rate != 100 )
|
||||||
val = val*sd->sprecov_rate/100;
|
val = val*sd->sprecov_rate/100;
|
||||||
@ -5724,7 +5724,7 @@ void status_calc_bl_main(struct block_list *bl, std::bitset<SCB_MAX> flag)
|
|||||||
#ifdef RENEWAL
|
#ifdef RENEWAL
|
||||||
+ (int)( ((float)status->dex/5 - (float)b_status->dex/5) + ((float)status->vit/5 - (float)b_status->vit/5) )
|
+ (int)( ((float)status->dex/5 - (float)b_status->dex/5) + ((float)status->vit/5 - (float)b_status->vit/5) )
|
||||||
#else
|
#else
|
||||||
+ ((status->vit - b_status->vit)>>1)
|
+ ((status->vit - b_status->vit) / 2)
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -5754,7 +5754,7 @@ void status_calc_bl_main(struct block_list *bl, std::bitset<SCB_MAX> flag)
|
|||||||
/// After status_calc_critical so the bonus is applied despite if you have or not a sc bugreport:5240
|
/// After status_calc_critical so the bonus is applied despite if you have or not a sc bugreport:5240
|
||||||
if (sd) {
|
if (sd) {
|
||||||
if (sd->status.weapon == W_KATAR)
|
if (sd->status.weapon == W_KATAR)
|
||||||
status->cri <<= 1;
|
status->cri *= 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7558,7 +7558,7 @@ static defType status_calc_def(struct block_list *bl, status_change *sc, int def
|
|||||||
if (bl->type == BL_PC)
|
if (bl->type == BL_PC)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return def >>= 1;
|
return def /= 2;
|
||||||
}
|
}
|
||||||
if(sc->getSCE(SC_DEFSET))
|
if(sc->getSCE(SC_DEFSET))
|
||||||
return sc->getSCE(SC_DEFSET)->val1;
|
return sc->getSCE(SC_DEFSET)->val1;
|
||||||
@ -7583,15 +7583,15 @@ static defType status_calc_def(struct block_list *bl, status_change *sc, int def
|
|||||||
if(sc->getSCE(SC_STONEHARDSKIN))
|
if(sc->getSCE(SC_STONEHARDSKIN))
|
||||||
def += sc->getSCE(SC_STONEHARDSKIN)->val1;
|
def += sc->getSCE(SC_STONEHARDSKIN)->val1;
|
||||||
if(sc->getSCE(SC_STONE))
|
if(sc->getSCE(SC_STONE))
|
||||||
def >>=1;
|
def /= 2;
|
||||||
if(sc->getSCE(SC_FREEZE))
|
if(sc->getSCE(SC_FREEZE))
|
||||||
def >>=1;
|
def /= 2;
|
||||||
if(sc->getSCE(SC_SIGNUMCRUCIS))
|
if(sc->getSCE(SC_SIGNUMCRUCIS))
|
||||||
def -= def * sc->getSCE(SC_SIGNUMCRUCIS)->val2/100;
|
def -= def * sc->getSCE(SC_SIGNUMCRUCIS)->val2/100;
|
||||||
if(sc->getSCE(SC_CONCENTRATION))
|
if(sc->getSCE(SC_CONCENTRATION))
|
||||||
def -= def * sc->getSCE(SC_CONCENTRATION)->val4/100;
|
def -= def * sc->getSCE(SC_CONCENTRATION)->val4/100;
|
||||||
if(sc->getSCE(SC_SKE))
|
if(sc->getSCE(SC_SKE))
|
||||||
def >>=1;
|
def /= 2;
|
||||||
if(sc->getSCE(SC_PROVOKE) && bl->type != BL_PC) // Provoke doesn't alter player defense->
|
if(sc->getSCE(SC_PROVOKE) && bl->type != BL_PC) // Provoke doesn't alter player defense->
|
||||||
def -= def * sc->getSCE(SC_PROVOKE)->val3/100;
|
def -= def * sc->getSCE(SC_PROVOKE)->val3/100;
|
||||||
if(sc->getSCE(SC_STRIPSHIELD) && bl->type != BL_PC) // Player doesn't have def reduction only equip removed
|
if(sc->getSCE(SC_STRIPSHIELD) && bl->type != BL_PC) // Player doesn't have def reduction only equip removed
|
||||||
@ -7737,7 +7737,7 @@ static defType status_calc_mdef(struct block_list *bl, status_change *sc, int md
|
|||||||
if (bl->type == BL_PC)
|
if (bl->type == BL_PC)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
return mdef >>= 1;
|
return mdef / 2;
|
||||||
}
|
}
|
||||||
if(sc->getSCE(SC_MDEFSET))
|
if(sc->getSCE(SC_MDEFSET))
|
||||||
return sc->getSCE(SC_MDEFSET)->val1;
|
return sc->getSCE(SC_MDEFSET)->val1;
|
||||||
@ -9408,7 +9408,7 @@ t_tick status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_
|
|||||||
tick_def2 = status->luk*100;
|
tick_def2 = status->luk*100;
|
||||||
} else {
|
} else {
|
||||||
// For monsters: 30000 - 200*vit
|
// For monsters: 30000 - 200*vit
|
||||||
tick>>=1;
|
tick /= 2;
|
||||||
tick_def = (status->vit*200)/3;
|
tick_def = (status->vit*200)/3;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -9512,7 +9512,7 @@ t_tick status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_
|
|||||||
break;
|
break;
|
||||||
case SC_DECREASEAGI:
|
case SC_DECREASEAGI:
|
||||||
if (sd)
|
if (sd)
|
||||||
tick >>= 1; // Half duration for players.
|
tick /= 2; // Half duration for players.
|
||||||
sc_def2 = status->mdef*100;
|
sc_def2 = status->mdef*100;
|
||||||
break;
|
break;
|
||||||
case SC_ANKLE:
|
case SC_ANKLE:
|
||||||
@ -10496,7 +10496,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
|||||||
tick = INFINITE_TICK;
|
tick = INFINITE_TICK;
|
||||||
break;
|
break;
|
||||||
case SC_AUTOBERSERK:
|
case SC_AUTOBERSERK:
|
||||||
if (status->hp < status->max_hp>>2 &&
|
if (status->hp < status->max_hp / 4 &&
|
||||||
(!sc->getSCE(SC_PROVOKE) || sc->getSCE(SC_PROVOKE)->val4==0))
|
(!sc->getSCE(SC_PROVOKE) || sc->getSCE(SC_PROVOKE)->val4==0))
|
||||||
sc_start4(src,bl,SC_PROVOKE,100,10,0,0,1,60000);
|
sc_start4(src,bl,SC_PROVOKE,100,10,0,0,1,60000);
|
||||||
tick = INFINITE_TICK;
|
tick = INFINITE_TICK;
|
||||||
@ -10785,10 +10785,10 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
|||||||
|
|
||||||
case SC_DPOISON:
|
case SC_DPOISON:
|
||||||
// Lose 10/15% of your life as long as it doesn't brings life below 25%
|
// Lose 10/15% of your life as long as it doesn't brings life below 25%
|
||||||
if (status->hp > status->max_hp>>2) {
|
if (status->hp > status->max_hp / 4) {
|
||||||
int diff = status->max_hp*(bl->type==BL_PC?10:15)/100;
|
int diff = status->max_hp*(bl->type==BL_PC?10:15)/100;
|
||||||
if (status->hp - diff < status->max_hp>>2)
|
if (status->hp - diff < status->max_hp / 4)
|
||||||
diff = status->hp - (status->max_hp>>2);
|
diff = status->hp - (status->max_hp / 4);
|
||||||
status_zap(bl, diff, 0);
|
status_zap(bl, diff, 0);
|
||||||
}
|
}
|
||||||
// Fall through
|
// Fall through
|
||||||
@ -10909,7 +10909,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
|||||||
map_session_data *tsd;
|
map_session_data *tsd;
|
||||||
int i;
|
int i;
|
||||||
for( i = val2 = 0; i < val1; i++) {
|
for( i = val2 = 0; i < val1; i++) {
|
||||||
int t = 5-(i>>1);
|
int t = 5-(i / 2);
|
||||||
val2 += (t < 0)? 1:t;
|
val2 += (t < 0)? 1:t;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12255,7 +12255,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
|||||||
case SC_TUNAPARTY:
|
case SC_TUNAPARTY:
|
||||||
val2 = (status->max_hp * (val1 * 10) / 100); // Max HP% to absorb
|
val2 = (status->max_hp * (val1 * 10) / 100); // Max HP% to absorb
|
||||||
if (sd && pc_checkskill(sd, SU_SPIRITOFSEA))
|
if (sd && pc_checkskill(sd, SU_SPIRITOFSEA))
|
||||||
val2 <<= 1; // Double the shield life
|
val2 *= 2; // Double the shield life
|
||||||
break;
|
break;
|
||||||
case SC_HISS:
|
case SC_HISS:
|
||||||
val2 = 50; // Perfect Dodge
|
val2 = 50; // Perfect Dodge
|
||||||
@ -14967,7 +14967,7 @@ static int status_natural_heal(struct block_list* bl, va_list args)
|
|||||||
if(flag&(RGN_SHP)) { // Sitting HP regen
|
if(flag&(RGN_SHP)) { // Sitting HP regen
|
||||||
rate = (int)(natural_heal_diff_tick * (sregen->rate.hp / 100.));
|
rate = (int)(natural_heal_diff_tick * (sregen->rate.hp / 100.));
|
||||||
if (regen->state.overweight)
|
if (regen->state.overweight)
|
||||||
rate >>= 1; // Half as fast when overweight.
|
rate /= 2; // Half as fast when overweight.
|
||||||
sregen->tick.hp += rate;
|
sregen->tick.hp += rate;
|
||||||
while(sregen->tick.hp >= (unsigned int)battle_config.natural_heal_skill_interval) {
|
while(sregen->tick.hp >= (unsigned int)battle_config.natural_heal_skill_interval) {
|
||||||
sregen->tick.hp -= battle_config.natural_heal_skill_interval;
|
sregen->tick.hp -= battle_config.natural_heal_skill_interval;
|
||||||
@ -14980,7 +14980,7 @@ static int status_natural_heal(struct block_list* bl, va_list args)
|
|||||||
if(flag&(RGN_SSP)) { // Sitting SP regen
|
if(flag&(RGN_SSP)) { // Sitting SP regen
|
||||||
rate = (int)(natural_heal_diff_tick * (sregen->rate.sp / 100.));
|
rate = (int)(natural_heal_diff_tick * (sregen->rate.sp / 100.));
|
||||||
if (regen->state.overweight)
|
if (regen->state.overweight)
|
||||||
rate >>= 1; // Half as fast when overweight.
|
rate /= 2; // Half as fast when overweight.
|
||||||
sregen->tick.sp += rate;
|
sregen->tick.sp += rate;
|
||||||
while(sregen->tick.sp >= (unsigned int)battle_config.natural_heal_skill_interval) {
|
while(sregen->tick.sp >= (unsigned int)battle_config.natural_heal_skill_interval) {
|
||||||
sregen->tick.sp -= battle_config.natural_heal_skill_interval;
|
sregen->tick.sp -= battle_config.natural_heal_skill_interval;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user