summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-07 17:46:50 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-07 17:46:50 +0000
commit15d86669fb2fcedefa83d76cfe8b4bf3f110d481 (patch)
tree220c52dc83b47308bef9a1efbc7789e39e31824c /src
parentcaa2c43f341ab070ff82d99410ffab773ba19e72 (diff)
downloadhercules-15d86669fb2fcedefa83d76cfe8b4bf3f110d481.tar.gz
hercules-15d86669fb2fcedefa83d76cfe8b4bf3f110d481.tar.bz2
hercules-15d86669fb2fcedefa83d76cfe8b4bf3f110d481.tar.xz
hercules-15d86669fb2fcedefa83d76cfe8b4bf3f110d481.zip
- Updated the range of BioExplosion and Self Destruction so they count as ranged skills.
- Removed old script bonuses bMatk, bMatk1, bMatk2 - Fixed char-server not sending online notification when a party member logs in. - When skill range by distance is set, the distance checked for is now 5 cells rather than 3. - Fixed bMatkRate bonuses not applying to status earned modifications to int/matk. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9816 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/char/int_party.c2
-rw-r--r--src/char_sql/int_party.c2
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/map.h8
-rw-r--r--src/map/pc.c27
-rw-r--r--src/map/status.c11
6 files changed, 20 insertions, 36 deletions
diff --git a/src/char/int_party.c b/src/char/int_party.c
index b043b8649..96a120aab 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -413,6 +413,8 @@ int inter_party_logged(int party_id, int account_id, int char_id)
if(p->party.member[i].lv < p->min_lv ||
p->party.member[i].lv > p->max_lv)
int_party_check_lv(p);
+ //Send online update to map servers
+ mapif_party_membermoved(&p->party, i);
break;
}
return 0;
diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c
index 054df47a7..8553862fe 100644
--- a/src/char_sql/int_party.c
+++ b/src/char_sql/int_party.c
@@ -483,6 +483,8 @@ int inter_party_logged(int party_id, int account_id, int char_id)
if(p->party.member[i].lv < p->min_lv ||
p->party.member[i].lv > p->max_lv)
int_party_check_lv(p);
+ //Send online update to map servers
+ mapif_party_membermoved(&p->party, i);
}
break;
}
diff --git a/src/map/battle.c b/src/map/battle.c
index 4aec803f7..9f8270f42 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -959,7 +959,7 @@ static struct Damage battle_calc_weapon_attack(
if (battle_config.skillrange_by_distance &&
(src->type&battle_config.skillrange_by_distance)
) { //based on distance between src/target [Skotlex]
- if (check_distance_bl(src, target, 3))
+ if (check_distance_bl(src, target, 5))
wd.flag=(wd.flag&~BF_RANGEMASK)|BF_SHORT;
else
wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG;
@@ -2204,7 +2204,7 @@ struct Damage battle_calc_magic_attack(
if (battle_config.skillrange_by_distance &&
(src->type&battle_config.skillrange_by_distance)
) { //based on distance between src/target [Skotlex]
- if (check_distance_bl(src, target, 3))
+ if (check_distance_bl(src, target, 5))
ad.flag=(ad.flag&~BF_RANGEMASK)|BF_SHORT;
else
ad.flag=(ad.flag&~BF_RANGEMASK)|BF_LONG;
@@ -2581,7 +2581,7 @@ struct Damage battle_calc_misc_attack(
if (battle_config.skillrange_by_distance &&
(src->type&battle_config.skillrange_by_distance)
) { //based on distance between src/target [Skotlex]
- if (check_distance_bl(src, target, 3))
+ if (check_distance_bl(src, target, 5))
md.flag=(md.flag&~BF_RANGEMASK)|BF_SHORT;
else
md.flag=(md.flag&~BF_RANGEMASK)|BF_LONG;
diff --git a/src/map/map.h b/src/map/map.h
index cc6228bd2..fb0756c65 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -1180,7 +1180,7 @@ enum _sp {
SP_ADDEFF, SP_RESEFF, // 1012-1013
SP_BASE_ATK,SP_ASPD_RATE,SP_HP_RECOV_RATE,SP_SP_RECOV_RATE,SP_SPEED_RATE, // 1014-1018
SP_CRITICAL_DEF,SP_NEAR_ATK_DEF,SP_LONG_ATK_DEF, // 1019-1021
- SP_DOUBLE_RATE, SP_DOUBLE_ADD_RATE, SP_MATK, SP_MATK_RATE, // 1022-1025
+ SP_DOUBLE_RATE, SP_DOUBLE_ADD_RATE, SP_FREE2, SP_MATK_RATE, // 1022-1025
SP_IGNORE_DEF_ELE,SP_IGNORE_DEF_RACE, // 1026-1027
SP_ATK_RATE,SP_SPEED_ADDRATE,SP_ASPD_ADDRATE, // 1028-1030
SP_MAGIC_ATK_DEF,SP_MISC_ATK_DEF, // 1031-1032
@@ -1211,9 +1211,9 @@ enum _sp {
SP_UNSTRIPABLE_WEAPON,SP_UNSTRIPABLE_ARMOR,SP_UNSTRIPABLE_HELM,SP_UNSTRIPABLE_SHIELD, // 2034-2037
SP_INTRAVISION, SP_ADD_MONSTER_DROP_ITEMGROUP, SP_SP_LOSS_RATE, // 2038-2040
SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE //2041
- //Before adding another, note that
- //1077 (SP_FREE, previously disguise),
- //are available!
+ //Before adding another, note that these are free:
+ //1024 (SP_FREE2, previous matk)
+ //1077 (SP_FREE, previously disguise)
};
enum _look {
diff --git a/src/map/pc.c b/src/map/pc.c
index a0741f10d..307fb791c 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1338,26 +1338,6 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
status->batk = cap_value(bonus, 0, USHRT_MAX);
}
break;
- case SP_MATK1:
- if(sd->state.lr_flag != 2) {
- bonus = status->matk_max + val;
- status->matk_max = cap_value(bonus, 0, USHRT_MAX);
- }
- break;
- case SP_MATK2:
- if(sd->state.lr_flag != 2) {
- bonus = status->matk_min + val;
- status->matk_min = cap_value(bonus, 0, USHRT_MAX);
- }
- break;
- case SP_MATK:
- if(sd->state.lr_flag != 2) {
- bonus = status->matk_max + val;
- status->matk_max = cap_value(bonus, 0, USHRT_MAX);
- bonus = status->matk_min + val;
- status->matk_min = cap_value(bonus, 0, USHRT_MAX);
- }
- break;
case SP_DEF1:
if(sd->state.lr_flag != 2) {
bonus = status->def + val;
@@ -4639,10 +4619,9 @@ int pc_resetlvl(struct map_session_data* sd,int type)
pc_unequipitem(sd,sd->equip_index[i],2);
}
- if ((type == 1 || type == 2 || type == 3) && sd->status.party_id) {
- //Send map-change packet to do a level range check and break party settings. [Skotlex]
- party_send_movemap(sd);
- }
+ if ((type == 1 || type == 2 || type == 3) && sd->status.party_id)
+ party_send_levelup(sd);
+
status_calc_pc(sd,0);
clif_skillinfoblock(sd);
diff --git a/src/map/status.c b/src/map/status.c
index 5f53f6655..bfae98dea 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1211,13 +1211,12 @@ void status_calc_misc(struct block_list *bl, struct status_data *status, int lev
//Non players get the value set, players need to stack with previous bonuses.
if (bl->type != BL_PC)
status->batk =
- status->matk_min = status->matk_max =
status->hit = status->flee =
status->def2 = status->mdef2 =
status->cri = status->flee2 = 0;
- status->matk_min += status_base_matk_min(status);
- status->matk_max += status_base_matk_max(status);
+ status->matk_min = status_base_matk_min(status);
+ status->matk_max = status_base_matk_max(status);
status->hit += level + status->dex;
status->flee += level + status->agi;
@@ -2665,8 +2664,10 @@ void status_calc_bl_sub_pc(struct map_session_data *sd, unsigned long flag)
status->matk_max = status_base_matk_max(status);
//Bonuses from previous matk
- status->matk_max += b_status->matk_max - status_base_matk_max(b_status);
- status->matk_min += b_status->matk_min - status_base_matk_min(b_status);
+ if(sd->matk_rate != 100){
+ status->matk_max = status->matk_max * sd->matk_rate/100;
+ status->matk_min = status->matk_min * sd->matk_rate/100;
+ }
status->matk_min = status_calc_matk(&sd->bl, &sd->sc, status->matk_min);
status->matk_max = status_calc_matk(&sd->bl, &sd->sc, status->matk_max);