internal Character(CharacterManager characterManager, byte slot, CharacterGender gender, byte hair, byte face, byte shirt, byte pants) { CharacterManager = characterManager; Weapons = new WeaponManager(this); Skills = new SkillManager(this); Costumes = new CostumeManager(this); Id = CharacterIdGenerator.GetNextId(); Slot = slot; Gender = gender; var defaultItems = GameServer.Instance.ResourceCache.GetDefaultItems(); Hair = defaultItems.Get(Gender, CostumeSlot.Hair, hair); Face = defaultItems.Get(Gender, CostumeSlot.Face, face); Shirt = defaultItems.Get(Gender, CostumeSlot.Shirt, shirt); Pants = defaultItems.Get(Gender, CostumeSlot.Pants, pants); Gloves = defaultItems.Get(Gender, CostumeSlot.Gloves, 0); Shoes = defaultItems.Get(Gender, CostumeSlot.Shoes, 0); }
internal Character(CharacterManager characterManager, PlayerCharacterDto dto) { CharacterManager = characterManager; Weapons = new WeaponManager(this, dto); Skills = new SkillManager(this, dto); Costumes = new CostumeManager(this, dto); var defaultItems = GameServer.Instance.ResourceCache.GetDefaultItems(); ExistsInDatabase = true; Id = dto.Id; Slot = dto.Slot; Gender = (CharacterGender)dto.Gender; Hair = defaultItems.Get(Gender, CostumeSlot.Hair, dto.BasicHair); Face = defaultItems.Get(Gender, CostumeSlot.Face, dto.BasicFace); Shirt = defaultItems.Get(Gender, CostumeSlot.Shirt, dto.BasicShirt); Pants = defaultItems.Get(Gender, CostumeSlot.Pants, dto.BasicPants); Gloves = defaultItems.Get(Gender, CostumeSlot.Gloves, 0); Shoes = defaultItems.Get(Gender, CostumeSlot.Shoes, 0); }