From 8ca2b8537c13f276043d1f44417e4cb0eb748a2f Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Sun, 23 Aug 2015 15:47:41 -0700 Subject: [PATCH] Fixed Logging of gems/coins for support staff. --- .../Models/AccountAdministrator.cs | 40 +++++++------------ .../LOC.Website.Web.Publish.xml | 8 ++-- 2 files changed, 18 insertions(+), 30 deletions(-) diff --git a/Website/LOC.Website.Common/Models/AccountAdministrator.cs b/Website/LOC.Website.Common/Models/AccountAdministrator.cs index 3c19dedff..1da074e07 100644 --- a/Website/LOC.Website.Common/Models/AccountAdministrator.cs +++ b/Website/LOC.Website.Common/Models/AccountAdministrator.cs @@ -277,19 +277,6 @@ token.OriginalBalance = account.Gems; account.Gems += token.Amount; - if (!token.Source.Contains("Earned") && !token.Source.Contains("Tutorial") && !token.Source.Contains("Parkour")) - { - var gemTransaction = new GemTransaction - { - Source = token.Source, - Account = account, - Amount = token.Amount, - Date = (long)TimeUtil.GetCurrentMilliseconds() - }; - - repository.Add(gemTransaction); - } - repository.Edit(account); repository.CommitChanges(); } @@ -323,19 +310,6 @@ token.OriginalBalance = account.Coins; account.Coins += token.Amount; - if (!token.Source.Contains("Earned") && !token.Source.Contains("Tutorial") && !token.Source.Contains("Parkour")) - { - var coinTransaction = new CoinTransaction - { - Source = token.Source, - Account = account, - Amount = token.Amount, - Date = (long)TimeUtil.GetCurrentMilliseconds() - }; - - repository.Add(coinTransaction); - } - repository.Edit(account); repository.CommitChanges(); } @@ -349,6 +323,20 @@ if (account.Coins != token.OriginalBalance + token.Amount) return false; + + if (!token.Source.Contains("Earned") && !token.Source.Contains("Tutorial") && !token.Source.Contains("Parkour")) + { + var coinTransaction = new CoinTransaction + { + Source = token.Source, + Account = account, + Amount = token.Amount, + Date = (long)TimeUtil.GetCurrentMilliseconds() + }; + + repository.Add(coinTransaction); + repository.CommitChanges(); + } } } diff --git a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml index d460aafda..1b821a3b2 100644 --- a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml +++ b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml @@ -598,7 +598,7 @@ - + @@ -653,9 +653,9 @@ - + - + @@ -692,7 +692,7 @@ - +