gm删除道具
parent
81e72ba228
commit
3d1681bfad
|
|
@ -52,11 +52,13 @@ public class Cmd_general extends GmAbstract {
|
|||
try {
|
||||
int uid = Integer.parseInt(args[1]);
|
||||
User user = UserManager.getUser(uid);
|
||||
int itemId = Integer.parseInt(args[2]);
|
||||
long itemNum = Long.parseLong(args[3]);
|
||||
HashMap<Integer, Long> map = new HashMap<>();
|
||||
map.put(itemId,itemNum);
|
||||
ItemUtil.itemCostLong(user,map, BIReason.GM_ROOT_REMOVE_ITEM,-999);
|
||||
String[] split = args[2].split("\\|");
|
||||
for (String s : split) {
|
||||
String[] strings = s.split("#");
|
||||
map.put(Integer.parseInt(strings[0]),Long.parseLong(strings[0]));
|
||||
}
|
||||
ItemUtil.useItemLong(user,map, BIReason.GM_ROOT_REMOVE_ITEM,-999);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1072,7 +1072,7 @@ public class ItemUtil {
|
|||
useItemLong(user,longMap,reason,subReason);
|
||||
}
|
||||
|
||||
private static void useItemLong(User user,Map<Integer,Long> useItemMap,int reason,int subReason) throws Exception{
|
||||
public static void useItemLong(User user,Map<Integer,Long> useItemMap,int reason,int subReason) throws Exception{
|
||||
if(useItemMap.isEmpty()){
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue