Skip to content

Commit c712097

Browse files
committed
Fixes to immobilization, wyverns, bug fixes
1 parent 5edc32d commit c712097

File tree

16 files changed

+12189
-14834
lines changed

16 files changed

+12189
-14834
lines changed

data/game/def/npcs/npc_combat.json

Lines changed: 11885 additions & 14677 deletions
Large diffs are not rendered by default.

src/main/java/io/luna/game/action/ActionQueue.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
import java.util.Queue;
1414
import java.util.Set;
1515

16+
import static com.google.common.base.Preconditions.checkState;
17+
1618
/**
1719
* Per-mob action scheduler responsible for registering and processing {@link Action}s each game cycle.
1820
* <p>
@@ -110,7 +112,9 @@ public void submit(Action<?> action) {
110112
* @param action The action to submit if its concrete type is not already active.
111113
* @return {@code true} if the action was not already active, and therefore submitted.
112114
*/
115+
@Deprecated // todo remove, actions should monitor their own lifecycle
113116
public boolean submitIfAbsent(Action<?> action) {
117+
checkState(!action.getClass().isAnonymousClass(), "Anonymous classes cannot be used with submitIfAbsent.");
114118
String type = action.getClass().getName();
115119
if (!types.contains(type)) {
116120
submit(action);

0 commit comments

Comments
 (0)