Example #1
0
 public Combatant CreateCombatantFromCharacter(Character character, int teamNumber)
 {
     return new Combatant
     {
         CharID = character.CharID,
         UserID = character.UserID,
         Race = character.Race,
         Name = character.Name,
         Level = character.Level,
         Experience = character.Experience,
         Health = character.Health,
         MaxHealth = character.MaxHealth,
         Stanima = character.Stanima,
         MaxStanima = character.MaxStanima,
         Strength = character.Strength,
         Speed = character.Speed,
         Agility = character.Agility,
         Dexterity = character.Dexterity,
         WeaponID = character.WeaponID,
         ShieldID = character.ShieldID,
         ArmorID = character.ArmorID,
         GiveUpPercent = 0.2,
         TeamNumber = teamNumber
     };
 }
Example #2
0
 public void EquipArmor(int? inventoryID, Character character)
 {
     Validate(character);
     InventoryDAL.EquipArmor(inventoryID, character.CharID, character.UserID);
 }
Example #3
0
 public User GetUser(Character character)
 {
     Validate(character);
     return UserDAL.GetUser((int)character.UserID);
 }
Example #4
0
 public void AddEquipmentToInventory(Character character, int equipID, int? number = null)
 {
     Validate(character);
     InventoryDAL.AddEquipmentToInventory(character.CharID, null, equipID, number);
 }
Example #5
0
 public void DeleteEquipmentFromInventory(Character character, int equipID, int? number = null)
 {
     Validate(character);
     InventoryDAL.DeleteEquipmentFromInventory(character.CharID, equipID, number);
 }
Example #6
0
 public int GetCharacterGold(Character character)
 {
     Validate(character);
     return EquipmentDAL.GetCharacterGold(character.CharID, null);
 }
Example #7
0
 public IEnumerable<Inventory> GetInventoryH(Character character)
 {
     Validate(character);
     return InventoryDAL.GetInventoryH(character.CharID);
 }
Example #8
0
 public void UpdateCharacterBiografy(Character character, string biografy = null)
 {
     Validate(character);
     CharacterDAL.UpdateCharacterBiografy(character.UserID, character.CharID, biografy);
 }
Example #9
0
 public void UpdateCharacterStats(Character character)
 {
     Validate(character);
     CharacterDAL.UpdateCharacterStats(character.UserID, character.CharID, character.Level, character.Experience, character.Health, character.MaxHealth, character.Stanima,
         character.MaxStanima, character.Strength, character.Speed, character.Dexterity, character.Agility);
 }
Example #10
0
 public void UpdateCharacterStats(Character character, int? level = null, int? experience = null,
                                  int? health = null, int? maxHealth = null, int? stanima = null, int? maxStanima = null,
                                  int? strength = null, int? speed = null, int? dexterity = null, int? agility = null)
 {
     Validate(character);
     CharacterDAL.UpdateCharacterStats(character.UserID, character.CharID, level, experience, health, maxHealth, stanima, maxStanima, strength, speed, dexterity, agility);
 }
Example #11
0
 public void CreateCharacter(Character character, int raceID)
 {
     Validate(character);
     CharacterDAL.CreateCharacter(character, raceID);
 }
Example #12
0
 public void DeleteCharacter(Character character)
 {
     Validate(character);
     CharacterDAL.DeleteCharacter(character.CharID, character.UserID);
 }