Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ protected void onTick() {
}

if (tick == nextUpTick) {
handleBloatUp(bloat.getNpc(), tick);
handleBloatUp(tick);
} else if (currentDownTick == BLOAT_STOMP_TICK && bloat != null) {
WorldPoint point = getWorldLocation(bloat);
dispatchEvent(new NpcAttackEvent(getStage(), tick, point, NpcAttack.TOB_BLOAT_STOMP, bloat));
Expand Down Expand Up @@ -174,7 +174,7 @@ protected void onAnimation(AnimationChanged event) {
if (npc.getAnimation() == BLOAT_DOWN_ANIMATION) {
handleBloatDown(npc, tick);
} else if (state == State.DOWN && npc.getAnimation() == -1) {
handleBloatUp(npc, tick);
handleBloatUp(tick);
}
}

Expand All @@ -201,12 +201,12 @@ private void handleBloatDown(NPC bloat, int tick) {
dispatchEvent(new BloatDownEvent(tick, getWorldLocation(bloat), currentDown, tick - lastUpTick));
}

private void handleBloatUp(NPC bloat, int tick) {
private void handleBloatUp(int tick) {
lastUpTick = tick;
nextUpTick = -1;
state = State.WALKING;
log.debug("Bloat up {} tick {}", currentDown, lastUpTick);

dispatchEvent(new BloatUpEvent(tick, getWorldLocation(bloat)));
dispatchEvent(new BloatUpEvent(tick));
}
}
4 changes: 2 additions & 2 deletions src/main/java/io/blert/core/DataTracker.java
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ private void updatePlayers() {

client.getTopLevelWorldView().players().forEach(player -> {
Raider raider = challenge.getRaider(player.getName());
if (raider == null || raider.isDead()) {
if (raider == null || raider.isDead() && raider.getDeathTick() < tick) {
return;
}

Expand All @@ -478,7 +478,7 @@ private void updatePlayers() {
}

private void checkForPlayerActions(@NonNull Raider raider) {
if (raider.isDead() && raider.getDeathTick() != getTick()) {
if (raider.isDead() && raider.getDeathTick() < getTick()) {
return;
}

Expand Down
5 changes: 2 additions & 3 deletions src/main/java/io/blert/events/tob/BloatUpEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@

import io.blert.challenges.tob.rooms.Room;
import io.blert.events.EventType;
import net.runelite.api.coords.WorldPoint;

public class BloatUpEvent extends TobEvent {
public BloatUpEvent(int tick, WorldPoint point) {
super(EventType.BLOAT_UP, Room.BLOAT, tick, point);
public BloatUpEvent(int tick) {
super(EventType.BLOAT_UP, Room.BLOAT, tick, null);
Comment thread
frolv marked this conversation as resolved.
}

@Override
Expand Down
Loading