Ejemplo n.º 1
0
 public Commands(
     IMovement movement,
     IRoomActions roomActions,
     IDebug debug,
     ISkills skills,
     ISpells spells,
     IObject objects,
     IInventory inventory,
     Icommunication communication,
     IEquip equipment,
     IScore score,
     ICombat combat,
     ICache cache,
     ISocials socials,
     ICommandHandler commandHandler
     )
 {
     _movement       = movement;
     _roomActions    = roomActions;
     _debug          = debug;
     _skills         = skills;
     _spells         = spells;
     _object         = objects;
     _inventory      = inventory;
     _communication  = communication;
     _equipment      = equipment;
     _score          = score;
     _combat         = combat;
     _cache          = cache;
     _socials        = socials;
     _commandHandler = commandHandler;
 }
Ejemplo n.º 2
0
        internal MyCharacter(byte[] binData)
        {
            // TODO check if size of the hex chunk is correct (432)
            _binData = binData;

            // Spell Points
            byte[] binDataSP = new byte[LengthSpellPoints];
            Array.Copy(_binData, OffsetSpellPoints, binDataSP, 0, LengthSpellPoints);
            _spellPoints = new MySpellPoints(binDataSP);

            // Attributes
            byte[] binDataAttributes = new byte[Constants.LengthAttributes];
            Array.Copy(_binData, Constants.OffsetAttributes, binDataAttributes, 0, Constants.LengthAttributes);
            _attributes = new MyAttributes(binDataAttributes);

            // Skills
            byte[] binDataSkills = new byte[Constants.LengthSkills];
            Array.Copy(_binData, Constants.OffsetSkills, binDataSkills, 0, Constants.LengthSkills);
            _skills = new MySkills(binDataSkills);

            // Resistances
            byte[] binDataResistances = new byte[LengthResistances];
            Array.Copy(_binData, OffsetResistances, binDataResistances, 0, LengthResistances);
            _resistances = new MyResistances(binDataResistances);
        }
Ejemplo n.º 3
0
 public Player(string id, string firstName, string lastName, ISkills skills)
 {
     Id        = id;
     FirstName = firstName;
     LastName  = lastName;
     Skills    = skills;
 }
Ejemplo n.º 4
0
 public Cooking(IWriteToClient writeToClient, IDice dice, IUpdateClientUI clientUi, ISkills skills)
 {
     _writeToClient = writeToClient;
     _dice          = dice;
     _clientUi      = clientUi;
     _skills        = skills;
 }
Ejemplo n.º 5
0
 public double Calculate(ISkills referentSkill, IEnumerable <ISkills> skills)
 {
     return(skills.Sum(s => Math.Sqrt(
                           Math.Pow(referentSkill.Shooting - s.Shooting, 2)
                           + Math.Pow(referentSkill.Skating - s.Skating, 2)
                           + Math.Pow(referentSkill.Checking - s.Checking, 2))));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the Unknowntype class.
 /// </summary>
 /// <param name='rootHandler'>
 /// Optional. The http client handler used to handle http transport.
 /// </param>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public Unknowntype(HttpClientHandler rootHandler, params DelegatingHandler[] handlers)
     : base(rootHandler, handlers)
 {
     this._bookings = new Bookings(this);
     this._heroes   = new Heroes(this);
     this._skills   = new Skills(this);
     this._baseUri  = new Uri("https://dqccomics-webapi.azurewebsites.net");
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the Unknowntype class.
 /// </summary>
 public Unknowntype()
     : base()
 {
     this._bookings = new Bookings(this);
     this._heroes   = new Heroes(this);
     this._skills   = new Skills(this);
     this._baseUri  = new Uri("https://dqccomics-webapi.azurewebsites.net");
 }
Ejemplo n.º 8
0
 public Crafting(IWriteToClient writeToClient, ICache cache, IGain gain, IUpdateClientUI clientUi, ISkills skills)
 {
     _writeToClient = writeToClient;
     _cache         = cache;
     _gain          = gain;
     _clientUi      = clientUi;
     _skills        = skills;
 }
Ejemplo n.º 9
0
 /// <param name='operations'>
 /// Reference to the DqccomicsMobileapiService.ISkills.
 /// </param>
 public static IList <ApiSkill> GetSkills(this ISkills operations)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ISkills)s).GetSkillsAsync();
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Ejemplo n.º 10
0
 public Commands(
     IMovement movement,
     IRoomActions roomActions,
     IDebug debug,
     ISkills skills,
     ISpells spells,
     IObject objects,
     IInventory inventory,
     Icommunication communication,
     IEquip equipment,
     IScore score,
     ICombat combat,
     ICache cache,
     ISocials socials,
     ICommandHandler commandHandler,
     ICore core,
     IMobFunctions mobFunctions,
     IHelp help,
     IMobScripts mobScripts,
     ICrafting crafting,
     ICooking cooking,
     IUtilSkills utilSkills,
     IPassiveSkills passiveSkills,
     IHealer healer
     )
 {
     _movement       = movement;
     _roomActions    = roomActions;
     _debug          = debug;
     _skills         = skills;
     _spells         = spells;
     _object         = objects;
     _inventory      = inventory;
     _communication  = communication;
     _equipment      = equipment;
     _score          = score;
     _combat         = combat;
     _cache          = cache;
     _socials        = socials;
     _commandHandler = commandHandler;
     _core           = core;
     _mobFunctions   = mobFunctions;
     _help           = help;
     _mobScripts     = mobScripts;
     _crafting       = crafting;
     _cooking        = cooking;
     _utilSkills     = utilSkills;
     _passiveSkills  = passiveSkills;
     _healer         = healer;
 }
Ejemplo n.º 11
0
 public Humanoid(ISkills Skills)
 {
     SkillSet = Skills.ShowSkills();
 }
Ejemplo n.º 12
0
 public Squad(IEnumerable <IPlayer> players, ISkills averageSkills)
 {
     Players       = players;
     AverageSkills = averageSkills;
 }
Ejemplo n.º 13
0
 public SkillsController(ISkills skills)
 {
     this.skills = skills;
 }
Ejemplo n.º 14
0
 public Humanoid(ISkills skills)
 {
     _Iskills = skills;
 }
Ejemplo n.º 15
0
 public SetupSource(IPlayer[] players, ISkills averageSkills)
 {
     Players       = players;
     AverageSkills = averageSkills;
 }
Ejemplo n.º 16
0
        /// <param name='operations'>
        /// Reference to the DqccomicsMobileapiService.ISkills.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <IList <ApiSkill> > GetSkillsAsync(this ISkills operations, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <System.Collections.Generic.IList <DqccomicsMobileapiService.Models.ApiSkill> > result = await operations.GetSkillsWithOperationResponseAsync(cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }