Fix immutable lists

This commit is contained in:
AnimeGitB 2022-05-12 02:36:34 +09:30 committed by Melledy
parent 74783cfecd
commit e2817c696a
2 changed files with 2 additions and 2 deletions

View File

@ -696,7 +696,7 @@ public class InventoryManager {
} }
// Pay materials and mora if possible // Pay materials and mora if possible
List<ItemParamData> costs = proudSkill.getCostItems(); // Can this be null? List<ItemParamData> costs = new ArrayList<ItemParamData>(proudSkill.getCostItems()); // Can this be null?
if (proudSkill.getCoinCost() > 0) { if (proudSkill.getCoinCost() > 0) {
costs.add(new ItemParamData(202, proudSkill.getCoinCost())); costs.add(new ItemParamData(202, proudSkill.getCoinCost()));
} }

View File

@ -56,7 +56,7 @@ public class HandlerBuyGoodsReq extends PacketHandler {
return; return;
} }
List<ItemParamData> costs = sg.getCostItemList(); // Can this even be null? List<ItemParamData> costs = new ArrayList<ItemParamData>(sg.getCostItemList()); // Can this even be null?
costs.add(new ItemParamData(202, sg.getScoin())); costs.add(new ItemParamData(202, sg.getScoin()));
costs.add(new ItemParamData(201, sg.getHcoin())); costs.add(new ItemParamData(201, sg.getHcoin()));
costs.add(new ItemParamData(203, sg.getMcoin())); costs.add(new ItemParamData(203, sg.getMcoin()));