Fixed Definitions Issue >:(

Added Ent fixes
#98 fixed teleport (and other skills) not showing exp given
#96 fixed teleport coordinates
#94 fixed dropping items when walking (its like RSC now)
#93 fixed facing npcs that don't talk
#104 fixed mining bugs (spam clicking, walking)
This commit is contained in:
Rodgerwilco 2012-01-13 23:54:38 -07:00
parent e35b6c9388
commit d1007c3f46
65 changed files with 728 additions and 694 deletions

View File

@ -3,8 +3,8 @@
<properties>
<comment>Stores aliases for the XStream engine</comment>
<entry key="PacketHandler">org.moparscape.msc.gs.phandler.PacketHandlerDefinition</entry>
<entry key="NpcHandler">org.moparscape.msc.gs.npchandler.NpcHandlerDefinition</entry>
<entry key="PacketHandler">org.moparscape.msc.gs.phandler.PacketHandlerDef</entry>
<entry key="NpcHandler">org.moparscape.msc.gs.npchandler.NpcHandlerDef</entry>
<entry key="Point">org.moparscape.msc.gs.model.Point</entry>
<entry key="TelePoint">org.moparscape.msc.gs.model.TelePoint</entry>
@ -13,40 +13,40 @@
<entry key="InvItem">org.moparscape.msc.gs.model.InvItem</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="GameObjectLoc">org.moparscape.msc.gs.model.Def.GameObjectLoc</entry>
<entry key="ItemLoc">org.moparscape.msc.gs.model.Def.ItemLoc</entry>
<entry key="NPCLoc">org.moparscape.msc.gs.model.Def.NPCLoc</entry>
<entry key="GameObjectDef">org.moparscape.msc.gs.model.Def.GameObjectDef</entry>
<entry key="ItemDef">org.moparscape.msc.gs.model.Def.ItemDef</entry>
<entry key="NPCDef">org.moparscape.msc.gs.model.Def.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="TileDef">org.moparscape.msc.gs.model.Def.extra.TileDef</entry>
<entry key="DoorDef">org.moparscape.msc.gs.model.Def.extra.DoorDef</entry>
<entry key="CerterDef">org.moparscape.msc.gs.model.Def.CerterDef</entry>
<entry key="CertDef">org.moparscape.msc.gs.model.Def.CertDef</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>
<entry key="PrayerDef">org.moparscape.msc.gs.model.Def.PrayerDef</entry>
<entry key="SpellDef">org.moparscape.msc.gs.model.Def.SpellDef</entry>
<entry key="ItemCraftingDef">org.moparscape.msc.gs.model.Def.ItemCraftingDef</entry>
<entry key="ItemHerbSecond">org.moparscape.msc.gs.model.Def.ItemHerbSecondDef</entry>
<entry key="ItemDartTipDef">org.moparscape.msc.gs.model.Def.ItemDartTipDef</entry>
<entry key="ItemGemDef">org.moparscape.msc.gs.model.Def.ItemGemDef</entry>
<entry key="ItemLogCutDef">org.moparscape.msc.gs.model.Def.ItemLogCutDef</entry>
<entry key="ItemBowStringDef">org.moparscape.msc.gs.model.Def.ItemBowStringDef</entry>
<entry key="ItemArrowHeadDef">org.moparscape.msc.gs.model.Def.ItemArrowHeadDef</entry>
<entry key="FiremakingDef">org.moparscape.msc.gs.model.Def.FiremakingDef</entry>
<entry key="ReqOreDef">org.moparscape.msc.gs.model.Def.ReqOreDef</entry>
<entry key="ItemWieldableDef">org.moparscape.msc.gs.model.Def.ItemWieldableDef</entry>
<entry key="ItemUnIdentHerbDef">org.moparscape.msc.gs.model.Def.ItemUnIdentHerbDef</entry>
<entry key="ItemHerbDef">org.moparscape.msc.gs.model.Def.ItemHerbDef</entry>
<entry key="ItemCookingDef">org.moparscape.msc.gs.model.Def.ItemCookingDef</entry>
<entry key="ItemSmeltingDef">org.moparscape.msc.gs.model.Def.ItemSmeltingDef</entry>
<entry key="ItemSmithingDef">org.moparscape.msc.gs.model.Def.ItemSmithingDef</entry>
<entry key="ObjectMiningDef">org.moparscape.msc.gs.model.Def.ObjectMiningDef</entry>
<entry key="ObjectWoodcuttingDef">org.moparscape.msc.gs.model.Def.ObjectWoodcuttingDef</entry>
<entry key="ObjectFishingDef">org.moparscape.msc.gs.model.Def.ObjectFishingDef</entry>
<entry key="ObjectFishDef">org.moparscape.msc.gs.model.Def.ObjectFishDef</entry>
<entry key="ItemDropDef">org.moparscape.msc.gs.model.Def.ItemDropDef</entry>
<entry key="AgilityDef">org.moparscape.msc.gs.model.Def.AgilityDef</entry>
<entry key="AgilityCourseDef">org.moparscape.msc.gs.model.Def.AgilityCourseDef</entry>
</properties>

View File

@ -13,14 +13,14 @@ 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.model.definition.entity.GameObjectLoc;
import org.moparscape.msc.gs.model.definition.entity.ItemLoc;
import org.moparscape.msc.gs.model.definition.entity.NPCLoc;
import org.moparscape.msc.gs.model.definition.skill.FiremakingDef;
import org.moparscape.msc.gs.model.definition.skill.ObjectFishDef;
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.SpellDef;
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(SpellDefinition def, int magicLevel, int magicEquip) {
public static boolean castSpell(SpellDef 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 ObjectFishDefinition getFish(int waterId, int fishingLevel, int click) {
ArrayList<ObjectFishDefinition> fish = new ArrayList<ObjectFishDefinition>();
for (ObjectFishDefinition def : EntityHandler.getObjectFishingDef(waterId,
public static ObjectFishDef getFish(int waterId, int fishingLevel, int click) {
ArrayList<ObjectFishDef> fish = new ArrayList<ObjectFishDef>();
for (ObjectFishDef 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;
}
ObjectFishDefinition thisFish = fish.get(DataConversions.random(0,
ObjectFishDef 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(ObjectWoodcuttingDefinition def, int woodcutLevel,
public static boolean getLog(ObjectWoodcuttingDef 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(ObjectMiningDefinition def, int miningLevel, int axeId) {
public static boolean getOre(ObjectMiningDef 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 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;
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;
}
} 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(FiremakingDefinition def, int firemakingLvl) {
public static boolean lightLogs(FiremakingDef def, int firemakingLvl) {
int levelDiff = firemakingLvl - def.getRequiredLevel();
if (levelDiff < 0) {
return false;

View File

@ -4,11 +4,11 @@ import org.moparscape.msc.gs.core.GameEngine;
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;
import org.moparscape.msc.gs.model.definition.entity.NPCLoc;
public abstract class WalkMobToMobEvent extends DelayedEvent {
protected Mob affectedMob;
private NPCLocationDefinition loc = null;
private NPCLoc loc = null;
protected Mob owner;
private int radius;
private long startTime = 0L;

View File

@ -15,9 +15,9 @@ 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.definition.entity.GameObjectLoc;
import org.moparscape.msc.gs.model.definition.entity.ItemLoc;
import org.moparscape.msc.gs.model.definition.entity.NPCLoc;
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 (GameObjectLocationDefinition gameObject : Instance.getDataStore().loadGameObjectLocs()) {
for (GameObjectLoc 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 (ItemLocationDefinition item : Instance.getDataStore().loadItemLocs()) {
for (ItemLoc 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 (NPCLocationDefinition npc : Instance.getDataStore().loadNPCLocs()) {
for (NPCLoc npc : Instance.getDataStore().loadNPCLocs()) {
if (Config.f2pWildy && Formulae.isP2P(true, npc))
continue;
if (Formulae.isP2P(npc) && !World.isMembers())

View File

@ -1,9 +1,9 @@
package org.moparscape.msc.gs.model;
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;
import org.moparscape.msc.gs.model.definition.entity.GameObjectDef;
import org.moparscape.msc.gs.model.definition.entity.GameObjectLoc;
import org.moparscape.msc.gs.model.definition.extra.DoorDef;
public class GameObject extends Entity {
/**
@ -19,7 +19,7 @@ public class GameObject extends Entity {
/**
* Location definition of the object
*/
private GameObjectLocationDefinition loc = null;
private GameObjectLoc 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(GameObjectLocationDefinition loc) {
public GameObject(GameObjectLoc 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 GameObjectLocationDefinition(id, location.getX(), location.getY(), direction,
this(new GameObjectLoc(id, location.getX(), location.getY(), direction,
type));
}
@ -66,15 +66,15 @@ public class GameObject extends Entity {
return direction;
}
public DoorDefinition getDoorDef() {
public DoorDef getDoorDef() {
return EntityHandler.getDoorDef(super.getID());
}
public GameObjectDefinition getGameObjectDef() {
public GameObjectDef getGameObjectDef() {
return EntityHandler.getGameObjectDef(super.getID());
}
public GameObjectLocationDefinition getLoc() {
public GameObjectLoc getLoc() {
return loc;
}

View File

@ -1,11 +1,11 @@
package org.moparscape.msc.gs.model;
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;
import org.moparscape.msc.gs.model.definition.entity.ItemDef;
import org.moparscape.msc.gs.model.definition.skill.ItemCookingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemUnIdentHerbDef;
import org.moparscape.msc.gs.model.definition.skill.ItemWieldableDef;
public class InvItem extends Entity implements Comparable<InvItem> {
@ -51,23 +51,23 @@ public class InvItem extends Entity implements Comparable<InvItem> {
return amount;
}
public ItemCookingDefinition getCookingDef() {
public ItemCookingDef getCookingDef() {
return EntityHandler.getItemCookingDef(id);
}
public ItemDefinition getDef() {
public ItemDef getDef() {
return EntityHandler.getItemDef(id);
}
public ItemSmeltingDefinition getSmeltingDef() {
public ItemSmeltingDef getSmeltingDef() {
return EntityHandler.getItemSmeltingDef(id);
}
public ItemUnIdentHerbDefinition getUnIdentHerbDef() {
public ItemUnIdentHerbDef getUnIdentHerbDef() {
return EntityHandler.getItemUnIdentHerbDef(id);
}
public ItemWieldableDefinition getWieldableDef() {
public ItemWieldableDef getWieldableDef() {
return EntityHandler.getItemWieldableDef(id);
}

View File

@ -5,8 +5,8 @@ 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.model.definition.EntityHandler;
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.ItemDef;
import org.moparscape.msc.gs.model.definition.entity.ItemLoc;
public class Item extends Entity {
/**
@ -21,7 +21,7 @@ public class Item extends Entity {
/**
* Location definition of the item
*/
private ItemLocationDefinition loc = null;
private ItemLoc loc = null;
/**
* Contains the player that the item belongs to, if any
@ -84,7 +84,7 @@ public class Item extends Entity {
}
}
public Item(ItemLocationDefinition loc) {
public Item(ItemLoc loc) {
this.loc = loc;
setID(loc.id);
setAmount(loc.amount);
@ -125,11 +125,11 @@ public class Item extends Entity {
return amount;
}
public ItemDefinition getDef() {
public ItemDef getDef() {
return EntityHandler.getItemDef(id);
}
public ItemLocationDefinition getLoc() {
public ItemLoc getLoc() {
return loc;
}

View File

@ -66,7 +66,7 @@ public abstract class Mob extends Entity {
/**
* The path we are walking
*/
private PathHandler pathHandler = new PathHandler(this);
public PathHandler pathHandler = new PathHandler(this);
/**
* Set when the mob has been destroyed to alert players
*/

View File

@ -12,9 +12,9 @@ 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.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.definition.entity.ItemDropDef;
import org.moparscape.msc.gs.model.definition.entity.NPCDef;
import org.moparscape.msc.gs.model.definition.entity.NPCLoc;
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 NPCDefinition def;
private NPCDef def;
private Syndicate syndicate = new Syndicate();
private boolean goingToAttack = false;
/**
* The location of this npc
*/
private NPCLocationDefinition loc;
private NPCLoc loc;
public boolean hasRan() {
return ran;
@ -199,11 +199,11 @@ public class Npc extends Mob {
this.weakend = weakend;
}
public void setDef(NPCDefinition def) {
public void setDef(NPCDef def) {
this.def = def;
}
public void setLoc(NPCLocationDefinition loc) {
public void setLoc(NPCLoc 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 NPCLocationDefinition(id, startX, startY, minX, maxX, minY, maxY));
this(new NPCLoc(id, startX, startY, minX, maxX, minY, maxY));
}
public boolean isScripted() {
@ -233,7 +233,7 @@ public class Npc extends Mob {
this.scripted = scripted;
}
public Npc(NPCLocationDefinition loc) {
public Npc(NPCLoc 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 NPCDefinition getDef() {
public NPCDef getDef() {
return EntityHandler.getNpcDef(getID());
}
@ -396,7 +396,7 @@ public class Npc extends Mob {
return curHits;
}
public NPCLocationDefinition getLoc() {
public NPCLoc getLoc() {
return loc;
}
@ -433,10 +433,10 @@ public class Npc extends Mob {
Player owner = mob instanceof Player ? (Player) mob : null;
ItemDropDefinition[] drops = def.getDrops();
ItemDropDef[] drops = def.getDrops();
int total = 0;
for (ItemDropDefinition drop : drops) {
for (ItemDropDef drop : drops) {
total += drop.getWeight();
}
//
@ -445,15 +445,12 @@ public class Npc extends Mob {
if (!this.getDef().name.equalsIgnoreCase("ghost")) {
for (ItemDropDefinition drop : drops) {
for (ItemDropDef drop : drops) {
if (drop == null) {
continue;
}
if (drop.getWeight() == 0) {
Item i = new Item(drop.getID(), getX(),getY(), drop.getAmount(), owner);
if(i.getDef().members && !Server.isMembers())
continue;
world.registerItem(i);
world.registerItem(new Item(drop.getID(), getX(),getY(), drop.getAmount(), owner));
continue;
}

View File

@ -26,8 +26,8 @@ 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.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.definition.skill.AgilityCourseDef;
import org.moparscape.msc.gs.model.definition.skill.PrayerDef;
import org.moparscape.msc.gs.model.snapshot.Activity;
import org.moparscape.msc.gs.phandler.client.WieldHandler;
import org.moparscape.msc.gs.quest.Quest;
@ -45,6 +45,8 @@ import bsh.Interpreter;
*/
public final class Player extends Mob {
public int dropTickCount = 0;
/**
* Methods to send packets related to actions
*/
@ -52,7 +54,7 @@ public final class Player extends Mob {
/**
* The current agility course the player's doing
*/
private AgilityCourseDefinition agilityCourseDef = null;
private AgilityCourseDef agilityCourseDef = null;
/**
* The Players appearance
*/
@ -63,7 +65,7 @@ public final class Player extends Mob {
* get a skull for attacking back
*/
private HashMap<Long, Long> attackedBy = new HashMap<Long, Long>();
// teleport
private boolean badClient = false;
/**
* Bank for banked items
@ -623,7 +625,7 @@ public final class Player extends Mob {
public void addPrayerDrain(int prayerID) {
drainRate = 0;
PrayerDefinition prayer = EntityHandler.getPrayerDef(prayerID);
PrayerDef prayer = EntityHandler.getPrayerDef(prayerID);
for (int x = 0; x <= 13; x++) {
prayer = EntityHandler.getPrayerDef(x);
if (super.isPrayerActivated(x)) {
@ -876,7 +878,7 @@ public final class Player extends Mob {
/**
* @return this player's current agility course
*/
public AgilityCourseDefinition getAgilityCourseDef() {
public AgilityCourseDef getAgilityCourseDef() {
return agilityCourseDef;
}
@ -902,9 +904,6 @@ public final class Player extends Mob {
return attackedBy;
}
/*
* Used for the Infected Blood world event
*/
public Bank getBank() {
return bank;
@ -914,37 +913,21 @@ public final class Player extends Mob {
return bubblesNeedingDisplayed;
}
/*
* Informs the server that the player has just used Infected Blood and
* activate the cooldown.
*/
public long getCastTimer() {
return lastSpellCast;
}
/*
* Returns the last time a player used Infected Blood.
*/
public List<ChatMessage> getChatMessagesNeedingDisplayed() {
return chatMessagesNeedingDisplayed;
}
/*
* Is this player infected?
*/
public LinkedList<ChatMessage> getChatQueue() {
return chatQueue;
}
/*
* This method is used for the Infected Blood world event
*
* @author Ollie
*/
public String getClassName() {
return className;
}
@ -2370,7 +2353,7 @@ public final class Player extends Mob {
/**
* Sets this player's current agility course
*/
public void setAgilityCourseDef(AgilityCourseDefinition def) {
public void setAgilityCourseDef(AgilityCourseDef def) {
agilityCourseDef = def;
}

View File

@ -16,8 +16,8 @@ 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.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.definition.entity.GameObjectLoc;
import org.moparscape.msc.gs.model.definition.entity.NPCLoc;
import org.moparscape.msc.gs.model.landscape.ActiveTile;
import org.moparscape.msc.gs.model.landscape.MutableTileValue;
import org.moparscape.msc.gs.model.landscape.TileValue;
@ -241,7 +241,7 @@ public final class World {
/**
* Adds a DelayedEvent that will spawn a GameObject
*/
public void delayedSpawnObject(final GameObjectLocationDefinition loc,
public void delayedSpawnObject(final GameObjectLoc loc,
final int respawnTime) {
delayedEventHandler.add(new SingleEvent(null, respawnTime) {
@ -532,7 +532,7 @@ public final class World {
* Registers an npc with the world
*/
public void registerNpc(Npc n) {
NPCLocationDefinition npc = n.getLoc();
NPCLoc 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) {

View File

@ -7,33 +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.model.definition.entity.GameObjectDef;
import org.moparscape.msc.gs.model.definition.entity.ItemDef;
import org.moparscape.msc.gs.model.definition.entity.NPCDef;
import org.moparscape.msc.gs.model.definition.extra.CerterDef;
import org.moparscape.msc.gs.model.definition.extra.DoorDef;
import org.moparscape.msc.gs.model.definition.extra.TileDef;
import org.moparscape.msc.gs.model.definition.skill.AgilityCourseDef;
import org.moparscape.msc.gs.model.definition.skill.AgilityDef;
import org.moparscape.msc.gs.model.definition.skill.FiremakingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemArrowHeadDef;
import org.moparscape.msc.gs.model.definition.skill.ItemBowStringDef;
import org.moparscape.msc.gs.model.definition.skill.ItemCookingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemCraftingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemDartTipDef;
import org.moparscape.msc.gs.model.definition.skill.ItemGemDef;
import org.moparscape.msc.gs.model.definition.skill.ItemHerbDef;
import org.moparscape.msc.gs.model.definition.skill.ItemHerbSecondDef;
import org.moparscape.msc.gs.model.definition.skill.ItemLogCutDef;
import org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemSmithingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemUnIdentHerbDef;
import org.moparscape.msc.gs.model.definition.skill.ItemWieldableDef;
import org.moparscape.msc.gs.model.definition.skill.ObjectFishingDef;
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.PrayerDef;
import org.moparscape.msc.gs.model.definition.skill.SpellDef;
import org.moparscape.msc.gs.persistence.DataStore;
/**
@ -41,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, 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 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 DoorDefinition[] doors;
private static Map<Integer, FiremakingDefinition> firemaking;
private static GameObjectDefinition[] gameObjects;
private static Map<Integer, ItemGemDefinition> gems;
private static ItemHerbSecondDefinition[] herbSeconds;
private static DoorDef[] doors;
private static Map<Integer, FiremakingDef> firemaking;
private static GameObjectDef[] gameObjects;
private static Map<Integer, ItemGemDef> gems;
private static ItemHerbSecondDef[] herbSeconds;
private static Map<Integer, int[]> itemAffectedTypes;
private static Map<Integer, ItemCookingDefinition> itemCooking;
private static ItemCraftingDefinition[] itemCrafting;
private static Map<Integer, ItemCookingDef> itemCooking;
private static ItemCraftingDef[] itemCrafting;
private static Map<Integer, Integer> itemEdibleHeals;
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 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 List<InvItem>[] keyChestLoots;
private static Map<Integer, ItemLogCutDefinition> logCut;
private static Map<Integer, ItemLogCutDef> logCut;
private static NPCDefinition[] npcs;
private static Map<Integer, ObjectFishingDefinition[]> objectFishing;
private static NPCDef[] npcs;
private static Map<Integer, ObjectFishingDef[]> objectFishing;
private static Map<Integer, ObjectMiningDefinition> objectMining;
private static Map<Integer, ObjectMiningDef> objectMining;
private static Map<Point, TelePoint> objectTelePoints;
private static Map<Integer, ObjectWoodcuttingDefinition> objectWoodcutting;
private static PrayerDefinition[] prayers;
private static Map<Integer, ObjectWoodcuttingDef> objectWoodcutting;
private static PrayerDef[] prayers;
private static Map<Integer, Integer> spellAggressiveLvl;
private static SpellDefinition[] spells;
private static TileDefinition[] tiles;
private static SpellDef[] spells;
private static TileDef[] tiles;
static {
DataStore dataStore = Instance.getDataStore();
@ -83,7 +83,7 @@ public class EntityHandler {
doors = dataStore.loadDoorDefs();
gameObjects = dataStore.loadGameObjectDefs();
npcs = dataStore.loadNPCDefs();
for (NPCDefinition n : npcs) {
for (NPCDef n : npcs) {
if (n.isAttackable()) {
n.respawnTime -= (n.respawnTime / 3);
}
@ -129,7 +129,7 @@ public class EntityHandler {
* the agility courses's start ID
* @return the AgilityCourseDef with the given start ID
*/
public static AgilityCourseDefinition getAgilityCourseDef(int id) {
public static AgilityCourseDef getAgilityCourseDef(int id) {
return agilityCourses.get(id);
}
@ -138,7 +138,7 @@ public class EntityHandler {
* the agility object's ID
* @return the AgilityDef with the given object ID
*/
public static AgilityDefinition getAgilityDef(int id) {
public static AgilityDef getAgilityDef(int id) {
return agilityObjects.get(id);
}
@ -147,14 +147,14 @@ public class EntityHandler {
* the npcs ID
* @return the CerterDef for the given npc
*/
public static CerterDefinition getCerterDef(int id) {
public static CerterDef getCerterDef(int id) {
return certers.get(id);
}
/**
* @return the ItemCraftingDef for the requested item
*/
public static ItemCraftingDefinition getCraftingDef(int id) {
public static ItemCraftingDef getCraftingDef(int id) {
if (id < 0 || id >= itemCrafting.length) {
return null;
}
@ -166,7 +166,7 @@ public class EntityHandler {
* the entities ID
* @return the DoorDef with the given ID
*/
public static DoorDefinition getDoorDef(int id) {
public static DoorDef getDoorDef(int id) {
if (id < 0 || id >= doors.length) {
return null;
}
@ -176,7 +176,7 @@ public class EntityHandler {
/**
* @return the FiremakingDef for the given log
*/
public static FiremakingDefinition getFiremakingDef(int id) {
public static FiremakingDef getFiremakingDef(int id) {
return firemaking.get(id);
}
@ -185,7 +185,7 @@ public class EntityHandler {
* the entities ID
* @return the GameObjectDef with the given ID
*/
public static GameObjectDefinition getGameObjectDef(int id) {
public static GameObjectDef getGameObjectDef(int id) {
if (id < 0 || id >= gameObjects.length) {
return null;
}
@ -204,14 +204,14 @@ public class EntityHandler {
/**
* @return the ItemArrowHeadDef for the given arrow
*/
public static ItemArrowHeadDefinition getItemArrowHeadDef(int id) {
public static ItemArrowHeadDef getItemArrowHeadDef(int id) {
return arrowHeads.get(id);
}
/**
* @return the ItemBowStringDef for the given bow
*/
public static ItemBowStringDefinition getItemBowStringDef(int id) {
public static ItemBowStringDef getItemBowStringDef(int id) {
return bowString.get(id);
}
@ -220,14 +220,14 @@ public class EntityHandler {
* the entities ID
* @return the ItemCookingDef with the given ID
*/
public static ItemCookingDefinition getItemCookingDef(int id) {
public static ItemCookingDef getItemCookingDef(int id) {
return itemCooking.get(id);
}
/**
* @return the ItemDartTipDef for the given tip
*/
public static ItemDartTipDefinition getItemDartTipDef(int id) {
public static ItemDartTipDef getItemDartTipDef(int id) {
return dartTips.get(id);
}
@ -236,7 +236,7 @@ public class EntityHandler {
* the entities ID
* @return the ItemDef with the given ID
*/
public static ItemDefinition getItemDef(int id) {
public static ItemDef getItemDef(int id) {
if (id < 0 || id >= items.length) {
return null;
}
@ -259,7 +259,7 @@ public class EntityHandler {
/**
* @return the ItemGemDef for the given gem
*/
public static ItemGemDefinition getItemGemDef(int id) {
public static ItemGemDef getItemGemDef(int id) {
return gems.get(id);
}
@ -268,16 +268,16 @@ public class EntityHandler {
* the entities ID
* @return the ItemHerbDef with the given ID
*/
public static ItemHerbDefinition getItemHerbDef(int id) {
public static ItemHerbDef getItemHerbDef(int id) {
return itemHerb.get(id);
}
/**
* @return the ItemHerbSecond for the given second ingredient
*/
public static ItemHerbSecondDefinition getItemHerbSecond(int secondID,
public static ItemHerbSecondDef getItemHerbSecond(int secondID,
int unfinishedID) {
for (ItemHerbSecondDefinition def : herbSeconds) {
for (ItemHerbSecondDef def : herbSeconds) {
if (def.getSecondID() == secondID
&& def.getUnfinishedID() == unfinishedID) {
return def;
@ -289,7 +289,7 @@ public class EntityHandler {
/**
* @return the ItemLogCutDef for the given log
*/
public static ItemLogCutDefinition getItemLogCutDef(int id) {
public static ItemLogCutDef getItemLogCutDef(int id) {
return logCut.get(id);
}
@ -298,7 +298,7 @@ public class EntityHandler {
* the entities ID
* @return the ItemSmeltingDef with the given ID
*/
public static ItemSmeltingDefinition getItemSmeltingDef(int id) {
public static ItemSmeltingDef getItemSmeltingDef(int id) {
return itemSmelting.get(id);
}
@ -307,7 +307,7 @@ public class EntityHandler {
* the entities ID
* @return the ItemUnIdentHerbDef with the given ID
*/
public static ItemUnIdentHerbDefinition getItemUnIdentHerbDef(int id) {
public static ItemUnIdentHerbDef getItemUnIdentHerbDef(int id) {
return itemUnIdentHerb.get(id);
}
@ -316,7 +316,7 @@ public class EntityHandler {
* the entities ID
* @return the ItemWieldableDef with the given ID
*/
public static ItemWieldableDefinition getItemWieldableDef(int id) {
public static ItemWieldableDef getItemWieldableDef(int id) {
return itemWieldable.get(id);
}
@ -329,7 +329,7 @@ public class EntityHandler {
* the entities ID
* @return the NPCDef with the given ID
*/
public static NPCDefinition getNpcDef(int id) {
public static NPCDef getNpcDef(int id) {
if (id < 0 || id >= npcs.length) {
return null;
}
@ -341,8 +341,8 @@ public class EntityHandler {
* the entities ID
* @return the ObjectFishingDef with the given ID
*/
public static ObjectFishingDefinition getObjectFishingDef(int id, int click) {
ObjectFishingDefinition[] defs = objectFishing.get(id);
public static ObjectFishingDef getObjectFishingDef(int id, int click) {
ObjectFishingDef[] defs = objectFishing.get(id);
if (defs == null) {
return null;
}
@ -354,7 +354,7 @@ public class EntityHandler {
* the entities ID
* @return the ObjectMiningDef with the given ID
*/
public static ObjectMiningDefinition getObjectMiningDef(int id) {
public static ObjectMiningDef getObjectMiningDef(int id) {
return objectMining.get(id);
}
@ -379,7 +379,7 @@ public class EntityHandler {
* the entities ID
* @return the ObjectWoodcuttingDef with the given ID
*/
public static ObjectWoodcuttingDefinition getObjectWoodcuttingDef(int id) {
public static ObjectWoodcuttingDef getObjectWoodcuttingDef(int id) {
return objectWoodcutting.get(id);
}
@ -388,7 +388,7 @@ public class EntityHandler {
* the entities ID
* @return the PrayerDef with the given ID
*/
public static PrayerDefinition getPrayerDef(int id) {
public static PrayerDef getPrayerDef(int id) {
if (id < 0 || id >= prayers.length) {
return null;
}
@ -398,7 +398,7 @@ public class EntityHandler {
/**
* @return the ItemSmithingDef for the requested item
*/
public static ItemSmithingDefinition getSmithingDef(int id) {
public static ItemSmithingDef getSmithingDef(int id) {
if (id < 0 || id >= itemSmithing.length) {
return null;
}
@ -408,8 +408,8 @@ public class EntityHandler {
/**
* @return the ItemSmithingDef for the requested item
*/
public static ItemSmithingDefinition getSmithingDefbyID(int itemID) {
for (ItemSmithingDefinition i : itemSmithing) {
public static ItemSmithingDef getSmithingDefbyID(int itemID) {
for (ItemSmithingDef i : itemSmithing) {
if (i.itemID == itemID)
return i;
}
@ -434,7 +434,7 @@ public class EntityHandler {
* the entities ID
* @return the SpellDef with the given ID
*/
public static SpellDefinition getSpellDef(int id) {
public static SpellDef getSpellDef(int id) {
if (id < 0 || id >= spells.length) {
return null;
}
@ -446,7 +446,7 @@ public class EntityHandler {
* the entities ID
* @return the TileDef with the given ID
*/
public static TileDefinition getTileDef(int id) {
public static TileDef getTileDef(int id) {
if (id < 0 || id >= tiles.length) {
return null;
}

View File

@ -5,7 +5,7 @@ import org.moparscape.msc.gs.model.definition.EntityDefinition;
/**
* The definition wrapper for game objects
*/
public class GameObjectDefinition extends EntityDefinition {
public class GameObjectDef extends EntityDefinition {
/**
* The first command of the object

View File

@ -1,6 +1,6 @@
package org.moparscape.msc.gs.model.definition.entity;
public class GameObjectLocationDefinition {
public class GameObjectLoc {
/**
* The direction it faces
*/
@ -22,7 +22,7 @@ public class GameObjectLocationDefinition {
*/
public int y;
public GameObjectLocationDefinition(int id, int x, int y, int direction, int type) {
public GameObjectLoc(int id, int x, int y, int direction, int type) {
this.id = id;
this.x = x;
this.y = y;

View File

@ -5,7 +5,7 @@ import org.moparscape.msc.gs.model.definition.EntityDefinition;
/**
* The definition wrapper for items
*/
public class ItemDefinition extends EntityDefinition {
public class ItemDef extends EntityDefinition {
/**
* The base price of the object
*/

View File

@ -1,11 +1,11 @@
package org.moparscape.msc.gs.model.definition.entity;
public class ItemDropDefinition {
public class ItemDropDef {
public int amount;
public int id;
public int weight;
public ItemDropDefinition(int id, int amount, int weight) {
public ItemDropDef(int id, int amount, int weight) {
this.id = id;
this.amount = amount;
this.weight = weight;

View File

@ -1,6 +1,6 @@
package org.moparscape.msc.gs.model.definition.entity;
public class ItemLocationDefinition {
public class ItemLoc {
/**
* Amount of item (stackables)
*/

View File

@ -5,7 +5,7 @@ import org.moparscape.msc.gs.model.definition.EntityDefinition;
/**
* The definition wrapper for npcs
*/
public class NPCDefinition extends EntityDefinition {
public class NPCDef extends EntityDefinition {
/**
* Whether the npc is aggressive
*/
@ -37,7 +37,7 @@ public class NPCDefinition extends EntityDefinition {
/**
* Possible drops
*/
public ItemDropDefinition[] drops;
public ItemDropDef[] drops;
/**
* Colour of our hair
*/
@ -103,7 +103,7 @@ public class NPCDefinition extends EntityDefinition {
return defense;
}
public ItemDropDefinition[] getDrops() {
public ItemDropDef[] getDrops() {
return drops;
}

View File

@ -1,6 +1,6 @@
package org.moparscape.msc.gs.model.definition.entity;
public class NPCLocationDefinition {
public class NPCLoc {
/**
* The id of the Npc
*/
@ -30,7 +30,7 @@ public class NPCLocationDefinition {
*/
public int startY;
public NPCLocationDefinition(int id, int startX, int startY, int minX, int maxX, int minY,
public NPCLoc(int id, int startX, int startY, int minX, int maxX, int minY,
int maxY) {
this.id = id;
this.startX = startX;

View File

@ -1,6 +1,6 @@
package org.moparscape.msc.gs.model.definition.extra;
public class CertDefinition {
public class CertDef {
/**
* The ID of the certificate
*/

View File

@ -1,10 +1,10 @@
package org.moparscape.msc.gs.model.definition.extra;
public class CerterDefinition {
public class CerterDef {
/**
* Certs this stall can deal with
*/
private CertDefinition[] certs;
private CertDef[] certs;
/**
* Type of stall
*/

View File

@ -5,7 +5,7 @@ import org.moparscape.msc.gs.model.definition.EntityDefinition;
/**
* The definition wrapper for doors
*/
public class DoorDefinition extends EntityDefinition {
public class DoorDef extends EntityDefinition {
/**
* The first command of the door

View File

@ -1,6 +1,6 @@
package org.moparscape.msc.gs.model.definition.extra;
public class TileDefinition {
public class TileDef {
public int colour;
public int objectType;
public int unknown;

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* Defines an agility course
*/
public class AgilityCourseDefinition {
public class AgilityCourseDef {
/**
* Ending object ID
*/

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* Defines an agility course object
*/
public class AgilityDefinition {
public class AgilityDef {
/**
* Can you fail this obstacle?
*/

View File

@ -1,6 +1,6 @@
package org.moparscape.msc.gs.model.definition.skill;
public class FiremakingDefinition {
public class FiremakingDef {
/**
* The exp given by these logs
*/

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for items
*/
public class ItemArrowHeadDefinition {
public class ItemArrowHeadDef {
/**
* The ID of the arrow created

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for items
*/
public class ItemBowStringDefinition {
public class ItemBowStringDef {
/**
* The ID of the bow created

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for items
*/
public class ItemCookingDefinition {
public class ItemCookingDef {
/**
* The id of the burned version

View File

@ -1,6 +1,6 @@
package org.moparscape.msc.gs.model.definition.skill;
public class ItemCraftingDefinition {
public class ItemCraftingDef {
/**
* The exp given
*/

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for items
*/
public class ItemDartTipDefinition {
public class ItemDartTipDef {
/**
* The ID of the arrow created

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for items
*/
public class ItemGemDefinition {
public class ItemGemDef {
/**
* The exp given by attaching this bow string

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for items
*/
public class ItemHerbDefinition {
public class ItemHerbDef {
/**
* The exp smelting this item gives

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for items
*/
public class ItemHerbSecondDefinition {
public class ItemHerbSecondDef {
/**
* The exp given completing this potion

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for items
*/
public class ItemLogCutDefinition {
public class ItemLogCutDef {
public int longbowExp;
public int longbowID;

View File

@ -4,7 +4,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for items
*/
public class ItemSmeltingDefinition {
public class ItemSmeltingDef {
/**
* The id of the related bar
@ -17,7 +17,7 @@ public class ItemSmeltingDefinition {
/**
* The ores required in addition to this one
*/
public ReqOreDefinition[] reqOres;
public ReqOreDef[] reqOres;
/**
* The level required to smelt this
*/
@ -35,7 +35,7 @@ public class ItemSmeltingDefinition {
return requiredLvl;
}
public ReqOreDefinition[] getReqOres() {
public ReqOreDef[] getReqOres() {
return reqOres;
}

View File

@ -1,6 +1,6 @@
package org.moparscape.msc.gs.model.definition.skill;
public class ItemSmithingDefinition {
public class ItemSmithingDef {
/**
* The amount of the item produced
*/

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for herbs
*/
public class ItemUnIdentHerbDefinition {
public class ItemUnIdentHerbDef {
/**
* How much experience identifying gives

View File

@ -9,7 +9,7 @@ import org.moparscape.msc.gs.model.definition.EntityHandler;
/**
* The definition wrapper for items
*/
public class ItemWieldableDefinition {
public class ItemWieldableDef {
/**
* How many armour points should be given

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for fish
*/
public class ObjectFishDefinition {
public class ObjectFishDef {
/**
* How much experience this fish should give

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for fishing spots
*/
public class ObjectFishingDefinition {
public class ObjectFishingDef {
/**
* The If of any bait required to go with the net
@ -12,7 +12,7 @@ public class ObjectFishingDefinition {
/**
* The fish that can be caught here
*/
public ObjectFishDefinition[] defs;
public ObjectFishDef[] defs;
/**
* The Id of the net required to fish with
*/
@ -22,7 +22,7 @@ public class ObjectFishingDefinition {
return baitId;
}
public ObjectFishDefinition[] getFishDefs() {
public ObjectFishDef[] getFishDefs() {
return defs;
}
@ -32,7 +32,7 @@ public class ObjectFishingDefinition {
public int getReqLevel() {
int requiredLevel = 99;
for (ObjectFishDefinition def : defs) {
for (ObjectFishDef def : defs) {
if (def.getReqLevel() < requiredLevel) {
requiredLevel = def.getReqLevel();
}

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for rocks
*/
public class ObjectMiningDefinition {
public class ObjectMiningDef {
/**
* How much experience identifying gives

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for trees
*/
public class ObjectWoodcuttingDefinition {
public class ObjectWoodcuttingDef {
/**
* How much experience identifying gives

View File

@ -5,7 +5,7 @@ import org.moparscape.msc.gs.model.definition.EntityDefinition;
/**
* The definition wrapper for prayers
*/
public class PrayerDefinition extends EntityDefinition {
public class PrayerDef extends EntityDefinition {
/**
* The drain rate of the prayer (perhaps points per min?)

View File

@ -3,7 +3,7 @@ package org.moparscape.msc.gs.model.definition.skill;
/**
* The definition wrapper for ores
*/
public class ReqOreDefinition {
public class ReqOreDef {
/**
* The amount of the ore required

View File

@ -9,7 +9,7 @@ import org.moparscape.msc.gs.model.definition.EntityDefinition;
/**
* The definition wrapper for spells
*/
public class SpellDefinition extends EntityDefinition {
public class SpellDef extends EntityDefinition {
/**
* The amount of experience given by this spell

View File

@ -9,7 +9,7 @@ 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;
import org.moparscape.msc.gs.model.definition.extra.CerterDef;
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 CerterDefinition certerDef = EntityHandler.getCerterDef(npc.getID());
final CerterDef certerDef = EntityHandler.getCerterDef(npc.getID());
if (certerDef == null) {
return;
}

View File

@ -8,36 +8,36 @@ 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.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.model.definition.entity.GameObjectDef;
import org.moparscape.msc.gs.model.definition.entity.GameObjectLoc;
import org.moparscape.msc.gs.model.definition.entity.ItemDef;
import org.moparscape.msc.gs.model.definition.entity.ItemLoc;
import org.moparscape.msc.gs.model.definition.entity.NPCDef;
import org.moparscape.msc.gs.model.definition.entity.NPCLoc;
import org.moparscape.msc.gs.model.definition.extra.CerterDef;
import org.moparscape.msc.gs.model.definition.extra.DoorDef;
import org.moparscape.msc.gs.model.definition.extra.TileDef;
import org.moparscape.msc.gs.model.definition.skill.AgilityCourseDef;
import org.moparscape.msc.gs.model.definition.skill.AgilityDef;
import org.moparscape.msc.gs.model.definition.skill.FiremakingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemArrowHeadDef;
import org.moparscape.msc.gs.model.definition.skill.ItemBowStringDef;
import org.moparscape.msc.gs.model.definition.skill.ItemCookingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemCraftingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemDartTipDef;
import org.moparscape.msc.gs.model.definition.skill.ItemGemDef;
import org.moparscape.msc.gs.model.definition.skill.ItemHerbDef;
import org.moparscape.msc.gs.model.definition.skill.ItemHerbSecondDef;
import org.moparscape.msc.gs.model.definition.skill.ItemLogCutDef;
import org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemSmithingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemUnIdentHerbDef;
import org.moparscape.msc.gs.model.definition.skill.ItemWieldableDef;
import org.moparscape.msc.gs.model.definition.skill.ObjectFishingDef;
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.PrayerDef;
import org.moparscape.msc.gs.model.definition.skill.SpellDef;
import org.moparscape.msc.gs.npchandler.NpcHandlerDefinition;
import org.moparscape.msc.gs.phandler.PacketHandlerDefinition;
@ -74,158 +74,158 @@ public abstract interface DataStore {
public void saveShops(List<Shop> shops) throws Exception;
public Map<Integer, CerterDefinition> loadCerterDefs() throws Exception;
public Map<Integer, CerterDef> loadCerterDefs() throws Exception;
public void saveCerterDefs(Map<Integer, CerterDefinition> certers)
public void saveCerterDefs(Map<Integer, CerterDef> certers)
throws Exception;
public List<GameObjectLocationDefinition> loadGameObjectLocs() throws Exception;
public List<GameObjectLoc> loadGameObjectLocs() throws Exception;
public void saveGameObjectLocs(List<GameObjectLocationDefinition> locs) throws Exception;
public void saveGameObjectLocs(List<GameObjectLoc> locs) throws Exception;
public List<ItemLocationDefinition> loadItemLocs() throws Exception;
public List<ItemLoc> loadItemLocs() throws Exception;
public void saveItemLocs(List<ItemLocationDefinition> locs) throws Exception;
public void saveItemLocs(List<ItemLoc> locs) throws Exception;
public List<NPCLocationDefinition> loadNPCLocs() throws Exception;
public List<NPCLoc> loadNPCLocs() throws Exception;
public void saveNPCLocs(List<NPCLocationDefinition> locs) throws Exception;
public void saveNPCLocs(List<NPCLoc> locs) throws Exception;
public TileDefinition[] loadTileDefs() throws Exception;
public TileDef[] loadTileDefs() throws Exception;
public void saveTileDefs(TileDefinition[] defs) throws Exception;
public void saveTileDefs(TileDef[] defs) throws Exception;
public GameObjectDefinition[] loadGameObjectDefs() throws Exception;
public GameObjectDef[] loadGameObjectDefs() throws Exception;
public void saveGameObjectDefs(GameObjectDefinition[] defs) throws Exception;
public void saveGameObjectDefs(GameObjectDef[] defs) throws Exception;
public DoorDefinition[] loadDoorDefs() throws Exception;
public DoorDef[] loadDoorDefs() throws Exception;
public void saveDoorDefs(DoorDefinition[] defs) throws Exception;
public void saveDoorDefs(DoorDef[] defs) throws Exception;
public ItemDefinition[] loadItemDefs() throws Exception;
public ItemDef[] loadItemDefs() throws Exception;
public void saveItemDefs(ItemDefinition[] defs) throws Exception;
public void saveItemDefs(ItemDef[] defs) throws Exception;
public PrayerDefinition[] loadPrayerDefs() throws Exception;
public PrayerDef[] loadPrayerDefs() throws Exception;
public void savePrayerDefs(PrayerDefinition[] defs) throws Exception;
public void savePrayerDefs(PrayerDef[] defs) throws Exception;
public SpellDefinition[] loadSpellDefs() throws Exception;
public SpellDef[] loadSpellDefs() throws Exception;
public void saveSpellDefs(SpellDefinition[] defs) throws Exception;
public void saveSpellDefs(SpellDef[] defs) throws Exception;
public NPCDefinition[] loadNPCDefs() throws Exception;
public NPCDef[] loadNPCDefs() throws Exception;
public void saveNPCDefs(NPCDefinition[] defs) throws Exception;
public void saveNPCDefs(NPCDef[] defs) throws Exception;
public ItemCraftingDefinition[] loadItemCraftingDefs() throws Exception;
public ItemCraftingDef[] loadItemCraftingDefs() throws Exception;
public void saveItemCraftingDefs(ItemCraftingDefinition[] defs) throws Exception;
public void saveItemCraftingDefs(ItemCraftingDef[] defs) throws Exception;
public ItemHerbSecondDefinition[] loadItemHerbSeconds() throws Exception;
public ItemHerbSecondDef[] loadItemHerbSeconds() throws Exception;
public void saveItemHerbSeconds(ItemHerbSecondDefinition[] seconds) throws Exception;
public void saveItemHerbSeconds(ItemHerbSecondDef[] seconds) throws Exception;
public Map<Integer, ItemDartTipDefinition> loadItemDartTipDefs() throws Exception;
public Map<Integer, ItemDartTipDef> loadItemDartTipDefs() throws Exception;
public void saveItemDartTipDefs(Map<Integer, ItemDartTipDefinition> defs)
public void saveItemDartTipDefs(Map<Integer, ItemDartTipDef> defs)
throws Exception;
public Map<Integer, ItemGemDefinition> loadGemDefs() throws Exception;
public Map<Integer, ItemGemDef> loadGemDefs() throws Exception;
public void saveGemDefs(Map<Integer, ItemGemDefinition> defs) throws Exception;
public void saveGemDefs(Map<Integer, ItemGemDef> defs) throws Exception;
public Map<Integer, ItemLogCutDefinition> loadItemLogCutDefs() throws Exception;
public Map<Integer, ItemLogCutDef> loadItemLogCutDefs() throws Exception;
public void saveItemLogCutDefs(Map<Integer, ItemLogCutDefinition> defs)
public void saveItemLogCutDefs(Map<Integer, ItemLogCutDef> defs)
throws Exception;
public Map<Integer, ItemBowStringDefinition> loadItemBowStringDefs()
public Map<Integer, ItemBowStringDef> loadItemBowStringDefs()
throws Exception;
public void saveItemBowStringDefs(Map<Integer, ItemBowStringDefinition> defs)
public void saveItemBowStringDefs(Map<Integer, ItemBowStringDef> defs)
throws Exception;
public Map<Integer, ItemArrowHeadDefinition> loadItemArrowHeadDefs()
public Map<Integer, ItemArrowHeadDef> loadItemArrowHeadDefs()
throws Exception;
public void saveItemArrowHeadDefs(Map<Integer, ItemArrowHeadDefinition> defs)
public void saveItemArrowHeadDefs(Map<Integer, ItemArrowHeadDef> defs)
throws Exception;
public Map<Integer, FiremakingDefinition> loadFiremakingDefs() throws Exception;
public Map<Integer, FiremakingDef> loadFiremakingDefs() throws Exception;
public void saveFiremakingDefs(Map<Integer, FiremakingDefinition> defs)
public void saveFiremakingDefs(Map<Integer, FiremakingDef> defs)
throws Exception;
public Map<Integer, int[]> loadItemAffectedTypes() throws Exception;
public void saveItemAffectedTypes(Map<Integer, int[]> types) throws Exception;
public Map<Integer, ItemWieldableDefinition> loadItemWieldableDefs()
public Map<Integer, ItemWieldableDef> loadItemWieldableDefs()
throws Exception;
public void saveItemWieldableDefs(Map<Integer, ItemWieldableDefinition> defs) throws Exception;
public void saveItemWieldableDefs(Map<Integer, ItemWieldableDef> defs) throws Exception;
public Map<Integer, ItemUnIdentHerbDefinition> loadItemUnIdentHerbDefs()
public Map<Integer, ItemUnIdentHerbDef> loadItemUnIdentHerbDefs()
throws Exception;
public void saveItemUnIdentHerbDefs(Map<Integer, ItemUnIdentHerbDefinition> defs) throws Exception;
public void saveItemUnIdentHerbDefs(Map<Integer, ItemUnIdentHerbDef> defs) throws Exception;
public Map<Integer, ItemHerbDefinition> loadItemHerbDefs() throws Exception;
public Map<Integer, ItemHerbDef> loadItemHerbDefs() throws Exception;
public void saveItemHerbDefs(Map<Integer, ItemHerbDefinition> defs) throws Exception;
public void saveItemHerbDefs(Map<Integer, ItemHerbDef> defs) throws Exception;
public Map<Integer, Integer> loadItemEdibleHeals() throws Exception;
public void saveItemEdibleHeals(Map<Integer, Integer> defs) throws Exception;
public Map<Integer, ItemCookingDefinition> loadItemCookingDefs() throws Exception;
public Map<Integer, ItemCookingDef> loadItemCookingDefs() throws Exception;
public void saveItemCookingDefs(Map<Integer, ItemCookingDefinition> defs) throws Exception;
public void saveItemCookingDefs(Map<Integer, ItemCookingDef> defs) throws Exception;
public Map<Integer, ItemSmeltingDefinition> loadItemSmeltingDefs()
public Map<Integer, ItemSmeltingDef> loadItemSmeltingDefs()
throws Exception;
public void saveItemSmeltingDefs(Map<Integer, ItemSmeltingDefinition> defs) throws Exception;
public void saveItemSmeltingDefs(Map<Integer, ItemSmeltingDef> defs) throws Exception;
public ItemSmithingDefinition[] loadItemSmithingDefs() throws Exception;
public ItemSmithingDef[] loadItemSmithingDefs() throws Exception;
public void saveItemSmithingDefs(ItemSmithingDefinition[] defs) throws Exception;
public void saveItemSmithingDefs(ItemSmithingDef[] defs) throws Exception;
public Map<Integer, ObjectMiningDefinition> loadObjectMiningDefs()
public Map<Integer, ObjectMiningDef> loadObjectMiningDefs()
throws Exception;
public void saveObjectMiningDefs(Map<Integer, ObjectMiningDefinition> defs) throws Exception;
public void saveObjectMiningDefs(Map<Integer, ObjectMiningDef> defs) throws Exception;
public Map<Integer, ObjectWoodcuttingDefinition> loadObjectWoodcuttingDefs()
public Map<Integer, ObjectWoodcuttingDef> loadObjectWoodcuttingDefs()
throws Exception;
public void saveObjectWoodcuttingDefs(Map<Integer, ObjectWoodcuttingDefinition> defs) throws Exception;
public void saveObjectWoodcuttingDefs(Map<Integer, ObjectWoodcuttingDef> defs) throws Exception;
public Map<Integer, ObjectFishingDefinition[]> loadObjectFishDefs()
public Map<Integer, ObjectFishingDef[]> loadObjectFishDefs()
throws Exception;
public void saveObjectFishingDefs(Map<Integer, ObjectFishingDefinition> defs) throws Exception;
public void saveObjectFishingDefs(Map<Integer, ObjectFishingDef> defs) throws Exception;
public Map<Integer, Integer> loadSpellAgressiveLevel() throws Exception;
public void saveSpellAgressiveLevel(Map<Integer, Integer> defs) throws Exception;
public Map<Integer, AgilityDefinition> loadAgilityDefs() throws Exception;
public Map<Integer, AgilityDef> loadAgilityDefs() throws Exception;
public void saveAgilityDefs(Map<Integer, AgilityDefinition> defs) throws Exception;
public void saveAgilityDefs(Map<Integer, AgilityDef> defs) throws Exception;
public Map<Integer, AgilityCourseDefinition> loadAgilityCourseDefs()
public Map<Integer, AgilityCourseDef> loadAgilityCourseDefs()
throws Exception;
public void saveAgilityCourseDef(Map<Integer, AgilityCourseDefinition> defs) throws Exception;
public void saveAgilityCourseDef(Map<Integer, AgilityCourseDef> defs) throws Exception;
public List<InvItem>[] loadKeyChestLoots() throws Exception;
public void saveKeyChestLoots(List<InvItem>[] loots) throws Exception;
public Map<Integer, ItemDartTipDefinition> loadDartTips() throws Exception;
public Map<Integer, ItemDartTipDef> loadDartTips() throws Exception;
public void dispose();

View File

@ -1,9 +1,11 @@
package org.moparscape.msc.gs.phandler.client;
import org.apache.mina.common.IoSession;
import org.moparscape.msc.gs.Instance;
import org.moparscape.msc.gs.connection.Packet;
import org.moparscape.msc.gs.event.DelayedEvent;
import org.moparscape.msc.gs.event.SingleEvent;
import org.moparscape.msc.gs.model.InvItem;
import org.moparscape.msc.gs.model.Item;
import org.moparscape.msc.gs.model.Player;
@ -37,7 +39,49 @@ public class DropHandler implements PacketHandler {
}
if (player.isPMod() && !player.isMod())
return;
if (item.getDef().isMembers() && !World.isMembers()) {
player.getActionSender().sendMessage(
"This feature is only avaliable on a members server");
return;
}
// drop item after a path has finished
if(player.pathHandler != null && !player.pathHandler.finishedPath()) {
waitAndDrop(player, item);
} else {
drop(player, item);
}
}
public void waitAndDrop(final Player player,final InvItem item) {
Instance.getDelayedEventHandler().add(new SingleEvent(player, 500) {
@Override
public void action() {
if(owner.dropTickCount > 20) { // 10 seconds they are allowed to walk for. anything longer won't drop.
owner.dropTickCount = 0;
stop();
} else {
owner.dropTickCount++;
if(owner.pathHandler != null && !owner.pathHandler.finishedPath()) {
waitAndDrop(owner, item);
} else {
drop(owner, item);
}
}
}
});
}
public void drop(Player player, final InvItem item) {
player.getActionSender().sendMessage("Dropping!");
player.setStatus(Action.DROPPING_GITEM);
Instance.getDelayedEventHandler().add(new DelayedEvent(player, 500) {
public void run() {
@ -52,8 +96,8 @@ public class DropHandler implements PacketHandler {
}
world.addEntryToSnapshots(new Activity(owner.getUsername(),
owner.getUsername() + " dropped ID: " + item.getID()
+ " amount: " + item.getAmount() + " at: "
+ owner.getX() + "/" + owner.getY()));
+ " amount: " + item.getAmount() + " at: "
+ owner.getX() + "/" + owner.getY()));
owner.getActionSender().sendSound("dropobject");
owner.getInventory().remove(item);
@ -64,4 +108,4 @@ public class DropHandler implements PacketHandler {
}
});
}
}
}

View File

@ -15,7 +15,7 @@ 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.definition.entity.ItemDef;
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;
}
ItemDefinition def = tItem.getDef();
ItemDef def = tItem.getDef();
if (!def.canTrade()) {
player.getActionSender().sendMessage(
def.getName()

View File

@ -15,7 +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.definition.skill.ItemUnIdentHerbDef;
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;
}
ItemUnIdentHerbDefinition herb = item.getUnIdentHerbDef();
ItemUnIdentHerbDef 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() {
ItemUnIdentHerbDefinition herb = item.getUnIdentHerbDef();
ItemUnIdentHerbDef herb = item.getUnIdentHerbDef();
InvItem newItem = new InvItem(herb.getNewId());
owner.getInventory().remove(item);
owner.getInventory().add(newItem);

View File

@ -15,7 +15,7 @@ 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.definition.skill.FiremakingDef;
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 FiremakingDefinition def = EntityHandler
final FiremakingDef def = EntityHandler
.getFiremakingDef(item.getID());
if (!itemId(new int[] { 166 }) || def == null) {
owner.getActionSender().sendMessage(

View File

@ -12,13 +12,13 @@ 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.definition.skill.ItemArrowHeadDef;
import org.moparscape.msc.gs.model.definition.skill.ItemBowStringDef;
import org.moparscape.msc.gs.model.definition.skill.ItemDartTipDef;
import org.moparscape.msc.gs.model.definition.skill.ItemGemDef;
import org.moparscape.msc.gs.model.definition.skill.ItemHerbDef;
import org.moparscape.msc.gs.model.definition.skill.ItemHerbSecondDef;
import org.moparscape.msc.gs.model.definition.skill.ItemLogCutDef;
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;
ItemDartTipDefinition tipDef = null;
ItemDartTipDef 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 ItemArrowHeadDefinition headDef = EntityHandler
final ItemArrowHeadDef 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 ItemBowStringDefinition stringDef = EntityHandler
final ItemBowStringDef 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 ItemGemDefinition gemDef = EntityHandler.getItemGemDef(gem.getID());
final ItemGemDef 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 ItemHerbDefinition herbDef = EntityHandler.getItemHerbDef(herb.getID());
final ItemHerbDef 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 ItemHerbSecondDefinition def) {
final InvItem unfinished, final ItemHerbSecondDef 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 ItemLogCutDefinition cutDef = EntityHandler
final ItemLogCutDef 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);
ItemHerbSecondDefinition secondDef = null;
ItemHerbSecondDef secondDef = null;
if ((secondDef = EntityHandler.getItemHerbSecond(item1.getID(),
item2.getID())) != null
&& doHerbSecond(player, item1, item2, secondDef)) {

View File

@ -22,12 +22,12 @@ 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.definition.skill.ItemCookingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemCraftingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemSmithingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemWieldableDef;
import org.moparscape.msc.gs.model.definition.skill.ReqOreDef;
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
ItemWieldableDefinition def = item.getWieldableDef();
ItemWieldableDef 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;
}
ItemCraftingDefinition def = EntityHandler
ItemCraftingDef 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;
ItemSmeltingDefinition smeltingDef = item.getSmeltingDef();
ItemSmeltingDef smeltingDef = item.getSmeltingDef();
if (smeltingDef == null) {
owner.getActionSender().sendMessage(
"Nothing interesting happens.");
return;
}
for (ReqOreDefinition reqOre : smeltingDef.getReqOres()) {
for (ReqOreDef 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 ItemSmeltingDefinition def = smeltingDef;
final ItemSmeltingDef def = smeltingDef;
Instance.getDelayedEventHandler().add(
new ShortEvent(owner) {
public void action() {
InvItem bar = new InvItem(def
.getBarId());
if (owner.getInventory().remove(item) > -1) {
for (ReqOreDefinition reqOre : def
for (ReqOreDef reqOre : def
.getReqOres()) {
for (int i = 0; i < reqOre
.getAmount(); i++) {
@ -1381,7 +1381,7 @@ public class InvUseOnObject implements PacketHandler {
}
});
} else {
final ItemCookingDefinition cookingDef = item
final ItemCookingDef 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) {
ItemSmithingDefinition def = EntityHandler.getSmithingDef((Formulae.getBarType(barID) * 21) + toMake);
ItemSmithingDef def = EntityHandler.getSmithingDef((Formulae.getBarType(barID) * 21) + toMake);
if(def == null) {
owner.getActionSender().sendMessage("Nothing interesting happens.");
return;

View File

@ -27,12 +27,12 @@ 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.definition.entity.GameObjectDef;
import org.moparscape.msc.gs.model.definition.skill.AgilityCourseDef;
import org.moparscape.msc.gs.model.definition.skill.AgilityDef;
import org.moparscape.msc.gs.model.definition.skill.ObjectFishDef;
import org.moparscape.msc.gs.model.definition.skill.ObjectFishingDef;
import org.moparscape.msc.gs.model.definition.skill.ObjectWoodcuttingDef;
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();
GameObjectDefinition def = object.getGameObjectDef();
GameObjectDef 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 AgilityDefinition def = EntityHandler
final AgilityDef 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);
AgilityCourseDefinition course = EntityHandler
AgilityCourseDef 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 ObjectFishingDefinition def = EntityHandler
final ObjectFishingDef 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() {
ObjectFishDefinition def = Formulae.getFish(
ObjectFishDef 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 ObjectWoodcuttingDefinition def = EntityHandler
final ObjectWoodcuttingDef def = EntityHandler
.getObjectWoodcuttingDef(object.getID());
if (owner.isBusy()) {
return;

View File

@ -7,7 +7,7 @@ import org.moparscape.msc.gs.connection.RSCPacket;
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.model.definition.skill.PrayerDef;
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;
}
PrayerDefinition prayer = EntityHandler.getPrayerDef(prayerID);
PrayerDef prayer = EntityHandler.getPrayerDef(prayerID);
switch (pID) {
case 56:
if (player.getMaxStat(5) < prayer.getReqLevel()) {

View File

@ -31,9 +31,9 @@ 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.definition.skill.ItemSmeltingDef;
import org.moparscape.msc.gs.model.definition.skill.ReqOreDef;
import org.moparscape.msc.gs.model.definition.skill.SpellDef;
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, SpellDefinition spell) {
private static boolean checkAndRemoveRunes(Player player, SpellDef 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, SpellDefinition spell) {
private void finalizeSpell(Player player, SpellDef 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, SpellDefinition spell, int id) {
private void handleGroundCast(Player player, SpellDef 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, SpellDefinition spell, int id,
private void handleInvItemCast(Player player, SpellDef 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
ItemSmeltingDefinition smeltingDef = affectedItem.getSmeltingDef();
ItemSmeltingDef smeltingDef = affectedItem.getSmeltingDef();
if (smeltingDef == null) {
player.getActionSender().sendMessage(
"This spell cannot be used on this kind of item");
return;
}
for (ReqOreDefinition reqOre : smeltingDef.getReqOres()) {
for (ReqOreDef 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 (ReqOreDefinition reqOre : smeltingDef.getReqOres()) {
for (ReqOreDef 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 SpellDefinition spell,
private void handleItemCast(Player player, final SpellDef 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();
SpellDefinition spell = EntityHandler.getSpellDef(spellID);
SpellDef 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()));
SpellDefinition spell = EntityHandler.getSpellDef(idx);
SpellDef 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, SpellDefinition spell, int id) {
private void handleTeleport(Player player, SpellDef spell, int id) {
if (player.inCombat()) {
return;

View File

@ -69,21 +69,22 @@ public class TalkToNpcHandler implements PacketHandler {
if (affectedNpc.isBusy()) {
owner.getActionSender().sendMessage(
affectedNpc.getDef().getName()
+ " is currently busy.");
+ " is currently busy.");
return;
}
affectedNpc.resetPath();
NpcHandler handler = world.getNpcHandler(affectedNpc
.getID());
if (Formulae.getDirection(owner, affectedNpc) != -1) {
affectedNpc.setSprite(Formulae.getDirection(owner,
affectedNpc));
owner.setSprite(Formulae.getDirection(affectedNpc,
owner));
}
if (handler != null) {
try {
if (Formulae.getDirection(owner, affectedNpc) != -1) {
affectedNpc.setSprite(Formulae.getDirection(owner,
affectedNpc));
owner.setSprite(Formulae.getDirection(affectedNpc,
owner));
}
handler.handleNpc(affectedNpc, owner);
} catch (Exception e) {
Logger.error("Exception with npc["
@ -96,20 +97,19 @@ public class TalkToNpcHandler implements PacketHandler {
}
} else {
if (!World.getQuestManager().handleNpcTalk(
affectedNpc, owner)) {
if (!World.getQuestManager().handleNpcTalk(affectedNpc, owner)) {
if (affectedNpc.getDef().isAttackable())
owner.getActionSender()
.sendMessage(
"The "
+ affectedNpc
.getDef()
.getName()
+ " doesn't appear interested in talking.");
owner.getActionSender().sendMessage("The "+ affectedNpc.getDef().getName() + " doesn't appear interested in talking.");
else if (world.npcScripts
.containsKey(affectedNpc.getID())) {
owner.setBusy(true);
affectedNpc.blockedBy(owner);
if (Formulae.getDirection(owner, affectedNpc) != -1) {
affectedNpc.setSprite(Formulae.getDirection(owner,
affectedNpc));
owner.setSprite(Formulae.getDirection(affectedNpc,
owner));
}
if (owner.getInterpreterThread() != null) {
try {
owner.getInterpreterThread().stop();
@ -161,10 +161,17 @@ public class TalkToNpcHandler implements PacketHandler {
owner.destroy(false);
}
}
} else {
if (Formulae.getDirection(owner, affectedNpc) != -1) {
affectedNpc.setSprite(Formulae.getDirection(owner,
affectedNpc));
owner.setSprite(Formulae.getDirection(affectedNpc,
owner));
}
}
}
}
});
}
}
}

View File

@ -14,7 +14,7 @@ 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.definition.entity.ItemDef;
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;
}
ItemDefinition def = tItem.getDef();
ItemDef def = tItem.getDef();
if (!def.canTrade() && !player.isMod()) {
player.getActionSender().sendMessage(
def.getName()

View File

@ -15,7 +15,7 @@ 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.definition.extra.DoorDef;
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();
DoorDefinition def = object.getDoorDef();
DoorDef def = object.getDoorDef();
if (owner.isBusy() || owner.isRanging()
|| !owner.nextTo(object) || def == null
|| owner.getStatus() != Action.USING_DOOR) {

View File

@ -16,7 +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.definition.entity.GameObjectDef;
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 GameObjectDefinition def;
private GameObjectDef 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(GameObjectDefinition def) {
public void setDef(GameObjectDef def) {
this.def = def;
}
public GameObjectDefinition getDef() {
public GameObjectDef getDef() {
return def;
}

View File

@ -2,7 +2,6 @@ package org.moparscape.msc.gs.plugins.plugs.skills;
import org.moparscape.msc.config.Formulae;
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.model.Bubble;
@ -10,7 +9,7 @@ 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.model.definition.skill.ObjectMiningDef;
import org.moparscape.msc.gs.plugins.listeners.ObjectListener;
import org.moparscape.msc.gs.tools.DataConversions;
@ -53,7 +52,7 @@ public class Mining implements ObjectListener {
return;
final GameObject newobject = Instance.getWorld()
.getTile(object.getX(), object.getY()).getGameObject();
final ObjectMiningDefinition def = EntityHandler.getObjectMiningDef(newobject
final ObjectMiningDef def = EntityHandler.getObjectMiningDef(newobject
.getID());
if (def == null || def.getRespawnTime() < 1) {
owner.getActionSender().sendMessage(
@ -70,7 +69,7 @@ public class Mining implements ObjectListener {
if (owner.getCurStat(14) < def.getReqLevel()) {
owner.getActionSender().sendMessage(
"You need a mining level of " + def.getReqLevel()
+ " to mine this rock.");
+ " to mine this rock.");
return;
}
int axeId = getAxe(owner);
@ -114,6 +113,7 @@ public class Mining implements ObjectListener {
return;
}
owner.setBusy(true);
//owner.isMining(true);
owner.getActionSender().sendSound("mine");
Bubble bubble = new Bubble(owner, axeId);
@ -122,15 +122,15 @@ public class Mining implements ObjectListener {
}
final int retrytime = retrytimes;
owner.setLastMineTimer(GameEngine.getTime());
//owner.setLastMineTimer(GameEngine.getTime());
owner.getActionSender().sendMessage(
"You swing your pick at the rock...");
Instance.getDelayedEventHandler().add(new ShortEvent(owner) {
public void action() {
if (!owner.isMining()) {
owner.setBusy(false);
return;
}
//if(!owner.isMining()) {
//owner.setBusy(false);
//return;
//}
if (Formulae.getOre(def, owner.getCurStat(14), axeID)) {
if (DataConversions.random(0, 200) == 0) {
InvItem gem = new InvItem(Formulae.getGem(), 1);
@ -150,10 +150,9 @@ public class Mining implements ObjectListener {
world.delayedSpawnObject(newobject.getLoc(),
def.getRespawnTime() * 1000);
}
owner.isMining(false);
owner.setSkillLoops(0);
//owner.isMining(false);
//owner.setSkillLoops(0);
owner.getActionSender().sendInventory();
owner.setBusy(false);
} else {
boolean retry = false;
if (retrytime - swings > 0)
@ -162,20 +161,24 @@ public class Mining implements ObjectListener {
"You only succeed in scratching the rock.");
if (retry) {
world.getDelayedEventHandler().add(
new SingleEvent(owner, 500) {
public void action() {
if(!owner.isMining() || owner.inCombat()) {
return;
}
owner.setSkillLoops(swings + 1);
handleMining(object, owner,
owner.getClick());
}
});
}
if (!retry) {
owner.setBusy(false);
owner.isMining(false);
owner.setSkillLoops(0);
}
//if (!retry) {
// owner.isMining(false);
// owner.setSkillLoops(0);
//}
}
owner.setBusy(false);
}
});
}

View File

@ -11,36 +11,36 @@ 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.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.model.definition.entity.GameObjectDef;
import org.moparscape.msc.gs.model.definition.entity.GameObjectLoc;
import org.moparscape.msc.gs.model.definition.entity.ItemDef;
import org.moparscape.msc.gs.model.definition.entity.ItemLoc;
import org.moparscape.msc.gs.model.definition.entity.NPCDef;
import org.moparscape.msc.gs.model.definition.entity.NPCLoc;
import org.moparscape.msc.gs.model.definition.extra.CerterDef;
import org.moparscape.msc.gs.model.definition.extra.DoorDef;
import org.moparscape.msc.gs.model.definition.extra.TileDef;
import org.moparscape.msc.gs.model.definition.skill.AgilityCourseDef;
import org.moparscape.msc.gs.model.definition.skill.AgilityDef;
import org.moparscape.msc.gs.model.definition.skill.FiremakingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemArrowHeadDef;
import org.moparscape.msc.gs.model.definition.skill.ItemBowStringDef;
import org.moparscape.msc.gs.model.definition.skill.ItemCookingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemCraftingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemDartTipDef;
import org.moparscape.msc.gs.model.definition.skill.ItemGemDef;
import org.moparscape.msc.gs.model.definition.skill.ItemHerbDef;
import org.moparscape.msc.gs.model.definition.skill.ItemHerbSecondDef;
import org.moparscape.msc.gs.model.definition.skill.ItemLogCutDef;
import org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemSmithingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemUnIdentHerbDef;
import org.moparscape.msc.gs.model.definition.skill.ItemWieldableDef;
import org.moparscape.msc.gs.model.definition.skill.ObjectFishingDef;
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.PrayerDef;
import org.moparscape.msc.gs.model.definition.skill.SpellDef;
import org.moparscape.msc.gs.npchandler.NpcHandlerDefinition;
import org.moparscape.msc.gs.persistence.DataStore;
import org.moparscape.msc.gs.persistence.impl.bun.CodecLookupService;
@ -118,236 +118,236 @@ public class BinaryUsingNIO implements DataStore {
}
@Override
public Map<Integer, CerterDefinition> loadCerterDefs() throws Exception {
public Map<Integer, CerterDef> loadCerterDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveCerterDefs(Map<Integer, CerterDefinition> certers)
public void saveCerterDefs(Map<Integer, CerterDef> certers)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public List<GameObjectLocationDefinition> loadGameObjectLocs() throws Exception {
public List<GameObjectLoc> loadGameObjectLocs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveGameObjectLocs(List<GameObjectLocationDefinition> locs) throws Exception {
public void saveGameObjectLocs(List<GameObjectLoc> locs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public List<ItemLocationDefinition> loadItemLocs() throws Exception {
public List<ItemLoc> loadItemLocs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemLocs(List<ItemLocationDefinition> locs) throws Exception {
public void saveItemLocs(List<ItemLoc> locs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public List<NPCLocationDefinition> loadNPCLocs() throws Exception {
public List<NPCLoc> loadNPCLocs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveNPCLocs(List<NPCLocationDefinition> locs) throws Exception {
public void saveNPCLocs(List<NPCLoc> locs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public TileDefinition[] loadTileDefs() throws Exception {
public TileDef[] loadTileDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveTileDefs(TileDefinition[] defs) throws Exception {
public void saveTileDefs(TileDef[] defs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public GameObjectDefinition[] loadGameObjectDefs() throws Exception {
public GameObjectDef[] loadGameObjectDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveGameObjectDefs(GameObjectDefinition[] defs) throws Exception {
public void saveGameObjectDefs(GameObjectDef[] defs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public DoorDefinition[] loadDoorDefs() throws Exception {
public DoorDef[] loadDoorDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveDoorDefs(DoorDefinition[] defs) throws Exception {
public void saveDoorDefs(DoorDef[] defs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public ItemDefinition[] loadItemDefs() throws Exception {
public ItemDef[] loadItemDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemDefs(ItemDefinition[] defs) throws Exception {
public void saveItemDefs(ItemDef[] defs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public PrayerDefinition[] loadPrayerDefs() throws Exception {
public PrayerDef[] loadPrayerDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void savePrayerDefs(PrayerDefinition[] defs) throws Exception {
public void savePrayerDefs(PrayerDef[] defs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public SpellDefinition[] loadSpellDefs() throws Exception {
public SpellDef[] loadSpellDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveSpellDefs(SpellDefinition[] defs) throws Exception {
public void saveSpellDefs(SpellDef[] defs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public NPCDefinition[] loadNPCDefs() throws Exception {
public NPCDef[] loadNPCDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveNPCDefs(NPCDefinition[] defs) throws Exception {
public void saveNPCDefs(NPCDef[] defs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public ItemCraftingDefinition[] loadItemCraftingDefs() throws Exception {
public ItemCraftingDef[] loadItemCraftingDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemCraftingDefs(ItemCraftingDefinition[] defs) throws Exception {
public void saveItemCraftingDefs(ItemCraftingDef[] defs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public ItemHerbSecondDefinition[] loadItemHerbSeconds() throws Exception {
public ItemHerbSecondDef[] loadItemHerbSeconds() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemHerbSeconds(ItemHerbSecondDefinition[] seconds) throws Exception {
public void saveItemHerbSeconds(ItemHerbSecondDef[] seconds) throws Exception {
// TODO Auto-generated method stub
}
@Override
public Map<Integer, ItemDartTipDefinition> loadItemDartTipDefs() throws Exception {
public Map<Integer, ItemDartTipDef> loadItemDartTipDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemDartTipDefs(Map<Integer, ItemDartTipDefinition> defs)
public void saveItemDartTipDefs(Map<Integer, ItemDartTipDef> defs)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public Map<Integer, ItemGemDefinition> loadGemDefs() throws Exception {
public Map<Integer, ItemGemDef> loadGemDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveGemDefs(Map<Integer, ItemGemDefinition> defs) throws Exception {
public void saveGemDefs(Map<Integer, ItemGemDef> defs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public Map<Integer, ItemLogCutDefinition> loadItemLogCutDefs() throws Exception {
public Map<Integer, ItemLogCutDef> loadItemLogCutDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemLogCutDefs(Map<Integer, ItemLogCutDefinition> defs)
public void saveItemLogCutDefs(Map<Integer, ItemLogCutDef> defs)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public Map<Integer, ItemBowStringDefinition> loadItemBowStringDefs()
public Map<Integer, ItemBowStringDef> loadItemBowStringDefs()
throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemBowStringDefs(Map<Integer, ItemBowStringDefinition> defs)
public void saveItemBowStringDefs(Map<Integer, ItemBowStringDef> defs)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public Map<Integer, ItemArrowHeadDefinition> loadItemArrowHeadDefs()
public Map<Integer, ItemArrowHeadDef> loadItemArrowHeadDefs()
throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemArrowHeadDefs(Map<Integer, ItemArrowHeadDefinition> defs)
public void saveItemArrowHeadDefs(Map<Integer, ItemArrowHeadDef> defs)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public Map<Integer, FiremakingDefinition> loadFiremakingDefs() throws Exception {
public Map<Integer, FiremakingDef> loadFiremakingDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveFiremakingDefs(Map<Integer, FiremakingDefinition> defs)
public void saveFiremakingDefs(Map<Integer, FiremakingDef> defs)
throws Exception {
// TODO Auto-generated method stub
@ -367,41 +367,41 @@ public class BinaryUsingNIO implements DataStore {
}
@Override
public Map<Integer, ItemWieldableDefinition> loadItemWieldableDefs()
public Map<Integer, ItemWieldableDef> loadItemWieldableDefs()
throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemWieldableDefs(Map<Integer, ItemWieldableDefinition> defs)
public void saveItemWieldableDefs(Map<Integer, ItemWieldableDef> defs)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public Map<Integer, ItemUnIdentHerbDefinition> loadItemUnIdentHerbDefs()
public Map<Integer, ItemUnIdentHerbDef> loadItemUnIdentHerbDefs()
throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemUnIdentHerbDefs(Map<Integer, ItemUnIdentHerbDefinition> defs)
public void saveItemUnIdentHerbDefs(Map<Integer, ItemUnIdentHerbDef> defs)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public Map<Integer, ItemHerbDefinition> loadItemHerbDefs() throws Exception {
public Map<Integer, ItemHerbDef> loadItemHerbDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemHerbDefs(Map<Integer, ItemHerbDefinition> defs)
public void saveItemHerbDefs(Map<Integer, ItemHerbDef> defs)
throws Exception {
// TODO Auto-generated method stub
@ -421,60 +421,60 @@ public class BinaryUsingNIO implements DataStore {
}
@Override
public Map<Integer, ItemCookingDefinition> loadItemCookingDefs() throws Exception {
public Map<Integer, ItemCookingDef> loadItemCookingDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemCookingDefs(Map<Integer, ItemCookingDefinition> defs)
public void saveItemCookingDefs(Map<Integer, ItemCookingDef> defs)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public Map<Integer, ItemSmeltingDefinition> loadItemSmeltingDefs()
public Map<Integer, ItemSmeltingDef> loadItemSmeltingDefs()
throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemSmeltingDefs(Map<Integer, ItemSmeltingDefinition> defs)
public void saveItemSmeltingDefs(Map<Integer, ItemSmeltingDef> defs)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public ItemSmithingDefinition[] loadItemSmithingDefs() throws Exception {
public ItemSmithingDef[] loadItemSmithingDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveItemSmithingDefs(ItemSmithingDefinition[] defs) throws Exception {
public void saveItemSmithingDefs(ItemSmithingDef[] defs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public Map<Integer, ObjectMiningDefinition> loadObjectMiningDefs()
public Map<Integer, ObjectMiningDef> loadObjectMiningDefs()
throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveObjectMiningDefs(Map<Integer, ObjectMiningDefinition> defs)
public void saveObjectMiningDefs(Map<Integer, ObjectMiningDef> defs)
throws Exception {
// TODO Auto-generated method stub
}
@Override
public Map<Integer, ObjectWoodcuttingDefinition> loadObjectWoodcuttingDefs()
public Map<Integer, ObjectWoodcuttingDef> loadObjectWoodcuttingDefs()
throws Exception {
// TODO Auto-generated method stub
return null;
@ -482,20 +482,20 @@ public class BinaryUsingNIO implements DataStore {
@Override
public void saveObjectWoodcuttingDefs(
Map<Integer, ObjectWoodcuttingDefinition> defs) throws Exception {
Map<Integer, ObjectWoodcuttingDef> defs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public Map<Integer, ObjectFishingDefinition[]> loadObjectFishDefs()
public Map<Integer, ObjectFishingDef[]> loadObjectFishDefs()
throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveObjectFishingDefs(Map<Integer, ObjectFishingDefinition> defs)
public void saveObjectFishingDefs(Map<Integer, ObjectFishingDef> defs)
throws Exception {
// TODO Auto-generated method stub
@ -515,26 +515,26 @@ public class BinaryUsingNIO implements DataStore {
}
@Override
public Map<Integer, AgilityDefinition> loadAgilityDefs() throws Exception {
public Map<Integer, AgilityDef> loadAgilityDefs() throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveAgilityDefs(Map<Integer, AgilityDefinition> defs) throws Exception {
public void saveAgilityDefs(Map<Integer, AgilityDef> defs) throws Exception {
// TODO Auto-generated method stub
}
@Override
public Map<Integer, AgilityCourseDefinition> loadAgilityCourseDefs()
public Map<Integer, AgilityCourseDef> loadAgilityCourseDefs()
throws Exception {
// TODO Auto-generated method stub
return null;
}
@Override
public void saveAgilityCourseDef(Map<Integer, AgilityCourseDefinition> defs)
public void saveAgilityCourseDef(Map<Integer, AgilityCourseDef> defs)
throws Exception {
// TODO Auto-generated method stub
@ -553,7 +553,7 @@ public class BinaryUsingNIO implements DataStore {
}
@Override
public Map<Integer, ItemDartTipDefinition> loadDartTips() throws Exception {
public Map<Integer, ItemDartTipDef> loadDartTips() throws Exception {
// TODO Auto-generated method stub
return null;
}

View File

@ -2,19 +2,19 @@ package org.moparscape.msc.gs.persistence.impl.bun.codec;
import java.nio.ByteBuffer;
import org.moparscape.msc.gs.model.definition.entity.NPCDefinition;
import org.moparscape.msc.gs.model.definition.entity.NPCDef;
import org.moparscape.msc.gs.persistence.impl.bun.ByteBufferUtil;
import org.moparscape.msc.gs.persistence.impl.bun.Codec;
public class NpcDefCodec implements Codec<NPCDefinition[]> {
public class NpcDefCodec implements Codec<NPCDef[]> {
@Override
public ByteBuffer encode(NPCDefinition[] t) {
public ByteBuffer encode(NPCDef[] t) {
return null;
}
private ByteBuffer encode(NPCDefinition d) {
private ByteBuffer encode(NPCDef 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<NPCDefinition[]> {
}
@Override
public NPCDefinition[] decode(ByteBuffer buf) {
public NPCDef[] decode(ByteBuffer buf) {
// TODO Auto-generated method stub
return null;
}

View File

@ -24,36 +24,36 @@ 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.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.model.definition.entity.GameObjectDef;
import org.moparscape.msc.gs.model.definition.entity.GameObjectLoc;
import org.moparscape.msc.gs.model.definition.entity.ItemDef;
import org.moparscape.msc.gs.model.definition.entity.ItemLoc;
import org.moparscape.msc.gs.model.definition.entity.NPCDef;
import org.moparscape.msc.gs.model.definition.entity.NPCLoc;
import org.moparscape.msc.gs.model.definition.extra.CerterDef;
import org.moparscape.msc.gs.model.definition.extra.DoorDef;
import org.moparscape.msc.gs.model.definition.extra.TileDef;
import org.moparscape.msc.gs.model.definition.skill.AgilityCourseDef;
import org.moparscape.msc.gs.model.definition.skill.AgilityDef;
import org.moparscape.msc.gs.model.definition.skill.FiremakingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemArrowHeadDef;
import org.moparscape.msc.gs.model.definition.skill.ItemBowStringDef;
import org.moparscape.msc.gs.model.definition.skill.ItemCookingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemCraftingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemDartTipDef;
import org.moparscape.msc.gs.model.definition.skill.ItemGemDef;
import org.moparscape.msc.gs.model.definition.skill.ItemHerbDef;
import org.moparscape.msc.gs.model.definition.skill.ItemHerbSecondDef;
import org.moparscape.msc.gs.model.definition.skill.ItemLogCutDef;
import org.moparscape.msc.gs.model.definition.skill.ItemSmeltingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemSmithingDef;
import org.moparscape.msc.gs.model.definition.skill.ItemUnIdentHerbDef;
import org.moparscape.msc.gs.model.definition.skill.ItemWieldableDef;
import org.moparscape.msc.gs.model.definition.skill.ObjectFishingDef;
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.PrayerDef;
import org.moparscape.msc.gs.model.definition.skill.SpellDef;
import org.moparscape.msc.gs.npchandler.NpcHandlerDefinition;
import org.moparscape.msc.gs.persistence.DataStore;
import org.moparscape.msc.gs.phandler.PacketHandlerDefinition;
@ -162,98 +162,98 @@ public class XMLUsingXStream implements DataStore {
}
@Override
public Map<Integer, CerterDefinition> loadCerterDefs() {
return (Map<Integer, CerterDefinition>) load("defs/extras/NpcCerters.xml.gz");
public Map<Integer, CerterDef> loadCerterDefs() {
return (Map<Integer, CerterDef>) load("defs/extras/NpcCerters.xml.gz");
}
@Override
public List<GameObjectLocationDefinition> loadGameObjectLocs() {
return (List<GameObjectLocationDefinition>) load("locs/GameObjectLoc.xml.gz");
public List<GameObjectLoc> loadGameObjectLocs() {
return (List<GameObjectLoc>) load("locs/GameObjectLoc.xml.gz");
}
@Override
public List<ItemLocationDefinition> loadItemLocs() {
return (List<ItemLocationDefinition>) load("locs/ItemLoc.xml.gz");
public List<ItemLoc> loadItemLocs() {
return (List<ItemLoc>) load("locs/ItemLoc.xml.gz");
}
@Override
public List<NPCLocationDefinition> loadNPCLocs() {
return (List<NPCLocationDefinition>) load("locs/NpcLoc.xml.gz");
public List<NPCLoc> loadNPCLocs() {
return (List<NPCLoc>) load("locs/NpcLoc.xml.gz");
}
@Override
public TileDefinition[] loadTileDefs() {
return (TileDefinition[]) load("defs/TileDef.xml.gz");
public TileDef[] loadTileDefs() {
return (TileDef[]) load("defs/TileDef.xml.gz");
}
@Override
public GameObjectDefinition[] loadGameObjectDefs() {
return (GameObjectDefinition[]) load("defs/GameObjectDef.xml.gz");
public GameObjectDef[] loadGameObjectDefs() {
return (GameObjectDef[]) load("defs/GameObjectDef.xml.gz");
}
@Override
public DoorDefinition[] loadDoorDefs() {
return (DoorDefinition[]) load("defs/DoorDef.xml.gz");
public DoorDef[] loadDoorDefs() {
return (DoorDef[]) load("defs/DoorDef.xml.gz");
}
@Override
public ItemDefinition[] loadItemDefs() {
return (ItemDefinition[]) load("defs/ItemDef.xml.gz");
public ItemDef[] loadItemDefs() {
return (ItemDef[]) load("defs/ItemDef.xml.gz");
}
@Override
public PrayerDefinition[] loadPrayerDefs() {
return (PrayerDefinition[]) load("defs/PrayerDef.xml.gz");
public PrayerDef[] loadPrayerDefs() {
return (PrayerDef[]) load("defs/PrayerDef.xml.gz");
}
@Override
public SpellDefinition[] loadSpellDefs() {
return (SpellDefinition[]) load("defs/SpellDef.xml.gz");
public SpellDef[] loadSpellDefs() {
return (SpellDef[]) load("defs/SpellDef.xml.gz");
}
@Override
public NPCDefinition[] loadNPCDefs() {
return (NPCDefinition[]) load("defs/NPCDef.xml.gz");
public NPCDef[] loadNPCDefs() {
return (NPCDef[]) load("defs/NPCDef.xml.gz");
}
@Override
public ItemCraftingDefinition[] loadItemCraftingDefs() {
return (ItemCraftingDefinition[]) load("defs/extras/ItemCraftingDef.xml.gz");
public ItemCraftingDef[] loadItemCraftingDefs() {
return (ItemCraftingDef[]) load("defs/extras/ItemCraftingDef.xml.gz");
}
@Override
public ItemHerbSecondDefinition[] loadItemHerbSeconds() {
return (ItemHerbSecondDefinition[]) load("defs/extras/ItemHerbSecond.xml.gz");
public ItemHerbSecondDef[] loadItemHerbSeconds() {
return (ItemHerbSecondDef[]) load("defs/extras/ItemHerbSecond.xml.gz");
}
@Override
public Map<Integer, ItemDartTipDefinition> loadItemDartTipDefs() {
return (Map<Integer, ItemDartTipDefinition>) load("defs/extras/ItemDartTipDef.xml.gz");
public Map<Integer, ItemDartTipDef> loadItemDartTipDefs() {
return (Map<Integer, ItemDartTipDef>) load("defs/extras/ItemDartTipDef.xml.gz");
}
@Override
public Map<Integer, ItemGemDefinition> loadGemDefs() {
return (Map<Integer, ItemGemDefinition>) load("defs/extras/ItemGemDef.xml.gz");
public Map<Integer, ItemGemDef> loadGemDefs() {
return (Map<Integer, ItemGemDef>) load("defs/extras/ItemGemDef.xml.gz");
}
@Override
public Map<Integer, ItemLogCutDefinition> loadItemLogCutDefs() {
return (Map<Integer, ItemLogCutDefinition>) load("defs/extras/ItemLogCutDef.xml.gz");
public Map<Integer, ItemLogCutDef> loadItemLogCutDefs() {
return (Map<Integer, ItemLogCutDef>) load("defs/extras/ItemLogCutDef.xml.gz");
}
@Override
public Map<Integer, ItemBowStringDefinition> loadItemBowStringDefs() {
return (Map<Integer, ItemBowStringDefinition>) load("defs/extras/ItemBowStringDef.xml.gz");
public Map<Integer, ItemBowStringDef> loadItemBowStringDefs() {
return (Map<Integer, ItemBowStringDef>) load("defs/extras/ItemBowStringDef.xml.gz");
}
@Override
public Map<Integer, ItemArrowHeadDefinition> loadItemArrowHeadDefs() {
return (Map<Integer, ItemArrowHeadDefinition>) load("defs/extras/ItemArrowHeadDef.xml.gz");
public Map<Integer, ItemArrowHeadDef> loadItemArrowHeadDefs() {
return (Map<Integer, ItemArrowHeadDef>) load("defs/extras/ItemArrowHeadDef.xml.gz");
}
@Override
public Map<Integer, FiremakingDefinition> loadFiremakingDefs() {
return (Map<Integer, FiremakingDefinition>) load("defs/extras/FiremakingDef.xml.gz");
public Map<Integer, FiremakingDef> loadFiremakingDefs() {
return (Map<Integer, FiremakingDef>) load("defs/extras/FiremakingDef.xml.gz");
}
@Override
@ -262,18 +262,18 @@ public class XMLUsingXStream implements DataStore {
}
@Override
public Map<Integer, ItemWieldableDefinition> loadItemWieldableDefs() {
return (Map<Integer, ItemWieldableDefinition>) load("defs/extras/ItemWieldableDef.xml.gz");
public Map<Integer, ItemWieldableDef> loadItemWieldableDefs() {
return (Map<Integer, ItemWieldableDef>) load("defs/extras/ItemWieldableDef.xml.gz");
}
@Override
public Map<Integer, ItemUnIdentHerbDefinition> loadItemUnIdentHerbDefs() {
return (Map<Integer, ItemUnIdentHerbDefinition>) load("defs/extras/ItemUnIdentHerbDef.xml.gz");
public Map<Integer, ItemUnIdentHerbDef> loadItemUnIdentHerbDefs() {
return (Map<Integer, ItemUnIdentHerbDef>) load("defs/extras/ItemUnIdentHerbDef.xml.gz");
}
@Override
public Map<Integer, ItemHerbDefinition> loadItemHerbDefs() {
return (Map<Integer, ItemHerbDefinition>) load("defs/extras/ItemHerbDef.xml.gz");
public Map<Integer, ItemHerbDef> loadItemHerbDefs() {
return (Map<Integer, ItemHerbDef>) load("defs/extras/ItemHerbDef.xml.gz");
}
@Override
@ -282,33 +282,33 @@ public class XMLUsingXStream implements DataStore {
}
@Override
public Map<Integer, ItemCookingDefinition> loadItemCookingDefs() {
return (Map<Integer, ItemCookingDefinition>) load("defs/extras/ItemCookingDef.xml.gz");
public Map<Integer, ItemCookingDef> loadItemCookingDefs() {
return (Map<Integer, ItemCookingDef>) load("defs/extras/ItemCookingDef.xml.gz");
}
@Override
public Map<Integer, ItemSmeltingDefinition> loadItemSmeltingDefs() {
return (Map<Integer, ItemSmeltingDefinition>) load("defs/extras/ItemSmeltingDef.xml.gz");
public Map<Integer, ItemSmeltingDef> loadItemSmeltingDefs() {
return (Map<Integer, ItemSmeltingDef>) load("defs/extras/ItemSmeltingDef.xml.gz");
}
@Override
public ItemSmithingDefinition[] loadItemSmithingDefs() {
return (ItemSmithingDefinition[]) load("defs/extras/ItemSmithingDef.xml.gz");
public ItemSmithingDef[] loadItemSmithingDefs() {
return (ItemSmithingDef[]) load("defs/extras/ItemSmithingDef.xml.gz");
}
@Override
public Map<Integer, ObjectMiningDefinition> loadObjectMiningDefs() {
return (Map<Integer, ObjectMiningDefinition>) load("defs/extras/ObjectMining.xml.gz");
public Map<Integer, ObjectMiningDef> loadObjectMiningDefs() {
return (Map<Integer, ObjectMiningDef>) load("defs/extras/ObjectMining.xml.gz");
}
@Override
public Map<Integer, ObjectWoodcuttingDefinition> loadObjectWoodcuttingDefs() {
return (Map<Integer, ObjectWoodcuttingDefinition>) load("defs/extras/ObjectWoodcutting.xml.gz");
public Map<Integer, ObjectWoodcuttingDef> loadObjectWoodcuttingDefs() {
return (Map<Integer, ObjectWoodcuttingDef>) load("defs/extras/ObjectWoodcutting.xml.gz");
}
@Override
public Map<Integer, ObjectFishingDefinition[]> loadObjectFishDefs() {
return (Map<Integer, ObjectFishingDefinition[]>) load("defs/extras/ObjectFishing.xml.gz");
public Map<Integer, ObjectFishingDef[]> loadObjectFishDefs() {
return (Map<Integer, ObjectFishingDef[]>) load("defs/extras/ObjectFishing.xml.gz");
}
@Override
@ -317,13 +317,13 @@ public class XMLUsingXStream implements DataStore {
}
@Override
public Map<Integer, AgilityDefinition> loadAgilityDefs() {
return (Map<Integer, AgilityDefinition>) load("defs/extras/AgilityDef.xml.gz");
public Map<Integer, AgilityDef> loadAgilityDefs() {
return (Map<Integer, AgilityDef>) load("defs/extras/AgilityDef.xml.gz");
}
@Override
public Map<Integer, AgilityCourseDefinition> loadAgilityCourseDefs() {
return (Map<Integer, AgilityCourseDefinition>) load("defs/extras/AgilityCourseDef.xml.gz");
public Map<Integer, AgilityCourseDef> loadAgilityCourseDefs() {
return (Map<Integer, AgilityCourseDef>) load("defs/extras/AgilityCourseDef.xml.gz");
}
@Override
@ -332,8 +332,8 @@ public class XMLUsingXStream implements DataStore {
}
@Override
public Map<Integer, ItemDartTipDefinition> loadDartTips() {
return (HashMap<Integer, ItemDartTipDefinition>) load("defs/extras/ItemDartTipDef.xml.gz");
public Map<Integer, ItemDartTipDef> loadDartTips() {
return (HashMap<Integer, ItemDartTipDef>) load("defs/extras/ItemDartTipDef.xml.gz");
}
@Override
@ -368,102 +368,102 @@ public class XMLUsingXStream implements DataStore {
}
@Override
public void saveCerterDefs(Map<Integer, CerterDefinition> certers)
public void saveCerterDefs(Map<Integer, CerterDef> certers)
throws Exception {
write("defs/extras/NpcCerters.xml.gz", certers);
}
@Override
public void saveGameObjectLocs(List<GameObjectLocationDefinition> locs) throws Exception {
public void saveGameObjectLocs(List<GameObjectLoc> locs) throws Exception {
write("locs/GameObjectLocs.xml.gz", locs);
}
@Override
public void saveItemLocs(List<ItemLocationDefinition> locs) throws Exception {
public void saveItemLocs(List<ItemLoc> locs) throws Exception {
write("locs/ItemLoc.xml.gz", locs);
}
@Override
public void saveNPCLocs(List<NPCLocationDefinition> locs) throws Exception {
public void saveNPCLocs(List<NPCLoc> locs) throws Exception {
write("locs/NpcLoc.xml.gz", locs);
}
@Override
public void saveTileDefs(TileDefinition[] defs) throws Exception {
public void saveTileDefs(TileDef[] defs) throws Exception {
write("defs/TileDef.xml.gz", defs);
}
@Override
public void saveGameObjectDefs(GameObjectDefinition[] defs) throws Exception {
public void saveGameObjectDefs(GameObjectDef[] defs) throws Exception {
write("defs/GameObjectDef.xml.gz", defs);
}
@Override
public void saveDoorDefs(DoorDefinition[] defs) throws Exception {
public void saveDoorDefs(DoorDef[] defs) throws Exception {
write("defs/DoorDef.xml.gz", defs);
}
@Override
public void saveItemDefs(ItemDefinition[] defs) throws Exception {
public void saveItemDefs(ItemDef[] defs) throws Exception {
write("defs/ItemDef.xml.gz", defs);
}
@Override
public void savePrayerDefs(PrayerDefinition[] defs) throws Exception {
public void savePrayerDefs(PrayerDef[] defs) throws Exception {
write("defs/PrayerDef.xml.gz", defs);
}
@Override
public void saveSpellDefs(SpellDefinition[] defs) throws Exception {
public void saveSpellDefs(SpellDef[] defs) throws Exception {
write("defs/SpellDef.xml.gz", defs);
}
@Override
public void saveNPCDefs(NPCDefinition[] defs) throws Exception {
public void saveNPCDefs(NPCDef[] defs) throws Exception {
write("defs/NPCDef.xml.gz", defs);
}
@Override
public void saveItemCraftingDefs(ItemCraftingDefinition[] defs) throws Exception {
public void saveItemCraftingDefs(ItemCraftingDef[] defs) throws Exception {
write("defs/extras/ItemCraftingDef.xml.gz", defs);
}
@Override
public void saveItemHerbSeconds(ItemHerbSecondDefinition[] seconds) throws Exception {
public void saveItemHerbSeconds(ItemHerbSecondDef[] seconds) throws Exception {
write("defs/extras/ItemHerbSecond.xml.gz", seconds);
}
@Override
public void saveItemDartTipDefs(Map<Integer, ItemDartTipDefinition> defs)
public void saveItemDartTipDefs(Map<Integer, ItemDartTipDef> defs)
throws Exception {
write("defs/extras/ItemDartTipDef.xml.gz", defs);
}
@Override
public void saveGemDefs(Map<Integer, ItemGemDefinition> defs) throws Exception {
public void saveGemDefs(Map<Integer, ItemGemDef> defs) throws Exception {
write("def/extras/ItemGemDef.xml.gz", defs);
}
@Override
public void saveItemLogCutDefs(Map<Integer, ItemLogCutDefinition> defs)
public void saveItemLogCutDefs(Map<Integer, ItemLogCutDef> defs)
throws Exception {
write("def/extras/ItemLogCutDefs.xml.gz", defs);
}
@Override
public void saveItemBowStringDefs(Map<Integer, ItemBowStringDefinition> defs)
public void saveItemBowStringDefs(Map<Integer, ItemBowStringDef> defs)
throws Exception {
write("defs/extras/ItemBowStringDef.xml.gz", defs);
}
@Override
public void saveItemArrowHeadDefs(Map<Integer, ItemArrowHeadDefinition> defs)
public void saveItemArrowHeadDefs(Map<Integer, ItemArrowHeadDef> defs)
throws Exception {
write("defs/extras/ItemArrowHeadDef.xml.gz", defs);
}
@Override
public void saveFiremakingDefs(Map<Integer, FiremakingDefinition> defs)
public void saveFiremakingDefs(Map<Integer, FiremakingDef> defs)
throws Exception {
write("defs/extras/FiremakingDef.xml.gz", defs);
}
@ -475,19 +475,19 @@ public class XMLUsingXStream implements DataStore {
}
@Override
public void saveItemWieldableDefs(Map<Integer, ItemWieldableDefinition> defs)
public void saveItemWieldableDefs(Map<Integer, ItemWieldableDef> defs)
throws Exception {
write("defs/extras/ItemWieldableDef.xml.gz", defs);
}
@Override
public void saveItemUnIdentHerbDefs(Map<Integer, ItemUnIdentHerbDefinition> defs)
public void saveItemUnIdentHerbDefs(Map<Integer, ItemUnIdentHerbDef> defs)
throws Exception {
write("defs/extras/Item.UnIdentHerbDef.xml.gz", defs);
}
@Override
public void saveItemHerbDefs(Map<Integer, ItemHerbDefinition> defs)
public void saveItemHerbDefs(Map<Integer, ItemHerbDef> defs)
throws Exception {
write("defs/extras/ItemHerbDef.xml.gz", defs);
}
@ -499,36 +499,36 @@ public class XMLUsingXStream implements DataStore {
}
@Override
public void saveItemCookingDefs(Map<Integer, ItemCookingDefinition> defs)
public void saveItemCookingDefs(Map<Integer, ItemCookingDef> defs)
throws Exception {
write("defs/extras/ItemCookingDef.xml.gz", defs);
}
@Override
public void saveItemSmeltingDefs(Map<Integer, ItemSmeltingDefinition> defs)
public void saveItemSmeltingDefs(Map<Integer, ItemSmeltingDef> defs)
throws Exception {
write("defs/extras/ItemSmeltingDef.xml.gz", defs);
}
@Override
public void saveItemSmithingDefs(ItemSmithingDefinition[] defs) throws Exception {
public void saveItemSmithingDefs(ItemSmithingDef[] defs) throws Exception {
write("defs/extras/ItemSmithingDef.xml.gz", defs);
}
@Override
public void saveObjectMiningDefs(Map<Integer, ObjectMiningDefinition> defs)
public void saveObjectMiningDefs(Map<Integer, ObjectMiningDef> defs)
throws Exception {
write("defs/extras/ObjectMiningDef.xml.gz", defs);
}
@Override
public void saveObjectWoodcuttingDefs(
Map<Integer, ObjectWoodcuttingDefinition> defs) throws Exception {
Map<Integer, ObjectWoodcuttingDef> defs) throws Exception {
write("defs/extras/ObjectWoodcuttingDef.xml.gz", defs);
}
@Override
public void saveObjectFishingDefs(Map<Integer, ObjectFishingDefinition> defs)
public void saveObjectFishingDefs(Map<Integer, ObjectFishingDef> defs)
throws Exception {
write("defs/extras/ObjectFishingDef.xml.gz", defs);
}
@ -540,12 +540,12 @@ public class XMLUsingXStream implements DataStore {
}
@Override
public void saveAgilityDefs(Map<Integer, AgilityDefinition> defs) throws Exception {
public void saveAgilityDefs(Map<Integer, AgilityDef> defs) throws Exception {
write("defs/extras/AgilityDef.xml.gz", defs);
}
@Override
public void saveAgilityCourseDef(Map<Integer, AgilityCourseDefinition> defs)
public void saveAgilityCourseDef(Map<Integer, AgilityCourseDef> defs)
throws Exception {
write("defs/extras/AgilityCourseDef.xml.gz", defs);
}