Hey,
So something's wrong with my ObjectHandler. Every object I click; whether it's a door, a tree, a thieving stall, a portal, whatever, it takes the same action as what happens when the QBD object is clicked. (Spawns the QBD, etc.)
This is the code around the QBD object:
Code:
} else if (id == 41911) {
return;
}
World.QBD = true;
WorldTasksManager.schedule(new WorldTask() {
int loop;
@Override
public void run() {
if (loop == 0) {
player.setFreezeDelay(8);
player.setNextWorldTile(new WorldTile(3534, 5202, 0));
player.setNextFaceWorldTile(new WorldTile(3535, 5203, 0));
player.setNextForceTalk(new ForceTalk("I do believe this is the entrance to the Queen Black Dragon..."));
} else if (loop == 2) {
player.setNextAnimation(new Animation(733));
player.setNextForceTalk(new ForceTalk("I guess I'll light this..."));
} else if (loop == 7){
NPC n = new QBD(15507, new WorldTile(3533, 5199, 0), -1, true, true);
World.QBDN = n;
n.setNextAnimation(new Animation(16721));
player.setNextForceTalk(new ForceTalk("What the..."));
} else if (loop == 8){
player.setNextWorldTile(new WorldTile(3535, 5190, 0));
player.setNextFaceWorldTile(new WorldTile(3535, 5191, 0));
player.sm("Good luck against the Queen Black Dragon!");
stop();
}
loop++;
}
}, 0, 1);
if (id == 4277) {
Does anyone recognize anything wrong in this? Because it seems these actions duplicated to every object.