Definitions completely fixed

This commit is contained in:
Rodgerwilco 2012-01-14 22:58:16 -07:00
parent d1007c3f46
commit 7a42cf949c
17 changed files with 86 additions and 86 deletions

View File

@ -1,2 +1,2 @@
ant ant build
pause pause

View File

@ -13,40 +13,40 @@
<entry key="InvItem">org.moparscape.msc.gs.model.InvItem</entry> <entry key="InvItem">org.moparscape.msc.gs.model.InvItem</entry>
<entry key="GameObjectLoc">org.moparscape.msc.gs.model.Def.GameObjectLoc</entry> <entry key="GameObjectLoc">org.moparscape.msc.gs.model.definition.entity.GameObjectLoc</entry>
<entry key="ItemLoc">org.moparscape.msc.gs.model.Def.ItemLoc</entry> <entry key="ItemLoc">org.moparscape.msc.gs.model.definition.entity.ItemLoc</entry>
<entry key="NPCLoc">org.moparscape.msc.gs.model.Def.NPCLoc</entry> <entry key="NPCLoc">org.moparscape.msc.gs.model.definition.entity.NPCLoc</entry>
<entry key="GameObjectDef">org.moparscape.msc.gs.model.Def.GameObjectDef</entry> <entry key="GameObjectDef">org.moparscape.msc.gs.model.definition.entity.GameObjectDef</entry>
<entry key="ItemDef">org.moparscape.msc.gs.model.Def.ItemDef</entry> <entry key="ItemDef">org.moparscape.msc.gs.model.definition.entity.ItemDef</entry>
<entry key="NPCDef">org.moparscape.msc.gs.model.Def.NPCDef</entry> <entry key="NPCDef">org.moparscape.msc.gs.model.definition.entity.NPCDef</entry>
<entry key="ItemDropDef">org.moparscape.msc.gs.model.definition.entity.ItemDropDef</entry>
<entry key="TileDef">org.moparscape.msc.gs.model.Def.extra.TileDef</entry> <entry key="TileDef">org.moparscape.msc.gs.model.definition.extra.TileDef</entry>
<entry key="DoorDef">org.moparscape.msc.gs.model.Def.extra.DoorDef</entry> <entry key="DoorDef">org.moparscape.msc.gs.model.definition.extra.DoorDef</entry>
<entry key="CerterDef">org.moparscape.msc.gs.model.Def.CerterDef</entry> <entry key="CerterDef">org.moparscape.msc.gs.model.definition.extra.CerterDef</entry>
<entry key="CertDef">org.moparscape.msc.gs.model.Def.CertDef</entry> <entry key="CertDef">org.moparscape.msc.gs.model.definition.extra.CertDef</entry>
<entry key="PrayerDef">org.moparscape.msc.gs.model.Def.PrayerDef</entry> <entry key="PrayerDef">org.moparscape.msc.gs.model.definition.skill.PrayerDef</entry>
<entry key="SpellDef">org.moparscape.msc.gs.model.Def.SpellDef</entry> <entry key="SpellDef">org.moparscape.msc.gs.model.definition.skill.SpellDef</entry>
<entry key="ItemCraftingDef">org.moparscape.msc.gs.model.Def.ItemCraftingDef</entry> <entry key="ItemCraftingDef">org.moparscape.msc.gs.model.definition.skill.ItemCraftingDef</entry>
<entry key="ItemHerbSecond">org.moparscape.msc.gs.model.Def.ItemHerbSecondDef</entry> <entry key="ItemHerbSecond">org.moparscape.msc.gs.model.definition.skill.ItemHerbSecondDef</entry>
<entry key="ItemDartTipDef">org.moparscape.msc.gs.model.Def.ItemDartTipDef</entry> <entry key="ItemDartTipDef">org.moparscape.msc.gs.model.definition.skill.ItemDartTipDef</entry>
<entry key="ItemGemDef">org.moparscape.msc.gs.model.Def.ItemGemDef</entry> <entry key="ItemGemDef">org.moparscape.msc.gs.model.definition.skill.ItemGemDef</entry>
<entry key="ItemLogCutDef">org.moparscape.msc.gs.model.Def.ItemLogCutDef</entry> <entry key="ItemLogCutDef">org.moparscape.msc.gs.model.definition.skill.ItemLogCutDef</entry>
<entry key="ItemBowStringDef">org.moparscape.msc.gs.model.Def.ItemBowStringDef</entry> <entry key="ItemBowStringDef">org.moparscape.msc.gs.model.definition.skill.ItemBowStringDef</entry>
<entry key="ItemArrowHeadDef">org.moparscape.msc.gs.model.Def.ItemArrowHeadDef</entry> <entry key="ItemArrowHeadDef">org.moparscape.msc.gs.model.definition.skill.ItemArrowHeadDef</entry>
<entry key="FiremakingDef">org.moparscape.msc.gs.model.Def.FiremakingDef</entry> <entry key="FiremakingDef">org.moparscape.msc.gs.model.definition.skill.FiremakingDef</entry>
<entry key="ReqOreDef">org.moparscape.msc.gs.model.Def.ReqOreDef</entry> <entry key="ReqOreDef">org.moparscape.msc.gs.model.definition.skill.ReqOreDef</entry>
<entry key="ItemWieldableDef">org.moparscape.msc.gs.model.Def.ItemWieldableDef</entry> <entry key="ItemWieldableDef">org.moparscape.msc.gs.model.definition.skill.ItemWieldableDef</entry>
<entry key="ItemUnIdentHerbDef">org.moparscape.msc.gs.model.Def.ItemUnIdentHerbDef</entry> <entry key="ItemUnIdentHerbDef">org.moparscape.msc.gs.model.definition.skill.ItemUnIdentHerbDef</entry>
<entry key="ItemHerbDef">org.moparscape.msc.gs.model.Def.ItemHerbDef</entry> <entry key="ItemHerbDef">org.moparscape.msc.gs.model.definition.skill.ItemHerbDef</entry>
<entry key="ItemCookingDef">org.moparscape.msc.gs.model.Def.ItemCookingDef</entry> <entry key="ItemCookingDef">org.moparscape.msc.gs.model.definition.skill.ItemCookingDef</entry>
<entry key="ItemSmeltingDef">org.moparscape.msc.gs.model.Def.ItemSmeltingDef</entry> <entry key="ItemSmeltingDef">org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDef</entry>
<entry key="ItemSmithingDef">org.moparscape.msc.gs.model.Def.ItemSmithingDef</entry> <entry key="ItemSmithingDef">org.moparscape.msc.gs.model.definition.skill.ItemSmithingDef</entry>
<entry key="ObjectMiningDef">org.moparscape.msc.gs.model.Def.ObjectMiningDef</entry> <entry key="ObjectMiningDef">org.moparscape.msc.gs.model.definition.skill.ObjectMiningDef</entry>
<entry key="ObjectWoodcuttingDef">org.moparscape.msc.gs.model.Def.ObjectWoodcuttingDef</entry> <entry key="ObjectWoodcuttingDef">org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDef</entry>
<entry key="ObjectFishingDef">org.moparscape.msc.gs.model.Def.ObjectFishingDef</entry> <entry key="ObjectFishingDef">org.moparscape.msc.gs.model.definition.skill.ObjectFishingDef</entry>
<entry key="ObjectFishDef">org.moparscape.msc.gs.model.Def.ObjectFishDef</entry> <entry key="ObjectFishDef">org.moparscape.msc.gs.model.definition.skill.ObjectFishDef</entry>
<entry key="ItemDropDef">org.moparscape.msc.gs.model.Def.ItemDropDef</entry> <entry key="AgilityDef">org.moparscape.msc.gs.model.definition.skill.AgilityDef</entry>
<entry key="AgilityDef">org.moparscape.msc.gs.model.Def.AgilityDef</entry> <entry key="AgilityCourseDef">org.moparscape.msc.gs.model.definition.skill.AgilityCourseDef</entry>
<entry key="AgilityCourseDef">org.moparscape.msc.gs.model.Def.AgilityCourseDef</entry>
</properties> </properties>

Binary file not shown.

Binary file not shown.

View File

@ -194,7 +194,7 @@ public class StaticPacketBuilder {
addByte((byte) val, false); addByte((byte) val, false);
return this; return this;
} }
/** /**
* Ensures that the buffer is at least <code>minimumBytes</code> bytes. * Ensures that the buffer is at least <code>minimumBytes</code> bytes.
* *

View File

@ -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.landscape.ActiveTile;
import org.moparscape.msc.gs.model.snapshot.Snapshot; import org.moparscape.msc.gs.model.snapshot.Snapshot;
import org.moparscape.msc.gs.phandler.PacketHandler; import org.moparscape.msc.gs.phandler.PacketHandler;
import org.moparscape.msc.gs.phandler.PacketHandlerDefinition; import org.moparscape.msc.gs.phandler.PacketHandlerDef;
import org.moparscape.msc.gs.plugins.dependencies.NpcAI; import org.moparscape.msc.gs.plugins.dependencies.NpcAI;
import org.moparscape.msc.gs.tools.Captcha; import org.moparscape.msc.gs.tools.Captcha;
import org.moparscape.msc.gs.util.Logger; import org.moparscape.msc.gs.util.Logger;
@ -154,9 +154,9 @@ public final class GameEngine extends Thread {
* @throws Exception * @throws Exception
*/ */
protected void loadPacketHandlers() throws Exception { protected void loadPacketHandlers() throws Exception {
PacketHandlerDefinition[] handlerDefs = Instance.getDataStore() PacketHandlerDef[] handlerDefs = Instance.getDataStore()
.loadPacketHandlerDefs(); .loadPacketHandlerDefs();
for (PacketHandlerDefinition handlerDef : handlerDefs) { for (PacketHandlerDef handlerDef : handlerDefs) {
try { try {
String className = handlerDef.getClassName(); String className = handlerDef.getClassName();
Class<?> c = Class.forName(className); Class<?> c = Class.forName(className);

View File

@ -17,7 +17,7 @@ import org.moparscape.msc.gs.connection.LSConnectionHandler;
import org.moparscape.msc.gs.connection.LSPacket; import org.moparscape.msc.gs.connection.LSPacket;
import org.moparscape.msc.gs.connection.PacketQueue; import org.moparscape.msc.gs.connection.PacketQueue;
import org.moparscape.msc.gs.phandler.PacketHandler; import org.moparscape.msc.gs.phandler.PacketHandler;
import org.moparscape.msc.gs.phandler.PacketHandlerDefinition; import org.moparscape.msc.gs.phandler.PacketHandlerDef;
import org.moparscape.msc.gs.util.Logger; import org.moparscape.msc.gs.util.Logger;
public class LoginConnector { public class LoginConnector {
@ -144,8 +144,8 @@ public class LoginConnector {
} }
private void loadPacketHandlers() throws Exception { private void loadPacketHandlers() throws Exception {
PacketHandlerDefinition[] handlerDefs = Instance.getDataStore().loadLSPacketHandlerDefs(); PacketHandlerDef[] handlerDefs = Instance.getDataStore().loadLSPacketHandlerDefs();
for (PacketHandlerDefinition handlerDef : handlerDefs) { for (PacketHandlerDef handlerDef : handlerDefs) {
try { try {
String className = handlerDef.getClassName(); String className = handlerDef.getClassName();
Class<?> c = Class.forName(className); Class<?> c = Class.forName(className);

View File

@ -23,7 +23,7 @@ import org.moparscape.msc.gs.model.landscape.MutableTileValue;
import org.moparscape.msc.gs.model.landscape.TileValue; import org.moparscape.msc.gs.model.landscape.TileValue;
import org.moparscape.msc.gs.model.snapshot.Snapshot; import org.moparscape.msc.gs.model.snapshot.Snapshot;
import org.moparscape.msc.gs.npchandler.NpcHandler; import org.moparscape.msc.gs.npchandler.NpcHandler;
import org.moparscape.msc.gs.npchandler.NpcHandlerDefinition; import org.moparscape.msc.gs.npchandler.NpcHandlerDef;
import org.moparscape.msc.gs.quest.QuestManager; import org.moparscape.msc.gs.quest.QuestManager;
import org.moparscape.msc.gs.states.CombatState; import org.moparscape.msc.gs.states.CombatState;
import org.moparscape.msc.gs.util.EntityList; import org.moparscape.msc.gs.util.EntityList;
@ -446,8 +446,8 @@ public final class World {
*/ */
private void loadNpcHandlers() throws Exception { private void loadNpcHandlers() throws Exception {
NpcHandlerDefinition[] handlerDefs = Instance.getDataStore().loadNpcHandlers(); NpcHandlerDef[] handlerDefs = Instance.getDataStore().loadNpcHandlers();
for (NpcHandlerDefinition handlerDef : handlerDefs) { for (NpcHandlerDef handlerDef : handlerDefs) {
try { try {
String className = handlerDef.getClassName(); String className = handlerDef.getClassName();
Class<?> c = Class.forName(className); Class<?> c = Class.forName(className);

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.npchandler;
/** /**
* The definition of a npc handler, for use with XStream. * The definition of a npc handler, for use with XStream.
*/ */
public class NpcHandlerDefinition { public class NpcHandlerDef {
/** /**
* The name of the handler class * The name of the handler class
*/ */
@ -22,7 +22,7 @@ public class NpcHandlerDefinition {
* @param className * @param className
* The name of the packet handler class * The name of the packet handler class
*/ */
public NpcHandlerDefinition(int[] ids, String className) { public NpcHandlerDef(int[] ids, String className) {
this.ids = ids; this.ids = ids;
this.className = className; this.className = className;
} }

View File

@ -3,7 +3,6 @@ package org.moparscape.msc.gs.persistence;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.moparscape.msc.gs.external.*;
import org.moparscape.msc.gs.model.InvItem; import org.moparscape.msc.gs.model.InvItem;
import org.moparscape.msc.gs.model.Point; import org.moparscape.msc.gs.model.Point;
import org.moparscape.msc.gs.model.Shop; import org.moparscape.msc.gs.model.Shop;
@ -38,8 +37,8 @@ import org.moparscape.msc.gs.model.definition.skill.ObjectMiningDef;
import org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDef; import org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDef;
import org.moparscape.msc.gs.model.definition.skill.PrayerDef; import org.moparscape.msc.gs.model.definition.skill.PrayerDef;
import org.moparscape.msc.gs.model.definition.skill.SpellDef; import org.moparscape.msc.gs.model.definition.skill.SpellDef;
import org.moparscape.msc.gs.npchandler.NpcHandlerDefinition; import org.moparscape.msc.gs.npchandler.NpcHandlerDef;
import org.moparscape.msc.gs.phandler.PacketHandlerDefinition; import org.moparscape.msc.gs.phandler.PacketHandlerDef;
/** /**
* Any retrieval of unchanging data should be done through this interface. All * Any retrieval of unchanging data should be done through this interface. All
@ -53,18 +52,18 @@ import org.moparscape.msc.gs.phandler.PacketHandlerDefinition;
*/ */
public abstract interface DataStore { public abstract interface DataStore {
public PacketHandlerDefinition[] loadPacketHandlerDefs() throws Exception; public PacketHandlerDef[] loadPacketHandlerDefs() throws Exception;
public void savePacketHandlerDefs(PacketHandlerDefinition[] defs) throws Exception; public void savePacketHandlerDefs(PacketHandlerDef[] defs) throws Exception;
public PacketHandlerDefinition[] loadLSPacketHandlerDefs() throws Exception; public PacketHandlerDef[] loadLSPacketHandlerDefs() throws Exception;
public void saveLSPacketHandlerDefs(PacketHandlerDefinition[] defs) public void saveLSPacketHandlerDefs(PacketHandlerDef[] defs)
throws Exception; throws Exception;
public NpcHandlerDefinition[] loadNpcHandlers() throws Exception; public NpcHandlerDef[] loadNpcHandlers() throws Exception;
public void saveNpcHandlers(NpcHandlerDefinition[] defs) throws Exception; public void saveNpcHandlers(NpcHandlerDef[] defs) throws Exception;
public Map<Point, TelePoint> loadTelePoints() throws Exception; public Map<Point, TelePoint> loadTelePoints() throws Exception;

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.phandler;
/** /**
* The definition of a packet handler, for use with XStream. * The definition of a packet handler, for use with XStream.
*/ */
public class PacketHandlerDefinition { public class PacketHandlerDef {
/** /**
* The name of the handler class * The name of the handler class
*/ */
@ -22,7 +22,7 @@ public class PacketHandlerDefinition {
* @param className * @param className
* The name of the packet handler class * The name of the packet handler class
*/ */
public PacketHandlerDefinition(int[] ids, String className) { public PacketHandlerDef(int[] ids, String className) {
this.ids = ids; this.ids = ids;
this.className = className; this.className = className;
} }

View File

@ -337,7 +337,7 @@ class CommandHandler extends PacketHandler {
def item(p: Player, args: Array[String]) { def item(p: Player, args: Array[String]) {
import org.moparscape.msc.gs.model.InvItem import org.moparscape.msc.gs.model.InvItem
import org.moparscape.msc.gs.external.EntityHandler import org.moparscape.msc.gs.model.definition.EntityHandler
if (args.length < 1 || args.length > 2) { if (args.length < 1 || args.length > 2) {
message(p, "Invalid args. Syntax: ITEM id [amount]") message(p, "Invalid args. Syntax: ITEM id [amount]")
return ; return ;

View File

@ -6,7 +6,6 @@ import java.util.Map;
import net.jcip.annotations.ThreadSafe; import net.jcip.annotations.ThreadSafe;
import org.moparscape.msc.gs.external.*;
import org.moparscape.msc.gs.model.InvItem; import org.moparscape.msc.gs.model.InvItem;
import org.moparscape.msc.gs.model.Point; import org.moparscape.msc.gs.model.Point;
import org.moparscape.msc.gs.model.Shop; import org.moparscape.msc.gs.model.Shop;
@ -41,12 +40,12 @@ import org.moparscape.msc.gs.model.definition.skill.ObjectMiningDef;
import org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDef; import org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDef;
import org.moparscape.msc.gs.model.definition.skill.PrayerDef; import org.moparscape.msc.gs.model.definition.skill.PrayerDef;
import org.moparscape.msc.gs.model.definition.skill.SpellDef; import org.moparscape.msc.gs.model.definition.skill.SpellDef;
import org.moparscape.msc.gs.npchandler.NpcHandlerDefinition; import org.moparscape.msc.gs.npchandler.NpcHandlerDef;
import org.moparscape.msc.gs.persistence.DataStore; import org.moparscape.msc.gs.persistence.DataStore;
import org.moparscape.msc.gs.persistence.impl.bun.CodecLookupService; 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.FileLookupService;
import org.moparscape.msc.gs.persistence.impl.bun.IO; import org.moparscape.msc.gs.persistence.impl.bun.IO;
import org.moparscape.msc.gs.phandler.PacketHandlerDefinition; import org.moparscape.msc.gs.phandler.PacketHandlerDef;
@ThreadSafe @ThreadSafe
public class BinaryUsingNIO implements DataStore { public class BinaryUsingNIO implements DataStore {
@ -56,39 +55,39 @@ public class BinaryUsingNIO implements DataStore {
} }
@Override @Override
public PacketHandlerDefinition[] loadPacketHandlerDefs() throws Exception { public PacketHandlerDef[] loadPacketHandlerDefs() throws Exception {
String cls = PacketHandlerDefinition.class.getName(); String cls = PacketHandlerDef.class.getName();
File f = FileLookupService.lookup(cls); File f = FileLookupService.lookup(cls);
return (PacketHandlerDefinition[]) CodecLookupService.lookup(cls).decode(IO.read(f)); return (PacketHandlerDef[]) CodecLookupService.lookup(cls).decode(IO.read(f));
} }
@Override @Override
public void savePacketHandlerDefs(PacketHandlerDefinition[] defs) throws Exception { public void savePacketHandlerDefs(PacketHandlerDef[] defs) throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
} }
@Override @Override
public PacketHandlerDefinition[] loadLSPacketHandlerDefs() throws Exception { public PacketHandlerDef[] loadLSPacketHandlerDefs() throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return null; return null;
} }
@Override @Override
public void saveLSPacketHandlerDefs(PacketHandlerDefinition[] defs) public void saveLSPacketHandlerDefs(PacketHandlerDef[] defs)
throws Exception { throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
} }
@Override @Override
public NpcHandlerDefinition[] loadNpcHandlers() throws Exception { public NpcHandlerDef[] loadNpcHandlers() throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return null; return null;
} }
@Override @Override
public void saveNpcHandlers(NpcHandlerDefinition[] defs) throws Exception { public void saveNpcHandlers(NpcHandlerDef[] defs) throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
} }

View File

@ -1,13 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project name="XML Using XStream" default="build" basedir="../../../"> <project name="XML Using XStream" default="build" basedir="../../../">
<property name="name" value="XMLUsingXStream" /> <property name="base" location="Modules/DataStore/XMLUsingXStream" />
<property name="package" value="DataStore" />
<property name="base" location="Modules/${package}/${name}" />
<property name="src" location="${base}/src" /> <property name="src" location="${base}/src" />
<property name="bin" location="${base}/bin" /> <property name="bin" location="${base}/bin" />
<property name="lib" location="${base}/lib" /> <property name="lib" location="${base}/lib" />
<property name="common-lib" location="${base}/../lib" /> <property name="common-lib" location="${base}/../lib" />
<property name="jar" value="${base}/${name}.jar" /> <property name="jar" value="${base}/XMLUsingXStream.jar" />
<fileset id="mopar" dir="GameServer"> <fileset id="mopar" dir="GameServer">
<include name="moparclassic.jar" /> <include name="moparclassic.jar" />
@ -21,6 +19,10 @@
<include name="*.jar" /> <include name="*.jar" />
</fileset> </fileset>
<fileset id="datastore-core" dir="${base}/../">
<include name="DataStoreCore.jar" />
</fileset>
<fileset id="production-classes" dir="${bin}"> <fileset id="production-classes" dir="${bin}">
<include name="**/*.class" /> <include name="**/*.class" />
</fileset> </fileset>
@ -33,6 +35,7 @@
<fileset refid="common-libraries" /> <fileset refid="common-libraries" />
<fileset refid="libraries" /> <fileset refid="libraries" />
<fileset refid="mopar" /> <fileset refid="mopar" />
<fileset refid="datastore-core" />
</path> </path>
<path id="master-path"> <path id="master-path">

View File

@ -19,7 +19,6 @@ import java.util.zip.GZIPOutputStream;
import net.jcip.annotations.NotThreadSafe; import net.jcip.annotations.NotThreadSafe;
import org.moparscape.msc.config.Config; import org.moparscape.msc.config.Config;
import org.moparscape.msc.gs.external.*;
import org.moparscape.msc.gs.model.InvItem; import org.moparscape.msc.gs.model.InvItem;
import org.moparscape.msc.gs.model.Point; import org.moparscape.msc.gs.model.Point;
import org.moparscape.msc.gs.model.Shop; import org.moparscape.msc.gs.model.Shop;
@ -54,9 +53,9 @@ import org.moparscape.msc.gs.model.definition.skill.ObjectMiningDef;
import org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDef; import org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDef;
import org.moparscape.msc.gs.model.definition.skill.PrayerDef; import org.moparscape.msc.gs.model.definition.skill.PrayerDef;
import org.moparscape.msc.gs.model.definition.skill.SpellDef; import org.moparscape.msc.gs.model.definition.skill.SpellDef;
import org.moparscape.msc.gs.npchandler.NpcHandlerDefinition; import org.moparscape.msc.gs.npchandler.NpcHandlerDef;
import org.moparscape.msc.gs.persistence.DataStore; import org.moparscape.msc.gs.persistence.DataStore;
import org.moparscape.msc.gs.phandler.PacketHandlerDefinition; import org.moparscape.msc.gs.phandler.PacketHandlerDef;
import org.moparscape.msc.gs.util.Logger; import org.moparscape.msc.gs.util.Logger;
import com.thoughtworks.xstream.XStream; import com.thoughtworks.xstream.XStream;
@ -137,18 +136,18 @@ public class XMLUsingXStream implements DataStore {
} }
@Override @Override
public PacketHandlerDefinition[] loadPacketHandlerDefs() { public PacketHandlerDef[] loadPacketHandlerDefs() {
return (PacketHandlerDefinition[]) load("PacketHandlers.xml"); return (PacketHandlerDef[]) load("PacketHandlers.xml");
} }
@Override @Override
public PacketHandlerDefinition[] loadLSPacketHandlerDefs() { public PacketHandlerDef[] loadLSPacketHandlerDefs() {
return (PacketHandlerDefinition[]) load("LSPacketHandlers.xml"); return (PacketHandlerDef[]) load("LSPacketHandlers.xml");
} }
@Override @Override
public NpcHandlerDefinition[] loadNpcHandlers() { public NpcHandlerDef[] loadNpcHandlers() {
return (NpcHandlerDefinition[]) load("NpcHandlers.xml"); return (NpcHandlerDef[]) load("NpcHandlers.xml");
} }
@Override @Override
@ -342,18 +341,18 @@ public class XMLUsingXStream implements DataStore {
} }
@Override @Override
public void savePacketHandlerDefs(PacketHandlerDefinition[] defs) throws Exception { public void savePacketHandlerDefs(PacketHandlerDef[] defs) throws Exception {
write("PacketHandlers.xml", defs); write("PacketHandlers.xml", defs);
} }
@Override @Override
public void saveLSPacketHandlerDefs(PacketHandlerDefinition[] defs) public void saveLSPacketHandlerDefs(PacketHandlerDef[] defs)
throws Exception { throws Exception {
write("LSPacketHanlders.xml", defs); write("LSPacketHanlders.xml", defs);
} }
@Override @Override
public void saveNpcHandlers(NpcHandlerDefinition[] defs) throws Exception { public void saveNpcHandlers(NpcHandlerDef[] defs) throws Exception {
write("NpcHandlers.xml", defs); write("NpcHandlers.xml", defs);
} }