mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-06 08:39:06 +00:00
Cleanup part 1 (#213)
* Clean up part 1 - Removed lots of dead code - Removed unncessary files not in use - Cleaned up small bits of code - Removed a few warnings - Server.java ---> GameEngine.java - Constants.java ---> GameConstants.java * Cape Dye Rewrote cape dying * Packaging - redone ----> com.rebotted * PacketSender/clean up - ActionSender ---> PacketSender - Moved many more packets to packetsender - Cleaned up more dead code * Merge Client/Player - Merged Client.java with Player.java (both were doing same thing so redundant to have both) - Removed some more dead code - Tidy a few small things up * Quests/more clean up - Removed more dead code - Made quests static in order to clean them up a bit * More cleanup - Removed some more of the dead quest code - Correcting naming of some of the shop variables
This commit is contained in:
committed by
Daniel Ginovker
parent
3d1ae1b288
commit
d876a923b9
+119
@@ -0,0 +1,119 @@
|
||||
package com.rebotted.game.content.skills.agility;
|
||||
|
||||
import com.rebotted.event.CycleEvent;
|
||||
import com.rebotted.event.CycleEventContainer;
|
||||
import com.rebotted.event.CycleEventHandler;
|
||||
import com.rebotted.game.players.Player;
|
||||
|
||||
public class WildernessAgility {
|
||||
|
||||
private final Player c;
|
||||
|
||||
public WildernessAgility(Player player) {
|
||||
this.c = player;
|
||||
}
|
||||
|
||||
public static final int WILDERNESS_PIPE_OBJECT = 2288,
|
||||
WILDERNESS_SWING_ROPE_OBJECT = 2283,
|
||||
WILDERNESS_STEPPING_STONE_OBJECT = 2311,
|
||||
WILDERNESS_LOG_BALANCE_OBJECT = 2297,
|
||||
WILDERNESS_ROCKS_OBJECT = 2328;
|
||||
|
||||
public boolean wildernessCourse(final int objectId) {
|
||||
switch (objectId) {
|
||||
case WILDERNESS_PIPE_OBJECT: // pipe
|
||||
if (c.getAgility().checkLevel(objectId)) {
|
||||
return false;
|
||||
}
|
||||
if (c.getAgility().hotSpot(3004, 3937)) {
|
||||
c.getAgility().walk(0, 13,
|
||||
c.getAgility().getAnimation(objectId), 748);
|
||||
} else if (c.absX == 3004 && c.absY > 3937 && c.absY < 3950) {
|
||||
c.getPlayerAssistant().movePlayer(3004, 3950, 0);
|
||||
}
|
||||
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility);
|
||||
c.getAgility().resetAgilityProgress();
|
||||
c.getAgility().agilityProgress[0] = true;
|
||||
return true;
|
||||
case WILDERNESS_SWING_ROPE_OBJECT:
|
||||
if (c.getAgility().checkLevel(objectId)) {
|
||||
return false;
|
||||
}
|
||||
if (c.getAgility().hotSpot(3005, 3953)) {
|
||||
c.getAgility().walk(0, 1,
|
||||
c.getAgility().getAnimation(objectId), -1);
|
||||
if (c.getAgility().agilityProgress[0] == true) {
|
||||
c.getAgility().agilityProgress[1] = true;
|
||||
}
|
||||
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility);
|
||||
CycleEventHandler.getSingleton().addEvent(c, new CycleEvent() {
|
||||
@Override
|
||||
public void execute(CycleEventContainer container) {
|
||||
if (c.disconnected) {
|
||||
container.stop();
|
||||
return;
|
||||
}
|
||||
c.getPlayerAssistant().movePlayer(3005, 3958, 0);
|
||||
container.stop();
|
||||
}
|
||||
@Override
|
||||
public void stop() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}, 1);
|
||||
}
|
||||
return true;
|
||||
case WILDERNESS_STEPPING_STONE_OBJECT:
|
||||
if (c.getAgility().checkLevel(objectId)) {
|
||||
return false;
|
||||
}
|
||||
if (c.getAgility().hotSpot(3002, 3960)) {
|
||||
c.getAgility().walk(-6, 0,
|
||||
c.getAgility().getAnimation(objectId), -1);
|
||||
} else if (c.absX > 2996 && c.absX < 3002 && c.absY == 3960) {
|
||||
c.getPlayerAssistant().movePlayer(2996, 3960, 0);
|
||||
}
|
||||
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility);
|
||||
c.getAgility().steppingStone = 6;
|
||||
c.getAgility().steppingStoneTimer = 2;
|
||||
c.getAgility().steppingStone--;
|
||||
if (c.getAgility().agilityProgress[2] == true) {
|
||||
c.getAgility().agilityProgress[3] = true;
|
||||
}
|
||||
return true;
|
||||
|
||||
case WILDERNESS_LOG_BALANCE_OBJECT:
|
||||
if (c.getAgility().checkLevel(objectId)) {
|
||||
return false;
|
||||
}
|
||||
if (c.getAgility().hotSpot(3002, 3945)) {
|
||||
c.getAgility().walk(-8, 0,
|
||||
c.getAgility().getAnimation(objectId), -1);
|
||||
if (c.getAgility().agilityProgress[3] == true) {
|
||||
c.getAgility().agilityProgress[5] = true;
|
||||
}
|
||||
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility);
|
||||
} else if (c.absX > 2994 && c.absX < 3002 && c.absY == 3945) {
|
||||
c.getPlayerAssistant().movePlayer(2994, 3945, 0);
|
||||
}
|
||||
return true;
|
||||
|
||||
case WILDERNESS_ROCKS_OBJECT:
|
||||
if (c.getAgility().checkLevel(objectId)) {
|
||||
return false;
|
||||
}
|
||||
c.getAgility().walk(0, -4, c.getAgility().getAnimation(objectId), -1);
|
||||
if (c.getAgility().agilityProgress[5] == true) {
|
||||
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility);
|
||||
c.getAgility().lapBonus = 2400 / 30;
|
||||
c.getAgility().lapFinished();
|
||||
} else {
|
||||
c.getPlayerAssistant().addSkillXP(c.getAgility().getXp(objectId), c.playerAgility);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user