mirror of
https://github.com/moparisthebest/MoparClassic
synced 2024-11-12 04:05:12 -05:00
Some organization and cleanup
This commit is contained in:
parent
a1d0b67cd8
commit
cc7343bf5d
@ -3,8 +3,8 @@
|
||||
|
||||
<properties>
|
||||
<comment>Stores aliases for the XStream engine</comment>
|
||||
<entry key="PacketHandler">org.moparscape.msc.gs.phandler.PacketHandlerDef</entry>
|
||||
<entry key="NpcHandler">org.moparscape.msc.gs.npchandler.NpcHandlerDef</entry>
|
||||
<entry key="PacketHandler">org.moparscape.msc.gs.phandler.PacketHandlerDefinition</entry>
|
||||
<entry key="NpcHandler">org.moparscape.msc.gs.npchandler.NpcHandlerDefinition</entry>
|
||||
|
||||
<entry key="Point">org.moparscape.msc.gs.model.Point</entry>
|
||||
<entry key="TelePoint">org.moparscape.msc.gs.model.TelePoint</entry>
|
||||
@ -12,41 +12,41 @@
|
||||
<entry key="Shop">org.moparscape.msc.gs.model.Shop</entry>
|
||||
<entry key="InvItem">org.moparscape.msc.gs.model.InvItem</entry>
|
||||
|
||||
<entry key="CerterDef">org.moparscape.msc.gs.external.CerterDef</entry>
|
||||
<entry key="CertDef">org.moparscape.msc.gs.external.CertDef</entry>
|
||||
|
||||
<entry key="GameObjectLoc">org.moparscape.msc.gs.external.GameObjectLoc</entry>
|
||||
<entry key="ItemLoc">org.moparscape.msc.gs.external.ItemLoc</entry>
|
||||
<entry key="NPCLoc">org.moparscape.msc.gs.external.NPCLoc</entry>
|
||||
<entry key="GameObjectLoc">org.moparscape.msc.gs.model.definition.GameObjectLoc</entry>
|
||||
<entry key="ItemLoc">org.moparscape.msc.gs.model.definition.ItemLoc</entry>
|
||||
<entry key="NPCLoc">org.moparscape.msc.gs.model.definition.NPCLoc</entry>
|
||||
<entry key="GameObjectDef">org.moparscape.msc.gs.model.definition.GameObjectDefinition</entry>
|
||||
<entry key="ItemDef">org.moparscape.msc.gs.model.definition.ItemDefinition</entry>
|
||||
<entry key="NPCDef">org.moparscape.msc.gs.model.definition.NPCDefinition</entry>
|
||||
|
||||
<entry key="TileDef">org.moparscape.msc.gs.external.TileDef</entry>
|
||||
<entry key="GameObjectDef">org.moparscape.msc.gs.external.GameObjectDef</entry>
|
||||
<entry key="DoorDef">org.moparscape.msc.gs.external.DoorDef</entry>
|
||||
<entry key="ItemDef">org.moparscape.msc.gs.external.ItemDef</entry>
|
||||
<entry key="PrayerDef">org.moparscape.msc.gs.external.PrayerDef</entry>
|
||||
<entry key="SpellDef">org.moparscape.msc.gs.external.SpellDef</entry>
|
||||
<entry key="NPCDef">org.moparscape.msc.gs.external.NPCDef</entry>
|
||||
<entry key="TileDef">org.moparscape.msc.gs.model.definition.extra.TileDefinition</entry>
|
||||
<entry key="DoorDef">org.moparscape.msc.gs.model.definition.extra.DoorDefinition</entry>
|
||||
<entry key="CerterDef">org.moparscape.msc.gs.model.definition.CerterDefinition</entry>
|
||||
<entry key="CertDef">org.moparscape.msc.gs.model.definition.CertDefinition</entry>
|
||||
|
||||
<entry key="ItemCraftingDef">org.moparscape.msc.gs.external.ItemCraftingDef</entry>
|
||||
<entry key="ItemHerbSecond">org.moparscape.msc.gs.external.ItemHerbSecond</entry>
|
||||
<entry key="ItemDartTipDef">org.moparscape.msc.gs.external.ItemDartTipDef</entry>
|
||||
<entry key="ItemGemDef">org.moparscape.msc.gs.external.ItemGemDef</entry>
|
||||
<entry key="ItemLogCutDef">org.moparscape.msc.gs.external.ItemLogCutDef</entry>
|
||||
<entry key="ItemBowStringDef">org.moparscape.msc.gs.external.ItemBowStringDef</entry>
|
||||
<entry key="ItemArrowHeadDef">org.moparscape.msc.gs.external.ItemArrowHeadDef</entry>
|
||||
<entry key="FiremakingDef">org.moparscape.msc.gs.external.FiremakingDef</entry>
|
||||
<entry key="ReqOreDef">org.moparscape.msc.gs.external.ReqOreDef</entry>
|
||||
<entry key="ItemWieldableDef">org.moparscape.msc.gs.external.ItemWieldableDef</entry>
|
||||
<entry key="ItemUnIdentHerbDef">org.moparscape.msc.gs.external.ItemUnIdentHerbDef</entry>
|
||||
<entry key="ItemHerbDef">org.moparscape.msc.gs.external.ItemHerbDef</entry>
|
||||
<entry key="ItemCookingDef">org.moparscape.msc.gs.external.ItemCookingDef</entry>
|
||||
<entry key="ItemSmeltingDef">org.moparscape.msc.gs.external.ItemSmeltingDef</entry>
|
||||
<entry key="ItemSmithingDef">org.moparscape.msc.gs.external.ItemSmithingDef</entry>
|
||||
<entry key="ObjectMiningDef">org.moparscape.msc.gs.external.ObjectMiningDef</entry>
|
||||
<entry key="ObjectWoodcuttingDef">org.moparscape.msc.gs.external.ObjectWoodcuttingDef</entry>
|
||||
<entry key="ObjectFishingDef">org.moparscape.msc.gs.external.ObjectFishingDef</entry>
|
||||
<entry key="ObjectFishDef">org.moparscape.msc.gs.external.ObjectFishDef</entry>
|
||||
<entry key="ItemDropDef">org.moparscape.msc.gs.external.ItemDropDef</entry>
|
||||
<entry key="AgilityDef">org.moparscape.msc.gs.external.AgilityDef</entry>
|
||||
<entry key="AgilityCourseDef">org.moparscape.msc.gs.external.AgilityCourseDef</entry>
|
||||
<entry key="PrayerDef">org.moparscape.msc.gs.model.definition.PrayerDefinition</entry>
|
||||
<entry key="SpellDef">org.moparscape.msc.gs.model.definition.SpellDefinition</entry>
|
||||
<entry key="ItemCraftingDef">org.moparscape.msc.gs.model.definition.ItemCraftingDefinition</entry>
|
||||
<entry key="ItemHerbSecond">org.moparscape.msc.gs.model.definition.ItemHerbSecondDefinition</entry>
|
||||
<entry key="ItemDartTipDef">org.moparscape.msc.gs.model.definition.ItemDartTipDefinition</entry>
|
||||
<entry key="ItemGemDef">org.moparscape.msc.gs.model.definition.ItemGemDefinition</entry>
|
||||
<entry key="ItemLogCutDef">org.moparscape.msc.gs.model.definition.ItemLogCutDefinition</entry>
|
||||
<entry key="ItemBowStringDef">org.moparscape.msc.gs.model.definition.ItemBowStringDefinition</entry>
|
||||
<entry key="ItemArrowHeadDef">org.moparscape.msc.gs.model.definition.ItemArrowHeadDefinition</entry>
|
||||
<entry key="FiremakingDef">org.moparscape.msc.gs.model.definition.FiremakingDefinition</entry>
|
||||
<entry key="ReqOreDef">org.moparscape.msc.gs.model.definition.ReqOreDefinition</entry>
|
||||
<entry key="ItemWieldableDef">org.moparscape.msc.gs.model.definition.ItemWieldableDefinition</entry>
|
||||
<entry key="ItemUnIdentHerbDef">org.moparscape.msc.gs.model.definition.ItemUnIdentHerbDefinition</entry>
|
||||
<entry key="ItemHerbDef">org.moparscape.msc.gs.model.definition.ItemHerbDefinition</entry>
|
||||
<entry key="ItemCookingDef">org.moparscape.msc.gs.model.definition.ItemCookingDefinition</entry>
|
||||
<entry key="ItemSmeltingDef">org.moparscape.msc.gs.model.definition.ItemSmeltingDefinition</entry>
|
||||
<entry key="ItemSmithingDef">org.moparscape.msc.gs.model.definition.ItemSmithingDefinition</entry>
|
||||
<entry key="ObjectMiningDef">org.moparscape.msc.gs.model.definition.ObjectMiningDefinition</entry>
|
||||
<entry key="ObjectWoodcuttingDef">org.moparscape.msc.gs.model.definition.ObjectWoodcuttingDefinition</entry>
|
||||
<entry key="ObjectFishingDef">org.moparscape.msc.gs.model.definition.ObjectFishingDefinition</entry>
|
||||
<entry key="ObjectFishDef">org.moparscape.msc.gs.model.definition.ObjectFishDefinition</entry>
|
||||
<entry key="ItemDropDef">org.moparscape.msc.gs.model.definition.ItemDropDefinition</entry>
|
||||
<entry key="AgilityDef">org.moparscape.msc.gs.model.definition.AgilityDefinition</entry>
|
||||
<entry key="AgilityCourseDef">org.moparscape.msc.gs.model.definition.AgilityCourseDefinition</entry>
|
||||
</properties>
|
||||
|
@ -4,15 +4,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.FiremakingDef;
|
||||
import org.moparscape.msc.gs.external.GameObjectLoc;
|
||||
import org.moparscape.msc.gs.external.ItemLoc;
|
||||
import org.moparscape.msc.gs.external.NPCLoc;
|
||||
import org.moparscape.msc.gs.external.ObjectFishDef;
|
||||
import org.moparscape.msc.gs.external.ObjectMiningDef;
|
||||
import org.moparscape.msc.gs.external.ObjectWoodcuttingDef;
|
||||
import org.moparscape.msc.gs.external.SpellDef;
|
||||
import org.moparscape.msc.gs.model.Entity;
|
||||
import org.moparscape.msc.gs.model.GameObject;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
@ -21,6 +12,15 @@ import org.moparscape.msc.gs.model.Npc;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.Point;
|
||||
import org.moparscape.msc.gs.model.Shop;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.FiremakingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectFishDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectMiningDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.SpellDefinition;
|
||||
import org.moparscape.msc.gs.tools.DataConversions;
|
||||
|
||||
public class Formulae {
|
||||
@ -514,7 +514,7 @@ public class Formulae {
|
||||
/**
|
||||
* Should the spell cast or fail?
|
||||
*/
|
||||
public static boolean castSpell(SpellDef def, int magicLevel, int magicEquip) {
|
||||
public static boolean castSpell(SpellDefinition def, int magicLevel, int magicEquip) {
|
||||
int levelDiff = magicLevel - def.getReqLevel();
|
||||
|
||||
if (magicEquip >= 30 && levelDiff >= 5)
|
||||
@ -709,9 +709,9 @@ public class Formulae {
|
||||
/**
|
||||
* Decide what fish, if any, we should get from the water
|
||||
*/
|
||||
public static ObjectFishDef getFish(int waterId, int fishingLevel, int click) {
|
||||
ArrayList<ObjectFishDef> fish = new ArrayList<ObjectFishDef>();
|
||||
for (ObjectFishDef def : EntityHandler.getObjectFishingDef(waterId,
|
||||
public static ObjectFishDefinition getFish(int waterId, int fishingLevel, int click) {
|
||||
ArrayList<ObjectFishDefinition> fish = new ArrayList<ObjectFishDefinition>();
|
||||
for (ObjectFishDefinition def : EntityHandler.getObjectFishingDef(waterId,
|
||||
click).getFishDefs()) {
|
||||
if (fishingLevel >= def.getReqLevel()) {
|
||||
fish.add(def);
|
||||
@ -720,7 +720,7 @@ public class Formulae {
|
||||
if (fish.size() <= 0) {
|
||||
return null;
|
||||
}
|
||||
ObjectFishDef thisFish = fish.get(DataConversions.random(0,
|
||||
ObjectFishDefinition thisFish = fish.get(DataConversions.random(0,
|
||||
fish.size() - 1));
|
||||
int levelDiff = fishingLevel - thisFish.getReqLevel();
|
||||
if (levelDiff < 0) {
|
||||
@ -779,7 +779,7 @@ public class Formulae {
|
||||
/**
|
||||
* Should we get a log from the tree?
|
||||
*/
|
||||
public static boolean getLog(ObjectWoodcuttingDef def, int woodcutLevel,
|
||||
public static boolean getLog(ObjectWoodcuttingDefinition def, int woodcutLevel,
|
||||
int axeId) {
|
||||
int levelDiff = woodcutLevel - def.getReqLevel();
|
||||
if (levelDiff < 0) {
|
||||
@ -901,7 +901,7 @@ public class Formulae {
|
||||
/**
|
||||
* Should we can get an ore from the rock?
|
||||
*/
|
||||
public static boolean getOre(ObjectMiningDef def, int miningLevel, int axeId) {
|
||||
public static boolean getOre(ObjectMiningDefinition def, int miningLevel, int axeId) {
|
||||
|
||||
int levelDiff = miningLevel - def.getReqLevel();
|
||||
if (levelDiff > 50)
|
||||
@ -1137,15 +1137,15 @@ public class Formulae {
|
||||
int y = -1;
|
||||
if (objs.length == 1) {
|
||||
Object obj = objs[0];
|
||||
if (obj instanceof GameObjectLoc) {
|
||||
x = ((GameObjectLoc) obj).x;
|
||||
y = ((GameObjectLoc) obj).y;
|
||||
} else if ((obj instanceof ItemLoc)) {
|
||||
x = ((ItemLoc) obj).x;
|
||||
y = ((ItemLoc) obj).y;
|
||||
} else if (obj instanceof NPCLoc) {
|
||||
x = ((NPCLoc) obj).startX;
|
||||
y = ((NPCLoc) obj).startY;
|
||||
if (obj instanceof GameObjectLocationDefinition) {
|
||||
x = ((GameObjectLocationDefinition) obj).x;
|
||||
y = ((GameObjectLocationDefinition) obj).y;
|
||||
} else if ((obj instanceof ItemLocationDefinition)) {
|
||||
x = ((ItemLocationDefinition) obj).x;
|
||||
y = ((ItemLocationDefinition) obj).y;
|
||||
} else if (obj instanceof NPCLocationDefinition) {
|
||||
x = ((NPCLocationDefinition) obj).startX;
|
||||
y = ((NPCLocationDefinition) obj).startY;
|
||||
}
|
||||
} else {
|
||||
if (objs[0] instanceof Integer && objs[1] instanceof Integer) {
|
||||
@ -1190,7 +1190,7 @@ public class Formulae {
|
||||
/**
|
||||
* Should the fire light or fail?
|
||||
*/
|
||||
public static boolean lightLogs(FiremakingDef def, int firemakingLvl) {
|
||||
public static boolean lightLogs(FiremakingDefinition def, int firemakingLvl) {
|
||||
int levelDiff = firemakingLvl - def.getRequiredLevel();
|
||||
if (levelDiff < 0) {
|
||||
return false;
|
||||
|
@ -3,6 +3,8 @@ package org.moparscape.msc.gs.connection;
|
||||
import org.apache.mina.filter.codec.ProtocolCodecFactory;
|
||||
import org.apache.mina.filter.codec.ProtocolDecoder;
|
||||
import org.apache.mina.filter.codec.ProtocolEncoder;
|
||||
import org.moparscape.msc.gs.connection.codec.LSProtocolDecoder;
|
||||
import org.moparscape.msc.gs.connection.codec.LSProtocolEncoder;
|
||||
|
||||
/**
|
||||
* Provides access to the protocol encoders and decoders for the LS protocol.
|
||||
|
@ -3,6 +3,8 @@ package org.moparscape.msc.gs.connection;
|
||||
import org.apache.mina.filter.codec.ProtocolCodecFactory;
|
||||
import org.apache.mina.filter.codec.ProtocolDecoder;
|
||||
import org.apache.mina.filter.codec.ProtocolEncoder;
|
||||
import org.moparscape.msc.gs.connection.codec.RSCProtocolDecoder;
|
||||
import org.moparscape.msc.gs.connection.codec.RSCProtocolEncoder;
|
||||
|
||||
/**
|
||||
* Provides access to the protocol encoders and decoders for the RSC protocol.
|
||||
|
@ -1,9 +1,10 @@
|
||||
package org.moparscape.msc.gs.connection;
|
||||
package org.moparscape.msc.gs.connection.codec;
|
||||
|
||||
import org.apache.mina.common.ByteBuffer;
|
||||
import org.apache.mina.common.IoSession;
|
||||
import org.apache.mina.filter.codec.CumulativeProtocolDecoder;
|
||||
import org.apache.mina.filter.codec.ProtocolDecoderOutput;
|
||||
import org.moparscape.msc.gs.connection.LSPacket;
|
||||
|
||||
/**
|
||||
* A decoder for the LS protocol. Parses the incoming data from an IoSession and
|
@ -1,9 +1,10 @@
|
||||
package org.moparscape.msc.gs.connection;
|
||||
package org.moparscape.msc.gs.connection.codec;
|
||||
|
||||
import org.apache.mina.common.ByteBuffer;
|
||||
import org.apache.mina.common.IoSession;
|
||||
import org.apache.mina.filter.codec.ProtocolEncoder;
|
||||
import org.apache.mina.filter.codec.ProtocolEncoderOutput;
|
||||
import org.moparscape.msc.gs.connection.LSPacket;
|
||||
import org.moparscape.msc.gs.util.Logger;
|
||||
|
||||
/**
|
@ -1,9 +1,10 @@
|
||||
package org.moparscape.msc.gs.connection;
|
||||
package org.moparscape.msc.gs.connection.codec;
|
||||
|
||||
import org.apache.mina.common.ByteBuffer;
|
||||
import org.apache.mina.common.IoSession;
|
||||
import org.apache.mina.filter.codec.CumulativeProtocolDecoder;
|
||||
import org.apache.mina.filter.codec.ProtocolDecoderOutput;
|
||||
import org.moparscape.msc.gs.connection.RSCPacket;
|
||||
import org.moparscape.msc.gs.util.Logger;
|
||||
|
||||
/**
|
@ -1,9 +1,10 @@
|
||||
package org.moparscape.msc.gs.connection;
|
||||
package org.moparscape.msc.gs.connection.codec;
|
||||
|
||||
import org.apache.mina.common.ByteBuffer;
|
||||
import org.apache.mina.common.IoSession;
|
||||
import org.apache.mina.filter.codec.ProtocolEncoder;
|
||||
import org.apache.mina.filter.codec.ProtocolEncoderOutput;
|
||||
import org.moparscape.msc.gs.connection.RSCPacket;
|
||||
import org.moparscape.msc.gs.util.Logger;
|
||||
|
||||
/**
|
@ -22,7 +22,7 @@ import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.landscape.ActiveTile;
|
||||
import org.moparscape.msc.gs.model.snapshot.Snapshot;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandler;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandlerDef;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandlerDefinition;
|
||||
import org.moparscape.msc.gs.plugins.dependencies.NpcAI;
|
||||
import org.moparscape.msc.gs.tools.Captcha;
|
||||
import org.moparscape.msc.gs.util.Logger;
|
||||
@ -154,9 +154,9 @@ public final class GameEngine extends Thread {
|
||||
* @throws Exception
|
||||
*/
|
||||
protected void loadPacketHandlers() throws Exception {
|
||||
PacketHandlerDef[] handlerDefs = Instance.getDataStore()
|
||||
PacketHandlerDefinition[] handlerDefs = Instance.getDataStore()
|
||||
.loadPacketHandlerDefs();
|
||||
for (PacketHandlerDef handlerDef : handlerDefs) {
|
||||
for (PacketHandlerDefinition handlerDef : handlerDefs) {
|
||||
try {
|
||||
String className = handlerDef.getClassName();
|
||||
Class<?> c = Class.forName(className);
|
||||
|
@ -17,7 +17,7 @@ import org.moparscape.msc.gs.connection.LSConnectionHandler;
|
||||
import org.moparscape.msc.gs.connection.LSPacket;
|
||||
import org.moparscape.msc.gs.connection.PacketQueue;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandler;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandlerDef;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandlerDefinition;
|
||||
import org.moparscape.msc.gs.util.Logger;
|
||||
|
||||
public class LoginConnector {
|
||||
@ -144,8 +144,8 @@ public class LoginConnector {
|
||||
}
|
||||
|
||||
private void loadPacketHandlers() throws Exception {
|
||||
PacketHandlerDef[] handlerDefs = Instance.getDataStore().loadLSPacketHandlerDefs();
|
||||
for (PacketHandlerDef handlerDef : handlerDefs) {
|
||||
PacketHandlerDefinition[] handlerDefs = Instance.getDataStore().loadLSPacketHandlerDefs();
|
||||
for (PacketHandlerDefinition handlerDef : handlerDefs) {
|
||||
try {
|
||||
String className = handlerDef.getClassName();
|
||||
Class<?> c = Class.forName(className);
|
||||
|
@ -1,14 +1,14 @@
|
||||
package org.moparscape.msc.gs.event;
|
||||
|
||||
import org.moparscape.msc.gs.core.GameEngine;
|
||||
import org.moparscape.msc.gs.external.NPCLoc;
|
||||
import org.moparscape.msc.gs.model.Mob;
|
||||
import org.moparscape.msc.gs.model.Npc;
|
||||
import org.moparscape.msc.gs.model.Path;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCLocationDefinition;
|
||||
|
||||
public abstract class WalkMobToMobEvent extends DelayedEvent {
|
||||
protected Mob affectedMob;
|
||||
private NPCLoc loc = null;
|
||||
private NPCLocationDefinition loc = null;
|
||||
protected Mob owner;
|
||||
private int radius;
|
||||
private long startTime = 0L;
|
||||
|
@ -9,15 +9,15 @@ import java.util.zip.ZipFile;
|
||||
import org.moparscape.msc.config.Config;
|
||||
import org.moparscape.msc.config.Formulae;
|
||||
import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.GameObjectLoc;
|
||||
import org.moparscape.msc.gs.external.ItemLoc;
|
||||
import org.moparscape.msc.gs.external.NPCLoc;
|
||||
import org.moparscape.msc.gs.model.GameObject;
|
||||
import org.moparscape.msc.gs.model.Item;
|
||||
import org.moparscape.msc.gs.model.Npc;
|
||||
import org.moparscape.msc.gs.model.Shop;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.landscape.MutableTileValue;
|
||||
import org.moparscape.msc.gs.model.landscape.Sector;
|
||||
import org.moparscape.msc.gs.tools.DataConversions;
|
||||
@ -167,14 +167,14 @@ public class WorldLoader {
|
||||
|
||||
public void loadObjects() throws Exception {
|
||||
World world = Instance.getWorld();
|
||||
for (GameObjectLoc gameObject : Instance.getDataStore().loadGameObjectLocs()) {
|
||||
for (GameObjectLocationDefinition gameObject : Instance.getDataStore().loadGameObjectLocs()) {
|
||||
if (Config.f2pWildy && Formulae.isP2P(true, gameObject))
|
||||
continue;
|
||||
if (Formulae.isP2P(gameObject) && !World.isMembers())
|
||||
continue;
|
||||
world.registerGameObject(new GameObject(gameObject));
|
||||
}
|
||||
for (ItemLoc item : Instance.getDataStore().loadItemLocs()) {
|
||||
for (ItemLocationDefinition item : Instance.getDataStore().loadItemLocs()) {
|
||||
if (Config.f2pWildy && Formulae.isP2P(true, item))
|
||||
continue;
|
||||
if (Formulae.isP2P(item) && !World.isMembers())
|
||||
@ -182,7 +182,7 @@ public class WorldLoader {
|
||||
world.registerItem(new Item(item));
|
||||
}// ember
|
||||
|
||||
for (NPCLoc npc : Instance.getDataStore().loadNPCLocs()) {
|
||||
for (NPCLocationDefinition npc : Instance.getDataStore().loadNPCLocs()) {
|
||||
if (Config.f2pWildy && Formulae.isP2P(true, npc))
|
||||
continue;
|
||||
if (Formulae.isP2P(npc) && !World.isMembers())
|
||||
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.model;
|
||||
|
||||
import org.moparscape.msc.gs.external.DoorDef;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.GameObjectDef;
|
||||
import org.moparscape.msc.gs.external.GameObjectLoc;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.extra.DoorDefinition;
|
||||
|
||||
public class GameObject extends Entity {
|
||||
/**
|
||||
@ -19,7 +19,7 @@ public class GameObject extends Entity {
|
||||
/**
|
||||
* Location definition of the object
|
||||
*/
|
||||
private GameObjectLoc loc = null;
|
||||
private GameObjectLocationDefinition loc = null;
|
||||
/**
|
||||
* Set when the item has been destroyed to alert players
|
||||
*/
|
||||
@ -30,7 +30,7 @@ public class GameObject extends Entity {
|
||||
*/
|
||||
private int type;
|
||||
|
||||
public GameObject(GameObjectLoc loc) {
|
||||
public GameObject(GameObjectLocationDefinition loc) {
|
||||
direction = loc.direction;
|
||||
type = loc.type;
|
||||
this.loc = loc;
|
||||
@ -39,7 +39,7 @@ public class GameObject extends Entity {
|
||||
}
|
||||
|
||||
public GameObject(Point location, int id, int direction, int type) {
|
||||
this(new GameObjectLoc(id, location.getX(), location.getY(), direction,
|
||||
this(new GameObjectLocationDefinition(id, location.getX(), location.getY(), direction,
|
||||
type));
|
||||
}
|
||||
|
||||
@ -66,15 +66,15 @@ public class GameObject extends Entity {
|
||||
return direction;
|
||||
}
|
||||
|
||||
public DoorDef getDoorDef() {
|
||||
public DoorDefinition getDoorDef() {
|
||||
return EntityHandler.getDoorDef(super.getID());
|
||||
}
|
||||
|
||||
public GameObjectDef getGameObjectDef() {
|
||||
public GameObjectDefinition getGameObjectDef() {
|
||||
return EntityHandler.getGameObjectDef(super.getID());
|
||||
}
|
||||
|
||||
public GameObjectLoc getLoc() {
|
||||
public GameObjectLocationDefinition getLoc() {
|
||||
return loc;
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
package org.moparscape.msc.gs.model;
|
||||
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.ItemCookingDef;
|
||||
import org.moparscape.msc.gs.external.ItemDef;
|
||||
import org.moparscape.msc.gs.external.ItemSmeltingDef;
|
||||
import org.moparscape.msc.gs.external.ItemUnIdentHerbDef;
|
||||
import org.moparscape.msc.gs.external.ItemWieldableDef;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemCookingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemUnIdentHerbDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemWieldableDefinition;
|
||||
|
||||
public class InvItem extends Entity implements Comparable<InvItem> {
|
||||
|
||||
@ -51,23 +51,23 @@ public class InvItem extends Entity implements Comparable<InvItem> {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public ItemCookingDef getCookingDef() {
|
||||
public ItemCookingDefinition getCookingDef() {
|
||||
return EntityHandler.getItemCookingDef(id);
|
||||
}
|
||||
|
||||
public ItemDef getDef() {
|
||||
public ItemDefinition getDef() {
|
||||
return EntityHandler.getItemDef(id);
|
||||
}
|
||||
|
||||
public ItemSmeltingDef getSmeltingDef() {
|
||||
public ItemSmeltingDefinition getSmeltingDef() {
|
||||
return EntityHandler.getItemSmeltingDef(id);
|
||||
}
|
||||
|
||||
public ItemUnIdentHerbDef getUnIdentHerbDef() {
|
||||
public ItemUnIdentHerbDefinition getUnIdentHerbDef() {
|
||||
return EntityHandler.getItemUnIdentHerbDef(id);
|
||||
}
|
||||
|
||||
public ItemWieldableDef getWieldableDef() {
|
||||
public ItemWieldableDefinition getWieldableDef() {
|
||||
return EntityHandler.getItemWieldableDef(id);
|
||||
}
|
||||
|
||||
|
@ -4,9 +4,9 @@ import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.core.GameEngine;
|
||||
import org.moparscape.msc.gs.db.DataManager;
|
||||
import org.moparscape.msc.gs.event.DelayedEvent;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.ItemDef;
|
||||
import org.moparscape.msc.gs.external.ItemLoc;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemLocationDefinition;
|
||||
|
||||
public class Item extends Entity {
|
||||
/**
|
||||
@ -21,7 +21,7 @@ public class Item extends Entity {
|
||||
/**
|
||||
* Location definition of the item
|
||||
*/
|
||||
private ItemLoc loc = null;
|
||||
private ItemLocationDefinition loc = null;
|
||||
|
||||
/**
|
||||
* Contains the player that the item belongs to, if any
|
||||
@ -84,7 +84,7 @@ public class Item extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
public Item(ItemLoc loc) {
|
||||
public Item(ItemLocationDefinition loc) {
|
||||
this.loc = loc;
|
||||
setID(loc.id);
|
||||
setAmount(loc.amount);
|
||||
@ -125,11 +125,11 @@ public class Item extends Entity {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public ItemDef getDef() {
|
||||
public ItemDefinition getDef() {
|
||||
return EntityHandler.getItemDef(id);
|
||||
}
|
||||
|
||||
public ItemLoc getLoc() {
|
||||
public ItemLocationDefinition getLoc() {
|
||||
return loc;
|
||||
}
|
||||
|
||||
|
@ -11,10 +11,10 @@ import org.moparscape.msc.gs.Server;
|
||||
import org.moparscape.msc.gs.core.GameEngine;
|
||||
import org.moparscape.msc.gs.event.DelayedEvent;
|
||||
import org.moparscape.msc.gs.event.FightEvent;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.ItemDropDef;
|
||||
import org.moparscape.msc.gs.external.NPCDef;
|
||||
import org.moparscape.msc.gs.external.NPCLoc;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemDropDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.landscape.ActiveTile;
|
||||
import org.moparscape.msc.gs.plugins.dependencies.NpcAI;
|
||||
import org.moparscape.msc.gs.states.Action;
|
||||
@ -111,13 +111,13 @@ public class Npc extends Mob {
|
||||
/**
|
||||
* The definition of this npc
|
||||
*/
|
||||
private NPCDef def;
|
||||
private NPCDefinition def;
|
||||
private Syndicate syndicate = new Syndicate();
|
||||
private boolean goingToAttack = false;
|
||||
/**
|
||||
* The location of this npc
|
||||
*/
|
||||
private NPCLoc loc;
|
||||
private NPCLocationDefinition loc;
|
||||
|
||||
public boolean hasRan() {
|
||||
return ran;
|
||||
@ -199,11 +199,11 @@ public class Npc extends Mob {
|
||||
this.weakend = weakend;
|
||||
}
|
||||
|
||||
public void setDef(NPCDef def) {
|
||||
public void setDef(NPCDefinition def) {
|
||||
this.def = def;
|
||||
}
|
||||
|
||||
public void setLoc(NPCLoc loc) {
|
||||
public void setLoc(NPCLocationDefinition loc) {
|
||||
this.loc = loc;
|
||||
}
|
||||
|
||||
@ -222,7 +222,7 @@ public class Npc extends Mob {
|
||||
|
||||
public Npc(int id, int startX, int startY, int minX, int maxX, int minY,
|
||||
int maxY) {
|
||||
this(new NPCLoc(id, startX, startY, minX, maxX, minY, maxY));
|
||||
this(new NPCLocationDefinition(id, startX, startY, minX, maxX, minY, maxY));
|
||||
}
|
||||
|
||||
public boolean isScripted() {
|
||||
@ -233,7 +233,7 @@ public class Npc extends Mob {
|
||||
this.scripted = scripted;
|
||||
}
|
||||
|
||||
public Npc(NPCLoc loc) {
|
||||
public Npc(NPCLocationDefinition loc) {
|
||||
for (int i : Constants.GameServer.UNDEAD_NPCS) {
|
||||
if (loc.getId() == i) {
|
||||
this.undead = true;
|
||||
@ -384,7 +384,7 @@ public class Npc extends Mob {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public NPCDef getDef() {
|
||||
public NPCDefinition getDef() {
|
||||
return EntityHandler.getNpcDef(getID());
|
||||
}
|
||||
|
||||
@ -396,7 +396,7 @@ public class Npc extends Mob {
|
||||
return curHits;
|
||||
}
|
||||
|
||||
public NPCLoc getLoc() {
|
||||
public NPCLocationDefinition getLoc() {
|
||||
return loc;
|
||||
}
|
||||
|
||||
@ -433,10 +433,10 @@ public class Npc extends Mob {
|
||||
|
||||
Player owner = mob instanceof Player ? (Player) mob : null;
|
||||
|
||||
ItemDropDef[] drops = def.getDrops();
|
||||
ItemDropDefinition[] drops = def.getDrops();
|
||||
|
||||
int total = 0;
|
||||
for (ItemDropDef drop : drops) {
|
||||
for (ItemDropDefinition drop : drops) {
|
||||
total += drop.getWeight();
|
||||
}
|
||||
//
|
||||
@ -445,7 +445,7 @@ public class Npc extends Mob {
|
||||
if (!this.getDef().name.equalsIgnoreCase("ghost")) {
|
||||
|
||||
|
||||
for (ItemDropDef drop : drops) {
|
||||
for (ItemDropDefinition drop : drops) {
|
||||
if (drop == null) {
|
||||
continue;
|
||||
}
|
||||
|
@ -25,9 +25,9 @@ import org.moparscape.msc.gs.event.DelayedEvent;
|
||||
import org.moparscape.msc.gs.event.MiniEvent;
|
||||
import org.moparscape.msc.gs.event.RangeEvent;
|
||||
import org.moparscape.msc.gs.event.ShortEvent;
|
||||
import org.moparscape.msc.gs.external.AgilityCourseDef;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.PrayerDef;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.skill.AgilityCourseDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.PrayerDefinition;
|
||||
import org.moparscape.msc.gs.model.snapshot.Activity;
|
||||
import org.moparscape.msc.gs.phandler.client.WieldHandler;
|
||||
import org.moparscape.msc.gs.quest.Quest;
|
||||
@ -52,7 +52,7 @@ public final class Player extends Mob {
|
||||
/**
|
||||
* The current agility course the player's doing
|
||||
*/
|
||||
private AgilityCourseDef agilityCourseDef = null;
|
||||
private AgilityCourseDefinition agilityCourseDef = null;
|
||||
/**
|
||||
* The Players appearance
|
||||
*/
|
||||
@ -623,7 +623,7 @@ public final class Player extends Mob {
|
||||
|
||||
public void addPrayerDrain(int prayerID) {
|
||||
drainRate = 0;
|
||||
PrayerDef prayer = EntityHandler.getPrayerDef(prayerID);
|
||||
PrayerDefinition prayer = EntityHandler.getPrayerDef(prayerID);
|
||||
for (int x = 0; x <= 13; x++) {
|
||||
prayer = EntityHandler.getPrayerDef(x);
|
||||
if (super.isPrayerActivated(x)) {
|
||||
@ -876,7 +876,7 @@ public final class Player extends Mob {
|
||||
/**
|
||||
* @return this player's current agility course
|
||||
*/
|
||||
public AgilityCourseDef getAgilityCourseDef() {
|
||||
public AgilityCourseDefinition getAgilityCourseDef() {
|
||||
return agilityCourseDef;
|
||||
}
|
||||
|
||||
@ -2370,7 +2370,7 @@ public final class Player extends Mob {
|
||||
/**
|
||||
* Sets this player's current agility course
|
||||
*/
|
||||
public void setAgilityCourseDef(AgilityCourseDef def) {
|
||||
public void setAgilityCourseDef(AgilityCourseDefinition def) {
|
||||
agilityCourseDef = def;
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ import java.io.IOException;
|
||||
import java.util.ConcurrentModificationException;
|
||||
|
||||
import org.moparscape.msc.gs.core.GameEngine;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.util.Logger;
|
||||
|
||||
import bsh.EvalError;
|
||||
|
@ -15,15 +15,15 @@ import org.moparscape.msc.gs.core.ClientUpdater;
|
||||
import org.moparscape.msc.gs.core.DelayedEventHandler;
|
||||
import org.moparscape.msc.gs.event.DelayedEvent;
|
||||
import org.moparscape.msc.gs.event.SingleEvent;
|
||||
import org.moparscape.msc.gs.external.GameObjectLoc;
|
||||
import org.moparscape.msc.gs.external.NPCLoc;
|
||||
import org.moparscape.msc.gs.io.WorldLoader;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.landscape.ActiveTile;
|
||||
import org.moparscape.msc.gs.model.landscape.MutableTileValue;
|
||||
import org.moparscape.msc.gs.model.landscape.TileValue;
|
||||
import org.moparscape.msc.gs.model.snapshot.Snapshot;
|
||||
import org.moparscape.msc.gs.npchandler.NpcHandler;
|
||||
import org.moparscape.msc.gs.npchandler.NpcHandlerDef;
|
||||
import org.moparscape.msc.gs.npchandler.NpcHandlerDefinition;
|
||||
import org.moparscape.msc.gs.quest.QuestManager;
|
||||
import org.moparscape.msc.gs.states.CombatState;
|
||||
import org.moparscape.msc.gs.util.EntityList;
|
||||
@ -241,7 +241,7 @@ public final class World {
|
||||
/**
|
||||
* Adds a DelayedEvent that will spawn a GameObject
|
||||
*/
|
||||
public void delayedSpawnObject(final GameObjectLoc loc,
|
||||
public void delayedSpawnObject(final GameObjectLocationDefinition loc,
|
||||
final int respawnTime) {
|
||||
delayedEventHandler.add(new SingleEvent(null, respawnTime) {
|
||||
|
||||
@ -446,8 +446,8 @@ public final class World {
|
||||
*/
|
||||
private void loadNpcHandlers() throws Exception {
|
||||
|
||||
NpcHandlerDef[] handlerDefs = Instance.getDataStore().loadNpcHandlers();
|
||||
for (NpcHandlerDef handlerDef : handlerDefs) {
|
||||
NpcHandlerDefinition[] handlerDefs = Instance.getDataStore().loadNpcHandlers();
|
||||
for (NpcHandlerDefinition handlerDef : handlerDefs) {
|
||||
try {
|
||||
String className = handlerDef.getClassName();
|
||||
Class<?> c = Class.forName(className);
|
||||
@ -532,7 +532,7 @@ public final class World {
|
||||
* Registers an npc with the world
|
||||
*/
|
||||
public void registerNpc(Npc n) {
|
||||
NPCLoc npc = n.getLoc();
|
||||
NPCLocationDefinition npc = n.getLoc();
|
||||
if (npc.startX < npc.minX || npc.startX > npc.maxX
|
||||
|| npc.startY < npc.minY || npc.startY > npc.maxY
|
||||
|| (getTileValue(npc.startX, npc.startY).mapValue & 64) != 0) {
|
||||
|
@ -1,10 +1,10 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition;
|
||||
|
||||
/**
|
||||
* The abstract class EntityDef implements methods for return values which are
|
||||
* shared between entities.
|
||||
*/
|
||||
public abstract class EntityDef {
|
||||
public abstract class EntityDefinition {
|
||||
|
||||
/**
|
||||
* The description of the entity
|
@ -1,4 +1,4 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -7,6 +7,33 @@ import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.Point;
|
||||
import org.moparscape.msc.gs.model.TelePoint;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.extra.CerterDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.extra.DoorDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.extra.TileDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.AgilityCourseDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.AgilityDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.FiremakingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemArrowHeadDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemBowStringDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemCookingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemCraftingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemDartTipDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemGemDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemHerbDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemHerbSecondDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemLogCutDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemSmithingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemUnIdentHerbDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemWieldableDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectFishingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectMiningDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.PrayerDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.SpellDefinition;
|
||||
import org.moparscape.msc.gs.persistence.DataStore;
|
||||
|
||||
/**
|
||||
@ -14,41 +41,41 @@ import org.moparscape.msc.gs.persistence.DataStore;
|
||||
* methods for relaying these entities to the user.
|
||||
*/
|
||||
public class EntityHandler {
|
||||
private static Map<Integer, AgilityCourseDef> agilityCourses;
|
||||
private static Map<Integer, AgilityDef> agilityObjects;
|
||||
private static Map<Integer, ItemArrowHeadDef> arrowHeads;
|
||||
private static Map<Integer, ItemBowStringDef> bowString;
|
||||
private static Map<Integer, CerterDef> certers;
|
||||
private static Map<Integer, ItemDartTipDef> dartTips;
|
||||
private static Map<Integer, AgilityCourseDefinition> agilityCourses;
|
||||
private static Map<Integer, AgilityDefinition> agilityObjects;
|
||||
private static Map<Integer, ItemArrowHeadDefinition> arrowHeads;
|
||||
private static Map<Integer, ItemBowStringDefinition> bowString;
|
||||
private static Map<Integer, CerterDefinition> certers;
|
||||
private static Map<Integer, ItemDartTipDefinition> dartTips;
|
||||
|
||||
private static DoorDef[] doors;
|
||||
private static Map<Integer, FiremakingDef> firemaking;
|
||||
private static GameObjectDef[] gameObjects;
|
||||
private static Map<Integer, ItemGemDef> gems;
|
||||
private static ItemHerbSecond[] herbSeconds;
|
||||
private static DoorDefinition[] doors;
|
||||
private static Map<Integer, FiremakingDefinition> firemaking;
|
||||
private static GameObjectDefinition[] gameObjects;
|
||||
private static Map<Integer, ItemGemDefinition> gems;
|
||||
private static ItemHerbSecondDefinition[] herbSeconds;
|
||||
private static Map<Integer, int[]> itemAffectedTypes;
|
||||
private static Map<Integer, ItemCookingDef> itemCooking;
|
||||
private static ItemCraftingDef[] itemCrafting;
|
||||
private static Map<Integer, ItemCookingDefinition> itemCooking;
|
||||
private static ItemCraftingDefinition[] itemCrafting;
|
||||
private static Map<Integer, Integer> itemEdibleHeals;
|
||||
private static Map<Integer, ItemHerbDef> itemHerb;
|
||||
private static ItemDef[] items;
|
||||
private static Map<Integer, ItemSmeltingDef> itemSmelting;
|
||||
private static ItemSmithingDef[] itemSmithing;
|
||||
private static Map<Integer, ItemUnIdentHerbDef> itemUnIdentHerb;
|
||||
private static Map<Integer, ItemWieldableDef> itemWieldable;
|
||||
private static Map<Integer, ItemHerbDefinition> itemHerb;
|
||||
private static ItemDefinition[] items;
|
||||
private static Map<Integer, ItemSmeltingDefinition> itemSmelting;
|
||||
private static ItemSmithingDefinition[] itemSmithing;
|
||||
private static Map<Integer, ItemUnIdentHerbDefinition> itemUnIdentHerb;
|
||||
private static Map<Integer, ItemWieldableDefinition> itemWieldable;
|
||||
private static List<InvItem>[] keyChestLoots;
|
||||
private static Map<Integer, ItemLogCutDef> logCut;
|
||||
private static Map<Integer, ItemLogCutDefinition> logCut;
|
||||
|
||||
private static NPCDef[] npcs;
|
||||
private static Map<Integer, ObjectFishingDef[]> objectFishing;
|
||||
private static NPCDefinition[] npcs;
|
||||
private static Map<Integer, ObjectFishingDefinition[]> objectFishing;
|
||||
|
||||
private static Map<Integer, ObjectMiningDef> objectMining;
|
||||
private static Map<Integer, ObjectMiningDefinition> objectMining;
|
||||
private static Map<Point, TelePoint> objectTelePoints;
|
||||
private static Map<Integer, ObjectWoodcuttingDef> objectWoodcutting;
|
||||
private static PrayerDef[] prayers;
|
||||
private static Map<Integer, ObjectWoodcuttingDefinition> objectWoodcutting;
|
||||
private static PrayerDefinition[] prayers;
|
||||
private static Map<Integer, Integer> spellAggressiveLvl;
|
||||
private static SpellDef[] spells;
|
||||
private static TileDef[] tiles;
|
||||
private static SpellDefinition[] spells;
|
||||
private static TileDefinition[] tiles;
|
||||
|
||||
static {
|
||||
DataStore dataStore = Instance.getDataStore();
|
||||
@ -56,7 +83,7 @@ public class EntityHandler {
|
||||
doors = dataStore.loadDoorDefs();
|
||||
gameObjects = dataStore.loadGameObjectDefs();
|
||||
npcs = dataStore.loadNPCDefs();
|
||||
for (NPCDef n : npcs) {
|
||||
for (NPCDefinition n : npcs) {
|
||||
if (n.isAttackable()) {
|
||||
n.respawnTime -= (n.respawnTime / 3);
|
||||
}
|
||||
@ -102,7 +129,7 @@ public class EntityHandler {
|
||||
* the agility courses's start ID
|
||||
* @return the AgilityCourseDef with the given start ID
|
||||
*/
|
||||
public static AgilityCourseDef getAgilityCourseDef(int id) {
|
||||
public static AgilityCourseDefinition getAgilityCourseDef(int id) {
|
||||
return agilityCourses.get(id);
|
||||
}
|
||||
|
||||
@ -111,7 +138,7 @@ public class EntityHandler {
|
||||
* the agility object's ID
|
||||
* @return the AgilityDef with the given object ID
|
||||
*/
|
||||
public static AgilityDef getAgilityDef(int id) {
|
||||
public static AgilityDefinition getAgilityDef(int id) {
|
||||
return agilityObjects.get(id);
|
||||
}
|
||||
|
||||
@ -120,14 +147,14 @@ public class EntityHandler {
|
||||
* the npcs ID
|
||||
* @return the CerterDef for the given npc
|
||||
*/
|
||||
public static CerterDef getCerterDef(int id) {
|
||||
public static CerterDefinition getCerterDef(int id) {
|
||||
return certers.get(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ItemCraftingDef for the requested item
|
||||
*/
|
||||
public static ItemCraftingDef getCraftingDef(int id) {
|
||||
public static ItemCraftingDefinition getCraftingDef(int id) {
|
||||
if (id < 0 || id >= itemCrafting.length) {
|
||||
return null;
|
||||
}
|
||||
@ -139,7 +166,7 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the DoorDef with the given ID
|
||||
*/
|
||||
public static DoorDef getDoorDef(int id) {
|
||||
public static DoorDefinition getDoorDef(int id) {
|
||||
if (id < 0 || id >= doors.length) {
|
||||
return null;
|
||||
}
|
||||
@ -149,7 +176,7 @@ public class EntityHandler {
|
||||
/**
|
||||
* @return the FiremakingDef for the given log
|
||||
*/
|
||||
public static FiremakingDef getFiremakingDef(int id) {
|
||||
public static FiremakingDefinition getFiremakingDef(int id) {
|
||||
return firemaking.get(id);
|
||||
}
|
||||
|
||||
@ -158,7 +185,7 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the GameObjectDef with the given ID
|
||||
*/
|
||||
public static GameObjectDef getGameObjectDef(int id) {
|
||||
public static GameObjectDefinition getGameObjectDef(int id) {
|
||||
if (id < 0 || id >= gameObjects.length) {
|
||||
return null;
|
||||
}
|
||||
@ -177,14 +204,14 @@ public class EntityHandler {
|
||||
/**
|
||||
* @return the ItemArrowHeadDef for the given arrow
|
||||
*/
|
||||
public static ItemArrowHeadDef getItemArrowHeadDef(int id) {
|
||||
public static ItemArrowHeadDefinition getItemArrowHeadDef(int id) {
|
||||
return arrowHeads.get(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ItemBowStringDef for the given bow
|
||||
*/
|
||||
public static ItemBowStringDef getItemBowStringDef(int id) {
|
||||
public static ItemBowStringDefinition getItemBowStringDef(int id) {
|
||||
return bowString.get(id);
|
||||
}
|
||||
|
||||
@ -193,14 +220,14 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the ItemCookingDef with the given ID
|
||||
*/
|
||||
public static ItemCookingDef getItemCookingDef(int id) {
|
||||
public static ItemCookingDefinition getItemCookingDef(int id) {
|
||||
return itemCooking.get(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ItemDartTipDef for the given tip
|
||||
*/
|
||||
public static ItemDartTipDef getItemDartTipDef(int id) {
|
||||
public static ItemDartTipDefinition getItemDartTipDef(int id) {
|
||||
return dartTips.get(id);
|
||||
}
|
||||
|
||||
@ -209,7 +236,7 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the ItemDef with the given ID
|
||||
*/
|
||||
public static ItemDef getItemDef(int id) {
|
||||
public static ItemDefinition getItemDef(int id) {
|
||||
if (id < 0 || id >= items.length) {
|
||||
return null;
|
||||
}
|
||||
@ -232,7 +259,7 @@ public class EntityHandler {
|
||||
/**
|
||||
* @return the ItemGemDef for the given gem
|
||||
*/
|
||||
public static ItemGemDef getItemGemDef(int id) {
|
||||
public static ItemGemDefinition getItemGemDef(int id) {
|
||||
return gems.get(id);
|
||||
}
|
||||
|
||||
@ -241,16 +268,16 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the ItemHerbDef with the given ID
|
||||
*/
|
||||
public static ItemHerbDef getItemHerbDef(int id) {
|
||||
public static ItemHerbDefinition getItemHerbDef(int id) {
|
||||
return itemHerb.get(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ItemHerbSecond for the given second ingredient
|
||||
*/
|
||||
public static ItemHerbSecond getItemHerbSecond(int secondID,
|
||||
public static ItemHerbSecondDefinition getItemHerbSecond(int secondID,
|
||||
int unfinishedID) {
|
||||
for (ItemHerbSecond def : herbSeconds) {
|
||||
for (ItemHerbSecondDefinition def : herbSeconds) {
|
||||
if (def.getSecondID() == secondID
|
||||
&& def.getUnfinishedID() == unfinishedID) {
|
||||
return def;
|
||||
@ -262,7 +289,7 @@ public class EntityHandler {
|
||||
/**
|
||||
* @return the ItemLogCutDef for the given log
|
||||
*/
|
||||
public static ItemLogCutDef getItemLogCutDef(int id) {
|
||||
public static ItemLogCutDefinition getItemLogCutDef(int id) {
|
||||
return logCut.get(id);
|
||||
}
|
||||
|
||||
@ -271,7 +298,7 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the ItemSmeltingDef with the given ID
|
||||
*/
|
||||
public static ItemSmeltingDef getItemSmeltingDef(int id) {
|
||||
public static ItemSmeltingDefinition getItemSmeltingDef(int id) {
|
||||
return itemSmelting.get(id);
|
||||
}
|
||||
|
||||
@ -280,7 +307,7 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the ItemUnIdentHerbDef with the given ID
|
||||
*/
|
||||
public static ItemUnIdentHerbDef getItemUnIdentHerbDef(int id) {
|
||||
public static ItemUnIdentHerbDefinition getItemUnIdentHerbDef(int id) {
|
||||
return itemUnIdentHerb.get(id);
|
||||
}
|
||||
|
||||
@ -289,7 +316,7 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the ItemWieldableDef with the given ID
|
||||
*/
|
||||
public static ItemWieldableDef getItemWieldableDef(int id) {
|
||||
public static ItemWieldableDefinition getItemWieldableDef(int id) {
|
||||
return itemWieldable.get(id);
|
||||
}
|
||||
|
||||
@ -302,7 +329,7 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the NPCDef with the given ID
|
||||
*/
|
||||
public static NPCDef getNpcDef(int id) {
|
||||
public static NPCDefinition getNpcDef(int id) {
|
||||
if (id < 0 || id >= npcs.length) {
|
||||
return null;
|
||||
}
|
||||
@ -314,8 +341,8 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the ObjectFishingDef with the given ID
|
||||
*/
|
||||
public static ObjectFishingDef getObjectFishingDef(int id, int click) {
|
||||
ObjectFishingDef[] defs = objectFishing.get(id);
|
||||
public static ObjectFishingDefinition getObjectFishingDef(int id, int click) {
|
||||
ObjectFishingDefinition[] defs = objectFishing.get(id);
|
||||
if (defs == null) {
|
||||
return null;
|
||||
}
|
||||
@ -327,7 +354,7 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the ObjectMiningDef with the given ID
|
||||
*/
|
||||
public static ObjectMiningDef getObjectMiningDef(int id) {
|
||||
public static ObjectMiningDefinition getObjectMiningDef(int id) {
|
||||
return objectMining.get(id);
|
||||
}
|
||||
|
||||
@ -352,7 +379,7 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the ObjectWoodcuttingDef with the given ID
|
||||
*/
|
||||
public static ObjectWoodcuttingDef getObjectWoodcuttingDef(int id) {
|
||||
public static ObjectWoodcuttingDefinition getObjectWoodcuttingDef(int id) {
|
||||
return objectWoodcutting.get(id);
|
||||
}
|
||||
|
||||
@ -361,7 +388,7 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the PrayerDef with the given ID
|
||||
*/
|
||||
public static PrayerDef getPrayerDef(int id) {
|
||||
public static PrayerDefinition getPrayerDef(int id) {
|
||||
if (id < 0 || id >= prayers.length) {
|
||||
return null;
|
||||
}
|
||||
@ -371,7 +398,7 @@ public class EntityHandler {
|
||||
/**
|
||||
* @return the ItemSmithingDef for the requested item
|
||||
*/
|
||||
public static ItemSmithingDef getSmithingDef(int id) {
|
||||
public static ItemSmithingDefinition getSmithingDef(int id) {
|
||||
if (id < 0 || id >= itemSmithing.length) {
|
||||
return null;
|
||||
}
|
||||
@ -381,8 +408,8 @@ public class EntityHandler {
|
||||
/**
|
||||
* @return the ItemSmithingDef for the requested item
|
||||
*/
|
||||
public static ItemSmithingDef getSmithingDefbyID(int itemID) {
|
||||
for (ItemSmithingDef i : itemSmithing) {
|
||||
public static ItemSmithingDefinition getSmithingDefbyID(int itemID) {
|
||||
for (ItemSmithingDefinition i : itemSmithing) {
|
||||
if (i.itemID == itemID)
|
||||
return i;
|
||||
}
|
||||
@ -407,7 +434,7 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the SpellDef with the given ID
|
||||
*/
|
||||
public static SpellDef getSpellDef(int id) {
|
||||
public static SpellDefinition getSpellDef(int id) {
|
||||
if (id < 0 || id >= spells.length) {
|
||||
return null;
|
||||
}
|
||||
@ -419,7 +446,7 @@ public class EntityHandler {
|
||||
* the entities ID
|
||||
* @return the TileDef with the given ID
|
||||
*/
|
||||
public static TileDef getTileDef(int id) {
|
||||
public static TileDefinition getTileDef(int id) {
|
||||
if (id < 0 || id >= tiles.length) {
|
||||
return null;
|
||||
}
|
@ -1,9 +1,11 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.entity;
|
||||
|
||||
import org.moparscape.msc.gs.model.definition.EntityDefinition;
|
||||
|
||||
/**
|
||||
* The definition wrapper for game objects
|
||||
*/
|
||||
public class GameObjectDef extends EntityDef {
|
||||
public class GameObjectDefinition extends EntityDefinition {
|
||||
|
||||
/**
|
||||
* The first command of the object
|
@ -1,6 +1,6 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.entity;
|
||||
|
||||
public class GameObjectLoc {
|
||||
public class GameObjectLocationDefinition {
|
||||
/**
|
||||
* The direction it faces
|
||||
*/
|
||||
@ -22,7 +22,7 @@ public class GameObjectLoc {
|
||||
*/
|
||||
public int y;
|
||||
|
||||
public GameObjectLoc(int id, int x, int y, int direction, int type) {
|
||||
public GameObjectLocationDefinition(int id, int x, int y, int direction, int type) {
|
||||
this.id = id;
|
||||
this.x = x;
|
||||
this.y = y;
|
@ -1,9 +1,11 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.entity;
|
||||
|
||||
import org.moparscape.msc.gs.model.definition.EntityDefinition;
|
||||
|
||||
/**
|
||||
* The definition wrapper for items
|
||||
*/
|
||||
public class ItemDef extends EntityDef {
|
||||
public class ItemDefinition extends EntityDefinition {
|
||||
/**
|
||||
* The base price of the object
|
||||
*/
|
@ -1,11 +1,11 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.entity;
|
||||
|
||||
public class ItemDropDef {
|
||||
public class ItemDropDefinition {
|
||||
public int amount;
|
||||
public int id;
|
||||
public int weight;
|
||||
|
||||
public ItemDropDef(int id, int amount, int weight) {
|
||||
public ItemDropDefinition(int id, int amount, int weight) {
|
||||
this.id = id;
|
||||
this.amount = amount;
|
||||
this.weight = weight;
|
@ -1,6 +1,6 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.entity;
|
||||
|
||||
public class ItemLoc {
|
||||
public class ItemLocationDefinition {
|
||||
/**
|
||||
* Amount of item (stackables)
|
||||
*/
|
@ -1,9 +1,11 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.entity;
|
||||
|
||||
import org.moparscape.msc.gs.model.definition.EntityDefinition;
|
||||
|
||||
/**
|
||||
* The definition wrapper for npcs
|
||||
*/
|
||||
public class NPCDef extends EntityDef {
|
||||
public class NPCDefinition extends EntityDefinition {
|
||||
/**
|
||||
* Whether the npc is aggressive
|
||||
*/
|
||||
@ -35,7 +37,7 @@ public class NPCDef extends EntityDef {
|
||||
/**
|
||||
* Possible drops
|
||||
*/
|
||||
public ItemDropDef[] drops;
|
||||
public ItemDropDefinition[] drops;
|
||||
/**
|
||||
* Colour of our hair
|
||||
*/
|
||||
@ -101,7 +103,7 @@ public class NPCDef extends EntityDef {
|
||||
return defense;
|
||||
}
|
||||
|
||||
public ItemDropDef[] getDrops() {
|
||||
public ItemDropDefinition[] getDrops() {
|
||||
return drops;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.entity;
|
||||
|
||||
public class NPCLoc {
|
||||
public class NPCLocationDefinition {
|
||||
/**
|
||||
* The id of the Npc
|
||||
*/
|
||||
@ -30,7 +30,7 @@ public class NPCLoc {
|
||||
*/
|
||||
public int startY;
|
||||
|
||||
public NPCLoc(int id, int startX, int startY, int minX, int maxX, int minY,
|
||||
public NPCLocationDefinition(int id, int startX, int startY, int minX, int maxX, int minY,
|
||||
int maxY) {
|
||||
this.id = id;
|
||||
this.startX = startX;
|
@ -1,6 +1,6 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.extra;
|
||||
|
||||
public class CertDef {
|
||||
public class CertDefinition {
|
||||
/**
|
||||
* The ID of the certificate
|
||||
*/
|
@ -1,10 +1,10 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.extra;
|
||||
|
||||
public class CerterDef {
|
||||
public class CerterDefinition {
|
||||
/**
|
||||
* Certs this stall can deal with
|
||||
*/
|
||||
private CertDef[] certs;
|
||||
private CertDefinition[] certs;
|
||||
/**
|
||||
* Type of stall
|
||||
*/
|
@ -1,9 +1,11 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.extra;
|
||||
|
||||
import org.moparscape.msc.gs.model.definition.EntityDefinition;
|
||||
|
||||
/**
|
||||
* The definition wrapper for doors
|
||||
*/
|
||||
public class DoorDef extends EntityDef {
|
||||
public class DoorDefinition extends EntityDefinition {
|
||||
|
||||
/**
|
||||
* The first command of the door
|
@ -1,6 +1,6 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.extra;
|
||||
|
||||
public class TileDef {
|
||||
public class TileDefinition {
|
||||
public int colour;
|
||||
public int objectType;
|
||||
public int unknown;
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* Defines an agility course
|
||||
*/
|
||||
public class AgilityCourseDef {
|
||||
public class AgilityCourseDefinition {
|
||||
/**
|
||||
* Ending object ID
|
||||
*/
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* Defines an agility course object
|
||||
*/
|
||||
public class AgilityDef {
|
||||
public class AgilityDefinition {
|
||||
/**
|
||||
* Can you fail this obstacle?
|
||||
*/
|
@ -1,6 +1,6 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
public class FiremakingDef {
|
||||
public class FiremakingDefinition {
|
||||
/**
|
||||
* The exp given by these logs
|
||||
*/
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for items
|
||||
*/
|
||||
public class ItemArrowHeadDef {
|
||||
public class ItemArrowHeadDefinition {
|
||||
|
||||
/**
|
||||
* The ID of the arrow created
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for items
|
||||
*/
|
||||
public class ItemBowStringDef {
|
||||
public class ItemBowStringDefinition {
|
||||
|
||||
/**
|
||||
* The ID of the bow created
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for items
|
||||
*/
|
||||
public class ItemCookingDef {
|
||||
public class ItemCookingDefinition {
|
||||
|
||||
/**
|
||||
* The id of the burned version
|
@ -1,6 +1,6 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
public class ItemCraftingDef {
|
||||
public class ItemCraftingDefinition {
|
||||
/**
|
||||
* The exp given
|
||||
*/
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for items
|
||||
*/
|
||||
public class ItemDartTipDef {
|
||||
public class ItemDartTipDefinition {
|
||||
|
||||
/**
|
||||
* The ID of the arrow created
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for items
|
||||
*/
|
||||
public class ItemGemDef {
|
||||
public class ItemGemDefinition {
|
||||
|
||||
/**
|
||||
* The exp given by attaching this bow string
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for items
|
||||
*/
|
||||
public class ItemHerbDef {
|
||||
public class ItemHerbDefinition {
|
||||
|
||||
/**
|
||||
* The exp smelting this item gives
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for items
|
||||
*/
|
||||
public class ItemHerbSecond {
|
||||
public class ItemHerbSecondDefinition {
|
||||
|
||||
/**
|
||||
* The exp given completing this potion
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for items
|
||||
*/
|
||||
public class ItemLogCutDef {
|
||||
public class ItemLogCutDefinition {
|
||||
|
||||
public int longbowExp;
|
||||
public int longbowID;
|
@ -1,9 +1,10 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
|
||||
/**
|
||||
* The definition wrapper for items
|
||||
*/
|
||||
public class ItemSmeltingDef {
|
||||
public class ItemSmeltingDefinition {
|
||||
|
||||
/**
|
||||
* The id of the related bar
|
||||
@ -16,7 +17,7 @@ public class ItemSmeltingDef {
|
||||
/**
|
||||
* The ores required in addition to this one
|
||||
*/
|
||||
public ReqOreDef[] reqOres;
|
||||
public ReqOreDefinition[] reqOres;
|
||||
/**
|
||||
* The level required to smelt this
|
||||
*/
|
||||
@ -34,7 +35,7 @@ public class ItemSmeltingDef {
|
||||
return requiredLvl;
|
||||
}
|
||||
|
||||
public ReqOreDef[] getReqOres() {
|
||||
public ReqOreDefinition[] getReqOres() {
|
||||
return reqOres;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
public class ItemSmithingDef {
|
||||
public class ItemSmithingDefinition {
|
||||
/**
|
||||
* The amount of the item produced
|
||||
*/
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for herbs
|
||||
*/
|
||||
public class ItemUnIdentHerbDef {
|
||||
public class ItemUnIdentHerbDefinition {
|
||||
|
||||
/**
|
||||
* How much experience identifying gives
|
@ -1,13 +1,15 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
|
||||
/**
|
||||
* The definition wrapper for items
|
||||
*/
|
||||
public class ItemWieldableDef {
|
||||
public class ItemWieldableDefinition {
|
||||
|
||||
/**
|
||||
* How many armour points should be given
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for fish
|
||||
*/
|
||||
public class ObjectFishDef {
|
||||
public class ObjectFishDefinition {
|
||||
|
||||
/**
|
||||
* How much experience this fish should give
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for fishing spots
|
||||
*/
|
||||
public class ObjectFishingDef {
|
||||
public class ObjectFishingDefinition {
|
||||
|
||||
/**
|
||||
* The If of any bait required to go with the net
|
||||
@ -12,7 +12,7 @@ public class ObjectFishingDef {
|
||||
/**
|
||||
* The fish that can be caught here
|
||||
*/
|
||||
public ObjectFishDef[] defs;
|
||||
public ObjectFishDefinition[] defs;
|
||||
/**
|
||||
* The Id of the net required to fish with
|
||||
*/
|
||||
@ -22,7 +22,7 @@ public class ObjectFishingDef {
|
||||
return baitId;
|
||||
}
|
||||
|
||||
public ObjectFishDef[] getFishDefs() {
|
||||
public ObjectFishDefinition[] getFishDefs() {
|
||||
return defs;
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ public class ObjectFishingDef {
|
||||
|
||||
public int getReqLevel() {
|
||||
int requiredLevel = 99;
|
||||
for (ObjectFishDef def : defs) {
|
||||
for (ObjectFishDefinition def : defs) {
|
||||
if (def.getReqLevel() < requiredLevel) {
|
||||
requiredLevel = def.getReqLevel();
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for rocks
|
||||
*/
|
||||
public class ObjectMiningDef {
|
||||
public class ObjectMiningDefinition {
|
||||
|
||||
/**
|
||||
* How much experience identifying gives
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for trees
|
||||
*/
|
||||
public class ObjectWoodcuttingDef {
|
||||
public class ObjectWoodcuttingDefinition {
|
||||
|
||||
/**
|
||||
* How much experience identifying gives
|
@ -1,9 +1,11 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
import org.moparscape.msc.gs.model.definition.EntityDefinition;
|
||||
|
||||
/**
|
||||
* The definition wrapper for prayers
|
||||
*/
|
||||
public class PrayerDef extends EntityDef {
|
||||
public class PrayerDefinition extends EntityDefinition {
|
||||
|
||||
/**
|
||||
* The drain rate of the prayer (perhaps points per min?)
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
/**
|
||||
* The definition wrapper for ores
|
||||
*/
|
||||
public class ReqOreDef {
|
||||
public class ReqOreDefinition {
|
||||
|
||||
/**
|
||||
* The amount of the ore required
|
@ -1,13 +1,15 @@
|
||||
package org.moparscape.msc.gs.external;
|
||||
package org.moparscape.msc.gs.model.definition.skill;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.moparscape.msc.gs.model.definition.EntityDefinition;
|
||||
|
||||
/**
|
||||
* The definition wrapper for spells
|
||||
*/
|
||||
public class SpellDef extends EntityDef {
|
||||
public class SpellDefinition extends EntityDefinition {
|
||||
|
||||
/**
|
||||
* The amount of experience given by this spell
|
@ -3,13 +3,13 @@ package org.moparscape.msc.gs.npchandler;
|
||||
import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.event.MiniEvent;
|
||||
import org.moparscape.msc.gs.event.ShortEvent;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.ChatMessage;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.MenuHandler;
|
||||
import org.moparscape.msc.gs.model.Npc;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -2,14 +2,14 @@ package org.moparscape.msc.gs.npchandler;
|
||||
|
||||
import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.event.ShortEvent;
|
||||
import org.moparscape.msc.gs.external.CerterDef;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.ChatMessage;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.MenuHandler;
|
||||
import org.moparscape.msc.gs.model.Npc;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.extra.CerterDefinition;
|
||||
|
||||
public class Certer implements NpcHandler {
|
||||
/**
|
||||
@ -18,7 +18,7 @@ public class Certer implements NpcHandler {
|
||||
public static final World world = Instance.getWorld();
|
||||
|
||||
public void handleNpc(final Npc npc, Player player) throws Exception {
|
||||
final CerterDef certerDef = EntityHandler.getCerterDef(npc.getID());
|
||||
final CerterDefinition certerDef = EntityHandler.getCerterDef(npc.getID());
|
||||
if (certerDef == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ package org.moparscape.msc.gs.npchandler;
|
||||
/**
|
||||
* The definition of a npc handler, for use with XStream.
|
||||
*/
|
||||
public class NpcHandlerDef {
|
||||
public class NpcHandlerDefinition {
|
||||
/**
|
||||
* The name of the handler class
|
||||
*/
|
||||
@ -22,7 +22,7 @@ public class NpcHandlerDef {
|
||||
* @param className
|
||||
* The name of the packet handler class
|
||||
*/
|
||||
public NpcHandlerDef(int[] ids, String className) {
|
||||
public NpcHandlerDefinition(int[] ids, String className) {
|
||||
this.ids = ids;
|
||||
this.className = className;
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
package org.rscdaemon.server.npchandler;
|
||||
|
||||
import org.rscdaemon.server.model.Player;
|
||||
import org.rscdaemon.server.model.Npc;
|
||||
import org.rscdaemon.server.model.World;
|
||||
import org.rscdaemon.server.model.ChatMessage;
|
||||
import org.rscdaemon.server.model.MenuHandler;
|
||||
import org.rscdaemon.server.model.Shop;
|
||||
import org.rscdaemon.server.event.ShortEvent;
|
||||
|
||||
public class ShopKeeper implements NpcHandler {
|
||||
/**
|
||||
* World instance
|
||||
*/
|
||||
public static final World world = World.getWorld();
|
||||
|
||||
public void handleNpc(final Npc npc, Player player) throws Exception {
|
||||
final Shop shop = world.getShop(npc.getLocation());
|
||||
if(shop == null) {
|
||||
return;
|
||||
}
|
||||
if(shop.getGreeting() != null) {
|
||||
player.informOfNpcMessage(new ChatMessage(npc, shop.getGreeting(), player));
|
||||
}
|
||||
player.setBusy(true);
|
||||
world.getDelayedEventHandler().add(new ShortEvent(player) {
|
||||
public void action() {
|
||||
owner.setBusy(false);
|
||||
owner.setMenuHandler(new MenuHandler(shop.getOptions()) {
|
||||
public void handleReply(final int option, final String reply) {
|
||||
if(owner.isBusy()) {
|
||||
return;
|
||||
}
|
||||
owner.informOfChatMessage(new ChatMessage(owner, reply, npc));
|
||||
owner.setBusy(true);
|
||||
world.getDelayedEventHandler().add(new ShortEvent(owner) {
|
||||
public void action() {
|
||||
owner.setBusy(false);
|
||||
if(option == 0) {
|
||||
owner.setAccessingShop(shop);
|
||||
owner.getActionSender().showShop(shop);
|
||||
}
|
||||
npc.unblock();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
owner.getActionSender().sendMenu(shop.getOptions());
|
||||
}
|
||||
});
|
||||
npc.blockedBy(player);
|
||||
}
|
||||
|
||||
}
|
@ -8,8 +8,38 @@ import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.Point;
|
||||
import org.moparscape.msc.gs.model.Shop;
|
||||
import org.moparscape.msc.gs.model.TelePoint;
|
||||
import org.moparscape.msc.gs.npchandler.NpcHandlerDef;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandlerDef;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.extra.CerterDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.extra.DoorDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.extra.TileDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.AgilityCourseDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.AgilityDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.FiremakingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemArrowHeadDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemBowStringDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemCookingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemCraftingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemDartTipDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemGemDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemHerbDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemHerbSecondDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemLogCutDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemSmithingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemUnIdentHerbDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemWieldableDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectFishingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectMiningDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.PrayerDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.SpellDefinition;
|
||||
import org.moparscape.msc.gs.npchandler.NpcHandlerDefinition;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandlerDefinition;
|
||||
|
||||
/**
|
||||
* Any retrieval of unchanging data should be done through this interface. All
|
||||
@ -23,18 +53,18 @@ import org.moparscape.msc.gs.phandler.PacketHandlerDef;
|
||||
*/
|
||||
public abstract interface DataStore {
|
||||
|
||||
public PacketHandlerDef[] loadPacketHandlerDefs() throws Exception;
|
||||
public PacketHandlerDefinition[] loadPacketHandlerDefs() throws Exception;
|
||||
|
||||
public void savePacketHandlerDefs(PacketHandlerDef[] defs) throws Exception;
|
||||
public void savePacketHandlerDefs(PacketHandlerDefinition[] defs) throws Exception;
|
||||
|
||||
public PacketHandlerDef[] loadLSPacketHandlerDefs() throws Exception;
|
||||
public PacketHandlerDefinition[] loadLSPacketHandlerDefs() throws Exception;
|
||||
|
||||
public void saveLSPacketHandlerDefs(PacketHandlerDef[] defs)
|
||||
public void saveLSPacketHandlerDefs(PacketHandlerDefinition[] defs)
|
||||
throws Exception;
|
||||
|
||||
public NpcHandlerDef[] loadNpcHandlers() throws Exception;
|
||||
public NpcHandlerDefinition[] loadNpcHandlers() throws Exception;
|
||||
|
||||
public void saveNpcHandlers(NpcHandlerDef[] defs) throws Exception;
|
||||
public void saveNpcHandlers(NpcHandlerDefinition[] defs) throws Exception;
|
||||
|
||||
public Map<Point, TelePoint> loadTelePoints() throws Exception;
|
||||
|
||||
@ -44,158 +74,158 @@ public abstract interface DataStore {
|
||||
|
||||
public void saveShops(List<Shop> shops) throws Exception;
|
||||
|
||||
public Map<Integer, CerterDef> loadCerterDefs() throws Exception;
|
||||
public Map<Integer, CerterDefinition> loadCerterDefs() throws Exception;
|
||||
|
||||
public void saveCerterDefs(Map<Integer, CerterDef> certers)
|
||||
public void saveCerterDefs(Map<Integer, CerterDefinition> certers)
|
||||
throws Exception;
|
||||
|
||||
public List<GameObjectLoc> loadGameObjectLocs() throws Exception;
|
||||
public List<GameObjectLocationDefinition> loadGameObjectLocs() throws Exception;
|
||||
|
||||
public void saveGameObjectLocs(List<GameObjectLoc> locs) throws Exception;
|
||||
public void saveGameObjectLocs(List<GameObjectLocationDefinition> locs) throws Exception;
|
||||
|
||||
public List<ItemLoc> loadItemLocs() throws Exception;
|
||||
public List<ItemLocationDefinition> loadItemLocs() throws Exception;
|
||||
|
||||
public void saveItemLocs(List<ItemLoc> locs) throws Exception;
|
||||
public void saveItemLocs(List<ItemLocationDefinition> locs) throws Exception;
|
||||
|
||||
public List<NPCLoc> loadNPCLocs() throws Exception;
|
||||
public List<NPCLocationDefinition> loadNPCLocs() throws Exception;
|
||||
|
||||
public void saveNPCLocs(List<NPCLoc> locs) throws Exception;
|
||||
public void saveNPCLocs(List<NPCLocationDefinition> locs) throws Exception;
|
||||
|
||||
public TileDef[] loadTileDefs() throws Exception;
|
||||
public TileDefinition[] loadTileDefs() throws Exception;
|
||||
|
||||
public void saveTileDefs(TileDef[] defs) throws Exception;
|
||||
public void saveTileDefs(TileDefinition[] defs) throws Exception;
|
||||
|
||||
public GameObjectDef[] loadGameObjectDefs() throws Exception;
|
||||
public GameObjectDefinition[] loadGameObjectDefs() throws Exception;
|
||||
|
||||
public void saveGameObjectDefs(GameObjectDef[] defs) throws Exception;
|
||||
public void saveGameObjectDefs(GameObjectDefinition[] defs) throws Exception;
|
||||
|
||||
public DoorDef[] loadDoorDefs() throws Exception;
|
||||
public DoorDefinition[] loadDoorDefs() throws Exception;
|
||||
|
||||
public void saveDoorDefs(DoorDef[] defs) throws Exception;
|
||||
public void saveDoorDefs(DoorDefinition[] defs) throws Exception;
|
||||
|
||||
public ItemDef[] loadItemDefs() throws Exception;
|
||||
public ItemDefinition[] loadItemDefs() throws Exception;
|
||||
|
||||
public void saveItemDefs(ItemDef[] defs) throws Exception;
|
||||
public void saveItemDefs(ItemDefinition[] defs) throws Exception;
|
||||
|
||||
public PrayerDef[] loadPrayerDefs() throws Exception;
|
||||
public PrayerDefinition[] loadPrayerDefs() throws Exception;
|
||||
|
||||
public void savePrayerDefs(PrayerDef[] defs) throws Exception;
|
||||
public void savePrayerDefs(PrayerDefinition[] defs) throws Exception;
|
||||
|
||||
public SpellDef[] loadSpellDefs() throws Exception;
|
||||
public SpellDefinition[] loadSpellDefs() throws Exception;
|
||||
|
||||
public void saveSpellDefs(SpellDef[] defs) throws Exception;
|
||||
public void saveSpellDefs(SpellDefinition[] defs) throws Exception;
|
||||
|
||||
public NPCDef[] loadNPCDefs() throws Exception;
|
||||
public NPCDefinition[] loadNPCDefs() throws Exception;
|
||||
|
||||
public void saveNPCDefs(NPCDef[] defs) throws Exception;
|
||||
public void saveNPCDefs(NPCDefinition[] defs) throws Exception;
|
||||
|
||||
public ItemCraftingDef[] loadItemCraftingDefs() throws Exception;
|
||||
public ItemCraftingDefinition[] loadItemCraftingDefs() throws Exception;
|
||||
|
||||
public void saveItemCraftingDefs(ItemCraftingDef[] defs) throws Exception;
|
||||
public void saveItemCraftingDefs(ItemCraftingDefinition[] defs) throws Exception;
|
||||
|
||||
public ItemHerbSecond[] loadItemHerbSeconds() throws Exception;
|
||||
public ItemHerbSecondDefinition[] loadItemHerbSeconds() throws Exception;
|
||||
|
||||
public void saveItemHerbSeconds(ItemHerbSecond[] seconds) throws Exception;
|
||||
public void saveItemHerbSeconds(ItemHerbSecondDefinition[] seconds) throws Exception;
|
||||
|
||||
public Map<Integer, ItemDartTipDef> loadItemDartTipDefs() throws Exception;
|
||||
public Map<Integer, ItemDartTipDefinition> loadItemDartTipDefs() throws Exception;
|
||||
|
||||
public void saveItemDartTipDefs(Map<Integer, ItemDartTipDef> defs)
|
||||
public void saveItemDartTipDefs(Map<Integer, ItemDartTipDefinition> defs)
|
||||
throws Exception;
|
||||
|
||||
public Map<Integer, ItemGemDef> loadGemDefs() throws Exception;
|
||||
public Map<Integer, ItemGemDefinition> loadGemDefs() throws Exception;
|
||||
|
||||
public void saveGemDefs(Map<Integer, ItemGemDef> defs) throws Exception;
|
||||
public void saveGemDefs(Map<Integer, ItemGemDefinition> defs) throws Exception;
|
||||
|
||||
public Map<Integer, ItemLogCutDef> loadItemLogCutDefs() throws Exception;
|
||||
public Map<Integer, ItemLogCutDefinition> loadItemLogCutDefs() throws Exception;
|
||||
|
||||
public void saveItemLogCutDefs(Map<Integer, ItemLogCutDef> defs)
|
||||
public void saveItemLogCutDefs(Map<Integer, ItemLogCutDefinition> defs)
|
||||
throws Exception;
|
||||
|
||||
public Map<Integer, ItemBowStringDef> loadItemBowStringDefs()
|
||||
public Map<Integer, ItemBowStringDefinition> loadItemBowStringDefs()
|
||||
throws Exception;
|
||||
|
||||
public void saveItemBowStringDefs(Map<Integer, ItemBowStringDef> defs)
|
||||
public void saveItemBowStringDefs(Map<Integer, ItemBowStringDefinition> defs)
|
||||
throws Exception;
|
||||
|
||||
public Map<Integer, ItemArrowHeadDef> loadItemArrowHeadDefs()
|
||||
public Map<Integer, ItemArrowHeadDefinition> loadItemArrowHeadDefs()
|
||||
throws Exception;
|
||||
|
||||
public void saveItemArrowHeadDefs(Map<Integer, ItemArrowHeadDef> defs)
|
||||
public void saveItemArrowHeadDefs(Map<Integer, ItemArrowHeadDefinition> defs)
|
||||
throws Exception;
|
||||
|
||||
public Map<Integer, FiremakingDef> loadFiremakingDefs() throws Exception;
|
||||
public Map<Integer, FiremakingDefinition> loadFiremakingDefs() throws Exception;
|
||||
|
||||
public void saveFiremakingDefs(Map<Integer, FiremakingDef> defs)
|
||||
public void saveFiremakingDefs(Map<Integer, FiremakingDefinition> defs)
|
||||
throws Exception;
|
||||
|
||||
public Map<Integer, int[]> loadItemAffectedTypes() throws Exception;
|
||||
|
||||
public void saveItemAffectedTypes(Map<Integer, int[]> types) throws Exception;
|
||||
|
||||
public Map<Integer, ItemWieldableDef> loadItemWieldableDefs()
|
||||
public Map<Integer, ItemWieldableDefinition> loadItemWieldableDefs()
|
||||
throws Exception;
|
||||
|
||||
public void saveItemWieldableDefs(Map<Integer, ItemWieldableDef> defs) throws Exception;
|
||||
public void saveItemWieldableDefs(Map<Integer, ItemWieldableDefinition> defs) throws Exception;
|
||||
|
||||
public Map<Integer, ItemUnIdentHerbDef> loadItemUnIdentHerbDefs()
|
||||
public Map<Integer, ItemUnIdentHerbDefinition> loadItemUnIdentHerbDefs()
|
||||
throws Exception;
|
||||
|
||||
public void saveItemUnIdentHerbDefs(Map<Integer, ItemUnIdentHerbDef> defs) throws Exception;
|
||||
public void saveItemUnIdentHerbDefs(Map<Integer, ItemUnIdentHerbDefinition> defs) throws Exception;
|
||||
|
||||
public Map<Integer, ItemHerbDef> loadItemHerbDefs() throws Exception;
|
||||
public Map<Integer, ItemHerbDefinition> loadItemHerbDefs() throws Exception;
|
||||
|
||||
public void saveItemHerbDefs(Map<Integer, ItemHerbDef> defs) throws Exception;
|
||||
public void saveItemHerbDefs(Map<Integer, ItemHerbDefinition> defs) throws Exception;
|
||||
|
||||
public Map<Integer, Integer> loadItemEdibleHeals() throws Exception;
|
||||
|
||||
public void saveItemEdibleHeals(Map<Integer, Integer> defs) throws Exception;
|
||||
|
||||
public Map<Integer, ItemCookingDef> loadItemCookingDefs() throws Exception;
|
||||
public Map<Integer, ItemCookingDefinition> loadItemCookingDefs() throws Exception;
|
||||
|
||||
public void saveItemCookingDefs(Map<Integer, ItemCookingDef> defs) throws Exception;
|
||||
public void saveItemCookingDefs(Map<Integer, ItemCookingDefinition> defs) throws Exception;
|
||||
|
||||
public Map<Integer, ItemSmeltingDef> loadItemSmeltingDefs()
|
||||
public Map<Integer, ItemSmeltingDefinition> loadItemSmeltingDefs()
|
||||
throws Exception;
|
||||
|
||||
public void saveItemSmeltingDefs(Map<Integer, ItemSmeltingDef> defs) throws Exception;
|
||||
public void saveItemSmeltingDefs(Map<Integer, ItemSmeltingDefinition> defs) throws Exception;
|
||||
|
||||
public ItemSmithingDef[] loadItemSmithingDefs() throws Exception;
|
||||
public ItemSmithingDefinition[] loadItemSmithingDefs() throws Exception;
|
||||
|
||||
public void saveItemSmithingDefs(ItemSmithingDef[] defs) throws Exception;
|
||||
public void saveItemSmithingDefs(ItemSmithingDefinition[] defs) throws Exception;
|
||||
|
||||
public Map<Integer, ObjectMiningDef> loadObjectMiningDefs()
|
||||
public Map<Integer, ObjectMiningDefinition> loadObjectMiningDefs()
|
||||
throws Exception;
|
||||
|
||||
public void saveObjectMiningDefs(Map<Integer, ObjectMiningDef> defs) throws Exception;
|
||||
public void saveObjectMiningDefs(Map<Integer, ObjectMiningDefinition> defs) throws Exception;
|
||||
|
||||
public Map<Integer, ObjectWoodcuttingDef> loadObjectWoodcuttingDefs()
|
||||
public Map<Integer, ObjectWoodcuttingDefinition> loadObjectWoodcuttingDefs()
|
||||
throws Exception;
|
||||
|
||||
public void saveObjectWoodcuttingDefs(Map<Integer, ObjectWoodcuttingDef> defs) throws Exception;
|
||||
public void saveObjectWoodcuttingDefs(Map<Integer, ObjectWoodcuttingDefinition> defs) throws Exception;
|
||||
|
||||
public Map<Integer, ObjectFishingDef[]> loadObjectFishDefs()
|
||||
public Map<Integer, ObjectFishingDefinition[]> loadObjectFishDefs()
|
||||
throws Exception;
|
||||
|
||||
public void saveObjectFishingDefs(Map<Integer, ObjectFishingDef> defs) throws Exception;
|
||||
public void saveObjectFishingDefs(Map<Integer, ObjectFishingDefinition> defs) throws Exception;
|
||||
|
||||
public Map<Integer, Integer> loadSpellAgressiveLevel() throws Exception;
|
||||
|
||||
public void saveSpellAgressiveLevel(Map<Integer, Integer> defs) throws Exception;
|
||||
|
||||
public Map<Integer, AgilityDef> loadAgilityDefs() throws Exception;
|
||||
public Map<Integer, AgilityDefinition> loadAgilityDefs() throws Exception;
|
||||
|
||||
public void saveAgilityDefs(Map<Integer, AgilityDef> defs) throws Exception;
|
||||
public void saveAgilityDefs(Map<Integer, AgilityDefinition> defs) throws Exception;
|
||||
|
||||
public Map<Integer, AgilityCourseDef> loadAgilityCourseDefs()
|
||||
public Map<Integer, AgilityCourseDefinition> loadAgilityCourseDefs()
|
||||
throws Exception;
|
||||
|
||||
public void saveAgilityCourseDef(Map<Integer, AgilityCourseDef> defs) throws Exception;
|
||||
public void saveAgilityCourseDef(Map<Integer, AgilityCourseDefinition> defs) throws Exception;
|
||||
|
||||
public List<InvItem>[] loadKeyChestLoots() throws Exception;
|
||||
|
||||
public void saveKeyChestLoots(List<InvItem>[] loots) throws Exception;
|
||||
|
||||
public Map<Integer, ItemDartTipDef> loadDartTips() throws Exception;
|
||||
public Map<Integer, ItemDartTipDefinition> loadDartTips() throws Exception;
|
||||
|
||||
public void dispose();
|
||||
|
||||
|
@ -3,7 +3,7 @@ package org.moparscape.msc.gs.phandler;
|
||||
/**
|
||||
* The definition of a packet handler, for use with XStream.
|
||||
*/
|
||||
public class PacketHandlerDef {
|
||||
public class PacketHandlerDefinition {
|
||||
/**
|
||||
* The name of the handler class
|
||||
*/
|
||||
@ -22,7 +22,7 @@ public class PacketHandlerDef {
|
||||
* @param className
|
||||
* The name of the packet handler class
|
||||
*/
|
||||
public PacketHandlerDef(int[] ids, String className) {
|
||||
public PacketHandlerDefinition(int[] ids, String className) {
|
||||
this.ids = ids;
|
||||
this.className = className;
|
||||
}
|
@ -4,12 +4,12 @@ import org.apache.mina.common.IoSession;
|
||||
import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.connection.Packet;
|
||||
import org.moparscape.msc.gs.connection.RSCPacket;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.Bank;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.Inventory;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.snapshot.Activity;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandler;
|
||||
|
||||
|
@ -11,11 +11,11 @@ import org.moparscape.msc.gs.core.GameEngine;
|
||||
import org.moparscape.msc.gs.event.DuelEvent;
|
||||
import org.moparscape.msc.gs.event.SingleEvent;
|
||||
import org.moparscape.msc.gs.event.WalkToMobEvent;
|
||||
import org.moparscape.msc.gs.external.ItemDef;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.Inventory;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemDefinition;
|
||||
import org.moparscape.msc.gs.model.landscape.PathGenerator;
|
||||
import org.moparscape.msc.gs.model.snapshot.Activity;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandler;
|
||||
@ -393,7 +393,7 @@ public class DuelHandler implements PacketHandler {
|
||||
player.setSuspiciousPlayer(true);
|
||||
continue;
|
||||
}
|
||||
ItemDef def = tItem.getDef();
|
||||
ItemDefinition def = tItem.getDef();
|
||||
if (!def.canTrade()) {
|
||||
player.getActionSender().sendMessage(
|
||||
def.getName()
|
||||
|
@ -8,7 +8,6 @@ import org.moparscape.msc.gs.connection.Packet;
|
||||
import org.moparscape.msc.gs.event.DelayedEvent;
|
||||
import org.moparscape.msc.gs.event.MiniEvent;
|
||||
import org.moparscape.msc.gs.event.SingleEvent;
|
||||
import org.moparscape.msc.gs.external.ItemUnIdentHerbDef;
|
||||
import org.moparscape.msc.gs.model.Bubble;
|
||||
import org.moparscape.msc.gs.model.GameObject;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
@ -16,6 +15,7 @@ import org.moparscape.msc.gs.model.MenuHandler;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.Point;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemUnIdentHerbDefinition;
|
||||
import org.moparscape.msc.gs.model.landscape.ActiveTile;
|
||||
import org.moparscape.msc.gs.model.snapshot.Activity;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandler;
|
||||
@ -88,7 +88,7 @@ public class InvActionHandler implements PacketHandler {
|
||||
"This feature is only avaliable on a members server");
|
||||
return;
|
||||
}
|
||||
ItemUnIdentHerbDef herb = item.getUnIdentHerbDef();
|
||||
ItemUnIdentHerbDefinition herb = item.getUnIdentHerbDef();
|
||||
if (herb == null) {
|
||||
return;
|
||||
}
|
||||
@ -101,7 +101,7 @@ public class InvActionHandler implements PacketHandler {
|
||||
player.setBusy(true);
|
||||
Instance.getDelayedEventHandler().add(new MiniEvent(player) {
|
||||
public void action() {
|
||||
ItemUnIdentHerbDef herb = item.getUnIdentHerbDef();
|
||||
ItemUnIdentHerbDefinition herb = item.getUnIdentHerbDef();
|
||||
InvItem newItem = new InvItem(herb.getNewId());
|
||||
owner.getInventory().remove(item);
|
||||
owner.getInventory().add(newItem);
|
||||
|
@ -7,8 +7,6 @@ import org.moparscape.msc.gs.connection.Packet;
|
||||
import org.moparscape.msc.gs.event.DelayedEvent;
|
||||
import org.moparscape.msc.gs.event.ShortEvent;
|
||||
import org.moparscape.msc.gs.event.WalkToPointEvent;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.FiremakingDef;
|
||||
import org.moparscape.msc.gs.model.Bubble;
|
||||
import org.moparscape.msc.gs.model.GameObject;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
@ -16,6 +14,8 @@ import org.moparscape.msc.gs.model.Item;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.Point;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.skill.FiremakingDefinition;
|
||||
import org.moparscape.msc.gs.model.landscape.ActiveTile;
|
||||
import org.moparscape.msc.gs.model.snapshot.Activity;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandler;
|
||||
@ -138,7 +138,7 @@ public class InvUseOnGroundItem implements PacketHandler {
|
||||
|
||||
private void handleFireMaking(int tries) {
|
||||
final int retries = --tries;
|
||||
final FiremakingDef def = EntityHandler
|
||||
final FiremakingDefinition def = EntityHandler
|
||||
.getFiremakingDef(item.getID());
|
||||
if (!itemId(new int[] { 166 }) || def == null) {
|
||||
owner.getActionSender().sendMessage(
|
||||
|
@ -7,18 +7,18 @@ import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.Server;
|
||||
import org.moparscape.msc.gs.connection.Packet;
|
||||
import org.moparscape.msc.gs.event.MiniEvent;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.ItemArrowHeadDef;
|
||||
import org.moparscape.msc.gs.external.ItemBowStringDef;
|
||||
import org.moparscape.msc.gs.external.ItemDartTipDef;
|
||||
import org.moparscape.msc.gs.external.ItemGemDef;
|
||||
import org.moparscape.msc.gs.external.ItemHerbDef;
|
||||
import org.moparscape.msc.gs.external.ItemHerbSecond;
|
||||
import org.moparscape.msc.gs.external.ItemLogCutDef;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.MenuHandler;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemArrowHeadDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemBowStringDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemDartTipDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemGemDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemHerbDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemHerbSecondDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemLogCutDefinition;
|
||||
import org.moparscape.msc.gs.model.snapshot.Activity;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandler;
|
||||
import org.moparscape.msc.gs.tools.DataConversions;
|
||||
@ -49,7 +49,7 @@ public class InvUseOnItem implements PacketHandler {
|
||||
}
|
||||
InvItem newItem;
|
||||
int exp;
|
||||
ItemDartTipDef tipDef = null;
|
||||
ItemDartTipDefinition tipDef = null;
|
||||
if (item.getID() == 280) {
|
||||
newItem = new InvItem(637, amount);
|
||||
exp = amount;
|
||||
@ -96,7 +96,7 @@ public class InvUseOnItem implements PacketHandler {
|
||||
|
||||
private boolean doArrowHeads(Player player, final InvItem headlessArrows,
|
||||
final InvItem arrowHeads) {
|
||||
final ItemArrowHeadDef headDef = EntityHandler
|
||||
final ItemArrowHeadDefinition headDef = EntityHandler
|
||||
.getItemArrowHeadDef(arrowHeads.getID());
|
||||
if (!Config.members) {
|
||||
player.getActionSender().sendMessage(
|
||||
@ -141,7 +141,7 @@ public class InvUseOnItem implements PacketHandler {
|
||||
|
||||
private boolean doBowString(Player player, final InvItem bowString,
|
||||
final InvItem bow) {
|
||||
final ItemBowStringDef stringDef = EntityHandler
|
||||
final ItemBowStringDefinition stringDef = EntityHandler
|
||||
.getItemBowStringDef(bow.getID());
|
||||
if (!Config.members) {
|
||||
player.getActionSender().sendMessage(
|
||||
@ -177,7 +177,7 @@ public class InvUseOnItem implements PacketHandler {
|
||||
|
||||
private boolean doCutGem(Player player, final InvItem chisel,
|
||||
final InvItem gem) {
|
||||
final ItemGemDef gemDef = EntityHandler.getItemGemDef(gem.getID());
|
||||
final ItemGemDefinition gemDef = EntityHandler.getItemGemDef(gem.getID());
|
||||
if (gemDef == null) {
|
||||
return false;
|
||||
}
|
||||
@ -288,7 +288,7 @@ public class InvUseOnItem implements PacketHandler {
|
||||
|
||||
private boolean doHerblaw(Player player, final InvItem vial,
|
||||
final InvItem herb) {
|
||||
final ItemHerbDef herbDef = EntityHandler.getItemHerbDef(herb.getID());
|
||||
final ItemHerbDefinition herbDef = EntityHandler.getItemHerbDef(herb.getID());
|
||||
if (herbDef == null) {
|
||||
return false;
|
||||
}
|
||||
@ -322,7 +322,7 @@ public class InvUseOnItem implements PacketHandler {
|
||||
}
|
||||
|
||||
private boolean doHerbSecond(Player player, final InvItem second,
|
||||
final InvItem unfinished, final ItemHerbSecond def) {
|
||||
final InvItem unfinished, final ItemHerbSecondDefinition def) {
|
||||
if (!Config.members) {
|
||||
player.getActionSender().sendMessage(
|
||||
"This feature is not avaliable in f2p");
|
||||
@ -359,7 +359,7 @@ public class InvUseOnItem implements PacketHandler {
|
||||
private boolean doLogCut(final Player player, final InvItem knife,
|
||||
final InvItem log, int times) {
|
||||
final int retries = --times;
|
||||
final ItemLogCutDef cutDef = EntityHandler
|
||||
final ItemLogCutDefinition cutDef = EntityHandler
|
||||
.getItemLogCutDef(log.getID());
|
||||
if (!Config.members) {
|
||||
player.getActionSender().sendMessage(
|
||||
@ -455,7 +455,7 @@ public class InvUseOnItem implements PacketHandler {
|
||||
|
||||
World.getQuestManager().handleUseItemOnItem(item1, item2, player);
|
||||
|
||||
ItemHerbSecond secondDef = null;
|
||||
ItemHerbSecondDefinition secondDef = null;
|
||||
if ((secondDef = EntityHandler.getItemHerbSecond(item1.getID(),
|
||||
item2.getID())) != null
|
||||
&& doHerbSecond(player, item1, item2, secondDef)) {
|
||||
|
@ -13,13 +13,6 @@ import org.moparscape.msc.gs.core.GameEngine;
|
||||
import org.moparscape.msc.gs.event.MiniEvent;
|
||||
import org.moparscape.msc.gs.event.ShortEvent;
|
||||
import org.moparscape.msc.gs.event.WalkToObjectEvent;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.ItemCookingDef;
|
||||
import org.moparscape.msc.gs.external.ItemCraftingDef;
|
||||
import org.moparscape.msc.gs.external.ItemSmeltingDef;
|
||||
import org.moparscape.msc.gs.external.ItemSmithingDef;
|
||||
import org.moparscape.msc.gs.external.ItemWieldableDef;
|
||||
import org.moparscape.msc.gs.external.ReqOreDef;
|
||||
import org.moparscape.msc.gs.model.Bubble;
|
||||
import org.moparscape.msc.gs.model.ChatMessage;
|
||||
import org.moparscape.msc.gs.model.GameObject;
|
||||
@ -28,6 +21,13 @@ import org.moparscape.msc.gs.model.MenuHandler;
|
||||
import org.moparscape.msc.gs.model.Npc;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemCookingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemCraftingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemSmithingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemWieldableDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ReqOreDefinition;
|
||||
import org.moparscape.msc.gs.model.landscape.ActiveTile;
|
||||
import org.moparscape.msc.gs.model.snapshot.Activity;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandler;
|
||||
@ -62,7 +62,7 @@ public class InvUseOnObject implements PacketHandler {
|
||||
owner.resetAll();
|
||||
switch (object.getID()) {
|
||||
case 24: // Web
|
||||
ItemWieldableDef def = item.getWieldableDef();
|
||||
ItemWieldableDefinition def = item.getWieldableDef();
|
||||
if ((def == null || def.getWieldPos() != 4)
|
||||
&& item.getID() != 13) {
|
||||
owner.getActionSender().sendMessage(
|
||||
@ -463,7 +463,7 @@ public class InvUseOnObject implements PacketHandler {
|
||||
+ ".");
|
||||
return;
|
||||
}
|
||||
ItemCraftingDef def = EntityHandler
|
||||
ItemCraftingDefinition def = EntityHandler
|
||||
.getCraftingDef((option * 3)
|
||||
+ craftType);
|
||||
if (def == null) {
|
||||
@ -1218,13 +1218,13 @@ public class InvUseOnObject implements PacketHandler {
|
||||
|
||||
private void handleRegularSmelting(int times1) {
|
||||
final int times = --times1;
|
||||
ItemSmeltingDef smeltingDef = item.getSmeltingDef();
|
||||
ItemSmeltingDefinition smeltingDef = item.getSmeltingDef();
|
||||
if (smeltingDef == null) {
|
||||
owner.getActionSender().sendMessage(
|
||||
"Nothing interesting happens.");
|
||||
return;
|
||||
}
|
||||
for (ReqOreDef reqOre : smeltingDef.getReqOres()) {
|
||||
for (ReqOreDefinition reqOre : smeltingDef.getReqOres()) {
|
||||
if (owner.getInventory().countId(reqOre.getId()) < reqOre
|
||||
.getAmount()) {
|
||||
if (item.getID() == 151) {
|
||||
@ -1264,14 +1264,14 @@ public class InvUseOnObject implements PacketHandler {
|
||||
"You smelt the " + item.getDef().getName()
|
||||
+ " in the furnace.");
|
||||
|
||||
final ItemSmeltingDef def = smeltingDef;
|
||||
final ItemSmeltingDefinition def = smeltingDef;
|
||||
Instance.getDelayedEventHandler().add(
|
||||
new ShortEvent(owner) {
|
||||
public void action() {
|
||||
InvItem bar = new InvItem(def
|
||||
.getBarId());
|
||||
if (owner.getInventory().remove(item) > -1) {
|
||||
for (ReqOreDef reqOre : def
|
||||
for (ReqOreDefinition reqOre : def
|
||||
.getReqOres()) {
|
||||
for (int i = 0; i < reqOre
|
||||
.getAmount(); i++) {
|
||||
@ -1381,7 +1381,7 @@ public class InvUseOnObject implements PacketHandler {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
final ItemCookingDef cookingDef = item
|
||||
final ItemCookingDefinition cookingDef = item
|
||||
.getCookingDef();
|
||||
if (cookingDef == null) {
|
||||
owner.getActionSender().sendMessage(
|
||||
@ -1457,7 +1457,7 @@ public class InvUseOnObject implements PacketHandler {
|
||||
|
||||
|
||||
private void handleSmithing(int barID, int toMake) {
|
||||
ItemSmithingDef def = EntityHandler.getSmithingDef((Formulae.getBarType(barID) * 21) + toMake);
|
||||
ItemSmithingDefinition def = EntityHandler.getSmithingDef((Formulae.getBarType(barID) * 21) + toMake);
|
||||
if(def == null) {
|
||||
owner.getActionSender().sendMessage("Nothing interesting happens.");
|
||||
return;
|
||||
|
@ -15,13 +15,6 @@ import org.moparscape.msc.gs.event.MiniEvent;
|
||||
import org.moparscape.msc.gs.event.ShortEvent;
|
||||
import org.moparscape.msc.gs.event.SingleEvent;
|
||||
import org.moparscape.msc.gs.event.WalkToObjectEvent;
|
||||
import org.moparscape.msc.gs.external.AgilityCourseDef;
|
||||
import org.moparscape.msc.gs.external.AgilityDef;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.GameObjectDef;
|
||||
import org.moparscape.msc.gs.external.ObjectFishDef;
|
||||
import org.moparscape.msc.gs.external.ObjectFishingDef;
|
||||
import org.moparscape.msc.gs.external.ObjectWoodcuttingDef;
|
||||
import org.moparscape.msc.gs.model.Bubble;
|
||||
import org.moparscape.msc.gs.model.ChatMessage;
|
||||
import org.moparscape.msc.gs.model.GameObject;
|
||||
@ -33,6 +26,13 @@ import org.moparscape.msc.gs.model.Path;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.Point;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.AgilityCourseDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.AgilityDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectFishDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectFishingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDefinition;
|
||||
import org.moparscape.msc.gs.model.landscape.ActiveTile;
|
||||
import org.moparscape.msc.gs.model.snapshot.Activity;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandler;
|
||||
@ -128,7 +128,7 @@ public class ObjectAction implements PacketHandler {
|
||||
if (owner.getStatus() != Action.AGILITYING)
|
||||
owner.resetPath();
|
||||
|
||||
GameObjectDef def = object.getGameObjectDef();
|
||||
GameObjectDefinition def = object.getGameObjectDef();
|
||||
if (owner.isBusy() || owner.isRanging()
|
||||
|| !owner.nextTo(object) || def == null
|
||||
|| owner.getStatus() != Action.USING_OBJECT) {
|
||||
@ -1025,7 +1025,7 @@ public class ObjectAction implements PacketHandler {
|
||||
"This feature is only avaliable on a members server");
|
||||
return;
|
||||
}
|
||||
final AgilityDef def = EntityHandler
|
||||
final AgilityDefinition def = EntityHandler
|
||||
.getAgilityDef(object.getID());
|
||||
if (owner.getCurStat(16) < def.getReqLevel()) {
|
||||
owner.getActionSender().sendMessage(
|
||||
@ -1105,7 +1105,7 @@ public class ObjectAction implements PacketHandler {
|
||||
owner.getActionSender()
|
||||
.sendStat(16);
|
||||
|
||||
AgilityCourseDef course = EntityHandler
|
||||
AgilityCourseDefinition course = EntityHandler
|
||||
.getAgilityCourseDef(object
|
||||
.getID());
|
||||
|
||||
@ -1195,7 +1195,7 @@ public class ObjectAction implements PacketHandler {
|
||||
|
||||
private void handleFishing(final int click, int passvalue) {
|
||||
final int tries = --passvalue;
|
||||
final ObjectFishingDef def = EntityHandler
|
||||
final ObjectFishingDefinition def = EntityHandler
|
||||
.getObjectFishingDef(object.getID(), click);
|
||||
if (owner.isBusy()) {
|
||||
return;
|
||||
@ -1245,7 +1245,7 @@ public class ObjectAction implements PacketHandler {
|
||||
Instance.getDelayedEventHandler().add(
|
||||
new ShortEvent(owner) {
|
||||
public void action() {
|
||||
ObjectFishDef def = Formulae.getFish(
|
||||
ObjectFishDefinition def = Formulae.getFish(
|
||||
object.getID(),
|
||||
owner.getCurStat(10), click);
|
||||
if (def != null) {
|
||||
@ -1299,7 +1299,7 @@ public class ObjectAction implements PacketHandler {
|
||||
private void handleWoodcutting(final int click,
|
||||
int passedvalue) {
|
||||
final int tries = --passedvalue;
|
||||
final ObjectWoodcuttingDef def = EntityHandler
|
||||
final ObjectWoodcuttingDefinition def = EntityHandler
|
||||
.getObjectWoodcuttingDef(object.getID());
|
||||
if (owner.isBusy()) {
|
||||
return;
|
||||
|
@ -4,10 +4,10 @@ import org.apache.mina.common.IoSession;
|
||||
import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.connection.Packet;
|
||||
import org.moparscape.msc.gs.connection.RSCPacket;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.PrayerDef;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.skill.PrayerDefinition;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandler;
|
||||
|
||||
public class PrayerHandler implements PacketHandler {
|
||||
@ -77,7 +77,7 @@ public class PrayerHandler implements PacketHandler {
|
||||
player.getActionSender().sendPrayers();
|
||||
return;
|
||||
}
|
||||
PrayerDef prayer = EntityHandler.getPrayerDef(prayerID);
|
||||
PrayerDefinition prayer = EntityHandler.getPrayerDef(prayerID);
|
||||
switch (pID) {
|
||||
case 56:
|
||||
if (player.getMaxStat(5) < prayer.getReqLevel()) {
|
||||
|
@ -22,10 +22,6 @@ import org.moparscape.msc.gs.event.ObjectRemover;
|
||||
import org.moparscape.msc.gs.event.WalkMobToMobEvent;
|
||||
import org.moparscape.msc.gs.event.WalkToMobEvent;
|
||||
import org.moparscape.msc.gs.event.WalkToPointEvent;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.ItemSmeltingDef;
|
||||
import org.moparscape.msc.gs.external.ReqOreDef;
|
||||
import org.moparscape.msc.gs.external.SpellDef;
|
||||
import org.moparscape.msc.gs.model.GameObject;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.Item;
|
||||
@ -34,6 +30,10 @@ import org.moparscape.msc.gs.model.Npc;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.Projectile;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ReqOreDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.SpellDefinition;
|
||||
import org.moparscape.msc.gs.model.landscape.ActiveTile;
|
||||
import org.moparscape.msc.gs.model.landscape.PathGenerator;
|
||||
import org.moparscape.msc.gs.model.mini.Damage;
|
||||
@ -76,7 +76,7 @@ public class SpellHandler implements PacketHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static boolean checkAndRemoveRunes(Player player, SpellDef spell) {
|
||||
private static boolean checkAndRemoveRunes(Player player, SpellDefinition spell) {
|
||||
for (Entry<Integer, Integer> e : spell.getRunesRequired()) {
|
||||
boolean skipRune = false;
|
||||
for (InvItem staff : getStaffs(e.getKey())) {
|
||||
@ -135,7 +135,7 @@ public class SpellHandler implements PacketHandler {
|
||||
|
||||
private Random r = new Random();
|
||||
|
||||
private void finalizeSpell(Player player, SpellDef spell) {
|
||||
private void finalizeSpell(Player player, SpellDefinition spell) {
|
||||
player.incExp(6, spell.getExp(), true);
|
||||
player.setLastCast(GameEngine.getTime());
|
||||
player.getActionSender().sendSound("spellok");
|
||||
@ -176,7 +176,7 @@ public class SpellHandler implements PacketHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private void handleGroundCast(Player player, SpellDef spell, int id) {
|
||||
private void handleGroundCast(Player player, SpellDefinition spell, int id) {
|
||||
if (player.isAdmin()) {
|
||||
player.getActionSender().sendMessage("Spellid: " + id);
|
||||
}
|
||||
@ -227,7 +227,7 @@ public class SpellHandler implements PacketHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private void handleInvItemCast(Player player, SpellDef spell, int id,
|
||||
private void handleInvItemCast(Player player, SpellDefinition spell, int id,
|
||||
InvItem affectedItem) {
|
||||
switch (id) {
|
||||
case 3: // Enchant lvl-1 Sapphire amulet
|
||||
@ -278,13 +278,13 @@ public class SpellHandler implements PacketHandler {
|
||||
}
|
||||
break;
|
||||
case 21: // Superheat item
|
||||
ItemSmeltingDef smeltingDef = affectedItem.getSmeltingDef();
|
||||
ItemSmeltingDefinition smeltingDef = affectedItem.getSmeltingDef();
|
||||
if (smeltingDef == null) {
|
||||
player.getActionSender().sendMessage(
|
||||
"This spell cannot be used on this kind of item");
|
||||
return;
|
||||
}
|
||||
for (ReqOreDef reqOre : smeltingDef.getReqOres()) {
|
||||
for (ReqOreDefinition reqOre : smeltingDef.getReqOres()) {
|
||||
if (player.getInventory().countId(reqOre.getId()) < reqOre
|
||||
.getAmount()) {
|
||||
if (affectedItem.getID() == 151) {
|
||||
@ -314,7 +314,7 @@ public class SpellHandler implements PacketHandler {
|
||||
}
|
||||
InvItem bar = new InvItem(smeltingDef.getBarId());
|
||||
if (player.getInventory().remove(affectedItem) > -1) {
|
||||
for (ReqOreDef reqOre : smeltingDef.getReqOres()) {
|
||||
for (ReqOreDefinition reqOre : smeltingDef.getReqOres()) {
|
||||
for (int i = 0; i < reqOre.getAmount(); i++) {
|
||||
player.getInventory().remove(
|
||||
new InvItem(reqOre.getId()));
|
||||
@ -408,7 +408,7 @@ public class SpellHandler implements PacketHandler {
|
||||
}
|
||||
}
|
||||
|
||||
private void handleItemCast(Player player, final SpellDef spell,
|
||||
private void handleItemCast(Player player, final SpellDefinition spell,
|
||||
final int id, final Item affectedItem) {
|
||||
player.setStatus(Action.CASTING_GITEM);
|
||||
Instance.getDelayedEventHandler().add(
|
||||
@ -518,7 +518,7 @@ public class SpellHandler implements PacketHandler {
|
||||
player.resetFollowing();
|
||||
owner.resetPath();
|
||||
|
||||
SpellDef spell = EntityHandler.getSpellDef(spellID);
|
||||
SpellDefinition spell = EntityHandler.getSpellDef(spellID);
|
||||
if (!canCast(owner) || affectedMob.getHits() <= 0
|
||||
|| !owner.checkAttack(affectedMob, true)
|
||||
|| owner.getStatus() != Action.CASTING_MOB) {
|
||||
@ -1249,7 +1249,7 @@ public class SpellHandler implements PacketHandler {
|
||||
+ "): "
|
||||
+ player.getX() + "/" + player.getY()));
|
||||
|
||||
SpellDef spell = EntityHandler.getSpellDef(idx);
|
||||
SpellDefinition spell = EntityHandler.getSpellDef(idx);
|
||||
if (player.getCurStat(6) < spell.getReqLevel()) {
|
||||
player.setSuspiciousPlayer(true);
|
||||
player.getActionSender().sendMessage(
|
||||
@ -1417,7 +1417,7 @@ public class SpellHandler implements PacketHandler {
|
||||
player.getActionSender().sendStat(6);
|
||||
}// System.out
|
||||
|
||||
private void handleTeleport(Player player, SpellDef spell, int id) {
|
||||
private void handleTeleport(Player player, SpellDefinition spell, int id) {
|
||||
|
||||
if (player.inCombat()) {
|
||||
return;
|
||||
|
@ -10,11 +10,11 @@ import org.moparscape.msc.gs.connection.Packet;
|
||||
import org.moparscape.msc.gs.connection.RSCPacket;
|
||||
import org.moparscape.msc.gs.core.GameEngine;
|
||||
import org.moparscape.msc.gs.db.DataManager;
|
||||
import org.moparscape.msc.gs.external.ItemDef;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.Inventory;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemDefinition;
|
||||
import org.moparscape.msc.gs.model.landscape.PathGenerator;
|
||||
import org.moparscape.msc.gs.model.snapshot.Activity;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandler;
|
||||
@ -374,7 +374,7 @@ public class TradeHandler implements PacketHandler {
|
||||
player.setRequiresOfferUpdate(true);
|
||||
continue;
|
||||
}
|
||||
ItemDef def = tItem.getDef();
|
||||
ItemDefinition def = tItem.getDef();
|
||||
if (!def.canTrade() && !player.isMod()) {
|
||||
player.getActionSender().sendMessage(
|
||||
def.getName()
|
||||
|
@ -8,14 +8,14 @@ import org.moparscape.msc.gs.connection.RSCPacket;
|
||||
import org.moparscape.msc.gs.core.GameEngine;
|
||||
import org.moparscape.msc.gs.event.ShortEvent;
|
||||
import org.moparscape.msc.gs.event.WalkToPointEvent;
|
||||
import org.moparscape.msc.gs.external.DoorDef;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.ChatMessage;
|
||||
import org.moparscape.msc.gs.model.GameObject;
|
||||
import org.moparscape.msc.gs.model.Npc;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.Point;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.extra.DoorDefinition;
|
||||
import org.moparscape.msc.gs.model.landscape.ActiveTile;
|
||||
import org.moparscape.msc.gs.model.snapshot.Activity;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandler;
|
||||
@ -60,7 +60,7 @@ public class WallObjectAction implements PacketHandler {
|
||||
false) {
|
||||
public void arrived() {
|
||||
owner.resetPath();
|
||||
DoorDef def = object.getDoorDef();
|
||||
DoorDefinition def = object.getDoorDef();
|
||||
if (owner.isBusy() || owner.isRanging()
|
||||
|| !owner.nextTo(object) || def == null
|
||||
|| owner.getStatus() != Action.USING_DOOR) {
|
||||
|
@ -9,11 +9,11 @@ import org.moparscape.msc.config.Formulae;
|
||||
import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.connection.Packet;
|
||||
import org.moparscape.msc.gs.connection.RSCPacket;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.Script;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandler;
|
||||
import org.moparscape.msc.gs.quest.Quest;
|
||||
import org.moparscape.msc.gs.util.Logger;
|
||||
|
@ -8,7 +8,6 @@ import org.moparscape.msc.gs.event.FightEvent;
|
||||
import org.moparscape.msc.gs.event.MiniEvent;
|
||||
import org.moparscape.msc.gs.event.ShortEvent;
|
||||
import org.moparscape.msc.gs.event.WalkToMobEvent;
|
||||
import org.moparscape.msc.gs.external.GameObjectDef;
|
||||
import org.moparscape.msc.gs.model.Bubble;
|
||||
import org.moparscape.msc.gs.model.ChatMessage;
|
||||
import org.moparscape.msc.gs.model.GameObject;
|
||||
@ -17,6 +16,7 @@ import org.moparscape.msc.gs.model.Mob;
|
||||
import org.moparscape.msc.gs.model.Npc;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.World;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectDefinition;
|
||||
import org.moparscape.msc.gs.model.landscape.ActiveTile;
|
||||
import org.moparscape.msc.gs.states.Action;
|
||||
import org.moparscape.msc.gs.util.Logger;
|
||||
@ -122,7 +122,7 @@ public class Thieving {
|
||||
private int curDoor = -1;
|
||||
// given.
|
||||
private int curStall = -1;
|
||||
private GameObjectDef def;
|
||||
private GameObjectDefinition def;
|
||||
// Cur X, Cur Y, New X, New Y, Lvl, Exp
|
||||
private int[][] Doors = {
|
||||
{ 586, 581, 585, 581, 10, 13 }, // Nat rune West
|
||||
@ -1057,11 +1057,11 @@ public class Thieving {
|
||||
}
|
||||
}
|
||||
|
||||
public void setDef(GameObjectDef def) {
|
||||
public void setDef(GameObjectDefinition def) {
|
||||
this.def = def;
|
||||
}
|
||||
|
||||
public GameObjectDef getDef() {
|
||||
public GameObjectDefinition getDef() {
|
||||
return def;
|
||||
}
|
||||
|
||||
|
@ -5,12 +5,12 @@ import org.moparscape.msc.gs.Instance;
|
||||
import org.moparscape.msc.gs.core.GameEngine;
|
||||
import org.moparscape.msc.gs.event.ShortEvent;
|
||||
import org.moparscape.msc.gs.event.SingleEvent;
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.external.ObjectMiningDef;
|
||||
import org.moparscape.msc.gs.model.Bubble;
|
||||
import org.moparscape.msc.gs.model.GameObject;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectMiningDefinition;
|
||||
import org.moparscape.msc.gs.plugins.listeners.ObjectListener;
|
||||
import org.moparscape.msc.gs.tools.DataConversions;
|
||||
|
||||
@ -53,7 +53,7 @@ public class Mining implements ObjectListener {
|
||||
return;
|
||||
final GameObject newobject = Instance.getWorld()
|
||||
.getTile(object.getX(), object.getY()).getGameObject();
|
||||
final ObjectMiningDef def = EntityHandler.getObjectMiningDef(newobject
|
||||
final ObjectMiningDefinition def = EntityHandler.getObjectMiningDef(newobject
|
||||
.getID());
|
||||
if (def == null || def.getRespawnTime() < 1) {
|
||||
owner.getActionSender().sendMessage(
|
||||
|
@ -1,9 +1,9 @@
|
||||
package org.moparscape.msc.gs.plugins.quests;
|
||||
|
||||
import org.moparscape.msc.gs.external.EntityHandler;
|
||||
import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.Npc;
|
||||
import org.moparscape.msc.gs.model.Player;
|
||||
import org.moparscape.msc.gs.model.definition.EntityHandler;
|
||||
import org.moparscape.msc.gs.quest.Quest;
|
||||
import org.moparscape.msc.gs.quest.QuestAction;
|
||||
|
||||
|
@ -11,12 +11,42 @@ import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.Point;
|
||||
import org.moparscape.msc.gs.model.Shop;
|
||||
import org.moparscape.msc.gs.model.TelePoint;
|
||||
import org.moparscape.msc.gs.npchandler.NpcHandlerDef;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.extra.CerterDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.extra.DoorDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.extra.TileDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.AgilityCourseDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.AgilityDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.FiremakingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemArrowHeadDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemBowStringDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemCookingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemCraftingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemDartTipDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemGemDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemHerbDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemHerbSecondDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemLogCutDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemSmithingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemUnIdentHerbDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemWieldableDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectFishingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectMiningDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.PrayerDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.SpellDefinition;
|
||||
import org.moparscape.msc.gs.npchandler.NpcHandlerDefinition;
|
||||
import org.moparscape.msc.gs.persistence.DataStore;
|
||||
import org.moparscape.msc.gs.persistence.impl.bun.CodecLookupService;
|
||||
import org.moparscape.msc.gs.persistence.impl.bun.FileLookupService;
|
||||
import org.moparscape.msc.gs.persistence.impl.bun.IO;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandlerDef;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandlerDefinition;
|
||||
|
||||
@ThreadSafe
|
||||
public class BinaryUsingNIO implements DataStore {
|
||||
@ -26,39 +56,39 @@ public class BinaryUsingNIO implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketHandlerDef[] loadPacketHandlerDefs() throws Exception {
|
||||
String cls = PacketHandlerDef.class.getName();
|
||||
public PacketHandlerDefinition[] loadPacketHandlerDefs() throws Exception {
|
||||
String cls = PacketHandlerDefinition.class.getName();
|
||||
File f = FileLookupService.lookup(cls);
|
||||
return (PacketHandlerDef[]) CodecLookupService.lookup(cls).decode(IO.read(f));
|
||||
return (PacketHandlerDefinition[]) CodecLookupService.lookup(cls).decode(IO.read(f));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void savePacketHandlerDefs(PacketHandlerDef[] defs) throws Exception {
|
||||
public void savePacketHandlerDefs(PacketHandlerDefinition[] defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketHandlerDef[] loadLSPacketHandlerDefs() throws Exception {
|
||||
public PacketHandlerDefinition[] loadLSPacketHandlerDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveLSPacketHandlerDefs(PacketHandlerDef[] defs)
|
||||
public void saveLSPacketHandlerDefs(PacketHandlerDefinition[] defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public NpcHandlerDef[] loadNpcHandlers() throws Exception {
|
||||
public NpcHandlerDefinition[] loadNpcHandlers() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNpcHandlers(NpcHandlerDef[] defs) throws Exception {
|
||||
public void saveNpcHandlers(NpcHandlerDefinition[] defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
@ -88,236 +118,236 @@ public class BinaryUsingNIO implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, CerterDef> loadCerterDefs() throws Exception {
|
||||
public Map<Integer, CerterDefinition> loadCerterDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveCerterDefs(Map<Integer, CerterDef> certers)
|
||||
public void saveCerterDefs(Map<Integer, CerterDefinition> certers)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GameObjectLoc> loadGameObjectLocs() throws Exception {
|
||||
public List<GameObjectLocationDefinition> loadGameObjectLocs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveGameObjectLocs(List<GameObjectLoc> locs) throws Exception {
|
||||
public void saveGameObjectLocs(List<GameObjectLocationDefinition> locs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemLoc> loadItemLocs() throws Exception {
|
||||
public List<ItemLocationDefinition> loadItemLocs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemLocs(List<ItemLoc> locs) throws Exception {
|
||||
public void saveItemLocs(List<ItemLocationDefinition> locs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NPCLoc> loadNPCLocs() throws Exception {
|
||||
public List<NPCLocationDefinition> loadNPCLocs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNPCLocs(List<NPCLoc> locs) throws Exception {
|
||||
public void saveNPCLocs(List<NPCLocationDefinition> locs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileDef[] loadTileDefs() throws Exception {
|
||||
public TileDefinition[] loadTileDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveTileDefs(TileDef[] defs) throws Exception {
|
||||
public void saveTileDefs(TileDefinition[] defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public GameObjectDef[] loadGameObjectDefs() throws Exception {
|
||||
public GameObjectDefinition[] loadGameObjectDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveGameObjectDefs(GameObjectDef[] defs) throws Exception {
|
||||
public void saveGameObjectDefs(GameObjectDefinition[] defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoorDef[] loadDoorDefs() throws Exception {
|
||||
public DoorDefinition[] loadDoorDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveDoorDefs(DoorDef[] defs) throws Exception {
|
||||
public void saveDoorDefs(DoorDefinition[] defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemDef[] loadItemDefs() throws Exception {
|
||||
public ItemDefinition[] loadItemDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemDefs(ItemDef[] defs) throws Exception {
|
||||
public void saveItemDefs(ItemDefinition[] defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public PrayerDef[] loadPrayerDefs() throws Exception {
|
||||
public PrayerDefinition[] loadPrayerDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void savePrayerDefs(PrayerDef[] defs) throws Exception {
|
||||
public void savePrayerDefs(PrayerDefinition[] defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpellDef[] loadSpellDefs() throws Exception {
|
||||
public SpellDefinition[] loadSpellDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveSpellDefs(SpellDef[] defs) throws Exception {
|
||||
public void saveSpellDefs(SpellDefinition[] defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public NPCDef[] loadNPCDefs() throws Exception {
|
||||
public NPCDefinition[] loadNPCDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNPCDefs(NPCDef[] defs) throws Exception {
|
||||
public void saveNPCDefs(NPCDefinition[] defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCraftingDef[] loadItemCraftingDefs() throws Exception {
|
||||
public ItemCraftingDefinition[] loadItemCraftingDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemCraftingDefs(ItemCraftingDef[] defs) throws Exception {
|
||||
public void saveItemCraftingDefs(ItemCraftingDefinition[] defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemHerbSecond[] loadItemHerbSeconds() throws Exception {
|
||||
public ItemHerbSecondDefinition[] loadItemHerbSeconds() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemHerbSeconds(ItemHerbSecond[] seconds) throws Exception {
|
||||
public void saveItemHerbSeconds(ItemHerbSecondDefinition[] seconds) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemDartTipDef> loadItemDartTipDefs() throws Exception {
|
||||
public Map<Integer, ItemDartTipDefinition> loadItemDartTipDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemDartTipDefs(Map<Integer, ItemDartTipDef> defs)
|
||||
public void saveItemDartTipDefs(Map<Integer, ItemDartTipDefinition> defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemGemDef> loadGemDefs() throws Exception {
|
||||
public Map<Integer, ItemGemDefinition> loadGemDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveGemDefs(Map<Integer, ItemGemDef> defs) throws Exception {
|
||||
public void saveGemDefs(Map<Integer, ItemGemDefinition> defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemLogCutDef> loadItemLogCutDefs() throws Exception {
|
||||
public Map<Integer, ItemLogCutDefinition> loadItemLogCutDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemLogCutDefs(Map<Integer, ItemLogCutDef> defs)
|
||||
public void saveItemLogCutDefs(Map<Integer, ItemLogCutDefinition> defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemBowStringDef> loadItemBowStringDefs()
|
||||
public Map<Integer, ItemBowStringDefinition> loadItemBowStringDefs()
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemBowStringDefs(Map<Integer, ItemBowStringDef> defs)
|
||||
public void saveItemBowStringDefs(Map<Integer, ItemBowStringDefinition> defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemArrowHeadDef> loadItemArrowHeadDefs()
|
||||
public Map<Integer, ItemArrowHeadDefinition> loadItemArrowHeadDefs()
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemArrowHeadDefs(Map<Integer, ItemArrowHeadDef> defs)
|
||||
public void saveItemArrowHeadDefs(Map<Integer, ItemArrowHeadDefinition> defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, FiremakingDef> loadFiremakingDefs() throws Exception {
|
||||
public Map<Integer, FiremakingDefinition> loadFiremakingDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveFiremakingDefs(Map<Integer, FiremakingDef> defs)
|
||||
public void saveFiremakingDefs(Map<Integer, FiremakingDefinition> defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
@ -337,41 +367,41 @@ public class BinaryUsingNIO implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemWieldableDef> loadItemWieldableDefs()
|
||||
public Map<Integer, ItemWieldableDefinition> loadItemWieldableDefs()
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemWieldableDefs(Map<Integer, ItemWieldableDef> defs)
|
||||
public void saveItemWieldableDefs(Map<Integer, ItemWieldableDefinition> defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemUnIdentHerbDef> loadItemUnIdentHerbDefs()
|
||||
public Map<Integer, ItemUnIdentHerbDefinition> loadItemUnIdentHerbDefs()
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemUnIdentHerbDefs(Map<Integer, ItemUnIdentHerbDef> defs)
|
||||
public void saveItemUnIdentHerbDefs(Map<Integer, ItemUnIdentHerbDefinition> defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemHerbDef> loadItemHerbDefs() throws Exception {
|
||||
public Map<Integer, ItemHerbDefinition> loadItemHerbDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemHerbDefs(Map<Integer, ItemHerbDef> defs)
|
||||
public void saveItemHerbDefs(Map<Integer, ItemHerbDefinition> defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
@ -391,60 +421,60 @@ public class BinaryUsingNIO implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemCookingDef> loadItemCookingDefs() throws Exception {
|
||||
public Map<Integer, ItemCookingDefinition> loadItemCookingDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemCookingDefs(Map<Integer, ItemCookingDef> defs)
|
||||
public void saveItemCookingDefs(Map<Integer, ItemCookingDefinition> defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemSmeltingDef> loadItemSmeltingDefs()
|
||||
public Map<Integer, ItemSmeltingDefinition> loadItemSmeltingDefs()
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemSmeltingDefs(Map<Integer, ItemSmeltingDef> defs)
|
||||
public void saveItemSmeltingDefs(Map<Integer, ItemSmeltingDefinition> defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemSmithingDef[] loadItemSmithingDefs() throws Exception {
|
||||
public ItemSmithingDefinition[] loadItemSmithingDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemSmithingDefs(ItemSmithingDef[] defs) throws Exception {
|
||||
public void saveItemSmithingDefs(ItemSmithingDefinition[] defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ObjectMiningDef> loadObjectMiningDefs()
|
||||
public Map<Integer, ObjectMiningDefinition> loadObjectMiningDefs()
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveObjectMiningDefs(Map<Integer, ObjectMiningDef> defs)
|
||||
public void saveObjectMiningDefs(Map<Integer, ObjectMiningDefinition> defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ObjectWoodcuttingDef> loadObjectWoodcuttingDefs()
|
||||
public Map<Integer, ObjectWoodcuttingDefinition> loadObjectWoodcuttingDefs()
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
@ -452,20 +482,20 @@ public class BinaryUsingNIO implements DataStore {
|
||||
|
||||
@Override
|
||||
public void saveObjectWoodcuttingDefs(
|
||||
Map<Integer, ObjectWoodcuttingDef> defs) throws Exception {
|
||||
Map<Integer, ObjectWoodcuttingDefinition> defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ObjectFishingDef[]> loadObjectFishDefs()
|
||||
public Map<Integer, ObjectFishingDefinition[]> loadObjectFishDefs()
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveObjectFishingDefs(Map<Integer, ObjectFishingDef> defs)
|
||||
public void saveObjectFishingDefs(Map<Integer, ObjectFishingDefinition> defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
@ -485,26 +515,26 @@ public class BinaryUsingNIO implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, AgilityDef> loadAgilityDefs() throws Exception {
|
||||
public Map<Integer, AgilityDefinition> loadAgilityDefs() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAgilityDefs(Map<Integer, AgilityDef> defs) throws Exception {
|
||||
public void saveAgilityDefs(Map<Integer, AgilityDefinition> defs) throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, AgilityCourseDef> loadAgilityCourseDefs()
|
||||
public Map<Integer, AgilityCourseDefinition> loadAgilityCourseDefs()
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAgilityCourseDef(Map<Integer, AgilityCourseDef> defs)
|
||||
public void saveAgilityCourseDef(Map<Integer, AgilityCourseDefinition> defs)
|
||||
throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
@ -523,7 +553,7 @@ public class BinaryUsingNIO implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemDartTipDef> loadDartTips() throws Exception {
|
||||
public Map<Integer, ItemDartTipDefinition> loadDartTips() throws Exception {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
@ -2,19 +2,19 @@ package org.moparscape.msc.gs.persistence.impl.bun.codec;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import org.moparscape.msc.gs.external.NPCDef;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCDefinition;
|
||||
import org.moparscape.msc.gs.persistence.impl.bun.ByteBufferUtil;
|
||||
import org.moparscape.msc.gs.persistence.impl.bun.Codec;
|
||||
|
||||
public class NpcDefCodec implements Codec<NPCDef[]> {
|
||||
public class NpcDefCodec implements Codec<NPCDefinition[]> {
|
||||
|
||||
@Override
|
||||
public ByteBuffer encode(NPCDef[] t) {
|
||||
public ByteBuffer encode(NPCDefinition[] t) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private ByteBuffer encode(NPCDef d) {
|
||||
private ByteBuffer encode(NPCDefinition d) {
|
||||
ByteBuffer buf = ByteBuffer.allocate(d.getName().length() + 1 + d.getDescription().length() + 1 + d.getCommand().length() + 2 + 4 * 2 + 2 + 13 + 8 + 8);
|
||||
|
||||
ByteBufferUtil.putString(buf, d.getName());
|
||||
@ -25,7 +25,7 @@ public class NpcDefCodec implements Codec<NPCDef[]> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public NPCDef[] decode(ByteBuffer buf) {
|
||||
public NPCDefinition[] decode(ByteBuffer buf) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
@ -24,9 +24,39 @@ import org.moparscape.msc.gs.model.InvItem;
|
||||
import org.moparscape.msc.gs.model.Point;
|
||||
import org.moparscape.msc.gs.model.Shop;
|
||||
import org.moparscape.msc.gs.model.TelePoint;
|
||||
import org.moparscape.msc.gs.npchandler.NpcHandlerDef;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.GameObjectLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.ItemLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.entity.NPCLocationDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.extra.CerterDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.extra.DoorDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.extra.TileDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.AgilityCourseDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.AgilityDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.FiremakingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemArrowHeadDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemBowStringDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemCookingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemCraftingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemDartTipDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemGemDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemHerbDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemHerbSecondDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemLogCutDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemSmithingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemUnIdentHerbDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ItemWieldableDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectFishingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectMiningDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.PrayerDefinition;
|
||||
import org.moparscape.msc.gs.model.definition.skill.SpellDefinition;
|
||||
import org.moparscape.msc.gs.npchandler.NpcHandlerDefinition;
|
||||
import org.moparscape.msc.gs.persistence.DataStore;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandlerDef;
|
||||
import org.moparscape.msc.gs.phandler.PacketHandlerDefinition;
|
||||
import org.moparscape.msc.gs.util.Logger;
|
||||
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
@ -107,18 +137,18 @@ public class XMLUsingXStream implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketHandlerDef[] loadPacketHandlerDefs() {
|
||||
return (PacketHandlerDef[]) load("PacketHandlers.xml");
|
||||
public PacketHandlerDefinition[] loadPacketHandlerDefs() {
|
||||
return (PacketHandlerDefinition[]) load("PacketHandlers.xml");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketHandlerDef[] loadLSPacketHandlerDefs() {
|
||||
return (PacketHandlerDef[]) load("LSPacketHandlers.xml");
|
||||
public PacketHandlerDefinition[] loadLSPacketHandlerDefs() {
|
||||
return (PacketHandlerDefinition[]) load("LSPacketHandlers.xml");
|
||||
}
|
||||
|
||||
@Override
|
||||
public NpcHandlerDef[] loadNpcHandlers() {
|
||||
return (NpcHandlerDef[]) load("NpcHandlers.xml");
|
||||
public NpcHandlerDefinition[] loadNpcHandlers() {
|
||||
return (NpcHandlerDefinition[]) load("NpcHandlers.xml");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -132,98 +162,98 @@ public class XMLUsingXStream implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, CerterDef> loadCerterDefs() {
|
||||
return (Map<Integer, CerterDef>) load("defs/extras/NpcCerters.xml.gz");
|
||||
public Map<Integer, CerterDefinition> loadCerterDefs() {
|
||||
return (Map<Integer, CerterDefinition>) load("defs/extras/NpcCerters.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GameObjectLoc> loadGameObjectLocs() {
|
||||
return (List<GameObjectLoc>) load("locs/GameObjectLoc.xml.gz");
|
||||
public List<GameObjectLocationDefinition> loadGameObjectLocs() {
|
||||
return (List<GameObjectLocationDefinition>) load("locs/GameObjectLoc.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemLoc> loadItemLocs() {
|
||||
return (List<ItemLoc>) load("locs/ItemLoc.xml.gz");
|
||||
public List<ItemLocationDefinition> loadItemLocs() {
|
||||
return (List<ItemLocationDefinition>) load("locs/ItemLoc.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NPCLoc> loadNPCLocs() {
|
||||
return (List<NPCLoc>) load("locs/NpcLoc.xml.gz");
|
||||
public List<NPCLocationDefinition> loadNPCLocs() {
|
||||
return (List<NPCLocationDefinition>) load("locs/NpcLoc.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileDef[] loadTileDefs() {
|
||||
return (TileDef[]) load("defs/TileDef.xml.gz");
|
||||
public TileDefinition[] loadTileDefs() {
|
||||
return (TileDefinition[]) load("defs/TileDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public GameObjectDef[] loadGameObjectDefs() {
|
||||
return (GameObjectDef[]) load("defs/GameObjectDef.xml.gz");
|
||||
public GameObjectDefinition[] loadGameObjectDefs() {
|
||||
return (GameObjectDefinition[]) load("defs/GameObjectDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public DoorDef[] loadDoorDefs() {
|
||||
return (DoorDef[]) load("defs/DoorDef.xml.gz");
|
||||
public DoorDefinition[] loadDoorDefs() {
|
||||
return (DoorDefinition[]) load("defs/DoorDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemDef[] loadItemDefs() {
|
||||
return (ItemDef[]) load("defs/ItemDef.xml.gz");
|
||||
public ItemDefinition[] loadItemDefs() {
|
||||
return (ItemDefinition[]) load("defs/ItemDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PrayerDef[] loadPrayerDefs() {
|
||||
return (PrayerDef[]) load("defs/PrayerDef.xml.gz");
|
||||
public PrayerDefinition[] loadPrayerDefs() {
|
||||
return (PrayerDefinition[]) load("defs/PrayerDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpellDef[] loadSpellDefs() {
|
||||
return (SpellDef[]) load("defs/SpellDef.xml.gz");
|
||||
public SpellDefinition[] loadSpellDefs() {
|
||||
return (SpellDefinition[]) load("defs/SpellDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public NPCDef[] loadNPCDefs() {
|
||||
return (NPCDef[]) load("defs/NPCDef.xml.gz");
|
||||
public NPCDefinition[] loadNPCDefs() {
|
||||
return (NPCDefinition[]) load("defs/NPCDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemCraftingDef[] loadItemCraftingDefs() {
|
||||
return (ItemCraftingDef[]) load("defs/extras/ItemCraftingDef.xml.gz");
|
||||
public ItemCraftingDefinition[] loadItemCraftingDefs() {
|
||||
return (ItemCraftingDefinition[]) load("defs/extras/ItemCraftingDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemHerbSecond[] loadItemHerbSeconds() {
|
||||
return (ItemHerbSecond[]) load("defs/extras/ItemHerbSecond.xml.gz");
|
||||
public ItemHerbSecondDefinition[] loadItemHerbSeconds() {
|
||||
return (ItemHerbSecondDefinition[]) load("defs/extras/ItemHerbSecond.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemDartTipDef> loadItemDartTipDefs() {
|
||||
return (Map<Integer, ItemDartTipDef>) load("defs/extras/ItemDartTipDef.xml.gz");
|
||||
public Map<Integer, ItemDartTipDefinition> loadItemDartTipDefs() {
|
||||
return (Map<Integer, ItemDartTipDefinition>) load("defs/extras/ItemDartTipDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemGemDef> loadGemDefs() {
|
||||
return (Map<Integer, ItemGemDef>) load("defs/extras/ItemGemDef.xml.gz");
|
||||
public Map<Integer, ItemGemDefinition> loadGemDefs() {
|
||||
return (Map<Integer, ItemGemDefinition>) load("defs/extras/ItemGemDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemLogCutDef> loadItemLogCutDefs() {
|
||||
return (Map<Integer, ItemLogCutDef>) load("defs/extras/ItemLogCutDef.xml.gz");
|
||||
public Map<Integer, ItemLogCutDefinition> loadItemLogCutDefs() {
|
||||
return (Map<Integer, ItemLogCutDefinition>) load("defs/extras/ItemLogCutDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemBowStringDef> loadItemBowStringDefs() {
|
||||
return (Map<Integer, ItemBowStringDef>) load("defs/extras/ItemBowStringDef.xml.gz");
|
||||
public Map<Integer, ItemBowStringDefinition> loadItemBowStringDefs() {
|
||||
return (Map<Integer, ItemBowStringDefinition>) load("defs/extras/ItemBowStringDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemArrowHeadDef> loadItemArrowHeadDefs() {
|
||||
return (Map<Integer, ItemArrowHeadDef>) load("defs/extras/ItemArrowHeadDef.xml.gz");
|
||||
public Map<Integer, ItemArrowHeadDefinition> loadItemArrowHeadDefs() {
|
||||
return (Map<Integer, ItemArrowHeadDefinition>) load("defs/extras/ItemArrowHeadDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, FiremakingDef> loadFiremakingDefs() {
|
||||
return (Map<Integer, FiremakingDef>) load("defs/extras/FiremakingDef.xml.gz");
|
||||
public Map<Integer, FiremakingDefinition> loadFiremakingDefs() {
|
||||
return (Map<Integer, FiremakingDefinition>) load("defs/extras/FiremakingDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -232,18 +262,18 @@ public class XMLUsingXStream implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemWieldableDef> loadItemWieldableDefs() {
|
||||
return (Map<Integer, ItemWieldableDef>) load("defs/extras/ItemWieldableDef.xml.gz");
|
||||
public Map<Integer, ItemWieldableDefinition> loadItemWieldableDefs() {
|
||||
return (Map<Integer, ItemWieldableDefinition>) load("defs/extras/ItemWieldableDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemUnIdentHerbDef> loadItemUnIdentHerbDefs() {
|
||||
return (Map<Integer, ItemUnIdentHerbDef>) load("defs/extras/ItemUnIdentHerbDef.xml.gz");
|
||||
public Map<Integer, ItemUnIdentHerbDefinition> loadItemUnIdentHerbDefs() {
|
||||
return (Map<Integer, ItemUnIdentHerbDefinition>) load("defs/extras/ItemUnIdentHerbDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemHerbDef> loadItemHerbDefs() {
|
||||
return (Map<Integer, ItemHerbDef>) load("defs/extras/ItemHerbDef.xml.gz");
|
||||
public Map<Integer, ItemHerbDefinition> loadItemHerbDefs() {
|
||||
return (Map<Integer, ItemHerbDefinition>) load("defs/extras/ItemHerbDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -252,33 +282,33 @@ public class XMLUsingXStream implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemCookingDef> loadItemCookingDefs() {
|
||||
return (Map<Integer, ItemCookingDef>) load("defs/extras/ItemCookingDef.xml.gz");
|
||||
public Map<Integer, ItemCookingDefinition> loadItemCookingDefs() {
|
||||
return (Map<Integer, ItemCookingDefinition>) load("defs/extras/ItemCookingDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemSmeltingDef> loadItemSmeltingDefs() {
|
||||
return (Map<Integer, ItemSmeltingDef>) load("defs/extras/ItemSmeltingDef.xml.gz");
|
||||
public Map<Integer, ItemSmeltingDefinition> loadItemSmeltingDefs() {
|
||||
return (Map<Integer, ItemSmeltingDefinition>) load("defs/extras/ItemSmeltingDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemSmithingDef[] loadItemSmithingDefs() {
|
||||
return (ItemSmithingDef[]) load("defs/extras/ItemSmithingDef.xml.gz");
|
||||
public ItemSmithingDefinition[] loadItemSmithingDefs() {
|
||||
return (ItemSmithingDefinition[]) load("defs/extras/ItemSmithingDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ObjectMiningDef> loadObjectMiningDefs() {
|
||||
return (Map<Integer, ObjectMiningDef>) load("defs/extras/ObjectMining.xml.gz");
|
||||
public Map<Integer, ObjectMiningDefinition> loadObjectMiningDefs() {
|
||||
return (Map<Integer, ObjectMiningDefinition>) load("defs/extras/ObjectMining.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ObjectWoodcuttingDef> loadObjectWoodcuttingDefs() {
|
||||
return (Map<Integer, ObjectWoodcuttingDef>) load("defs/extras/ObjectWoodcutting.xml.gz");
|
||||
public Map<Integer, ObjectWoodcuttingDefinition> loadObjectWoodcuttingDefs() {
|
||||
return (Map<Integer, ObjectWoodcuttingDefinition>) load("defs/extras/ObjectWoodcutting.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ObjectFishingDef[]> loadObjectFishDefs() {
|
||||
return (Map<Integer, ObjectFishingDef[]>) load("defs/extras/ObjectFishing.xml.gz");
|
||||
public Map<Integer, ObjectFishingDefinition[]> loadObjectFishDefs() {
|
||||
return (Map<Integer, ObjectFishingDefinition[]>) load("defs/extras/ObjectFishing.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -287,13 +317,13 @@ public class XMLUsingXStream implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, AgilityDef> loadAgilityDefs() {
|
||||
return (Map<Integer, AgilityDef>) load("defs/extras/AgilityDef.xml.gz");
|
||||
public Map<Integer, AgilityDefinition> loadAgilityDefs() {
|
||||
return (Map<Integer, AgilityDefinition>) load("defs/extras/AgilityDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, AgilityCourseDef> loadAgilityCourseDefs() {
|
||||
return (Map<Integer, AgilityCourseDef>) load("defs/extras/AgilityCourseDef.xml.gz");
|
||||
public Map<Integer, AgilityCourseDefinition> loadAgilityCourseDefs() {
|
||||
return (Map<Integer, AgilityCourseDefinition>) load("defs/extras/AgilityCourseDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -302,8 +332,8 @@ public class XMLUsingXStream implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Integer, ItemDartTipDef> loadDartTips() {
|
||||
return (HashMap<Integer, ItemDartTipDef>) load("defs/extras/ItemDartTipDef.xml.gz");
|
||||
public Map<Integer, ItemDartTipDefinition> loadDartTips() {
|
||||
return (HashMap<Integer, ItemDartTipDefinition>) load("defs/extras/ItemDartTipDef.xml.gz");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -312,18 +342,18 @@ public class XMLUsingXStream implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void savePacketHandlerDefs(PacketHandlerDef[] defs) throws Exception {
|
||||
public void savePacketHandlerDefs(PacketHandlerDefinition[] defs) throws Exception {
|
||||
write("PacketHandlers.xml", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveLSPacketHandlerDefs(PacketHandlerDef[] defs)
|
||||
public void saveLSPacketHandlerDefs(PacketHandlerDefinition[] defs)
|
||||
throws Exception {
|
||||
write("LSPacketHanlders.xml", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNpcHandlers(NpcHandlerDef[] defs) throws Exception {
|
||||
public void saveNpcHandlers(NpcHandlerDefinition[] defs) throws Exception {
|
||||
write("NpcHandlers.xml", defs);
|
||||
}
|
||||
|
||||
@ -338,102 +368,102 @@ public class XMLUsingXStream implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveCerterDefs(Map<Integer, CerterDef> certers)
|
||||
public void saveCerterDefs(Map<Integer, CerterDefinition> certers)
|
||||
throws Exception {
|
||||
write("defs/extras/NpcCerters.xml.gz", certers);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveGameObjectLocs(List<GameObjectLoc> locs) throws Exception {
|
||||
public void saveGameObjectLocs(List<GameObjectLocationDefinition> locs) throws Exception {
|
||||
write("locs/GameObjectLocs.xml.gz", locs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemLocs(List<ItemLoc> locs) throws Exception {
|
||||
public void saveItemLocs(List<ItemLocationDefinition> locs) throws Exception {
|
||||
write("locs/ItemLoc.xml.gz", locs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNPCLocs(List<NPCLoc> locs) throws Exception {
|
||||
public void saveNPCLocs(List<NPCLocationDefinition> locs) throws Exception {
|
||||
write("locs/NpcLoc.xml.gz", locs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveTileDefs(TileDef[] defs) throws Exception {
|
||||
public void saveTileDefs(TileDefinition[] defs) throws Exception {
|
||||
write("defs/TileDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveGameObjectDefs(GameObjectDef[] defs) throws Exception {
|
||||
public void saveGameObjectDefs(GameObjectDefinition[] defs) throws Exception {
|
||||
write("defs/GameObjectDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveDoorDefs(DoorDef[] defs) throws Exception {
|
||||
public void saveDoorDefs(DoorDefinition[] defs) throws Exception {
|
||||
write("defs/DoorDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemDefs(ItemDef[] defs) throws Exception {
|
||||
public void saveItemDefs(ItemDefinition[] defs) throws Exception {
|
||||
write("defs/ItemDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void savePrayerDefs(PrayerDef[] defs) throws Exception {
|
||||
public void savePrayerDefs(PrayerDefinition[] defs) throws Exception {
|
||||
write("defs/PrayerDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveSpellDefs(SpellDef[] defs) throws Exception {
|
||||
public void saveSpellDefs(SpellDefinition[] defs) throws Exception {
|
||||
write("defs/SpellDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveNPCDefs(NPCDef[] defs) throws Exception {
|
||||
public void saveNPCDefs(NPCDefinition[] defs) throws Exception {
|
||||
write("defs/NPCDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemCraftingDefs(ItemCraftingDef[] defs) throws Exception {
|
||||
public void saveItemCraftingDefs(ItemCraftingDefinition[] defs) throws Exception {
|
||||
write("defs/extras/ItemCraftingDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemHerbSeconds(ItemHerbSecond[] seconds) throws Exception {
|
||||
public void saveItemHerbSeconds(ItemHerbSecondDefinition[] seconds) throws Exception {
|
||||
write("defs/extras/ItemHerbSecond.xml.gz", seconds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemDartTipDefs(Map<Integer, ItemDartTipDef> defs)
|
||||
public void saveItemDartTipDefs(Map<Integer, ItemDartTipDefinition> defs)
|
||||
throws Exception {
|
||||
write("defs/extras/ItemDartTipDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveGemDefs(Map<Integer, ItemGemDef> defs) throws Exception {
|
||||
public void saveGemDefs(Map<Integer, ItemGemDefinition> defs) throws Exception {
|
||||
write("def/extras/ItemGemDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemLogCutDefs(Map<Integer, ItemLogCutDef> defs)
|
||||
public void saveItemLogCutDefs(Map<Integer, ItemLogCutDefinition> defs)
|
||||
throws Exception {
|
||||
write("def/extras/ItemLogCutDefs.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemBowStringDefs(Map<Integer, ItemBowStringDef> defs)
|
||||
public void saveItemBowStringDefs(Map<Integer, ItemBowStringDefinition> defs)
|
||||
throws Exception {
|
||||
write("defs/extras/ItemBowStringDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemArrowHeadDefs(Map<Integer, ItemArrowHeadDef> defs)
|
||||
public void saveItemArrowHeadDefs(Map<Integer, ItemArrowHeadDefinition> defs)
|
||||
throws Exception {
|
||||
write("defs/extras/ItemArrowHeadDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveFiremakingDefs(Map<Integer, FiremakingDef> defs)
|
||||
public void saveFiremakingDefs(Map<Integer, FiremakingDefinition> defs)
|
||||
throws Exception {
|
||||
write("defs/extras/FiremakingDef.xml.gz", defs);
|
||||
}
|
||||
@ -445,19 +475,19 @@ public class XMLUsingXStream implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemWieldableDefs(Map<Integer, ItemWieldableDef> defs)
|
||||
public void saveItemWieldableDefs(Map<Integer, ItemWieldableDefinition> defs)
|
||||
throws Exception {
|
||||
write("defs/extras/ItemWieldableDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemUnIdentHerbDefs(Map<Integer, ItemUnIdentHerbDef> defs)
|
||||
public void saveItemUnIdentHerbDefs(Map<Integer, ItemUnIdentHerbDefinition> defs)
|
||||
throws Exception {
|
||||
write("defs/extras/Item.UnIdentHerbDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemHerbDefs(Map<Integer, ItemHerbDef> defs)
|
||||
public void saveItemHerbDefs(Map<Integer, ItemHerbDefinition> defs)
|
||||
throws Exception {
|
||||
write("defs/extras/ItemHerbDef.xml.gz", defs);
|
||||
}
|
||||
@ -469,36 +499,36 @@ public class XMLUsingXStream implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemCookingDefs(Map<Integer, ItemCookingDef> defs)
|
||||
public void saveItemCookingDefs(Map<Integer, ItemCookingDefinition> defs)
|
||||
throws Exception {
|
||||
write("defs/extras/ItemCookingDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemSmeltingDefs(Map<Integer, ItemSmeltingDef> defs)
|
||||
public void saveItemSmeltingDefs(Map<Integer, ItemSmeltingDefinition> defs)
|
||||
throws Exception {
|
||||
write("defs/extras/ItemSmeltingDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveItemSmithingDefs(ItemSmithingDef[] defs) throws Exception {
|
||||
public void saveItemSmithingDefs(ItemSmithingDefinition[] defs) throws Exception {
|
||||
write("defs/extras/ItemSmithingDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveObjectMiningDefs(Map<Integer, ObjectMiningDef> defs)
|
||||
public void saveObjectMiningDefs(Map<Integer, ObjectMiningDefinition> defs)
|
||||
throws Exception {
|
||||
write("defs/extras/ObjectMiningDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveObjectWoodcuttingDefs(
|
||||
Map<Integer, ObjectWoodcuttingDef> defs) throws Exception {
|
||||
Map<Integer, ObjectWoodcuttingDefinition> defs) throws Exception {
|
||||
write("defs/extras/ObjectWoodcuttingDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveObjectFishingDefs(Map<Integer, ObjectFishingDef> defs)
|
||||
public void saveObjectFishingDefs(Map<Integer, ObjectFishingDefinition> defs)
|
||||
throws Exception {
|
||||
write("defs/extras/ObjectFishingDef.xml.gz", defs);
|
||||
}
|
||||
@ -510,12 +540,12 @@ public class XMLUsingXStream implements DataStore {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAgilityDefs(Map<Integer, AgilityDef> defs) throws Exception {
|
||||
public void saveAgilityDefs(Map<Integer, AgilityDefinition> defs) throws Exception {
|
||||
write("defs/extras/AgilityDef.xml.gz", defs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAgilityCourseDef(Map<Integer, AgilityCourseDef> defs)
|
||||
public void saveAgilityCourseDef(Map<Integer, AgilityCourseDefinition> defs)
|
||||
throws Exception {
|
||||
write("defs/extras/AgilityCourseDef.xml.gz", defs);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user