summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-15 19:16:44 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-15 19:16:44 +0000
commit065f2203b8aa2140e55c0ef62ad0ad2e5ea4d088 (patch)
tree454c6a0e26c34829134806ea2cebb0b8a68c4ed0 /src
parent7c66f59d7fa170410b8a046008b48b6d67fa36d7 (diff)
downloadhercules-065f2203b8aa2140e55c0ef62ad0ad2e5ea4d088.tar.gz
hercules-065f2203b8aa2140e55c0ef62ad0ad2e5ea4d088.tar.bz2
hercules-065f2203b8aa2140e55c0ef62ad0ad2e5ea4d088.tar.xz
hercules-065f2203b8aa2140e55c0ef62ad0ad2e5ea4d088.zip
- Fixed Joint Beat's speed penalty.
- Added a pc_authok check to prevent the case in which somehow another character of the same account manages to log in as well. - The pc normalize job function will now recognize you as a novice if you don't have NV_BASIC maxed. - Accessories will now by default go into the rigth-side rather than the left-side of the equip window. - Added a check in the mob_ai_subhard function to make mobs unlock targets which have their invincible timer set. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9655 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/mob.c3
-rw-r--r--src/map/pc.c20
-rw-r--r--src/map/status.c4
5 files changed, 20 insertions, 13 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 9a9343d31..b6dba1939 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -871,7 +871,7 @@ static struct Damage battle_calc_weapon_attack(
if(
(sd && sd->state.arrow_atk) ||
(!sd && ((skill_num && skill_get_ammotype(skill_num)) || sstatus->rhw.range>3))
- ) {
+ ) {
wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG;
flag.arrow = 1;
}
diff --git a/src/map/clif.c b/src/map/clif.c
index ddf14927d..17eb4714c 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8211,8 +8211,8 @@ void clif_parse_WantToConnection(int fd, TBL_PC* sd)
WFIFOSET(fd,packet_len(0x6a));
clif_setwaitclose(fd);
return;
-
- } else if( (old_sd=map_id2sd(account_id)) != NULL ){
+ }
+ if( (old_sd=map_id2sd(account_id)) != NULL ){
// if same account already connected, we disconnect the 2 sessions
//Check for characters with no connection (includes those that are using autotrade) [durf],[Skotlex]
if (old_sd->state.finalsave || !old_sd->state.auth)
diff --git a/src/map/mob.c b/src/map/mob.c
index 5031fc5fa..1f3bf4cf7 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1101,7 +1101,8 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
(md->ud.walktimer != -1 && !(battle_config.mob_ai&0x1) && !check_distance_bl(&md->bl, tbl, md->min_chase)) ||
(
tbl->type == BL_PC && !(mode&MD_BOSS) &&
- ((TBL_PC*)tbl)->state.gangsterparadise
+ (((TBL_PC*)tbl)->state.gangsterparadise ||
+ ((TBL_PC*)tbl)->invincible_timer != INVALID_TIMER)
)) { //Unlock current target.
if (tbl && tbl->m != md->bl.m && battle_config.mob_ai&0x40)
{ //Chase to a nearby warp [Skotlex]
diff --git a/src/map/pc.c b/src/map/pc.c
index a8f16af13..6b2ac287a 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -125,7 +125,7 @@ static int pc_invincible_timer(int tid,unsigned int tick,int id,int data) {
int pc_setinvincibletimer(struct map_session_data *sd,int val) {
nullpo_retr(0, sd);
- if(sd->invincible_timer != -1)
+ if(sd->invincible_timer != INVALID_TIMER)
delete_timer(sd->invincible_timer,pc_invincible_timer);
sd->invincible_timer = add_timer(gettick()+val,pc_invincible_timer,sd->bl.id,0);
return 0;
@@ -134,9 +134,9 @@ int pc_setinvincibletimer(struct map_session_data *sd,int val) {
int pc_delinvincibletimer(struct map_session_data *sd) {
nullpo_retr(0, sd);
- if(sd->invincible_timer != -1) {
+ if(sd->invincible_timer != INVALID_TIMER) {
delete_timer(sd->invincible_timer,pc_invincible_timer);
- sd->invincible_timer = -1;
+ sd->invincible_timer = INVALID_TIMER;
skill_unit_move(&sd->bl,gettick(),1);
}
return 0;
@@ -581,6 +581,14 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t
clif_authfail_fd(sd->fd, 0);
return 1;
}
+
+ if (map_id2sd(st->account_id) != NULL)
+ { //Somehow a second connection has managed to go through the double-connection
+ //check in clif_parse_WantToConnection! [Skotlex]
+ clif_authfail_fd(sd->fd, 0);
+ return 1;
+ }
+
memcpy(&sd->status, st, sizeof(*st));
//Set the map-server used job id. [Skotlex]
@@ -1037,8 +1045,6 @@ static void pc_check_skilltree(struct map_session_data *sd, int skill) {
continue;
if (sd->status.job_level < skill_tree[c][i].joblv)
continue;
- else if (pc_checkskill(sd, NV_BASIC) < 9 && id != NV_BASIC && !(skill_get_inf2(id)&INF2_QUEST_SKILL))
- continue; // Do not unlock normal skills when Basic Skills is not maxed out (can happen because of skill reset)
if(skill_get_inf2(id)&INF2_SPIRIT_SKILL)
//Spirit skills cannot be learned
@@ -1076,7 +1082,7 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd) {
return c; //Only Normalize non-first classes (and non-super novice)
skill_point = pc_calc_skillpoint(sd);
- if(skill_point < 9)
+ if(pc_checkskill(sd, NV_BASIC) < 9) //Consider Novice Tree when you dont have NV_BASIC maxed.
c = MAPID_NOVICE;
else if (sd->status.skill_point >= (int)sd->status.job_level
&& ((sd->change_level > 0 && skill_point < sd->change_level+8) || skill_point < 58)) {
@@ -6308,7 +6314,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
if(pos == EQP_ACC) { //Accesories should only go in one of the two,
pos = req_pos&EQP_ACC;
if (pos == EQP_ACC) //User specified both slots..
- pos = sd->equip_index[EQI_ACC_L] >= 0 ? EQP_ACC_R : EQP_ACC_L;
+ pos = sd->equip_index[EQI_ACC_R] >= 0 ? EQP_ACC_L : EQP_ACC_R;
}
if(pos == EQP_ARMS && id->equip == EQP_HAND_R)
diff --git a/src/map/status.c b/src/map/status.c
index 5683a6218..b8572c0bf 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -3676,8 +3676,8 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha
speed = speed * 100/sc->data[SC_DEFENDER].val3;
if(sc->data[SC_GOSPEL].timer!=-1 && sc->data[SC_GOSPEL].val4 == BCT_ENEMY)
speed = speed * 100/75;
- if(sc->data[SC_JOINTBEAT].timer!=-1) {
- speed = speed * ( 100
+ if(sc->data[SC_JOINTBEAT].timer!=-1 && sc->data[SC_JOINTBEAT].val2&(BREAK_ANKLE|BREAK_KNEE)) {
+ speed = speed * 100/(100
- ( sc->data[SC_JOINTBEAT].val2&BREAK_ANKLE ? 50 : 0 )
- ( sc->data[SC_JOINTBEAT].val2&BREAK_KNEE ? 30 : 0 ));
}