Instantiate shops in ShopFactory

This commit is contained in:
P0nk
2023-03-29 21:59:00 +02:00
parent 2139147dcd
commit fe9dd75a23
5 changed files with 70 additions and 118 deletions

View File

@@ -106,11 +106,11 @@ public final class NPCTalkHandler extends AbstractPacketHandler {
}
private boolean hasShop(NPC npc) {
return shopFactory.getShopForNPC(npc.getId()) != null;
return shopFactory.getShop(npc.getId()) != null;
}
private void sendShop(NPC npc, Client c) {
Shop shop = shopFactory.getShopForNPC(npc.getId());
Shop shop = shopFactory.getShop(npc.getId());
if (shop == null) {
return;
}