示例#1
0
        public Task <bool> OnHandle(MessageContext context, CExerciseLicenceReqMessage message)
        {
            var session = context.GetSession <Session>();
            var plr     = session.Player;

            plr.LicenseManager.Acquire(message.License);
            return(Task.FromResult(true));
        }
示例#2
0
 public void ExerciseLicenseHandler(GameSession session, CExerciseLicenceReqMessage message)
 {
     try
     {
         session.Player.LicenseManager.Acquire(message.License);
     }
     catch (LicenseException ex)
     {
         Logger.ForAccount(session)
         .Error(ex, "Failed to exercise license");
     }
 }
 public void ExerciseLicenseHandler(GameSession session, CExerciseLicenceReqMessage message)
 {
     try
     {
         session.Player.LicenseManager.Acquire(message.License);
     }
     catch (LicenseException ex)
     {
         _logger.Error()
         .Account(session)
         .Exception(ex)
         .Write();
     }
 }