Пример #1
0
 public void RemoveCharacter(CharacterEngine Character)
 {
     if (Character == null)
     {
         return;
     }
     Characters.Remove(Character);
     CharactersId.Remove(Character.Id);
     CharactersString = string.Join(",", CharactersId);
 }
Пример #2
0
 public void AddCharacter(CharacterEngine Character)
 {
     if (Character == null)
     {
         return;
     }
     Characters.Add(Character);
     CharactersId.Add(Character.Id);
     CharactersString = string.Join(",", CharactersId);
 }
Пример #3
0
 public StatEngine(CharacterEngine character)
 {
     Character = character;
     _stats    = new Dictionary <StatEnum, CharacterBaseCharacteristic>();
     foreach (var @enum in typeof(StatEnum).GetEnumValues())
     {
         _stats.Add((StatEnum)@enum, new CharacterBaseCharacteristic());
     }
     this[StatEnum.ACTION_POINTS].@base              = character.Level >= 100 ? (short)7 : (short)6;
     this[StatEnum.MOVEMENT_POINTS].@base            = 3;
     this[StatEnum.SUMMONABLE_CREATURES_BOOST].@base = 1;
     this[StatEnum.STRENGTH].@base     = (short)character.Strength;
     this[StatEnum.VITALITY].@base     = (short)character.Vitality;
     this[StatEnum.WISDOM].@base       = (short)character.Wisdom;
     this[StatEnum.CHANCE].@base       = (short)character.Chance;
     this[StatEnum.AGILITY].@base      = (short)character.Agility;
     this[StatEnum.INTELLIGENCE].@base = (short)character.Intelligence;
     Refresh();
 }
Пример #4
0
        public void ParseCharacter()
        {
            var Elements = CharactersString.Split(',');

            foreach (var elem in Elements)
            {
                CharacterEngine Character = null;
                foreach (var c in Server.Clients.Where(c => c.Character.Id == int.Parse(elem)))
                {
                    Character = c.Character;
                }

                if (Character == null)
                {
                    continue;
                }

                CharactersId.Add(int.Parse(elem));
                Characters.Add(Character);
                Character.Guild = this;
            }
        }