summaryrefslogtreecommitdiff
path: root/src/map/guild.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/guild.c')
-rw-r--r--src/map/guild.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index 49d5dd0db..b71b6344b 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1171,26 +1171,23 @@ int guild_getexp(struct map_session_data *sd,int exp)
}
// スキルポイント割り振り
-int guild_skillup(struct map_session_data *sd,int skill_num,int flag)
+int guild_skillup(TBL_PC* sd, int skill_num)
{
- struct guild *g;
+ struct guild* g;
int idx = skill_num - GD_SKILLBASE;
nullpo_retr(0, sd);
- if(idx < 0 || idx >= MAX_GUILDSKILL)
-
- return 0;
- if(sd->status.guild_id==0 || (g=guild_search(sd->status.guild_id))==NULL)
- return 0;
- if(strcmp(sd->status.name,g->master))
+ if( idx < 0 || idx >= MAX_GUILDSKILL || // not a guild skill
+ sd->status.guild_id == 0 || (g=guild_search(sd->status.guild_id)) == NULL || // no guild
+ strcmp(sd->status.name, g->master) ) // not the guild master
return 0;
- if( (g->skill_point>0 || flag&1) &&
- g->skill[idx].id!=0 &&
- g->skill[idx].lv < guild_skill_get_max(skill_num) ){
- intif_guild_skillup(g->guild_id,skill_num,sd->status.account_id,flag);
- }
+ if( g->skill_point > 0 &&
+ g->skill[idx].id != 0 &&
+ g->skill[idx].lv < guild_skill_get_max(skill_num) )
+ intif_guild_skillup(g->guild_id, skill_num, sd->status.account_id);
+
return 0;
}
// スキルポイント割り振り通知