示例#1
0
        public void execute(GameSession gameSession, byte[] bytes)
        {
            var read = new AbilityLaunchRequest();

            read.readCommand(bytes);

            var player = gameSession.Player;

            player.SkillManager.AssembleSkillCategoryRequest(read.selectedAbilityId);
        }
        public void execute(GameSession gameSession, IByteBuffer buffer)
        {
            if (gameSession.Player.UsingNewClient)
            {
                return;
            }
            var request = new AbilityLaunchRequest();

            request.readCommand(buffer);

            var selectedAbilityId = request.selectedAbilityId;

            var ability = (Abilities)selectedAbilityId;

            if (gameSession.Player.Abilities.ContainsKey(ability))
            {
                gameSession.Player.Abilities[ability].execute();
            }
        }