mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-05 16:49:06 +00:00
Random stuff 3 (#312)
* Make ::update automatically restart server as well
* Add bank area checks back since previously you could open a bank, and as long as you didn't open another interface you could abuse it
* Fix noclip (NEEDS TESTING)
* Revert "Fix noclip (#302)"
This reverts commit 521ae52e4c.
* ::clip command removed, fixed a typo, reordered some stuff, fixed a bug with others cannon
-Removed the clip command from the client;
-Fixed a typo in a dialogue;
-Fixed mud battlestaff nto working as runes (water and earth);
-Fixed a bug with other cannons near you preventing you from setting down a cannon. Somehow your player would glitch himself and make it impossible to spawn a cannon at certain spot;
* Snow improvement
Nothing major
* Fixed Click to teleport command
Fixed Click to teleport command;
* cleaned stuff
* Update Commands.java
* Fixed picking up items requiring 2 clicks when not standing on/near it. Fixed the sound so it doesnt repeat itself anymore if spamclicked.
Fixed picking up items requiring 2 clicks when not standing on/near it. Fixed the sound so it doesnt repeat itself anymore if spamclicked.
Co-authored-by: Daniel Ginovker <dcress01@uoguelph.ca>
This commit is contained in:
@@ -150,7 +150,7 @@ public class GlobalDropsHandler {
|
||||
* @param c
|
||||
* cord y
|
||||
*/
|
||||
public static void pickup(Player player2, int a, int b, int c) {
|
||||
public static void pickup(Player player, int a, int b, int c) {
|
||||
GlobalDrop drop = itemExists(a, b, c);
|
||||
if (drop == null) {
|
||||
return;
|
||||
@@ -158,16 +158,20 @@ public class GlobalDropsHandler {
|
||||
if (drop.isTaken()) {
|
||||
return;
|
||||
}
|
||||
if (player2.getItemAssistant().freeSlots() > 0) {
|
||||
player2.getItemAssistant().addItem(drop.getId(), drop.getAmount());
|
||||
drop.setTakenAt(System.currentTimeMillis());
|
||||
drop.setTaken(true);
|
||||
for (Player player : PlayerHandler.players) {
|
||||
Client cl = (Client) player;
|
||||
if (cl != null) {
|
||||
cl.getPacketSender().removeGroundItem(drop.getId(), drop.getX(), drop.getY(), drop.getAmount());
|
||||
spawnedDrops.remove(drop);
|
||||
}
|
||||
if (player.getItemAssistant().freeSlots() < 1) {
|
||||
if (!(player.getItemAssistant().playerHasItem(player.pItemId) && player.getItemAssistant().isStackable(player.pItemId))) {
|
||||
player.getPacketSender().sendMessage("Not enough inventory space...");
|
||||
return;
|
||||
}
|
||||
}
|
||||
player.getItemAssistant().addItem(drop.getId(), drop.getAmount());
|
||||
drop.setTakenAt(System.currentTimeMillis());
|
||||
drop.setTaken(true);
|
||||
for (Player playerLoop : PlayerHandler.players) {
|
||||
Client cl = (Client) playerLoop;
|
||||
if (cl != null) {
|
||||
cl.getPacketSender().removeGroundItem(drop.getId(), drop.getX(), drop.getY(), drop.getAmount());
|
||||
spawnedDrops.remove(drop);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user