示例#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
     };
 }
示例#2
0
 public void EquipArmor(int? inventoryID, Character character)
 {
     Validate(character);
     InventoryDAL.EquipArmor(inventoryID, character.CharID, character.UserID);
 }
示例#3
0
 public User GetUser(Character character)
 {
     Validate(character);
     return UserDAL.GetUser((int)character.UserID);
 }
示例#4
0
 public void AddEquipmentToInventory(Character character, int equipID, int? number = null)
 {
     Validate(character);
     InventoryDAL.AddEquipmentToInventory(character.CharID, null, equipID, number);
 }
示例#5
0
 public void DeleteEquipmentFromInventory(Character character, int equipID, int? number = null)
 {
     Validate(character);
     InventoryDAL.DeleteEquipmentFromInventory(character.CharID, equipID, number);
 }
示例#6
0
 public int GetCharacterGold(Character character)
 {
     Validate(character);
     return EquipmentDAL.GetCharacterGold(character.CharID, null);
 }
示例#7
0
 public IEnumerable<Inventory> GetInventoryH(Character character)
 {
     Validate(character);
     return InventoryDAL.GetInventoryH(character.CharID);
 }
示例#8
0
 public void UpdateCharacterBiografy(Character character, string biografy = null)
 {
     Validate(character);
     CharacterDAL.UpdateCharacterBiografy(character.UserID, character.CharID, biografy);
 }
示例#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);
 }
示例#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);
 }
示例#11
0
 public void CreateCharacter(Character character, int raceID)
 {
     Validate(character);
     CharacterDAL.CreateCharacter(character, raceID);
 }
示例#12
0
 public void DeleteCharacter(Character character)
 {
     Validate(character);
     CharacterDAL.DeleteCharacter(character.CharID, character.UserID);
 }