예제 #1
0
파일: guild.c 프로젝트: casioza/server000
// ギルド役職変更
int guild_change_position(int guild_id,int idx,
	int mode,int exp_mode,const char *name)
{
	struct guild_position p;

	exp_mode = cap_value(exp_mode, 0, battle_config.guild_exp_limit);
	//Mode 0x01 <- Invite
	//Mode 0x10 <- Expel.
	p.mode=mode&0x11;
	p.exp_mode=exp_mode;
	safestrncpy(p.name,name,NAME_LENGTH);
	return intif_guild_position(guild_id,idx,&p);
}
예제 #2
0
// ギルド役職変更
int guild_change_position(int guild_id,int idx,
	int mode,int exp_mode,const char *name)
{
	struct guild_position p;

	exp_mode = cap_value(exp_mode, 0, battle_config.guild_exp_limit);
	//Mode 0x01 <- Invite
	//Mode 0x10 <- Expel.
	p.mode=mode&0x11;
	p.exp_mode=exp_mode;
	memcpy(p.name,name,NAME_LENGTH-1);
	p.name[NAME_LENGTH-1] = '\0'; //Security check... [Skotlex]
	return intif_guild_position(guild_id,idx,&p);
}
예제 #3
0
// ギルド役職変更
int guild_change_position(struct map_session_data *sd,int idx,
	int mode,int exp_mode,const char *name)
{
	struct guild_position p;

	nullpo_retr(0, sd);

	if(exp_mode>battle_config.guild_exp_limit)
		exp_mode=battle_config.guild_exp_limit;
	if(exp_mode<0)exp_mode=0;
	p.mode=mode;
	p.exp_mode=exp_mode;
	memcpy(p.name,name,NAME_LENGTH-1);
	p.name[NAME_LENGTH-1] = '\0'; //Security check... [Skotlex]
	return intif_guild_position(sd->status.guild_id,idx,&p);
}