mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
Add limit cuz idk
This commit is contained in:
parent
0ea25a66ee
commit
9dc8aaf550
2 changed files with 7 additions and 1 deletions
|
@ -119,6 +119,9 @@ pub fn give_item(master_item_id: i64, amount: i64, user: &mut JsonValue) {
|
|||
if dataa["master_item_id"].as_i64().unwrap() == master_item_id {
|
||||
has = true;
|
||||
dataa["amount"] = (dataa["amount"].as_i64().unwrap() + amount).into();
|
||||
if dataa["amount"].as_i64().unwrap() > 200000000 {
|
||||
dataa["amount"] = (200000000).into();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -267,7 +267,10 @@ pub fn end(req: HttpRequest, body: String) -> HttpResponse {
|
|||
for (_j, data) in user["point_list"].members_mut().enumerate() {
|
||||
if data["type"].as_i64().unwrap() == 1 {
|
||||
has = true;
|
||||
data["amount"] = (data["amount"].as_i64().unwrap() + 5000).into();
|
||||
data["amount"] = (data["amount"].as_i64().unwrap() + 50000).into();
|
||||
if data["amount"].as_i64().unwrap() > 2000000000 {
|
||||
data["amount"] = (2000000000).into();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue