private SetSettings ( PartyType type, string name, string dungeonLevel, string info, string password, int maxSize ) : void | ||
type | PartyType | |
name | string | |
dungeonLevel | string | |
info | string | |
password | string | |
maxSize | int | |
리턴 | void |
private void SetSettings(PartyType type, string name, string dungeonLevel, string info, string password, int maxSize)
{
this.Type = type;
this.Name = name;
this.DungeonLevel = (string.IsNullOrWhiteSpace(dungeonLevel) ? null : dungeonLevel);
this.Info = (string.IsNullOrWhiteSpace(info) ? null : info);
this.Password = (string.IsNullOrWhiteSpace(password) ? null : password);
this.MaxSize = Math2.Clamp(this.MemberCount, ChannelServer.Instance.Conf.World.PartyMaxSize, maxSize);
}
/// <summary> /// Creates new party with creature as leader. /// </summary> /// <param name="creature"></param> public static Party Create(Creature creature, PartyType type, string name, string dungeonLevel, string info, string password, int maxSize) { var party = new Party(); party.Id = ChannelServer.Instance.PartyManager.GetNextPartyId(); party._members.Add(creature); party._occupiedSlots.Add(1, creature); party.Leader = creature; party.SetSettings(type, name, dungeonLevel, info, password, maxSize); creature.PartyPosition = 1; ChannelServer.Instance.Events.MinutesTimeTick += party.OnMinutesTimeTick; return(party); }