mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 13:37:42 +00:00
Fix immutable lists
This commit is contained in:
parent
74783cfecd
commit
e2817c696a
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user