diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-26 06:46:34 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-26 06:46:34 +0000 |
commit | 48f2ec3f27a57a7fe3c60f5475174c075eec890d (patch) | |
tree | 2e9186172b7e3ff294ab0790bf8a6f0778988111 | |
parent | 3c5e8580b0297a53d2b77eb8cc0a71e32d3206d3 (diff) | |
download | hercules-48f2ec3f27a57a7fe3c60f5475174c075eec890d.tar.gz hercules-48f2ec3f27a57a7fe3c60f5475174c075eec890d.tar.bz2 hercules-48f2ec3f27a57a7fe3c60f5475174c075eec890d.tar.xz hercules-48f2ec3f27a57a7fe3c60f5475174c075eec890d.zip |
* Added some code for Moonlit Petals and Basilica
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@788 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog.txt | 3 | ||||
-rw-r--r-- | src/map/mob.c | 6 | ||||
-rw-r--r-- | src/map/pc.c | 9 | ||||
-rw-r--r-- | src/map/skill.c | 86 | ||||
-rw-r--r-- | src/map/skill.h | 14 |
5 files changed, 87 insertions, 31 deletions
diff --git a/Changelog.txt b/Changelog.txt index 38b0506f9..5d1b3bcf5 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,4 +1,7 @@ Date Added +12/26 + * Added some code for Moonlit Petals and Basilica [celest] + 12/24 * Added suggested fix when client disconnected [celest] - send "disconnected due to time gap" and close session when timed out diff --git a/src/map/mob.c b/src/map/mob.c index e8cef9730..40bf4d1b0 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -500,7 +500,11 @@ static int mob_walk(struct mob_data *md,unsigned int tick,int data) mob_walktoxy_sub(md); return 0; } - + if (skill_check_basilica (&md->bl,x+dx,y+dy) || + skill_check_moonlit (&md->bl,x+dx,y+dy)) { + mob_walktoxy_sub(md); + return 0; + } moveblock = ( x/BLOCK_SIZE != (x+dx)/BLOCK_SIZE || y/BLOCK_SIZE != (y+dy)/BLOCK_SIZE); md->state.state=MS_WALK; diff --git a/src/map/pc.c b/src/map/pc.c index fda290532..376efb313 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4175,7 +4175,10 @@ static int pc_walk(int tid,unsigned int tick,int id,int data) pc_walktoxy_sub(sd); return 0; } - + if (skill_check_moonlit (&sd->bl,x+dx,y+dy)) { + pc_stop_walking(sd,1); + return 0; + } moveblock = ( x/BLOCK_SIZE != (x+dx)/BLOCK_SIZE || y/BLOCK_SIZE != (y+dy)/BLOCK_SIZE); sd->walktimer = 1; @@ -4317,22 +4320,18 @@ int pc_walktoxy(struct map_session_data *sd,int x,int y) if (sd->sc_data && sd->status.guild_id > 0) { struct skill_unit *su; struct skill_unit_group *sg; - //if (sd->sc_data[SC_LEADERSHIP].val4 && (su=(struct skill_unit *)sd->sc_data[SC_LEADERSHIP].val4)) { if (sd->state.leadership_flag && (su=(struct skill_unit *)sd->state.leadership_flag) && (sg=su->group) && sg->src_id == sd->bl.id) { skill_unit_move_unit_group(sg,sd->bl.m,(x - sd->bl.x),(y - sd->bl.y)); } - //if (sd->sc_data[SC_GLORYWOUNDS].val4 && (su=(struct skill_unit *)sd->sc_data[SC_GLORYWOUNDS].val4)) { if (sd->state.glorywounds_flag && (su=(struct skill_unit *)sd->state.glorywounds_flag) && (sg=su->group) && sg->src_id == sd->bl.id) { skill_unit_move_unit_group(sg,sd->bl.m,(x - sd->bl.x),(y - sd->bl.y)); } - //if (sd->sc_data[SC_SOULCOLD].val4 && (su=(struct skill_unit *)sd->sc_data[SC_SOULCOLD].val4)) { if (sd->state.soulcold_flag && (su=(struct skill_unit *)sd->state.soulcold_flag) && (sg=su->group) && sg->src_id == sd->bl.id) { skill_unit_move_unit_group(sg,sd->bl.m,(x - sd->bl.x),(y - sd->bl.y)); } - //if (sd->sc_data[SC_HAWKEYES].val4 && (su=(struct skill_unit *)sd->sc_data[SC_HAWKEYES].val4)) { if (sd->state.hawkeyes_flag && (su=(struct skill_unit *)sd->state.hawkeyes_flag) && (sg=su->group) && sg->src_id == sd->bl.id) { skill_unit_move_unit_group(sg,sd->bl.m,(x - sd->bl.x),(y - sd->bl.y)); diff --git a/src/map/skill.c b/src/map/skill.c index e32561cef..3ede9313d 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -249,7 +249,8 @@ int SkillStatusChangeTable[]={ /* skill.hのenumのSC_***とあわせること */ SC_CHASEWALK, /* 390- */ SC_REJECTSWORD, - -1,-1,-1,-1,-1, + -1,-1,-1,-1, + SC_MOONLIT, SC_MARIONETTE, -1, SC_HEADCRUSH, @@ -964,7 +965,7 @@ int skill_get_unit_id(int id,int flag) case WE_CALLPARTNER: return 0xb2; /* あなたに逢いたい */ case PA_GOSPEL: return 0xb3; /* ゴスペル */ case HP_BASILICA: return 0xb4; /* バジリカ */ - case CG_MOONLIT: return 0xb5; +// case CG_MOONLIT: return 0xb5; case PF_FOGWALL: return 0xb6; /* フォグウォ?ル */ case PF_SPIDERWEB: return 0xb7; /* スパイダ?ウェッブ */ // temporary unit ID's [Celest] @@ -3265,6 +3266,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int case PF_MEMORIZE: /* メモライズ */ case PA_SACRIFICE: case ASC_EDP: // [Celest] + case CG_MOONLIT: /* 月明りの泉に落ちる花びら */ clif_skill_nodamage(src,bl,skillid,skilllv,1); skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 ); break; @@ -3670,7 +3672,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int case DC_DONTFORGETME: /* 私を忘れないで… */ case DC_FORTUNEKISS: /* 幸運のキス */ case DC_SERVICEFORYOU: /* サ?ビスフォ?ユ? */ - case CG_MOONLIT: /* 月明りの泉に落ちる花びら */ +// case CG_MOONLIT: /* 月明りの泉に落ちる花びら */ clif_skill_nodamage(src,bl,skillid,skilllv,1); skill_unitsetting(src,skillid,skilllv,src->x,src->y,0); break; @@ -5553,11 +5555,11 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, limit=skill_get_time(skillid,skilllv); break; - case CG_MOONLIT: +/* case CG_MOONLIT: range=1; target=BCT_ALL; limit=skill_get_time(skillid,skilllv); - break; + break;*/ case PF_FOGWALL: /* フォグウォ?ル */ count=15; @@ -5782,7 +5784,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, case DC_DONTFORGETME: /* 私を忘れないで… */ case DC_FORTUNEKISS: /* 幸運のキス */ case DC_SERVICEFORYOU: /* サ?ビスフォ?ユ? */ - case CG_MOONLIT: +// case CG_MOONLIT: ux+=(i%7-3); uy+=(i/7-3); if(i==40) @@ -6359,7 +6361,7 @@ int skill_unit_onout(struct skill_unit *src,struct block_list *bl,unsigned int t } } break; - case 0xb5: +// case 0xb5: case 0xb8: { struct block_list *target=map_id2bl(sg->val2); @@ -8363,6 +8365,64 @@ int skill_frostjoke_scream(struct block_list *bl,va_list ap) return 0; } +/*========================================== + * Basilica creates a 'safe zone' [celest] + *------------------------------------------ + */ +static int skill_basilica_count(struct block_list *bl,va_list ap) +{ + int *c; + struct skill_unit *unit; + + nullpo_retr(0, bl); + nullpo_retr(0, ap); + nullpo_retr(0, (unit=(struct skill_unit *)bl)); + nullpo_retr(0, unit->group); + + c=va_arg(ap,int *); + + if(unit && unit->group->unit_id == 0xb4 && c) + (*c)++; + return 0; +} + +int skill_check_basilica (struct block_list *bl, int dx, int dy) +{ + int c=0; + nullpo_retr(0, bl); + map_foreachinarea(skill_basilica_count,bl->m, + dx-1,dy-1,dx+1,dy+1,BL_SKILL,&c); + return (c>0); +} +/*========================================== + * Moonlit creates a 'safe zone' [celest] + *------------------------------------------ + */ +static int skill_moonlit_count(struct block_list *bl,va_list ap) +{ + int *c, id; + struct map_session_data *sd; + + nullpo_retr(0, bl); + nullpo_retr(0, ap); + nullpo_retr(0, (sd=(struct map_session_data *)bl)); + + id=va_arg(ap,int); + c=va_arg(ap,int *); + + if (sd->bl.id != id && sd->sc_count && sd->sc_data[SC_MOONLIT].timer != -1 && c) + (*c)++; + return 0; +} + +int skill_check_moonlit (struct block_list *bl, int dx, int dy) +{ + int c=0; + nullpo_retr(0, bl); + map_foreachinarea(skill_moonlit_count,bl->m, + dx-1,dy-1,dx+1,dy+1,BL_PC,bl->id,&c); + return (c>0); +} /*========================================== *アブラカダブラの使用スキル決定(決定スキルがダメなら0を返す) @@ -9827,6 +9887,9 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val case SC_SERVICE4U: /* サ?ビスフォ?ユ? */ calc_flag = 1; break; + case SC_MOONLIT: + val2 = bl->id; + break; case SC_DANCING: /* ダンス/演奏中 */ calc_flag = 1; val3= tick / 1000; @@ -10190,15 +10253,6 @@ int skill_status_change_start(struct block_list *bl, int type, int val1, int val calc_flag = 1; break; -/* case SC_LEADERSHIP: - case SC_GLORYWOUNDS: - case SC_SOULCOLD: - case SC_HAWKEYES: - tick = 1000; - calc_flag = 1; - //val4 = 1; - break;*/ - case SC_REGENERATION: val1 = 2; case SC_BATTLEORDERS: diff --git a/src/map/skill.h b/src/map/skill.h index f98893120..87a56345c 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -134,6 +134,8 @@ void skill_stop_dancing(struct block_list *src, int flag); int skill_castcancel(struct block_list *bl,int type); int skill_gangsterparadise(struct map_session_data *sd ,int type); +int skill_check_basilica (struct block_list *bl, int dx, int dy); +int skill_check_moonlit (struct block_list *bl, int dx, int dy); void skill_brandishspear_first(struct square *tc,int dir,int x,int y); void skill_brandishspear_dir(struct square *tc,int dir,int are); int skill_autospell(struct map_session_data *md,int skillid); @@ -323,7 +325,7 @@ enum { // struct map_session_data の status_changeの番?テ?ブル SC_SPIDERWEB =180, /* スパイダ?ウェッブ */ SC_MEMORIZE =181, /* メモライズ */ SC_DPOISON =182, /* 猛毒 */ -// SC_EDP =183, // moved +// SC_EDP // moved SC_SACRIFICE =184, /* サクリファイス */ SC_WEDDING =187, //結婚用(結婚衣裳になって?くのが?いとか) SC_NOCHAT =188, //赤エモ?態 @@ -339,33 +341,27 @@ enum { // struct map_session_data の status_changeの番?テ?ブル SC_SLOWDOWN =45, // for skill slowdown SC_AUTOBERSERK =46, SC_SIGHTTRASHER =73, -// SC_BASILICA =125, // 125 is the same id as joint break SC_BASILICA =102, // temporarily use this before an actual id is found [celest] SC_EDP =114, /* エフェクトが判明したら移動 */ SC_MARIONETTE2 =122, // Marionette target SC_ENSEMBLE =159, SC_FOGWALL =178, SC_GOSPEL =179, + SC_MOONLIT =183, SC_ATKPOT =185, // [Valaris] SC_MATKPOT =186, // [Valaris] SC_MINDBREAKER =191, SC_SPELLBREAKER =192, SC_LANDPROTECTOR =193, -// SC_DPOISON =193, /* 猛毒 */ SC_BLOCKSKILL =194, // for disallowing the use of a skill for a time period SC_ADAPTATION =195, SC_CHASEWALK =196, -/* SC_LEADERSHIP =196, // temporarily disabled - they're too buggy =/ - SC_GLORYWOUNDS =197, - SC_SOULCOLD =198, - SC_HAWKEYES =199,*/ SC_BATTLEORDERS =200, SC_REGENERATION =201, SC_PRESERVE =202, // [Celest] - SC_BLEEDING = 124, // Temporarily same id as headcrush - SC_MOONLIT =195, + SC_BLEEDING = 124, // Temporarily same id as headcrush // -- testing various SC effects // SC_AURABLADE =81, |