private void LogEpForActivity(Account account, Character character, EpForActivityType activityType, int rawPoints, int points, double boostFactor) { var epForActivityLogEvent = new EpForActivityLogEvent(activityType) { Account = account, CharacterId = character.Id, RawPoints = rawPoints, Points = points, BoostFactor = boostFactor, }; _epForActivityLogger.Log(epForActivityLogEvent); Logger.Info($"EP4Activity:{activityType} accountId:{account.Id} characterId:{character.Id} raw:{rawPoints} pts:{points} boostFactor:{Math.Round(boostFactor,4)}"); }
public int AddExtensionPointsBoostAndLog(Account account, Character character, EpForActivityType activityType, int points) { if (points <= 0) { return(0); } var rawPoints = points; var boostFactor = GetExperienceBoostingFactor(GetExtensionPointsCollected(account), SERVER_DESIRED_EP_LEVEL); var boostedPoints = GetBoostedExtensionPoints(account, points); Transaction.Current.OnCommited(() => { LogEpForActivity(account, character, activityType, rawPoints, boostedPoints, boostFactor); }); AddExtensionPoints(account, boostedPoints); return(boostedPoints); }
public EpForActivityLogEvent(EpForActivityType transactionType) { TransactionType = transactionType; Created = DateTime.Now; }