diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-21 14:48:28 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-21 14:48:28 +0000 |
commit | b6e172482b1a91869c8ffd630d8b0e97c98ad8d0 (patch) | |
tree | 1dc20e710d329b9aabada92e0ebc7fb78deeea18 | |
parent | 81ff879313b29ee97375d214b00f78b1f75d3d4a (diff) | |
download | hercules-b6e172482b1a91869c8ffd630d8b0e97c98ad8d0.tar.gz hercules-b6e172482b1a91869c8ffd630d8b0e97c98ad8d0.tar.bz2 hercules-b6e172482b1a91869c8ffd630d8b0e97c98ad8d0.tar.xz hercules-b6e172482b1a91869c8ffd630d8b0e97c98ad8d0.zip |
- Updated Basilica, Sharp Shooting, Berserk, Meditatio
- Fixed a typo with Blade Stop that was causing crashes, sorry. ^^;
- Reverted changes to Cloaking, ours is already more updated (than Freya!) ^_^
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@293 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog.txt | 6 | ||||
-rw-r--r-- | Dev/bugs.txt | 4 | ||||
-rw-r--r-- | src/map/battle.c | 19 | ||||
-rw-r--r-- | src/map/mob.c | 14 | ||||
-rw-r--r-- | src/map/pc.c | 20 | ||||
-rw-r--r-- | src/map/skill.c | 212 |
6 files changed, 161 insertions, 114 deletions
diff --git a/Changelog.txt b/Changelog.txt index a16f388a7..fb712e8e3 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,5 +1,9 @@ Date Added 11/21 + * Skill updates: [Celest] + - Updated Basilica, Sharp Shooting, Berserk, Meditatio (Thanks to DracoRPG!) + - Fixed a typo with Blade Stop that was causing crashes, sorry. ^^; + - Reverted changes to Cloaking, ours is already more updated! ^_^ * @alive, @raisemap, @raise now display the resurrection skill animation [MC Cameri] * @charpetrename(AtCommand) is now #petrename(CharCommand) [MC Cameri] * @charjob/(AtCommand) is now #jobchange(CharCommand) [MC Cameri] @@ -9,6 +13,7 @@ Date Added - Less congestion in atcommand.c - Port commands that start with @char to #, example: ~ @charoption will now be #option + 11/20 * Added str_lower() function to atcommand.c (from OA). [MC Cameri] * Simplified @charchangesex to @charchangesex [player], your sex is changed to the opposite one [MC Cameri] @@ -25,7 +30,6 @@ Date Added * Added @whozeny. Shows list of top 50 online players and their zeny sorted from highest to lowest. [Valaris] * Added @happyhappyjoyjoy. Makes all players on server do a random emote. [Valaris] * Removed -funroll-loops from compile, thanks to kashy for pointing out the problems caused by this. (Do not re-add!) [Valaris] - * Skill updates [celest] * Added check for max vending_max_value when reading config [kobra_k88] * Skill updates [celest] - Napalm vulcan, Enchant Deadly Poison, Slow Poison (based on jAthena 1066) diff --git a/Dev/bugs.txt b/Dev/bugs.txt index 471c2ef31..5f371c92f 100644 --- a/Dev/bugs.txt +++ b/Dev/bugs.txt @@ -71,8 +71,8 @@ Assigned: N/A Progess: 0% Problem: Monk's Skill ROOT instantly reboots server -Assigned: N/A -Progess: 0% +Assigned: Celest +Progess: 100%? (Notes: Typo... my bad, sorry ^^; ) Problem: Sage's Area Skills (Delu.,Vulcano, etc) if casted on the same area (or overlap each other) instantly reboots server. use @gvgon when test. Don't test it towns Assigned: N/A diff --git a/src/map/battle.c b/src/map/battle.c index f334f3455..a83df2ba8 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2398,7 +2398,7 @@ static struct Damage battle_calc_mob_weapon_attack( if(sc_data[SC_TRUESIGHT].timer!=-1) // トゥルーサイト damage += damage*(2*sc_data[SC_TRUESIGHT].val1)/100; if(sc_data[SC_BERSERK].timer!=-1) // バーサーク - damage += damage*50/100; + damage += damage*2; } if(skill_num>0){ @@ -2970,7 +2970,7 @@ static struct Damage battle_calc_pc_weapon_attack( cri <<= 1; } - if(skill_num == SN_SHARPSHOOTING) + if(skill_num == SN_SHARPSHOOTING && rand()%100 < 50) cri += 200; } @@ -3091,8 +3091,8 @@ static struct Damage battle_calc_pc_weapon_attack( damage2 += damage2*(2*sc_data[SC_TRUESIGHT].val1)/100; } if(sc_data[SC_BERSERK].timer!=-1){ // バーサーク - damage += damage*50/100; - damage2 += damage2*50/100; + damage += damage*2; + damage2 += damage2*2; } } @@ -4657,7 +4657,7 @@ int battle_weapon_attack( struct block_list *src,struct block_list *target, } } if(t_sc_data && t_sc_data[SC_BLADESTOP_WAIT].timer != -1){ - if (!(src->type = BL_MOB && mob_db[((struct mob_data *)src)->class].mode&0x32)) { + if (!(src->type == BL_MOB && mob_db[((struct mob_data *)src)->class].mode&0x20)) { int lv = t_sc_data[SC_BLADESTOP_WAIT].val1; skill_status_change_end(target,SC_BLADESTOP_WAIT,-1); skill_status_change_start(src,SC_BLADESTOP,lv,1,(int)src,(int)target,skill_get_time2(MO_BLADESTOP,lv),0); @@ -4702,6 +4702,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f { int s_p,s_g,t_p,t_g; struct block_list *ss=src; + struct status_change *sc_data; + struct status_change *tsc_data; nullpo_retr(0, src); nullpo_retr(0, target); @@ -4726,6 +4728,13 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f if(target->type == BL_PC && ((struct map_session_data *)target)->invincible_timer != -1) return -1; + // Celest + sc_data = battle_get_sc_data(src); + tsc_data = battle_get_sc_data(target); + if ((sc_data && sc_data[SC_BASILICA].timer != -1) || + (tsc_data && tsc_data[SC_BASILICA].timer != -1)) + return -1; + if(target->type == BL_SKILL) { switch(((struct skill_unit *)target)->group->unit_id){ case 0x8d: diff --git a/src/map/mob.c b/src/map/mob.c index 1f953b75d..b3a2d83c0 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -601,7 +601,7 @@ static int mob_attack(struct mob_data *md,unsigned int tick,int data) md->state.targettype = NONE_ATTACKABLE; return 0; } - if(tsd && !(mode&0x20) && (tsd->sc_data[SC_TRICKDEAD].timer != -1 || + if(tsd && !(mode&0x20) && (tsd->sc_data[SC_TRICKDEAD].timer != -1 || tsd->sc_data[SC_BASILICA].timer != -1 || ((pc_ishiding(tsd) || tsd->state.gangsterparadise) && !((race == 4 || race == 6) && !tsd->perfect_hiding) ) ) ) { md->target_id=0; md->state.targettype = NONE_ATTACKABLE; @@ -1174,8 +1174,8 @@ int mob_target(struct mob_data *md,struct block_list *bl,int dist) return 0; if(mode&0x20 || // Coercion is exerted if it is MVPMOB. - (sc_data && sc_data[SC_TRICKDEAD].timer == -1 && - ( (option && !(*option&0x06) ) || race==4 || race==6) ) ){ + (sc_data && sc_data[SC_TRICKDEAD].timer == -1 && sc_data[SC_BASILICA].timer == -1 && + ( (option && !(*option&0x06) ) || race==4 || race==6) ) ) { if(bl->type == BL_PC) { nullpo_retr(0, sd = (struct map_session_data *)bl); if(sd->invincible_timer != -1 || pc_isinvisible(sd)) @@ -1240,7 +1240,7 @@ static int mob_ai_sub_hard_activesearch(struct block_list *bl,va_list ap) ) { if(mode&0x20 || - (tsd->sc_data[SC_TRICKDEAD].timer == -1 && + (tsd->sc_data[SC_TRICKDEAD].timer == -1 && tsd->sc_data[SC_BASILICA].timer == -1 && ((!pc_ishiding(tsd) && !tsd->state.gangsterparadise) || ((race == 4 || race == 6) && !tsd->perfect_hiding) ))){ // 妨害がないか判定 if( mob_can_reach(smd,bl,12) && // 到達可能性判定 rand()%1000<1000/(++(*pcc)) ){ // 範囲内PCで等確率にする @@ -1428,7 +1428,7 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick) race=mob_db[md->class].race; if(mode&0x20 || - (sd->sc_data[SC_TRICKDEAD].timer == -1 && + (sd->sc_data[SC_TRICKDEAD].timer == -1 && sd->sc_data[SC_BASILICA].timer == -1 && ( (!pc_ishiding(sd) && !sd->state.gangsterparadise) || ((race == 4 || race == 6) && !sd->perfect_hiding) ) ) ){ // 妨害がないか判定 md->target_id=sd->bl.id; @@ -1642,7 +1642,9 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap) if(tsd || tmd) { if(tbl->m != md->bl.m || tbl->prev == NULL || (dist=distance(md->bl.x,md->bl.y,tbl->x,tbl->y))>=md->min_chase) mob_unlocktarget(md,tick); // 別マップか、視界外 - else if( tsd && !(mode&0x20) && (tsd->sc_data[SC_TRICKDEAD].timer != -1 || ((pc_ishiding(tsd) || tsd->state.gangsterparadise) && !((race == 4 || race == 6) && !tsd->perfect_hiding) )) ) + else if( tsd && !(mode&0x20) && (tsd->sc_data[SC_TRICKDEAD].timer != -1 || tsd->sc_data[SC_BASILICA].timer != -1 || + ((pc_ishiding(tsd) || tsd->state.gangsterparadise) && + !((race == 4 || race == 6) && !tsd->perfect_hiding) )) ) mob_unlocktarget(md,tick); // スキルなどによる策敵妨害 else if(!battle_check_range(&md->bl,tbl,mob_db[md->class].range)){ // 攻撃範囲外なので移動 diff --git a/src/map/pc.c b/src/map/pc.c index 356f2b173..799fc2f59 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1452,9 +1452,9 @@ int pc_calcstatus(struct map_session_data* sd,int first) sd->speed = sd->speed *125/100; if(sd->sc_data[SC_CLOAKING].timer!=-1) { sd->critical_rate += 100; // critical increases - //sd->speed = sd->speed * (sd->sc_data[SC_CLOAKING].val3-sd->sc_data[SC_CLOAKING].val1*3) /100; - //clocking speed descreases normally - sd->speed = (sd->speed*(76+(sd->sc_data[SC_CLOAKING].val1*3)))/100; // Fixed by MiKa & Asa [Lupus] + sd->speed = sd->speed * (sd->sc_data[SC_CLOAKING].val3-sd->sc_data[SC_CLOAKING].val1*3) /100; + // Ours is accurate enough - refer skill_check_cloaking. ^^ + //sd->speed = (sd->speed*(76+(sd->sc_data[SC_CLOAKING].val1*3)))/100; // Fixed by MiKa & Asa [Lupus] } //sd->speed = (sd->speed*(76+(sd->sc_data[SC_INCREASEAGI].val1*3)))/100; if(sd->sc_data[SC_CHASEWALK].timer!=-1) @@ -1696,10 +1696,10 @@ int pc_calcstatus(struct map_session_data* sd,int first) sd->nhealsp = sd->nhealsp*sd->sprecov_rate/100; if(sd->nhealsp < 1) sd->nhealsp = 1; } - if((skill=pc_checkskill(sd,HP_MEDITATIO)) > 0) { // メディテイティオはSPRではなく自然回復にかかる + /* if((skill=pc_checkskill(sd,HP_MEDITATIO)) > 0) { // f?fffBfefCfefBfI,I'SPR,A*,I',E`,。ゥZ((c)。ョR「カn~.ゥォ,E',(c),(c),e' sd->nhealsp += 3*skill*(sd->status.max_sp)/100; if(sd->nhealsp > 0x7fff) sd->nhealsp = 0x7fff; - } + } Increase natural SP regen instead of colossal SP Recovery effect [DracoRPG]*/ // 種族耐性(これでいいの? ディバインプロテクションと同じ?理がいるかも) if( (skill=pc_checkskill(sd,SA_DRAGONOLOGY))>0 ){ // ドラゴノロジ? @@ -1937,7 +1937,7 @@ int pc_calcstatus(struct map_session_data* sd,int first) sd->mdef = sd->mdef2 = 0; sd->flee -= sd->flee*50/100; aspd_rate -= 30; - sd->base_atk *= 3; + //sd->base_atk *= 3; } if(sd->sc_data[SC_KEEPING].timer!=-1) sd->def = 100; @@ -6733,15 +6733,17 @@ struct map_session_data *pc_get_partner(struct map_session_data *sd) static int natural_heal_tick,natural_heal_prev_tick,natural_heal_diff_tick; static int pc_spheal(struct map_session_data *sd) { - int a; + int a, skill; struct guild_castle *gc = NULL; nullpo_retr(0, sd); a = natural_heal_diff_tick; if(pc_issit(sd)) a += a; - if( sd->sc_data[SC_MAGNIFICAT].timer!=-1 ) // マグニフィカ?ト - a += a; + if (sd->sc_data[SC_MAGNIFICAT].timer!=-1) // マグニフィカ?ト + a += a; + if((skill = pc_checkskill(sd,HP_MEDITATIO)) > 0) //Increase natural SP regen with Meditatio [DracoRPG] + a += a*skill*3/100; gc=guild_mapname2gc(sd->mapname); // Increased guild castle regen [Valaris] if(gc) { diff --git a/src/map/skill.c b/src/map/skill.c index 58b74f149..01b026423 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2760,7 +2760,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int if (sd){ s_class = pc_calc_base_job(sd->status.class); if((skill=pc_checkskill(sd,HP_MEDITATIO))>0) // メディテイティオ - heal += heal*(skill*2/100); + heal += heal*skill*2/100; if(sd && dstsd && sd->status.partner_id == dstsd->status.char_id && s_class.job == 23 && sd->status.sex == 0) //自分も?象もPC、?象が自分のパ?トナ?、自分がスパノビ、自分が♀なら heal = heal*2; //スパノビの嫁が旦那にヒ?ルすると2倍になる } @@ -3479,7 +3479,29 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int break; case HP_BASILICA: /* バジリカ */ - skill_status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0); + { + // cancel Basilica if already in effect + struct status_change *sc_data = battle_get_sc_data(src); + if(sc_data && sc_data[SC_BASILICA].timer != -1){ + struct skill_unit *su; + if ((su = (struct skill_unit *)sc_data[SC_BASILICA].val4)) { + struct skill_unit_group *sg; + if ((sg = su->group) && sg->src_id == sd->bl.id) { + skill_status_change_end(src,SC_BASILICA,-1); + skill_delunitgroup (sg); + break; + } + } + } else { + // otherwise allow casting + skill_status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0); + skill_clear_unitgroup(src); + clif_skill_nodamage(src,bl,skillid,skilllv,1); + skill_unitsetting(src,skillid,skilllv,src->x,src->y,0); + } + } + break; + case PA_GOSPEL: /* ゴスペル */ skill_clear_unitgroup(src); clif_skill_nodamage(src,bl,skillid,skilllv,1); @@ -3673,22 +3695,22 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int struct status_change *tsc_data = battle_get_sc_data(bl); if(tsc_data && tsc_data[SC_CP_WEAPON].timer != -1 ) - break; - strip_per = 5+2*skilllv+strip_fix/5; - strip_time = skill_get_time(skillid,skilllv)+strip_fix/2; - if(rand()%100 < strip_per){ - clif_skill_nodamage(src,bl,skillid,skilllv,1); - skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,strip_time,0 ); - if(dstsd){ - for(i=0;i<MAX_INVENTORY;i++){ - if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0002){ - pc_unequipitem(dstsd,i,0,BF_SKILL); - break; + break; + strip_per = 5+2*skilllv+strip_fix/5; + strip_time = skill_get_time(skillid,skilllv)+strip_fix/2; + if(rand()%100 < strip_per){ + clif_skill_nodamage(src,bl,skillid,skilllv,1); + skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,strip_time,0 ); + if(dstsd){ + for(i=0;i<MAX_INVENTORY;i++){ + if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0002){ + pc_unequipitem(dstsd,i,0,BF_SKILL); + break; + } } } } } - } break; case RG_STRIPSHIELD: /* ストリップシ?ルド */ @@ -3696,22 +3718,22 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int struct status_change *tsc_data = battle_get_sc_data(bl); if(tsc_data && tsc_data[SC_CP_SHIELD].timer != -1 ) - break; - strip_per = 5+2*skilllv+strip_fix/5; - strip_time = skill_get_time(skillid,skilllv)+strip_fix/2; - if(rand()%100 < strip_per){ - clif_skill_nodamage(src,bl,skillid,skilllv,1); - skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,strip_time,0 ); - if(dstsd){ - for(i=0;i<MAX_INVENTORY;i++){ - if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0020){ - pc_unequipitem(dstsd,i,0,BF_SKILL); - break; + break; + strip_per = 5+2*skilllv+strip_fix/5; + strip_time = skill_get_time(skillid,skilllv)+strip_fix/2; + if(rand()%100 < strip_per){ + clif_skill_nodamage(src,bl,skillid,skilllv,1); + skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,strip_time,0 ); + if(dstsd){ + for(i=0;i<MAX_INVENTORY;i++){ + if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0020){ + pc_unequipitem(dstsd,i,0,BF_SKILL); + break; + } } } } } - } break; case RG_STRIPARMOR: /* ストリップア?マ? */ @@ -3719,44 +3741,44 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int struct status_change *tsc_data = battle_get_sc_data(bl); if(tsc_data && tsc_data[SC_CP_ARMOR].timer != -1 ) - break; - strip_per = 5+2*skilllv+strip_fix/5; - strip_time = skill_get_time(skillid,skilllv)+strip_fix/2; - if(rand()%100 < strip_per){ - clif_skill_nodamage(src,bl,skillid,skilllv,1); - skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,strip_time,0 ); - if(dstsd){ - for(i=0;i<MAX_INVENTORY;i++){ - if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0010){ - pc_unequipitem(dstsd,i,0,BF_SKILL); - break; + break; + strip_per = 5+2*skilllv+strip_fix/5; + strip_time = skill_get_time(skillid,skilllv)+strip_fix/2; + if(rand()%100 < strip_per){ + clif_skill_nodamage(src,bl,skillid,skilllv,1); + skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,strip_time,0 ); + if(dstsd){ + for(i=0;i<MAX_INVENTORY;i++){ + if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0010){ + pc_unequipitem(dstsd,i,0,BF_SKILL); + break; + } } } } } - } break; case RG_STRIPHELM: /* ストリップヘルム */ { struct status_change *tsc_data = battle_get_sc_data(bl); if(tsc_data && tsc_data[SC_CP_HELM].timer != -1 ) - break; - strip_per = 5+2*skilllv+strip_fix/5; - strip_time = skill_get_time(skillid,skilllv)+strip_fix/2; - if(rand()%100 < strip_per){ - clif_skill_nodamage(src,bl,skillid,skilllv,1); - skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,strip_time,0 ); - if(dstsd){ - for(i=0;i<MAX_INVENTORY;i++){ - if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0100){ - pc_unequipitem(dstsd,i,0,BF_SKILL); - break; + break; + strip_per = 5+2*skilllv+strip_fix/5; + strip_time = skill_get_time(skillid,skilllv)+strip_fix/2; + if(rand()%100 < strip_per){ + clif_skill_nodamage(src,bl,skillid,skilllv,1); + skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,strip_time,0 ); + if(dstsd){ + for(i=0;i<MAX_INVENTORY;i++){ + if(dstsd->status.inventory[i].equip && dstsd->status.inventory[i].equip & 0x0100){ + pc_unequipitem(dstsd,i,0,BF_SKILL); + break; + } } } } } - } break; /* PotionPitcher */ case AM_POTIONPITCHER: /* ポ?ションピッチャ? */ @@ -6770,14 +6792,18 @@ int skill_use_id( struct map_session_data *sd, int target_id, if (skill_num == sd->sc_data[SC_BLOCKSKILL].val3) return 0; - if (sc_data[SC_BASILICA].timer != -1) { // Basilica cancels if caster moves [celest] + if (sc_data[SC_BASILICA].timer != -1) { // Disallow all other skills in Basilica [celest] struct skill_unit *su; if ((su = (struct skill_unit *)sc_data[SC_BASILICA].val4)) { struct skill_unit_group *sg; + // if caster is the owner of basilica if ((sg = su->group) && sg->src_id == sd->bl.id) { - skill_status_change_end(&sd->bl,SC_BASILICA,-1); - skill_delunitgroup (sg); - } + // skill_status_change_end(&sd->bl,SC_BASILICA,-1); + // skill_delunitgroup (sg); + if (skill_num != HP_BASILICA) return 0; + } // otherwise... + else + return 0; } } } @@ -7073,10 +7099,14 @@ int skill_use_pos( struct map_session_data *sd, struct skill_unit *su; if ((su = (struct skill_unit *)sc_data[SC_BASILICA].val4)) { struct skill_unit_group *sg; + // if caster is the owner of basilica if ((sg = su->group) && sg->src_id == sd->bl.id) { - skill_status_change_end(&sd->bl,SC_BASILICA,-1); - skill_delunitgroup (sg); - } + // skill_status_change_end(&sd->bl,SC_BASILICA,-1); + // skill_delunitgroup (sg); + if (skill_num != HP_BASILICA) return 0; + } // otherwise... + else + return 0; } } } @@ -9504,44 +9534,44 @@ void skill_stop_dancing(struct block_list *src, int flag) nullpo_retv(src); sc_data=battle_get_sc_data(src); - if(sc_data && sc_data[SC_DANCING].timer==-1) - return; - group=(struct skill_unit_group *)sc_data[SC_DANCING].val2; //ダンスのスキルユニットIDはval2に入ってる - if(group && src->type==BL_PC && sc_data && sc_data[SC_DANCING].val4){ //合奏中? - struct map_session_data* dsd=map_id2sd(sc_data[SC_DANCING].val4); //相方のsd取得 - if(flag){ //ログアウトなど片方が落ちても演奏が??される - if(dsd && src->id == group->src_id){ //グル?プを持ってるPCが落ちる - group->src_id=sc_data[SC_DANCING].val4; //相方にグル?プを任せる - if(flag&1) //ログアウト - dsd->sc_data[SC_DANCING].val4=0; //相方の相方を0にして合奏終了→通常のダンス?態 - if(flag&2) //ハエ飛びなど - return; //合奏もダンス?態も終了させない&スキルユニットは置いてけぼり - }else if(dsd && dsd->bl.id == group->src_id){ //相方がグル?プを持っているPCが落ちる(自分はグル?プを持っていない) - if(flag&1) //ログアウト - dsd->sc_data[SC_DANCING].val4=0; //相方の相方を0にして合奏終了→通常のダンス?態 - if(flag&2) //ハエ飛びなど - return; //合奏もダンス?態も終了させない&スキルユニットは置いてけぼり - } - skill_status_change_end(src,SC_DANCING,-1);//自分のステ?タスを終了させる - //そしてグル?プは消さない&消さないのでステ?タス計算もいらない? - return; - }else{ - if(dsd && src->id == group->src_id){ //グル?プを持ってるPCが止める - skill_status_change_end((struct block_list *)dsd,SC_DANCING,-1);//相手のステ?タスを終了させる - } - if(dsd && dsd->bl.id == group->src_id){ //相方がグル?プを持っているPCが止める(自分はグル?プを持っていない) + if(sc_data && sc_data[SC_DANCING].timer != -1) { + group=(struct skill_unit_group *)sc_data[SC_DANCING].val2; //ダンスのスキルユニットIDはval2に入ってる + if(group && src->type==BL_PC && sc_data && sc_data[SC_DANCING].val4){ //合奏中? + struct map_session_data* dsd=map_id2sd(sc_data[SC_DANCING].val4); //相方のsd取得 + if(flag){ //ログアウトなど片方が落ちても演奏が??される + if(dsd && src->id == group->src_id){ //グル?プを持ってるPCが落ちる + group->src_id=sc_data[SC_DANCING].val4; //相方にグル?プを任せる + if(flag&1) //ログアウト + dsd->sc_data[SC_DANCING].val4=0; //相方の相方を0にして合奏終了→通常のダンス?態 + if(flag&2) //ハエ飛びなど + return; //合奏もダンス?態も終了させない&スキルユニットは置いてけぼり + }else if(dsd && dsd->bl.id == group->src_id){ //相方がグル?プを持っているPCが落ちる(自分はグル?プを持っていない) + if(flag&1) //ログアウト + dsd->sc_data[SC_DANCING].val4=0; //相方の相方を0にして合奏終了→通常のダンス?態 + if(flag&2) //ハエ飛びなど + return; //合奏もダンス?態も終了させない&スキルユニットは置いてけぼり + } skill_status_change_end(src,SC_DANCING,-1);//自分のステ?タスを終了させる + //そしてグル?プは消さない&消さないのでステ?タス計算もいらない? + return; + }else{ + if(dsd && src->id == group->src_id){ //グル?プを持ってるPCが止める + skill_status_change_end((struct block_list *)dsd,SC_DANCING,-1);//相手のステ?タスを終了させる + } + if(dsd && dsd->bl.id == group->src_id){ //相方がグル?プを持っているPCが止める(自分はグル?プを持っていない) + skill_status_change_end(src,SC_DANCING,-1);//自分のステ?タスを終了させる + } } } + if(flag&2 && group && src->type==BL_PC){ //ハエで飛んだときとかはユニットも飛ぶ + struct map_session_data *sd = (struct map_session_data *)src; + skill_unit_move_unit_group(group, sd->bl.m,(sd->to_x - sd->bl.x),(sd->to_y - sd->bl.y)); + return; + } + skill_delunitgroup(group); + if(src->type==BL_PC) + pc_calcstatus((struct map_session_data *)src,0); } - if(flag&2 && group && src->type==BL_PC){ //ハエで飛んだときとかはユニットも飛ぶ - struct map_session_data *sd = (struct map_session_data *)src; - skill_unit_move_unit_group(group, sd->bl.m,(sd->to_x - sd->bl.x),(sd->to_y - sd->bl.y)); - return; - } - skill_delunitgroup(group); - if(src->type==BL_PC) - pc_calcstatus((struct map_session_data *)src,0); } /*========================================== |