- 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://svn.code.sf.net/p/rathena/svn/trunk@9608 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ultramage 2007-01-03 03:05:43 +00:00
parent 88addb1951
commit 215762fe8c
9 changed files with 46 additions and 29 deletions

View File

@ -3,7 +3,17 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/12/02
2007/01/03
* Modified the useless error message in atcommand_effect.
* Silenced the debug message in socket.c that's been freaking people out.
* Added support for text/comments at the end of monster spawn lines (<tab> required)
* Added the official behavior of monsters regaining full hp when they morph.
> info at http://www.eathena.ws/board/index.php?showtopic=130103
* Fixed pc_calc_skilltree ignoring prerequisites / joblvl requirements.
> TODOs at http://www.eathena.ws/board/index.php?showtopic=130788
* Re-applied change r9593 that got accidentally reverted by r9595. [ultramage]
2007/01/02
* Fixed SC_JOINTBEAT not doing crit damage for the Neck Break ailment.
* Gospel sends the buff message to the affected player. [FlavioJS]
2006/12/31

View File

@ -1,5 +1,7 @@
Date Added
2007/01/03
* Changed monster_class_change_full_recover to 'yes' (official) [ultramage]
2006/12/20
* Fixed the meaning of stdout_with_ansisequence and changed the default
value to no. [FlavioJS]

View File

@ -167,8 +167,8 @@ retaliate_to_master: yes
// the skill, otherwise B will be targetted by the reaction skill.
mob_changetarget_byskill: no
// If monster's class is changed will it fully recover HP and SP and Ailments? (Note 1)
monster_class_change_full_recover: no
// If monster's class is changed will it fully recover HP? (Note 1)
monster_class_change_full_recover: yes
// Display some mob info next to their name? (add as needed)
// (does not works on guardian or emperium)

View File

@ -183,7 +183,7 @@ static int recv_to_fifo(int fd)
FD_CLR(fd, &readfds); //Remove the socket so the select() won't hang on it.
}
if (s_errno != S_EWOULDBLOCK) {
ShowDebug("recv_to_fifo: error %d, ending connection #%d\n", s_errno, fd);
//ShowDebug("recv_to_fifo: error %d, ending connection #%d\n", s_errno, fd);
set_eof(fd);
}
return 0;
@ -219,7 +219,7 @@ static int send_from_fifo(int fd)
FD_CLR(fd, &readfds); //Remove the socket so the select() won't hang on it.
}
if (s_errno != S_EWOULDBLOCK) {
ShowDebug("send_from_fifo: error %d, ending connection #%d\n", s_errno, fd);
//ShowDebug("send_from_fifo: error %d, ending connection #%d\n", s_errno, fd);
session[fd]->wdata_size = 0; //Clear the send queue as we can't send anymore. [Skotlex]
set_eof(fd);
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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++){

View File

@ -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;
}