Commit 2822eea3 authored by Rafi Ramadhan's avatar Rafi Ramadhan
Browse files

update mix item

parent fe84012c
......@@ -202,10 +202,11 @@ public class MethodHandler {
String username = session.get(searchToken(token)).getUsername();
Long item1 = parse.parseIntJSON(input, "item1");
Long item2 = parse.parseIntJSON(input, "item2");
int item_id = 0;
if((db.getItem(username, item1.intValue()) >=3) && (db.getItem(username, item2.intValue()) >=3)) {
int item_id = -999;
item_id = Combine(item1,item2);
if(item_id != -999) {
db.addInventory(username, item_id);
db.removefromInventory(username, item1.intValue(), 3);
db.removefromInventory(username, item2.intValue(), 3);
......
Supports Markdown
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