예제 #1
0
파일: guild.c 프로젝트: monimonih/eathena
// スキルポイント割り振り
int guild_skillup(TBL_PC* sd, int skill_num)
{
	struct guild* g;
	int idx = skill_num - GD_SKILLBASE;

	nullpo_retr(0, sd);

	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 &&
			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;
}
예제 #2
0
// スキルポイント割り振り
int guild_skillup(struct map_session_data *sd,int skill_num,int flag)
{
	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))
		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);
	}
	status_calc_pc (sd, 0); // Celest

	return 0;
}