summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.txt15
-rw-r--r--db/skill_tree.txt8
-rw-r--r--src/char_sql/char.c2
-rw-r--r--src/map/map.c13
-rw-r--r--src/map/pc.c44
5 files changed, 45 insertions, 37 deletions
diff --git a/Changelog.txt b/Changelog.txt
index c9ff6f667..cfbfcd4c3 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,20 @@
Date Added
12/21
+ * Fixed skill LK_HEADCRUSH, LK_JOINTBEAT to work on both on
+ and off peco's for lord knights (fixed typo in
+ skill_tree.txt) [MouseJstr]
+ * removed LK_SPIRALPIERCE from lord knights not on peco's[MouseJstr]
+ * Moved the code from map_quit to pc_makesavestatus that
+ "adjusts" the skill tree before persisting to the character
+ server [MouseJstr]
+ * made pc_makesavestatus() properly persist skills that are
+ unavailable but not forgotten (example, spiral pierce). You can now
+ get spiral pierce, get off your peco, log out, log in, and
+ get back on your peco and still have not lost the skill
+ points you invested. This also solves the problems of when
+ the skill tree gets changed, players loosing the points. [MouseJstr]
+ * Made pc_resetskill() properly reset skills that are
+ currently not visible due to skilltree changes [MouseJstr]
* Finished updating most of the map-server to 1082... i'll leave the more
technical ones for the other devs ^^; [celest]
* Added other new battle_athena options from jA 1082 ... descriptions not
diff --git a/db/skill_tree.txt b/db/skill_tree.txt
index b412137e4..e62439c0e 100644
--- a/db/skill_tree.txt
+++ b/db/skill_tree.txt
@@ -720,8 +720,6 @@
4008,357,5,4,1,55,5,63,1,0,0,0,0//LK_CONCENTRATE
4008,358,1,4,10,6,5,8,3,0,0,0,0//LK_TENSIONRELAX
4008,359,1,55,7,56,5,57,5,58,2,63,1//LK_BERSERK
-//4008,360,1,3,10,4,6,62,6,0,0,0,0//LK_FURY
-4008,397,5,55,10,56,10,58,5,63,1,0,0//LK_SPIRALPIERCE
4008,398,5,55,9,63,1,0,0,0,0,0,0//LK_HEADCRUSH
4008,399,10,55,9,64,3,398,3,0,0,0,0//LK_JOINTBEAT#ジョイントビート#
//High Priest
@@ -927,9 +925,9 @@
4014,358,1,4,10,6,5,8,3,0,0,0,0//LK_TENSIONRELAX
4014,359,1,55,7,56,5,57,5,58,2,63,1//LK_BERSERK
//4014,360,1,3,10,4,6,62,6,0,0,0,0//LK_FURY
-4008,397,5,55,10,56,10,58,5,63,1,0,0//LK_SPIRALPIERCE
-4008,398,5,55,9,63,1,0,0,0,0,0,0//LK_HEADCRUSH
-4008,399,10,55,9,64,3,398,3,0,0,0,0//LK_JOINTBEAT#ジョイントビート#
+4014,397,5,55,10,56,10,58,5,63,1,0,0//LK_SPIRALPIERCE
+4014,398,5,55,9,63,1,0,0,0,0,0,0//LK_HEADCRUSH
+4014,399,10,55,9,64,3,398,3,0,0,0,0//LK_JOINTBEAT#ジョイントビート#
//Paladin
4015,1,9,0,0,0,0,0,0,0,0,0,0//NV_BASIC #基本スキル#
4015,142,1,0,0,0,0,0,0,0,0,0,0//NV_FIRSTAID #応急手当#
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 47dba6f85..446801b8e 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -3334,7 +3334,7 @@ int do_init(int argc, char **argv){
#undef mysql_query
int debug_mysql_query(char *file, int line, void *mysql, const char *q) {
-// printf("sql: %s:%d# %s\n", file, line, q);
+ // printf("sql: %s:%d# %s\n", file, line, q);
return mysql_query((MYSQL *) mysql, q);
}
diff --git a/src/map/map.c b/src/map/map.c
index 134250cdb..a6317234f 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1023,21 +1023,16 @@ int map_quit(struct map_session_data *sd) {
if(pc_isdead(sd))
pc_setrestartvalue(sd,2);
+
pc_makesavestatus(sd);
- //クロ?ンスキルで?えたスキルは消す
- for(i=0;i<MAX_SKILL;i++){
- if(sd->status.skill[i].flag == 13){
- sd->status.skill[i].id=0;
- sd->status.skill[i].lv=0;
- sd->status.skill[i].flag=0;
- }
- }
chrif_save(sd);
storage_storage_save(sd);
//double connect bug fix by Valaris
- if(sd->alive_timer)
+ if(sd->alive_timer) {
delete_timer(sd->alive_timer,pc_alive_timer);
+ sd->alive_timer = NULL;
+ }
if( sd->npc_stackbuf && sd->npc_stackbuf != NULL)
free( sd->npc_stackbuf );
diff --git a/src/map/pc.c b/src/map/pc.c
index 306360ed5..c10eef425 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -381,6 +381,7 @@ static int pc_walktoxy_sub(struct map_session_data *);
*/
int pc_makesavestatus(struct map_session_data *sd)
{
+ int i;
nullpo_retr(0, sd);
// 秒フ色は色?弊害が多いので保存?象にはしない
@@ -409,6 +410,18 @@ int pc_makesavestatus(struct map_session_data *sd)
//マナ?ポイントがプラスだった場合0に
if(battle_config.muting_players && sd->status.manner > 0)
sd->status.manner = 0;
+
+ // Make sure all the skills are in the correct condition
+ // before persisting to the backend.. [MouseJstr]
+ for(i=0;i<MAX_SKILL;i++){
+ if(sd->status.skill[i].flag == 13){
+ sd->status.skill[i].id=0;
+ sd->status.skill[i].lv=0;
+ sd->status.skill[i].flag=0;
+ } else if ((sd->status.skill[i].lv != 0) && (sd->status.skill[i].id == 0))
+ sd->status.skill[i].id = i;
+ }
+
return 0;
}
@@ -984,7 +997,8 @@ int pc_calc_skilltree(struct map_session_data *sd)
c = pc_calc_skilltree_normalize_job(c, sd);
for(i=0;i<MAX_SKILL;i++){
- if (sd->status.skill[i].flag != 13) sd->status.skill[i].id=0;
+ if (sd->status.skill[i].flag != 13)
+ sd->status.skill[i].id=0;
if (sd->status.skill[i].flag && sd->status.skill[i].flag != 13){ // cardスキルなら、
sd->status.skill[i].lv=(sd->status.skill[i].flag==1)?0:sd->status.skill[i].flag-2; // 本?のlvに
sd->status.skill[i].flag=0; // flagは0にしておく
@@ -1018,6 +1032,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
pc_checkskill(sd,skill_tree[s][c][i].need[j].id) <
skill_tree[s][c][i].need[j].lv)
f=0;
+ break;
}
}
if(f && sd->status.skill[id].id==0 ){
@@ -1025,24 +1040,6 @@ int pc_calc_skilltree(struct map_session_data *sd)
flag=1;
}
}
- for(i=0;(id=skill_tree[s][s_class.job][i].id)>0;i++){
- int j,f=1;
- if(!skill_get_inf2(id))
- continue;
- if(!battle_config.skillfree) {
- for(j=0;j<5;j++) {
- if( skill_tree[s][s_class.job][i].need[j].id &&
- pc_checkskill(sd,skill_tree[s][s_class.job][i].need[j].id) <
- skill_tree[s][s_class.job][i].need[j].lv)
- f=0;
- }
- }
- if(f && sd->status.skill[id].id==0 ){
- sd->status.skill[id].id=id;
- flag=1;
- }
- }
-
} while(flag);
}
// if(battle_config.etc_log)
@@ -1087,6 +1084,7 @@ int pc_calc_skilltree_normalize_job(int c, struct map_session_data *sd) {
case 17:
c = 6;
break;
+#if 0
case 4008:
case 4014:
case 4015:
@@ -1141,6 +1139,7 @@ int pc_calc_skilltree_normalize_job(int c, struct map_session_data *sd) {
case 4043:
c = 4029;
break;
+#endif
}
}
}
@@ -5475,7 +5474,8 @@ int pc_resetskill(struct map_session_data* sd)
nullpo_retr(0, sd);
for(i=1;i<MAX_SKILL;i++){
- if( (skill = pc_checkskill(sd,i)) > 0) {
+ skill = ( i >= 10000 ) ? pc_checkskill(sd,i) : sd->status.skill[i].lv;
+ if( skill > 0) {
if(!(skill_get_inf2(i)&0x01) || battle_config.quest_skill_learn) {
if(!sd->status.skill[i].flag)
sd->status.skill_point += skill;
@@ -5487,9 +5487,9 @@ int pc_resetskill(struct map_session_data* sd)
else if(battle_config.quest_skill_reset)
sd->status.skill[i].lv = 0;
sd->status.skill[i].flag = 0;
- }
- else
+ } else {
sd->status.skill[i].lv = 0;
+ }
}
clif_updatestatus(sd,SP_SKILLPOINT);
clif_skillinfoblock(sd);