public CharacterSelectionScreen(DbCharacter character)
        {
            CharacterId   = character.Id;
            Level         = character.Level;
            Race          = character.Race;
            Mode          = character.Mode;
            Hair          = character.Hair;
            Face          = character.Face;
            Height        = character.Height;
            Class         = character.Class;
            Gender        = character.Gender;
            Map           = character.Map;
            Strength      = character.Strength;
            Dexterity     = character.Dexterity;
            Rec           = character.Rec;
            Intelligence  = character.Intelligence;
            Wisdom        = character.Wisdom;
            Luck          = character.Luck;
            HealthPoints  = character.HealthPoints;
            ManaPoints    = character.ManaPoints;
            StaminaPoints = character.StaminaPoints;
            IsRename      = character.IsRename;

            var equipmentItems = character.Items.Where(item => item.Bag == 0);

            for (var i = 0; i < 17; i++)
            {
                var item = equipmentItems.FirstOrDefault(itm => itm.Slot == i);
                if (item != null)
                {
                    EquipmentItemsType[i]    = item.Type;
                    EquipmentItemsTypeId[i]  = item.TypeId;
                    EquipmentItemHasColor[i] = item.HasDyeColor;
                    if (item.HasDyeColor)
                    {
                        Colors[i] = new DyeColorSerialized(item.DyeColorSaturation, item.DyeColorR, item.DyeColorG, item.DyeColorB);
                    }
                }
            }

            Name     = character.Name;
            IsDelete = character.IsDelete;
        }
        public CharacterSelectionScreen(DbCharacter character)
        {
            CharacterId  = character.Id;
            Level        = character.Level;
            Race         = character.Race;
            Mode         = character.Mode;
            Hair         = character.Hair;
            Face         = character.Face;
            Height       = character.Height;
            Class        = character.Class;
            Gender       = character.Gender;
            Map          = character.Map;
            Strength     = character.Strength;
            Dexterity    = character.Dexterity;
            Rec          = character.Rec;
            Intelligence = character.Intelligence;
            Wisdom       = character.Wisdom;
            Luck         = character.Luck;

            var equipmentItems = character.Items.Where(item => item.Bag == 0);

            for (var i = 0; i < 17; i++)
            {
                var item = equipmentItems.FirstOrDefault(itm => itm.Slot == i);
                if (item is null)
                {
                    EquipmentItemsType[i]    = 0;
                    EquipmentItemsTypeId[i]  = 0;
                    EquipmentItemHasColor[i] = false;
                }
                else
                {
                    EquipmentItemsType[i]    = item.Type;
                    EquipmentItemsTypeId[i]  = item.TypeId;
                    EquipmentItemHasColor[i] = false; // TODO: research how colors are working
                }
            }

            Name     = character.Name;
            IsDelete = character.IsDelete;
        }
示例#3
0
        public PartyMember(Character character)
        {
            CharacterId = character.Id;
            Level       = character.LevelProvider.Level;
            Class       = character.AdditionalInfoManager.Class;
            MaxHP       = character.HealthManager.MaxHP;
            HP          = character.HealthManager.CurrentHP;
            MaxSP       = character.HealthManager.MaxSP;
            SP          = character.HealthManager.CurrentSP;
            MaxMP       = character.HealthManager.MaxMP;
            MP          = character.HealthManager.CurrentMP;
            Map         = character.MapProvider.Map.Id;
            X           = character.PosX;
            Y           = character.PosY;
            Z           = character.PosZ;
            Name        = character.AdditionalInfoManager.Name;

            foreach (var buff in character.BuffsManager.ActiveBuffs.ToList())
            {
                Buffs.Add(new PartyMemberBuff(buff));
            }
        }
示例#4
0
        public PartyMember(Character character)
        {
            CharacterId = character.Id;
            Level       = character.Level;
            Class       = character.Class;
            MaxHP       = character.MaxHP;
            HP          = character.CurrentHP;
            MaxSP       = character.MaxSP;
            SP          = character.CurrentSP;
            MaxMP       = character.MaxMP;
            MP          = character.CurrentMP;
            Map         = character.MapId;
            X           = character.PosX;
            Y           = character.PosY;
            Z           = character.PosZ;
            Name        = character.NameAsByteArray;

            foreach (var buff in character.ActiveBuffs.ToList())
            {
                Buffs.Add(new PartyMemberBuff(buff));
            }
        }
示例#5
0
        private Character SaveData()
        {
            var character = new Character();

            character.Name        = _txtName.Text;
            character.Description = _txtDescription.Text;
            CharacterRace characterRace = (CharacterRace)_cbRace.SelectedItem;

            character.Race = characterRace;
            CharacterProfession characterProfession = (CharacterProfession)_cbProfession.SelectedItem;

            character.Profession   = characterProfession;
            character.Strength     = _numStr.Value;
            character.Intelligence = _numInt.Value;
            character.Agility      = _numAgi.Value;
            character.Dexterity    = _numDex.Value;
            character.Endurance    = _numEnd.Value;
            character.Male         = _rbMale.Checked;
            character.Female       = _rbFemale.Checked;


            return(character);
        }
示例#6
0
 public PartySearchUnit(Character character)
 {
     Level = (byte)character.LevelProvider.Level;
     Job   = character.AdditionalInfoManager.Class;
     Name  = character.AdditionalInfoManager.Name;
 }
示例#7
0
 public Player(string name, CharacterGender GenderSelect, CharacterRace race, CharacterProfession profession) : base()
 {
     Name   = name;
     Gender = GenderSelect;
     Race   = race;
 }
示例#8
0
 public PartySearchUnit(Character character)
 {
     Level = (byte)character.Level;
     Job   = character.Class;
     Name  = character.NameAsByteArray;
 }
示例#9
0
 public Character(string nameSelected, CharacterGender GenderSelected, CharacterRace raceSelected, CharacterProfession professionSelected)
 {
     name       = nameSelected;
     gender     = GenderSelected;
     race       = raceSelected;
     profession = professionSelected;
 }