gold dupe prevention

This commit is contained in:
2024-05-15 16:29:23 -05:00
parent 01aa226c62
commit 39f7be99b0
3 changed files with 34 additions and 0 deletions
+2
View File
@@ -177,6 +177,8 @@ public class PlayerCharacter extends AbstractCharacter {
public float ZergMultiplier = 1.0f;
public int mineAppliedID = 0;
public long lastAction = 0;
/**
* No Id Constructor
*/
+9
View File
@@ -129,6 +129,12 @@ public class Warehouse extends AbstractWorldObject {
public static void warehouseDeposit(MerchantMsg msg, PlayerCharacter player, NPC npc, ClientConnection origin) {
if(player.lastAction + 5000 > System.currentTimeMillis()){
ChatManager.chatSystemInfo(player, "You Must Wait To Do This");
return;
}
Building warehouseBuilding;
Warehouse warehouse;
int depositAmount;
@@ -140,6 +146,9 @@ public class Warehouse extends AbstractWorldObject {
return;
depositAmount = msg.getAmount();
if(depositAmount < 1){
ChatManager.chatSystemInfo(player, "You Have Attempted To Dupe. Please Don't");
}
CharacterItemManager itemMan = player.getCharItemManager();
if (itemMan.doesCharOwnThisItem(resource.getObjectUUID()) == false)