Turn npc id magic numbers into constants
This commit is contained in:
@@ -28,6 +28,7 @@ import client.inventory.ItemFactory;
|
||||
import client.inventory.Pet;
|
||||
import config.YamlConfig;
|
||||
import constants.game.GameConstants;
|
||||
import constants.id.NpcId;
|
||||
import constants.inventory.ItemConstants;
|
||||
import constants.string.LanguageConstants;
|
||||
import net.server.Server;
|
||||
@@ -400,15 +401,15 @@ public class NPCConversationManager extends AbstractPlayerInteraction {
|
||||
}
|
||||
|
||||
public void doGachapon() {
|
||||
int[] maps = {100000000, 101000000, 102000000, 103000000, 105040300, 800000000, 809000101, 809000201, 600000000, 120000000};
|
||||
|
||||
GachaponItem item = Gachapon.getInstance().process(npc);
|
||||
|
||||
Item itemGained = gainItem(item.getId(), (short) (item.getId() / 10000 == 200 ? 100 : 1), true, true); // For normal potions, make it give 100.
|
||||
|
||||
sendNext("You have obtained a #b#t" + item.getId() + "##k.");
|
||||
|
||||
String map = c.getChannelServer().getMapFactory().getMap(maps[(getNpc() != 9100117 && getNpc() != 9100109) ? (getNpc() - 9100100) : getNpc() == 9100109 ? 8 : 9]).getMapName();
|
||||
int[] maps = {100000000, 101000000, 102000000, 103000000, 105040300, 800000000, 809000101, 809000201, 600000000, 120000000};
|
||||
final int mapId = maps[(getNpc() != NpcId.GACHAPON_NAUTILUS && getNpc() != NpcId.GACHAPON_NLC) ?
|
||||
(getNpc() - NpcId.GACHAPON_HENESYS) : getNpc() == NpcId.GACHAPON_NLC ? 8 : 9];
|
||||
String map = c.getChannelServer().getMapFactory().getMap(mapId).getMapName();
|
||||
|
||||
LogHelper.logGacha(getPlayer(), item.getId(), map);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user