mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-07 00:32:06 +00:00
Fix banking packet exploit, & setup for a future of preventing packet exploits
This commit is contained in:
@@ -7,6 +7,7 @@ import com.rebotted.game.npcs.NpcHandler;
|
||||
import com.rebotted.game.players.Client;
|
||||
import com.rebotted.game.players.Player;
|
||||
import com.rebotted.game.players.PlayerHandler;
|
||||
import com.rebotted.util.MainFrameIDs;
|
||||
import com.rebotted.util.Misc;
|
||||
|
||||
public class ItemAssistant {
|
||||
@@ -1804,6 +1805,12 @@ public class ItemAssistant {
|
||||
c.otherBank = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(c.lastMainFrameInterface == MainFrameIDs.DEPOSIT_BOX || c.lastMainFrameInterface == MainFrameIDs.BANK)) { //Packet exploit prevention
|
||||
c.getPacketSender().sendMessage("You don't have a bank open! Report this ID to developers: " + c.lastMainFrameInterface);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (c.playerItemsN[fromSlot] <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1080,7 +1080,7 @@ public class ObjectsActions {
|
||||
}
|
||||
break;
|
||||
|
||||
case 9299:
|
||||
case 9299: //Lumbridge squeeze-through fence
|
||||
if (player.absX == 3240) {
|
||||
if (player.absY == 3191) {
|
||||
player.getPlayerAssistant().walkTo(0, -1);
|
||||
|
||||
@@ -121,7 +121,7 @@ public abstract class Player {
|
||||
private final ObjectManager objectManager = new ObjectManager();
|
||||
public ArrayList<GameItem> fishingTrawlerReward = new ArrayList<GameItem>();
|
||||
private final RangersGuild rangersGuild = new RangersGuild(this);
|
||||
private GlassBlowing glassBlowing = new GlassBlowing(this);
|
||||
private GlassBlowing glassBlowing = new GlassBlowing(this);
|
||||
private Barrows barrows = new Barrows(this);
|
||||
private Mining mining = new Mining();
|
||||
private ChallengePlayer challengePlayer = new ChallengePlayer();
|
||||
@@ -130,7 +130,8 @@ public abstract class Player {
|
||||
private GateHandler gateHandler = new GateHandler();
|
||||
private SingleGates singleGates = new SingleGates();
|
||||
private DoubleGates doubleGates = new DoubleGates();
|
||||
|
||||
public int lastMainFrameInterface = -1; //Possibly used in future to prevent packet exploits
|
||||
|
||||
public SingleGates getSingleGates() {
|
||||
return singleGates;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user