Refactor gachapon logging
This commit is contained in:
@@ -21,7 +21,10 @@
|
||||
*/
|
||||
package server.gachapon;
|
||||
|
||||
import client.Character;
|
||||
import constants.id.NpcId;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import server.ItemInformationProvider;
|
||||
import tools.Randomizer;
|
||||
|
||||
@@ -29,7 +32,7 @@ import tools.Randomizer;
|
||||
* @author Alan (SharpAceX)
|
||||
*/
|
||||
public class Gachapon {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(Gachapon.class);
|
||||
private static final Gachapon instance = new Gachapon();
|
||||
|
||||
public static Gachapon getInstance() {
|
||||
@@ -162,4 +165,9 @@ public class Gachapon {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
||||
public static void log(Character player, int itemId, String map) {
|
||||
String itemName = ItemInformationProvider.getInstance().getName(itemId);
|
||||
log.info("{} got a {} ({}) from the {} gachapon.", player.getName(), itemName, itemId, map);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user