diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 3 | ||||
-rw-r--r-- | src/map/battle.h | 1 | ||||
-rw-r--r-- | src/map/clif.c | 8 | ||||
-rw-r--r-- | src/map/pc.c | 4 | ||||
-rw-r--r-- | src/map/skill.c | 11 |
5 files changed, 12 insertions, 15 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index b2c74afaf..de0bfe07f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3871,12 +3871,13 @@ static const struct _battle_data { { "auction_feeperhour", &battle_config.auction_feeperhour, 12000, 0, INT_MAX, }, { "auction_maximumprice", &battle_config.auction_maximumprice, 500000000, 0, MAX_ZENY, }, { "gm_viewequip_min_lv", &battle_config.gm_viewequip_min_lv, 0, 0, 99, }, - { "homunculus_auto_vapor", &battle_config.homunculus_auto_vapor, 0, 0, 1, }, + { "homunculus_auto_vapor", &battle_config.homunculus_auto_vapor, 1, 0, 1, }, { "display_status_timers", &battle_config.display_status_timers, 1, 0, 1, }, { "skill_add_heal_rate", &battle_config.skill_add_heal_rate, 7, 0, INT_MAX, }, { "eq_single_target_reflectable", &battle_config.eq_single_target_reflectable, 1, 0, 1, }, { "invincible.nodamage", &battle_config.invincible_nodamage, 0, 0, 1, }, { "mob_slave_keep_target", &battle_config.mob_slave_keep_target, 0, 0, 1, }, + { "autospell_check_range", &battle_config.autospell_check_range, 0, 0, 1, }, // BattleGround Settings { "bg_update_interval", &battle_config.bg_update_interval, 1000, 100, INT_MAX, }, { "bg_short_attack_damage_rate", &battle_config.bg_short_damage_rate, 80, 0, INT_MAX, }, diff --git a/src/map/battle.h b/src/map/battle.h index 17e80c408..361867a9f 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -469,6 +469,7 @@ extern struct Battle_Config int eq_single_target_reflectable; int invincible_nodamage; int mob_slave_keep_target; + int autospell_check_range; //Enable range check for autospell bonus. [L0ne_W0lf] // [BattleGround Settings] int bg_update_interval; diff --git a/src/map/clif.c b/src/map/clif.c index bd7af7eb3..0e1082d4c 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -8310,15 +8310,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) clif_set0199(sd,1); if (map[sd->bl.m].flag.gvg_dungeon) - { clif_set0199(sd,1); //TODO: Figure out the real packet to send here. - if (!sd->pvp_point) - { - sd->pvp_point = 5; //Need to die twice to be warped out. - sd->pvp_won = 0; - sd->pvp_lost = 0; - } - } if( map_flag_gvg(sd->bl.m) ) clif_set0199(sd,3); diff --git a/src/map/pc.c b/src/map/pc.c index 91017cf22..04027c42d 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5721,8 +5721,8 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) } // pvp // disable certain pvp functions on pk_mode [Valaris] - if( map[sd->bl.m].flag.gvg_dungeon || (map[sd->bl.m].flag.pvp && !battle_config.pk_mode && !map[sd->bl.m].flag.pvp_nocalcrank) ) - { // Pvp points always take effect on gvg_dungeon maps. + if( map[sd->bl.m].flag.pvp && !battle_config.pk_mode && !map[sd->bl.m].flag.pvp_nocalcrank ) + { sd->pvp_point -= 5; sd->pvp_lost++; if( src && src->type == BL_PC ) diff --git a/src/map/skill.c b/src/map/skill.c index 2f2a7e6b0..3e63a9211 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1010,8 +1010,11 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int tbl = (sd->autospell[i].id < 0) ? src : bl; - if( !battle_check_range(src, tbl, skill_get_range2(src, skill,skilllv) + (skill == RG_CLOSECONFINE?0:1)) ) - continue; //Autocasts should always fail if the target is outside the skill range or an obstacle is in between.[Inkfish] + if( !battle_check_range(src, tbl, skill_get_range2(src, skill,skilllv) + (skill == RG_CLOSECONFINE?0:1)) && battle_config.autospell_check_range ) + continue; // If autospell_check_range is yes, fail the autocast. + + if (skill == AS_SONICBLOW) + pc_stop_attack(sd); //Special case, Sonic Blow autospell should stop the player attacking. sd->state.autocast = 1; skill_consume_requirement(sd,skill,skilllv,1); @@ -1109,7 +1112,7 @@ int skill_onskillusage(struct map_session_data *sd, struct block_list *bl, int s continue; tbl = (sd->autospell3[i].id < 0) ? &sd->bl : bl; - if( !battle_check_range(&sd->bl, tbl, skill_get_range2(&sd->bl, skill,skilllv) + (skill == RG_CLOSECONFINE?0:1)) ) + if( !battle_check_range(&sd->bl, tbl, skill_get_range2(&sd->bl, skill,skilllv) + (skill == RG_CLOSECONFINE?0:1)) && battle_config.autospell_check_range ) continue; sd->state.autocast = 1; @@ -1281,7 +1284,7 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * tbl = (dstsd->autospell2[i].id < 0) ? bl : src; - if( !battle_check_range(src, tbl, skill_get_range2(src, skillid,skilllv) + (skillid == RG_CLOSECONFINE?0:1)) ) + if( !battle_check_range(src, tbl, skill_get_range2(src, skillid,skilllv) + (skillid == RG_CLOSECONFINE?0:1)) && battle_config.autospell_check_range ) continue; dstsd->state.autocast = 1; |