mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-07 16:49:07 +00:00
Fix bank packet exploit + fishing guild banking (#300)
This commit is contained in:
@@ -32,7 +32,7 @@ public class BotHandler {
|
|||||||
|
|
||||||
public static void playerShop(Player player){
|
public static void playerShop(Player player){
|
||||||
// Must be in the correct zones
|
// Must be in the correct zones
|
||||||
if (!player.inPlayerShopArea() && !player.inBankArea()) {
|
if (!player.inPlayerShopArea()) {
|
||||||
player.getPacketSender().sendMessage("You need to be in a bank zone or trade area for this.");
|
player.getPacketSender().sendMessage("You need to be in a bank zone or trade area for this.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2093,6 +2093,11 @@ public class ItemAssistant {
|
|||||||
|
|
||||||
public void fromBank(int itemID, int fromSlot, int amount) {
|
public void fromBank(int itemID, int fromSlot, int amount) {
|
||||||
boolean cantWithdrawCuzMaxStack = false;
|
boolean cantWithdrawCuzMaxStack = false;
|
||||||
|
if (c.lastMainFrameInterface != MainFrameIDs.BANK)
|
||||||
|
{
|
||||||
|
c.getPacketSender().sendMessage("Your bank isn't open!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (amount > 0) {
|
if (amount > 0) {
|
||||||
if (c.bankItems[fromSlot] > 0) {
|
if (c.bankItems[fromSlot] > 0) {
|
||||||
if (c.getItemAssistant().playerHasItem(itemID))
|
if (c.getItemAssistant().playerHasItem(itemID))
|
||||||
|
|||||||
@@ -1757,6 +1757,7 @@ public abstract class Player {
|
|||||||
isInArea(2530,4725,2550,4705) || //Phasmatys
|
isInArea(2530,4725,2550,4705) || //Phasmatys
|
||||||
isInArea(2834, 10215, 2841, 10204) || // Keldagrim
|
isInArea(2834, 10215, 2841, 10204) || // Keldagrim
|
||||||
isInArea(2379, 4453, 2386, 4462) || // Zanaris
|
isInArea(2379, 4453, 2386, 4462) || // Zanaris
|
||||||
|
isInArea(2582, 3423, 2591, 3417) || //Fishing Guild
|
||||||
false;
|
false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -344,6 +344,11 @@ public class ShopAssistant {
|
|||||||
player.getPacketSender().sendMessage("Selling items as an admin has been disabled.");
|
player.getPacketSender().sendMessage("Selling items as an admin has been disabled.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!player.inPlayerShopArea()) //Packet abuse!
|
||||||
|
{
|
||||||
|
player.getPacketSender().sendMessage("You're not in a shopping area! Enter one to sell items & manage your store.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if(!player.isShopping) {
|
if(!player.isShopping) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user