A few things (#401)
- Can't attack players or npcs through doors/walls anymore - Cleaned up a few small bits of code - Added a few new boundaries to the boundary system - Removed dialogue asking are you sure you want to empty your inventory for admins
This commit is contained in:
1 parent
43f4b14dbf
commit
b4371d3129
19 files changed
+130
-183
No files matched your search
@@ -1,7 +1,7 @@
|
||||
package com.rebotted.game.objects;
|
||||
|
||||
import com.rebotted.game.players.Player;
|
||||
import com.rebotted.world.clip.ObjectDef;
|
||||
import com.rebotted.world.clip.ObjectDefinition;
|
||||
|
||||
/**
|
||||
* ObjectDefaults
|
||||
@@ -17,7 +17,7 @@ public class ObjectDefaults {
|
||||
WEST = 3;
|
||||
|
||||
public static int getObjectType(Player player, int objectType) {
|
||||
String objectName = ObjectDef.getObjectDef(objectType).name;
|
||||
String objectName = ObjectDefinition.getObjectDef(objectType).name;
|
||||
if (objectName.contains("Wardrobe") || objectName.contains("chest") || objectName.contains("Cupboard") || objectName.contains("Coffin")) {
|
||||
return 10;
|
||||
} else if (objectName.contains("Curtain")) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.rebotted.game.objects;
|
||||
|
||||
import com.rebotted.world.clip.ObjectDef;
|
||||
import com.rebotted.world.clip.ObjectDefinition;
|
||||
|
||||
public class Objects {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Objects {
|
||||
}
|
||||
|
||||
public int[] getObjectSize() {
|
||||
ObjectDef def = ObjectDef.getObjectDef(objectId);
|
||||
ObjectDefinition def = ObjectDefinition.getObjectDef(objectId);
|
||||
if (def == null) {
|
||||
return new int[] {1, 1};
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.rebotted.event.CycleEvent;
|
||||
import com.rebotted.event.CycleEventContainer;
|
||||
import com.rebotted.event.CycleEventHandler;
|
||||
import com.rebotted.game.players.Player;
|
||||
import com.rebotted.world.clip.ObjectDef;
|
||||
import com.rebotted.world.clip.ObjectDefinition;
|
||||
|
||||
/**
|
||||
* Levers
|
||||
@@ -22,7 +22,7 @@ public class Levers {
|
||||
};
|
||||
|
||||
public static void pullLever(final Player player, int objectType) {
|
||||
String objectName = ObjectDef.getObjectDef(objectType).name;
|
||||
String objectName = ObjectDefinition.getObjectDef(objectType).name;
|
||||
for (final int[] element : LEVERS) {
|
||||
if (player.objectX == element[0] && player.objectY == element[1] && objectName.equalsIgnoreCase("Lever")) {
|
||||
if (System.currentTimeMillis() - player.leverDelay > 3750) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import com.rebotted.game.content.traveling.DesertHeat;
|
||||
import com.rebotted.game.objects.ObjectDefaults;
|
||||
import com.rebotted.game.players.Player;
|
||||
import com.rebotted.util.Misc;
|
||||
import com.rebotted.world.clip.ObjectDef;
|
||||
import com.rebotted.world.clip.ObjectDefinition;
|
||||
import com.rebotted.world.clip.Region;
|
||||
|
||||
public class OtherObjects {
|
||||
@@ -117,7 +117,7 @@ public class OtherObjects {
|
||||
}
|
||||
|
||||
private static void handleSpecialObject(final Player player, final int objectType) {
|
||||
String objectName = ObjectDef.getObjectDef(objectType).name;
|
||||
String objectName = ObjectDefinition.getObjectDef(objectType).name;
|
||||
if (objectType == 160 && player.getX() == 3096) {
|
||||
player.getPlayerAssistant().walkTo(0, 1);
|
||||
CycleEventHandler.getSingleton().addEvent(player, new CycleEvent() {
|
||||
|
||||
Reference in new issue
Block a user