mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-05 08:39:04 +00:00
Various Changes (#614)
* Clean Old Log Files * Various Changes * Moved minutes.log to log folder * Made SERVER_LOG_DIR constant * Moved FILE_SYSTEM_DIR to GameConstants & Deleted org.apollo.jagcached.Constants * Removed unused minutes.log from data/data * Removed Duplicate RSAKeyGen * Moved RSAKeyGen from com.rs2.net.rsa to com.rs2.util.rsa * Removed data/net.xml & Created Moved NetworkConstants.java * Add HTTP & Jaggrab Port's to ConfigLoader * IntelliJ Reformat ConfigLoader.java * Fix Mistake * Attempt #2 * Woops, wrong port
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package com.rs2.game.npcs;
|
||||
|
||||
import com.rs2.GameConstants;
|
||||
import com.rs2.Constants;
|
||||
import com.rs2.game.content.StaticNpcList;
|
||||
import com.rs2.game.content.quests.QuestAssistant;
|
||||
import com.rs2.game.content.skills.core.Fishing;
|
||||
@@ -207,10 +207,10 @@ public class NpcActions {
|
||||
player.getDialogueHandler().sendDialogues(1349, npcType);
|
||||
break;
|
||||
case MARTIN_THWAIT:
|
||||
if (player.playerLevel[GameConstants.THIEVING] > 98) {
|
||||
if (player.playerLevel[Constants.THIEVING] > 98) {
|
||||
player.getShopAssistant().openShop(118);
|
||||
} else if (player.playerLevel[GameConstants.THIEVING] > 49
|
||||
&& player.playerLevel[GameConstants.AGILITY] > 49) {
|
||||
} else if (player.playerLevel[Constants.THIEVING] > 49
|
||||
&& player.playerLevel[Constants.AGILITY] > 49) {
|
||||
player.getShopAssistant().openShop(118);
|
||||
} else {
|
||||
player.getPacketSender().sendMessage(
|
||||
@@ -524,7 +524,7 @@ public class NpcActions {
|
||||
}
|
||||
break;
|
||||
case GERTRUDE:
|
||||
if (player.playerLevel[GameConstants.FISHING] < 4) {
|
||||
if (player.playerLevel[Constants.FISHING] < 4) {
|
||||
player.getDialogueHandler().sendStatement(
|
||||
"You don't have the requirements to do this quest.");
|
||||
return;
|
||||
@@ -1017,10 +1017,10 @@ public class NpcActions {
|
||||
Tanning.sendTanningInterface(player);
|
||||
break;
|
||||
case MARTIN_THWAIT:
|
||||
if (player.playerLevel[GameConstants.THIEVING] > 98) {
|
||||
if (player.playerLevel[Constants.THIEVING] > 98) {
|
||||
player.getShopAssistant().openShop(118);
|
||||
} else if (player.playerLevel[GameConstants.THIEVING] > 49
|
||||
&& player.playerLevel[GameConstants.AGILITY] > 49) {
|
||||
} else if (player.playerLevel[Constants.THIEVING] > 49
|
||||
&& player.playerLevel[Constants.AGILITY] > 49) {
|
||||
player.getShopAssistant().openShop(118);
|
||||
} else {
|
||||
player.getPacketSender().sendMessage(
|
||||
@@ -1126,7 +1126,7 @@ public class NpcActions {
|
||||
player.getPlayerAssistant().startTeleport(2911, 4832, 0, type);
|
||||
break;
|
||||
case MAGE_OF_ZAMORAK:
|
||||
if (player.playerLevel[GameConstants.RUNECRAFTING] < 35) {
|
||||
if (player.playerLevel[Constants.RUNECRAFTING] < 35) {
|
||||
player.getPacketSender().sendMessage("You need a Runecrafting level of 35 to enter the Abyss.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package com.rs2.game.npcs;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.rs2.GameConstants;
|
||||
import com.rs2.Constants;
|
||||
import com.rs2.GameEngine;
|
||||
import com.rs2.event.CycleEvent;
|
||||
import com.rs2.event.CycleEventContainer;
|
||||
@@ -159,7 +159,7 @@ public class NpcHandler {
|
||||
|
||||
public static boolean isUndead(int index) {
|
||||
String name = getNpcListName(npcs[index].npcType);
|
||||
for (String s : GameConstants.UNDEAD) {
|
||||
for (String s : Constants.UNDEAD) {
|
||||
if (s.equalsIgnoreCase(name)) {
|
||||
return true;
|
||||
}
|
||||
@@ -615,13 +615,13 @@ public class NpcHandler {
|
||||
npcs[i].killerId = 0;
|
||||
if (npcs[i].spawnedBy == 0) {
|
||||
if (npcs[i].absX > npcs[i].makeX
|
||||
+ GameConstants.NPC_RANDOM_WALK_DISTANCE
|
||||
+ Constants.NPC_RANDOM_WALK_DISTANCE
|
||||
|| npcs[i].absX < npcs[i].makeX
|
||||
- GameConstants.NPC_RANDOM_WALK_DISTANCE
|
||||
- Constants.NPC_RANDOM_WALK_DISTANCE
|
||||
|| npcs[i].absY > npcs[i].makeY
|
||||
+ GameConstants.NPC_RANDOM_WALK_DISTANCE
|
||||
+ Constants.NPC_RANDOM_WALK_DISTANCE
|
||||
|| npcs[i].absY < npcs[i].makeY
|
||||
- GameConstants.NPC_RANDOM_WALK_DISTANCE) {
|
||||
- Constants.NPC_RANDOM_WALK_DISTANCE) {
|
||||
npcs[i].walkingHome = true;
|
||||
}
|
||||
}
|
||||
@@ -787,8 +787,8 @@ public class NpcHandler {
|
||||
}
|
||||
if (npcs[i].npcType > 3726 && npcs[i].npcType < 3732) {
|
||||
int damage = 10 + Misc.random(10);
|
||||
player.playerLevel[GameConstants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[GameConstants.HITPOINTS]) - damage;
|
||||
player.getPlayerAssistant().refreshSkill(GameConstants.HITPOINTS);
|
||||
player.playerLevel[Constants.HITPOINTS] = player.getPlayerAssistant().getLevelForXP(player.playerXP[Constants.HITPOINTS]) - damage;
|
||||
player.getPlayerAssistant().refreshSkill(Constants.HITPOINTS);
|
||||
player.handleHitMask(damage);
|
||||
}
|
||||
if (npcs[i].npcType == 655) {
|
||||
@@ -1117,7 +1117,7 @@ public class NpcHandler {
|
||||
{
|
||||
scroll = 2679;
|
||||
}
|
||||
if (scroll >= 0 && GameConstants.CLUES_ENABLED) {
|
||||
if (scroll >= 0 && Constants.CLUES_ENABLED) {
|
||||
GameEngine.itemHandler.createGroundItem(c, scroll, npcs[i].absX, npcs[i].absY, 1, c.playerId);
|
||||
}
|
||||
}
|
||||
@@ -1232,10 +1232,10 @@ public class NpcHandler {
|
||||
int y = npc.absY;
|
||||
Player player = PlayerHandler.players[playerId];
|
||||
if (npcs[i].spawnedBy > 0
|
||||
|| x < npc.makeX + GameConstants.NPC_FOLLOW_DISTANCE
|
||||
&& x > npc.makeX - GameConstants.NPC_FOLLOW_DISTANCE
|
||||
&& y < npc.makeY + GameConstants.NPC_FOLLOW_DISTANCE
|
||||
&& y > npc.makeY - GameConstants.NPC_FOLLOW_DISTANCE) {
|
||||
|| x < npc.makeX + Constants.NPC_FOLLOW_DISTANCE
|
||||
&& x > npc.makeX - Constants.NPC_FOLLOW_DISTANCE
|
||||
&& y < npc.makeY + Constants.NPC_FOLLOW_DISTANCE
|
||||
&& y > npc.makeY - Constants.NPC_FOLLOW_DISTANCE) {
|
||||
if (npc.heightLevel == player.heightLevel) {
|
||||
if (player != null && npc != null) {
|
||||
if (playerX > x && playerY < y) {
|
||||
@@ -1394,9 +1394,9 @@ public class NpcHandler {
|
||||
|| npcs[i].npcType == 1160) {
|
||||
if (damage > 0) {
|
||||
if (c != null) {
|
||||
if (c.playerLevel[GameConstants.PRAYER] > 0) {
|
||||
c.playerLevel[GameConstants.PRAYER]--;
|
||||
c.getPlayerAssistant().refreshSkill(GameConstants.PRAYER);
|
||||
if (c.playerLevel[Constants.PRAYER] > 0) {
|
||||
c.playerLevel[Constants.PRAYER]--;
|
||||
c.getPlayerAssistant().refreshSkill(Constants.PRAYER);
|
||||
c.getPlayerAssistant().appendPoison(12);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user