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)); }
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(); } }