Display clans purchases properly in support server

This commit is contained in:
AlexTheCoder 2016-07-28 19:08:24 -04:00
parent f0be7794f5
commit f3944527f8

View File

@ -129,6 +129,8 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
int valentinesGiftsReceived = 0;
int boostersReceived = 0;
int freedomChestsReceived = 0;
int runeAmplifier20 = 0;
int runeAmplifier60 = 0;
for (CoinTransactionToken transaction : donor.getCoinTransactions())
{
@ -227,7 +229,26 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
else if (transaction.SalesPackageName.split(" ").length == 2)
boostersReceived += 1;
}
}
if (transaction.SalesPackageName.startsWith("Rune Amplifier 20"))
{
if (transaction.Coins == 0 && transaction.Gems == 0)
{
if (transaction.SalesPackageName.split(" ").length == 4)
runeAmplifier20 += Integer.parseInt(transaction.SalesPackageName.split(" ")[3]);
else if (transaction.SalesPackageName.split(" ").length == 3)
runeAmplifier20 += 1;
}
}
if (transaction.SalesPackageName.startsWith("Rune Amplifier 60"))
{
if (transaction.Coins == 0 && transaction.Gems == 0)
{
if (transaction.SalesPackageName.split(" ").length == 4)
runeAmplifier60 += Integer.parseInt(transaction.SalesPackageName.split(" ")[3]);
else if (transaction.SalesPackageName.split(" ").length == 3)
runeAmplifier60 += 1;
}
}
}
@ -238,6 +259,8 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
caller.sendMessage(C.cBlue + "Mythical Chests Received: " + C.cYellow + mythicalChestsReceived);
caller.sendMessage(C.cBlue + "Illuminated Chests Received: " + C.cYellow + illuminatedChestsReceived);
caller.sendMessage(C.cBlue + "Game Amplifiers Received: " + C.cYellow + boostersReceived);
caller.sendMessage(C.cBlue + "Rune Amplifiers (20 min) Received: " + C.cYellow + runeAmplifier20);
caller.sendMessage(C.cBlue + "Rune Amplifiers (60 min) Received: " + C.cYellow + runeAmplifier60);
caller.sendMessage(C.cBlue + "Freedom Chests Received: " + C.cYellow + freedomChestsReceived);
caller.sendMessage(C.cBlue + "Monthly Bonus Log (Last 6 entries):");
@ -260,6 +283,9 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable
caller.sendMessage(C.cBlue + "Price of Freedom: " + getLockedFreedomStr(playerName, "Price of Freedom"));
caller.sendMessage(C.cBlue + "Uncle Sam Hat: " + getLockedFreedomStr(playerName, "Uncle Sam Hat"));
caller.sendMessage(C.cDGreen + C.Strike + "=============================================");
caller.sendMessage(C.cBlue + "Clan Banner Usage: " + getLockedFreedomStr(playerName, "Clan Banner Usage"));
caller.sendMessage(C.cBlue + "Uncle Sam Morph: " + getLockedFreedomStr(playerName, "Clan Banner Editor"));
caller.sendMessage(C.cDGreen + C.Strike + "=============================================");
_accountBonusLog.remove(client.getAccountId());
}