summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-03 03:05:43 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-01-03 03:05:43 +0000
commitf68bd7c915dc631d452b6ea2ac21cdf75bc26fe4 (patch)
treeff8a979363dccf37f3bfb66be4f24cf2d89027e4 /src/map
parent350416fff4bb9e8bc50b5f8205d04f772e848a92 (diff)
downloadhercules-f68bd7c915dc631d452b6ea2ac21cdf75bc26fe4.tar.gz
hercules-f68bd7c915dc631d452b6ea2ac21cdf75bc26fe4.tar.bz2
hercules-f68bd7c915dc631d452b6ea2ac21cdf75bc26fe4.tar.xz
hercules-f68bd7c915dc631d452b6ea2ac21cdf75bc26fe4.zip
- Fixed pc_calc_skilltree ignoring prerequisites / joblvl requirements.
- Re-applied change r9593 that got accidentally reverted by r9595. - Added the official behavior of monsters regaining full hp when they morph. - Added support for text/comments at the end of monster spawn lines (<tab> required) - Silenced the debug message in socket.c that's been freaking people out. - Modified the useless error message in atcommand_effect. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9608 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c2
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/npc.c2
-rw-r--r--src/map/pc.c45
-rw-r--r--src/map/skill.c2
5 files changed, 29 insertions, 24 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index a621c8dfd..41aa7becd 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -7120,7 +7120,7 @@ int atcommand_effect(
nullpo_retr(-1, sd);
if (!message || !*message || sscanf(message, "%d %d", &type,&flag) < 2) {
- clif_displaymessage(fd, "Please, enter at least a option (usage: @effect <type+>).");
+ clif_displaymessage(fd, "Please, enter a type and a send flag (usage: @effect <type> <flag>).");
return -1;
}
diff --git a/src/map/battle.c b/src/map/battle.c
index b399960ab..92b630619 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -4067,7 +4067,7 @@ void battle_set_defaults() {
battle_config.attack_direction_change = BL_ALL;
battle_config.land_skill_limit = BL_ALL;
battle_config.party_skill_penalty = 1;
- battle_config.monster_class_change_full_recover = 0;
+ battle_config.monster_class_change_full_recover = 1;
battle_config.produce_item_name_input = 1;
battle_config.produce_potion_name_input = 1;
battle_config.making_arrow_name_input = 1;
diff --git a/src/map/npc.c b/src/map/npc.c
index 598cc8ee7..7b7557a10 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2228,7 +2228,7 @@ int npc_parse_mob (char *w1, char *w2, char *w3, char *w4)
// 引数の個数チェック
if (sscanf(w1, "%15[^,],%d,%d,%d,%d", mapname, &x, &y, &xs, &ys) < 3 ||
- sscanf(w4, "%d,%d,%u,%u,%49[^\r\n]", &class_, &num, &mob.delay1, &mob.delay2, mob.eventname) < 2 ) {
+ sscanf(w4, "%d,%d,%u,%u,%49[^\t\r\n]", &class_, &num, &mob.delay1, &mob.delay2, mob.eventname) < 2 ) {
ShowError("bad monster line : %s %s %s (file %s)\n", w1, w3, w4, current_file);
return 1;
}
diff --git a/src/map/pc.c b/src/map/pc.c
index eba537d9f..f0eb54ad6 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -918,6 +918,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
if (sd->status.skill[i].flag != 13) //Don't touch plagiarized skills
sd->status.skill[i].id=0; //First clear skills.
}
+
for(i=0;i<MAX_SKILL;i++){
if (sd->status.skill[i].flag && sd->status.skill[i].flag != 13){ //Restore original level of skills after deleting earned skills.
sd->status.skill[i].lv=(sd->status.skill[i].flag==1)?0:sd->status.skill[i].flag-2;
@@ -946,41 +947,43 @@ int pc_calc_skilltree(struct map_session_data *sd)
}
return 0;
}
+
do {
- flag=0;
- for(i=0;i < MAX_SKILL_TREE && (id=skill_tree[c][i].id)>0;i++){
- int j,f=1;
+ flag = 0;
+ for(i = 0; i < MAX_SKILL_TREE && (id = skill_tree[c][i].id) > 0; i++) {
+ int j, f;
+
if(sd->status.skill[id].id)
continue; //Skill already known.
+
+ f = 1;
if(!battle_config.skillfree) {
- for(j=0;j<5;j++) {
- if( skill_tree[c][i].need[j].id &&
- pc_checkskill(sd,skill_tree[c][i].need[j].id) <
- skill_tree[c][i].need[j].lv) {
- f=0;
+ for(j = 0; j < 5; j++) {
+ if( skill_tree[c][i].need[j].id && pc_checkskill(sd,skill_tree[c][i].need[j].id) < skill_tree[c][i].need[j].lv) {
+ f = 0; // one or more prerequisites wasn't satisfied
break;
}
}
if (sd->status.job_level < skill_tree[c][i].joblv)
- f=0;
+ f = 0; // job level requirement wasn't satisfied
else if (pc_checkskill(sd, NV_BASIC) < 9 && id != NV_BASIC && !(skill_get_inf2(id)&INF2_QUEST_SKILL))
- f=0; // Do not unlock normal skills when Basic Skills is not maxed out (can happen because of skill reset)
+ f = 0; // Do not unlock normal skills when Basic Skill is not maxed out (can happen because of skill reset)
}
- if(skill_get_inf2(id)&INF2_SPIRIT_SKILL)
- { //Spirit skills cannot be learned, they will only show up on your tree when you get buffed.
- if (sd->sc.count && sd->sc.data[SC_SPIRIT].timer != -1)
- { //Enable Spirit Skills. [Skotlex]
- sd->status.skill[id].id=id;
- sd->status.skill[id].lv=1;
- sd->status.skill[id].flag=1; //So it is not saved, and tagged as a "bonus" skill.
- flag=1;
+
+ if (f) {
+ sd->status.skill[id].id = id;
+
+ if(skill_get_inf2(id)&INF2_SPIRIT_SKILL && sd->sc.count && sd->sc.data[SC_SPIRIT].timer != -1)
+ { //Spirit skills cannot be learned, they will only show up on your tree when you get buffed.
+ sd->status.skill[id].lv = 1; // need to manually specify a skill level
+ sd->status.skill[id].flag = 1; //So it is not saved, and tagged as a "bonus" skill.
}
- } else if (f){
- sd->status.skill[id].id=id;
- flag=1;
+
+ flag = 1; // skill list has changed, perform another pass
}
}
} while(flag);
+
if ((sd->class_&MAPID_UPPERMASK) == MAPID_TAEKWON && sd->status.base_level >= 90 && pc_famerank(sd->status.char_id, MAPID_TAEKWON)) {
//Grant all Taekwon Tree, but only as bonus skills in case they drop from ranking. [Skotlex]
for(i=0;i < MAX_SKILL_TREE && (id=skill_tree[c][i].id)>0;i++){
diff --git a/src/map/skill.c b/src/map/skill.c
index 50e85d621..8f7fc0b48 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7836,6 +7836,8 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
sd->skillitem = sd->skillitemlv = 0;
//Need to do arrow state check.
sd->state.arrow_atk = skill_get_ammotype(skill)?1:0;
+ //Need to do Spiritball check.
+ sd->spiritball_old = sd->spiritball;
return 1;
}