Refactor item_type
This commit is contained in:
@@ -315,18 +315,13 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
if (itemMan.doesCharOwnThisItem(item.getObjectUUID())) {
|
||||
|
||||
if (ib.isConsumable() || ib.getType() == ItemType.FARMABLE) {
|
||||
if (ib.isConsumable() || item.template.item_type.equals(ItemType.REAGENT)) {
|
||||
|
||||
int uuid = ib.getUUID();
|
||||
int type = ib.getType().getValue();
|
||||
int uuid = item.templsteID;
|
||||
|
||||
switch (type) {
|
||||
case 27: //Mithril repair
|
||||
break;
|
||||
case 10: //charters
|
||||
//don't think they're handled here?
|
||||
break;
|
||||
case 19: //buildings
|
||||
switch (item.template.item_type) {
|
||||
|
||||
case DEED: //buildings
|
||||
//Call add building screen here, ib.getUseID() get's building ID
|
||||
|
||||
//if inside player city, center loc on tol. otherwise center on player.
|
||||
@@ -352,10 +347,10 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
//itemMan.consume(item); //temporary fix for dupe.. TODO Make Item Unusable after This message is sent.
|
||||
break;
|
||||
case 25: //furniture
|
||||
case FURNITUREDEED: //furniture
|
||||
//Call add furniture screen here. ib.getUseID() get's furniture ID
|
||||
break;
|
||||
case 33:
|
||||
case OFFERING:
|
||||
long shrineCompID = comps.get(1);
|
||||
Building shrineBuilding = BuildingManager.getBuilding((int) shrineCompID);
|
||||
if (shrineBuilding == null) {
|
||||
@@ -381,7 +376,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
break;
|
||||
|
||||
case 35:
|
||||
case REALMCHARTER:
|
||||
int charterType = 0;
|
||||
switch (uuid) {
|
||||
case 910020:
|
||||
@@ -398,7 +393,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
|
||||
itemMan.consume(item);
|
||||
}
|
||||
break;
|
||||
case 7: //rod of command
|
||||
case WAND: //rod of command
|
||||
long compID = comps.get(1);
|
||||
|
||||
int objectType = AbstractWorldObject.extractTypeID(compID).ordinal();
|
||||
@@ -422,7 +417,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
break;
|
||||
//ANNIVERSERY GIFT
|
||||
case 31:
|
||||
case TREASURE:
|
||||
// *** Disabled for now: Needs bootyset created
|
||||
|
||||
//if (ib.getUUID() == 971012) {
|
||||
@@ -440,13 +435,13 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
|
||||
// break;
|
||||
//}
|
||||
|
||||
LootManager.peddleFate(player,item);
|
||||
LootManager.peddleFate(player, item);
|
||||
break;
|
||||
|
||||
case 30: //water bucket
|
||||
case 8: //potions, tears of saedron
|
||||
case BUCKET: //water bucket
|
||||
case POTION: //potions, tears of saedron
|
||||
|
||||
case 5: //runes, petition, warrant, scrolls
|
||||
case SCROLL: //runes, petition, warrant, scrolls
|
||||
if (uuid > 3000 && uuid < 3050) { //Discipline Runes
|
||||
if (ApplyRuneMsg.applyRune(uuid, origin, player)) {
|
||||
itemMan.consume(item);
|
||||
|
||||
Reference in New Issue
Block a user