diff options
author | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-24 17:45:04 +0000 |
---|---|---|
committer | celest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-24 17:45:04 +0000 |
commit | fbfffeaf7052b5a6e32b69fcec1045b55356f3fc (patch) | |
tree | 770385c2654054aa63328439b350b1df0b128b1b /src/map | |
parent | d98ba0ca473c8d893895b46f7f22e2cf5a58ea64 (diff) | |
download | hercules-fbfffeaf7052b5a6e32b69fcec1045b55356f3fc.tar.gz hercules-fbfffeaf7052b5a6e32b69fcec1045b55356f3fc.tar.bz2 hercules-fbfffeaf7052b5a6e32b69fcec1045b55356f3fc.tar.xz hercules-fbfffeaf7052b5a6e32b69fcec1045b55356f3fc.zip |
Updated new guild skills (60%)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@347 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/guild.c | 7 | ||||
-rw-r--r-- | src/map/pc.c | 8 | ||||
-rw-r--r-- | src/map/skill.c | 94 |
3 files changed, 74 insertions, 35 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index fff6305d4..411289aa7 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -865,8 +865,13 @@ int guild_notice_changed(int guild_id,const char *mes1,const char *mes2) int guild_change_emblem(struct map_session_data *sd,int len,const char *data) { nullpo_retr(0, sd); + struct guild *g = NULL; - return intif_guild_emblem(sd->status.guild_id,len,data); + if ((g = guild_search(sd->status.guild_id)) && guild_checkskill(g, GD_GLORYGUILD)>0) + return intif_guild_emblem(sd->status.guild_id,len,data); + + clif_skill_fail(sd,GD_GLORYGUILD,0,0); + return 0; } // ギルドエンブレム変更通知 int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data) diff --git a/src/map/pc.c b/src/map/pc.c index d8893407f..b037efbeb 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2106,13 +2106,7 @@ int pc_calcspeed (struct map_session_data *sd) b_speed = sd->speed; sd->speed = DEFAULT_WALK_SPEED ; - sd->speed_rate = 100; - sd->speed_add_rate = 100; - if(sd->speed_add_rate != 100) - sd->speed_rate += sd->speed_add_rate - 100; - if(sd->aspd_add_rate != 100) - sd->aspd_rate += sd->aspd_add_rate - 100; - + if(sd->sc_count){ if(sd->sc_data[SC_INCREASEAGI].timer!=-1 && sd->sc_data[SC_QUAGMIRE].timer == -1 && sd->sc_data[SC_DONTFORGETME].timer == -1){ // 速度?加 sd->speed -= sd->speed *25/100; diff --git a/src/map/skill.c b/src/map/skill.c index 9840d76dc..cd83e2b39 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -4396,55 +4396,93 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int case GD_BATTLEORDER: { struct guild *g = NULL; - if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) && - strcmp(sd->status.name,g->master)==0) { - for(i = 0; i < g->max_member; i++) { - if ((dstsd = g->member[i].sd) != NULL && sd->bl.m == dstsd->bl.m) { - clif_skill_nodamage(src,bl,skillid,skilllv,1); - skill_status_change_start(&dstsd->bl,SC_BATTLEORDERS,skilllv,0,0,0,0,0 ); - } + // Only usable during WoE + if (!agit_flag) { + clif_skill_fail(sd,skillid,0,0); + map_freeblock_unlock(); + return 0; + } + if(flag&1) { + if (dstsd && dstsd->status.guild_id == sd->status.guild_id) { + skill_status_change_start(&dstsd->bl,SC_BATTLEORDERS,skilllv,0,0,0,0,0 ); } } + else if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) && + strcmp(sd->status.name,g->master)==0) { + clif_skill_nodamage(src,bl,skillid,skilllv,1); + map_foreachinarea(skill_area_sub, + src->m,src->x-15,src->y-15,src->x+15,src->y+15,0, + src,skillid,skilllv,tick, flag|BCT_ALL|1, + skill_castend_nodamage_id); + } } break; case GD_REGENERATION: { struct guild *g = NULL; - if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) && - strcmp(sd->status.name,g->master)==0) { - for(i = 0; i < g->max_member; i++) { - if ((dstsd = g->member[i].sd) != NULL && sd->bl.m == dstsd->bl.m) { - clif_skill_nodamage(src,bl,skillid,skilllv,1); - skill_status_change_start(&dstsd->bl,SC_REGENERATION,skilllv,0,0,0,0,0 ); - } + // Only usable during WoE + if (!agit_flag) { + clif_skill_fail(sd,skillid,0,0); + map_freeblock_unlock(); + return 0; + } + if(flag&1) { + if (dstsd && dstsd->status.guild_id == sd->status.guild_id) { + skill_status_change_start(&dstsd->bl,SC_REGENERATION,skilllv,0,0,0,0,0 ); } } + else if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) && + strcmp(sd->status.name,g->master)==0) { + clif_skill_nodamage(src,bl,skillid,skilllv,1); + map_foreachinarea(skill_area_sub, + src->m,src->x-15,src->y-15,src->x+15,src->y+15,0, + src,skillid,skilllv,tick, flag|BCT_ALL|1, + skill_castend_nodamage_id); + } } break; case GD_RESTORE: { struct guild *g = NULL; - int hp, sp; - if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) && - strcmp(sd->status.name,g->master)==0) { - for(i = 0; i < g->max_member; i++) { - if ((dstsd = g->member[i].sd) != NULL && sd->bl.m == dstsd->bl.m) { - hp = dstsd->status.max_hp*0.9; - sp = dstsd->status.sp + hp <= dstsd->status.max_sp ? hp : dstsd->status.max_sp - dstsd->status.sp; - clif_skill_nodamage(src,bl,AL_HEAL,hp,1); - battle_heal(NULL,bl,hp,sp,0); - } + // Only usable during WoE + if (!agit_flag) { + clif_skill_fail(sd,skillid,0,0); + map_freeblock_unlock(); + return 0; + } + if(flag&1) { + if (dstsd && dstsd->status.guild_id == sd->status.guild_id) { + int hp, sp; + hp = dstsd->status.max_hp*0.9; + sp = dstsd->status.max_sp*0.9; + sp = dstsd->status.sp + sp <= dstsd->status.max_sp ? sp : dstsd->status.max_sp - dstsd->status.sp; + clif_skill_nodamage(src,bl,AL_HEAL,hp,1); + battle_heal(NULL,bl,hp,sp,0); } } + else if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) && + strcmp(sd->status.name,g->master)==0) { + clif_skill_nodamage(src,bl,skillid,skilllv,1); + map_foreachinarea(skill_area_sub, + src->m,src->x-15,src->y-15,src->x+15,src->y+15,0, + src,skillid,skilllv,tick, flag|BCT_ALL|1, + skill_castend_nodamage_id); + } } break; case GD_EMERGENCYCALL: { struct guild *g = NULL; + // Only usable during WoE + if (!agit_flag) { + clif_skill_fail(sd,skillid,0,0); + map_freeblock_unlock(); + return 0; + } // i don't know if it actually summons in a circle, but oh well. ;P - int dx[9]={-2, 0, 2,-2, 0, 2,-2, 0, 2}; - int dy[9]={-2,-2,-2, 0, 0, 0, 2, 2, 2}; - int j = 0; + int dx[9]={-1, 1, 0, 0,-1, 1,-1, 1, 0}; + int dy[9]={ 0, 0, 1,-1, 1,-1,-1, 1, 0}; + int c, j = 0; if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) && strcmp(sd->status.name,g->master)==0) { for(i = 0; i < g->max_member; i++, j++) { @@ -4452,6 +4490,8 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int if ((dstsd = g->member[i].sd) != NULL && sd != dstsd && !map[sd->bl.m].flag.nowarpto && !map[dstsd->bl.m].flag.nowarp) { clif_skill_nodamage(src,bl,skillid,skilllv,1); + if ((c=read_gat(sd->bl.m,sd->bl.x+dx[j],sd->bl.y+dy[j]))==1 || c==5) + dx[j] = dy[j] = 0; pc_setpos(dstsd, sd->mapname, sd->bl.x+dx[j], sd->bl.y+dy[j], 2); } } |