diff options
-rw-r--r-- | Changelog-Trunk.txt | 12 | ||||
-rw-r--r-- | src/map/clif.c | 20 | ||||
-rw-r--r-- | src/map/mob.c | 4 | ||||
-rw-r--r-- | src/map/pc.c | 29 | ||||
-rw-r--r-- | src/map/skill.c | 17 |
5 files changed, 47 insertions, 35 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index ab38043c4..3e482d72c 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,18 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2007/01/15 + * The NPC elemental attacks will display a skill animation again. + * Mob instant cast skills will use their adelay now. + * Spirit of Wizard won't work on Ganbantein + * The pc normalize job function will consider you as novice if you don't + have maxed out basic skill. + * Cleaned up pc_calc_skilltree and related functions so that the id is left + as 0 when you can't raise the skill even if you meet the prerequisites. + This is to prevent raising quest/soul/marriage skills through packets. + * Slaves should lock unto their master's target even if they are not + attacking yet (eg: in chase mode) + * Updated the Summon Slave skill to use the slave distance define as valid + distance to spawn from master. * 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. diff --git a/src/map/clif.c b/src/map/clif.c index 17eb4714c..077bc4139 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -4301,7 +4301,7 @@ int clif_insight(struct block_list *bl,va_list ap) */ int clif_skillinfo(struct map_session_data *sd,int skillid,int type,int range) { - int fd,id, inf2; + int fd,id; nullpo_retr(0, sd); @@ -4323,12 +4323,8 @@ int clif_skillinfo(struct map_session_data *sd,int skillid,int type,int range) WFIFOW(fd,12)= range; strncpy(WFIFOP(fd,14), skill_get_name(id), NAME_LENGTH); - inf2 = skill_get_inf2(id); - if(((!(inf2&INF2_QUEST_SKILL) || battle_config.quest_skill_learn) && - !(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL))) || - (battle_config.gm_allskill > 0 && pc_isGM(sd) >= battle_config.gm_allskill)) - //WFIFOB(fd,38)= (sd->status.skill[skillid].lv < skill_get_max(id) && sd->status.skill[skillid].flag ==0 )? 1:0; - WFIFOB(fd,38)= (sd->status.skill[skillid].lv < skill_tree_get_max(id, sd->status.class_) && sd->status.skill[skillid].flag ==0 )? 1:0; + if(sd->status.skill[skillid].flag ==0) + WFIFOB(fd,38)= (sd->status.skill[skillid].lv < skill_tree_get_max(id, sd->status.class_))? 1:0; else WFIFOB(fd,38) = 0; WFIFOSET(fd,packet_len(0x147)); @@ -4343,7 +4339,7 @@ int clif_skillinfo(struct map_session_data *sd,int skillid,int type,int range) int clif_skillinfoblock(struct map_session_data *sd) { int fd; - int i,c,len=4,id, inf2; + int i,c,len=4,id; nullpo_retr(0, sd); @@ -4361,11 +4357,8 @@ int clif_skillinfoblock(struct map_session_data *sd) WFIFOW(fd,len+8) = skill_get_sp(id,sd->status.skill[i].lv); WFIFOW(fd,len+10)= skill_get_range2(&sd->bl, id,sd->status.skill[i].lv); strncpy(WFIFOP(fd,len+12), skill_get_name(id), NAME_LENGTH); - inf2 = skill_get_inf2(id); - if(((!(inf2&INF2_QUEST_SKILL) || battle_config.quest_skill_learn) && - !(inf2&(INF2_WEDDING_SKILL|INF2_SPIRIT_SKILL))) || - (battle_config.gm_allskill > 0 && pc_isGM(sd) >= battle_config.gm_allskill) ) - WFIFOB(fd,len+36)= (sd->status.skill[i].lv < skill_tree_get_max(id, sd->status.class_) && sd->status.skill[i].flag ==0 )? 1:0; + if(sd->status.skill[i].flag ==0) + WFIFOB(fd,len+36)= (sd->status.skill[i].lv < skill_tree_get_max(id, sd->status.class_))? 1:0; else WFIFOB(fd,len+36) = 0; len+=37; @@ -4395,7 +4388,6 @@ int clif_skillup(struct map_session_data *sd,int skill_num) WFIFOW(fd,4) = sd->status.skill[skill_num].lv; WFIFOW(fd,6) = skill_get_sp(skill_num,sd->status.skill[skill_num].lv); WFIFOW(fd,8) = skill_get_range2(&sd->bl,skill_num,sd->status.skill[skill_num].lv); - //WFIFOB(fd,10) = (sd->status.skill[skill_num].lv < skill_get_max(sd->status.skill[skill_num].id)) ? 1 : 0; WFIFOB(fd,10) = (sd->status.skill[skill_num].lv < skill_tree_get_max(sd->status.skill[skill_num].id, sd->status.class_)) ? 1 : 0; WFIFOSET(fd,packet_len(0x10e)); diff --git a/src/map/mob.c b/src/map/mob.c index 1f3bf4cf7..d7e6f9592 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -957,7 +957,7 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick) if (ud) { struct block_list *tbl=NULL; - if (ud->target && ud->attacktimer != -1) + if (ud->target && ud->state.attack_continue) tbl=map_id2bl(ud->target); else if (ud->skilltarget) { tbl = map_id2bl(ud->skilltarget); @@ -2466,7 +2466,7 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id) if (mobdb_checkid(data.class_) == 0) continue; - if (map_search_freecell(&md2->bl, 0, &x, &y, 4, 4, 0)) { + if (map_search_freecell(&md2->bl, 0, &x, &y, MOB_SLAVEDISTANCE, MOB_SLAVEDISTANCE, 0)) { data.x = x; data.y = y; } else { diff --git a/src/map/pc.c b/src/map/pc.c index 6b2ac287a..a9f0f4d67 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -959,7 +959,7 @@ int pc_calc_skilltree(struct map_session_data *sd) do { flag = 0; for(i = 0; i < MAX_SKILL_TREE && (id = skill_tree[c][i].id) > 0; i++) { - int j, f; + int j, f, inf2; if(sd->status.skill[id].id) continue; //Skill already known. @@ -974,19 +974,25 @@ int pc_calc_skilltree(struct map_session_data *sd) } if (sd->status.job_level < skill_tree[c][i].joblv) 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 Skill is not maxed out (can happen because of skill reset) } if (f) { + inf2 = skill_get_inf2(id); + + if(!sd->status.skill[id].lv && ( + (inf2&INF2_QUEST_SKILL && !battle_config.quest_skill_learn) || + inf2&INF2_WEDDING_SKILL || + (inf2&INF2_SPIRIT_SKILL && !(sd->sc.count && sd->sc.data[SC_SPIRIT].timer != -1)) + )) + continue; //Cannot be learned via normal means. Note this check DOES allows raising already known skills. + sd->status.skill[id].id = id; - if(skill_get_inf2(id)&INF2_SPIRIT_SKILL && sd->sc.count && sd->sc.data[SC_SPIRIT].timer != -1) + if(inf2&INF2_SPIRIT_SKILL) { //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. } - flag = 1; // skill list has changed, perform another pass } } @@ -1046,9 +1052,14 @@ static void pc_check_skilltree(struct map_session_data *sd, int skill) { if (sd->status.job_level < skill_tree[c][i].joblv) continue; - if(skill_get_inf2(id)&INF2_SPIRIT_SKILL) - //Spirit skills cannot be learned - continue; + j = skill_get_inf2(id); + if(!sd->status.skill[id].lv && ( + (j&INF2_QUEST_SKILL && !battle_config.quest_skill_learn) || + j&INF2_WEDDING_SKILL || + (j&INF2_SPIRIT_SKILL && !(sd->sc.count && sd->sc.data[SC_SPIRIT].timer != -1)) + )) + continue; //Cannot be learned via normal means. + sd->status.skill[id].id=id; flag=1; } @@ -4484,7 +4495,7 @@ int pc_skillup(struct map_session_data *sd,int skill_num) if (skill_num < 0 || skill_num >= MAX_SKILL) return 0; - + if(sd->status.skill_point>0 && sd->status.skill[skill_num].id && sd->status.skill[skill_num].flag==0 && //Don't allow raising while you have granted skills. [Skotlex] diff --git a/src/map/skill.c b/src/map/skill.c index 25063712a..ba4c51cc0 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2047,14 +2047,6 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds case KN_AUTOCOUNTER: case NPC_CRITICALSLASH: - case NPC_WATERATTACK: - case NPC_GROUNDATTACK: - case NPC_FIREATTACK: - case NPC_WINDATTACK: - case NPC_POISONATTACK: - case NPC_HOLYATTACK: - case NPC_DARKNESSATTACK: - case NPC_TELEKINESISATTACK: case NPC_SPLASHATTACK: case TF_DOUBLE: case GS_CHAINACTION: @@ -5641,7 +5633,9 @@ int skill_castend_id (int tid, unsigned int tick, int id, int data) if(md) { if(tid != -1) //Set afterskill delay. - md->last_thinktime=tick + md->status.amotion; + md->last_thinktime=tick +md->status.amotion; + else + md->last_thinktime=tick +md->status.adelay; if(battle_config.mob_ai&0x200) { //pass on delay to same skill. int i; for (i = 0; i < md->db->maxskill; i++) @@ -5832,6 +5826,8 @@ int skill_castend_pos (int tid, unsigned int tick, int id, int data) if(md) { if (tid != -1) md->last_thinktime=tick +md->status.amotion; + else + md->last_thinktime=tick +md->status.adelay; if(battle_config.mob_ai&0x200) { //pass on delay to same skill. int i; for (i = 0; i < md->db->maxskill; i++) @@ -8537,7 +8533,8 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t clif_skill_fail(sd,skill,0,0); return 0; } - if(itemid[i] >= 715 && itemid[i] <= 717 && sc && sc->data[SC_SPIRIT].timer != -1 && sc->data[SC_SPIRIT].val2 == SL_WIZARD) + if(itemid[i] >= 715 && itemid[i] <= 717 && skill != HW_GANBANTEIN && + sc && sc->data[SC_SPIRIT].timer != -1 && sc->data[SC_SPIRIT].val2 == SL_WIZARD) index[i] = -1; //Gemstones are checked, but not substracted from inventory. } } |