From ba64401d27d855d33280015e3bea523aeda0af37 Mon Sep 17 00:00:00 2001 From: skotlex Date: Sun, 22 Apr 2007 03:11:04 +0000 Subject: - Corrected crash if itemskill is used without an attached player. - Removed range checks for autospells as per UltraMage Aegis tests. - Added chatID skill fail check to skill_check_condition - Corrected @refresh not re-displaying your spirit spheres nor re-setting your cloth dye. - Now the "number of attackers" in mob_dead is counted only from online characters on the same map. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10307 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 7 +++++++ src/map/clif.c | 4 ++++ src/map/mob.c | 12 ++++++++---- src/map/script.c | 3 +-- src/map/skill.c | 8 +------- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 5db38c5e4..c0a1a3c48 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,13 @@ 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/04/22 + * Corrected crash if itemskill is used without an attached player. + * Removed range checks for autospells as per UltraMage Aegis tests. + * Added chatID skill fail check to skill_check_condition + * Corrected @refresh not re-displaying your spirit spheres nor re-setting + your cloth dye. + * Now the "number of attackers" in mob_dead is counted only from online + characters on the same map. * Updated the autospell bonus scripts so you don't have to specify all the attack type criteria. If neither of BF_LONG/BF_SHORT is specified, the spell will trigger on both. If neither of BF_WEAPON/BF_MAGIC/BF_MISC is diff --git a/src/map/clif.c b/src/map/clif.c index 4e4a701c5..8b1dbc0a2 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7634,6 +7634,10 @@ int clif_refresh(struct map_session_data *sd) { clif_updatestatus(sd,SP_INT); clif_updatestatus(sd,SP_DEX); clif_updatestatus(sd,SP_LUK); + if (sd->spiritball) + clif_spiritball_single(sd->fd, sd); + if (sd->vd.cloth_color) + clif_refreshlook(&sd->bl,sd->bl.id,LOOK_CLOTHES_COLOR,sd->vd.cloth_color,SELF); map_foreachinrange(clif_getareachar,&sd->bl,AREA_SIZE,BL_ALL,sd); clif_weather_check(sd); return 0; diff --git a/src/map/mob.c b/src/map/mob.c index e211faf2e..63bd76d91 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1790,12 +1790,18 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) } } - for(i=0,mvp_damage=0;idmglog[i].id;i++) + for(i=count=0,mvp_damage=0;idmglog[i].id;i++) { tmpsd[i] = map_charid2sd(md->dmglog[i].id); if(tmpsd[i] == NULL) continue; - if(tmpsd[i]->bl.m != m || pc_isdead(tmpsd[i])) + if(tmpsd[i]->bl.m != m) + { + tmpsd[i] = NULL; + continue; + } + count++; //Only logged into same map chars are counted for the total. + if (pc_isdead(tmpsd[i])) { tmpsd[i] = NULL; continue; @@ -1805,7 +1811,6 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) tmpsd[i] = NULL; continue; } - if(mvp_damage<(unsigned int)md->dmglog[i].dmg){ third_sd = second_sd; second_sd = mvp_sd; @@ -1813,7 +1818,6 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) mvp_damage=md->dmglog[i].dmg; } } - count = i; //Total number of attackers. if(!battle_config.exp_calc_type && count > 1) { //Apply first-attacker 200% exp share bonus diff --git a/src/map/script.c b/src/map/script.c index 47203beb5..0de86906c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -7110,8 +7110,7 @@ BUILDIN_FUNC(itemskill) id=script_getnum(st,2); lv=script_getnum(st,3); - // 詠唱中にスキルアイテムは使用できない - if(sd->ud.skilltimer != -1) + if(!sd || sd->ud.skilltimer != -1) return 0; sd->skillitem=id; diff --git a/src/map/skill.c b/src/map/skill.c index 1279aa822..aa62dd4ee 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1440,9 +1440,6 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int else tbl = bl; - if (tbl != src && !battle_check_range(src, tbl, skill_get_range2(src, skill, skilllv))) - continue; //Autoskills DO check for target-src range. [Skotlex] - rate = skill_get_inf(skill); switch (skill_get_casttype(skill)) { case CAST_GROUND: skill_castend_pos2(src, tbl->x, tbl->y, skill, skilllv, tick, 0); @@ -1615,9 +1612,6 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list * else tbl = src; - if (tbl != bl && !battle_check_range(bl, tbl, skill_get_range2(bl, skillid, skilllv))) - continue; //Autoskills DO check for target-src range. [Skotlex] - switch (skill_get_casttype(skillid)) { case CAST_GROUND: skill_castend_pos2(bl, tbl->x, tbl->y, skillid, skilllv, tick, 0); @@ -7964,7 +7958,7 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t nullpo_retr(0, sd); - if (lv <= 0) return 0; + if (lv <= 0 || sd->chatID) return 0; if( battle_config.gm_skilluncond && pc_isGM(sd)>= battle_config.gm_skilluncond && -- cgit v1.2.3-70-g09d2