Refactor gachapon logging

This commit is contained in:
P0nk
2022-01-03 18:50:50 +01:00
parent 6041d56bcd
commit 1e53bc7d1f
4 changed files with 19 additions and 10 deletions

View File

@@ -1,7 +1,6 @@
package tools;
import client.Character;
import server.ItemInformationProvider;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -23,11 +22,4 @@ public class LogHelper {
String log = player.getName() + (gotPrize ? " used a maple leaf to buy " + operation : " redeemed " + operation + " VP for a leaf") + " - " + timeStamp;
FilePrinter.print(FilePrinter.LOG_LEAF, log);
}
public static void logGacha(Character player, int itemid, String map) {
String itemName = ItemInformationProvider.getInstance().getName(itemid);
String timeStamp = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss").format(new Date());
String log = player.getName() + " got a " + itemName + "(" + itemid + ") from the " + map + " gachapon. - " + timeStamp;
FilePrinter.print(FilePrinter.LOG_GACHAPON, log);
}
}