Commit f45e106b authored by AnimeGitB's avatar AnimeGitB Committed by Melledy
Browse files

Fix immutable lists

parent b787c70c
......@@ -696,7 +696,7 @@ public class InventoryManager {
}
// 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) {
costs.add(new ItemParamData(202, proudSkill.getCoinCost()));
}
......
......@@ -56,7 +56,7 @@ public class HandlerBuyGoodsReq extends PacketHandler {
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(201, sg.getHcoin()));
costs.add(new ItemParamData(203, sg.getMcoin()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment