@ -27,6 +30,99 @@ public class dbEffectsResourceCostHandler extends dbHandlerBase {
@@ -27,6 +30,99 @@ public class dbEffectsResourceCostHandler extends dbHandlerBase {
@ -127,15 +128,13 @@ public class dbWarehouseHandler extends dbHandlerBase {
@@ -127,15 +128,13 @@ public class dbWarehouseHandler extends dbHandlerBase {
@ -154,4 +153,71 @@ public class dbWarehouseHandler extends dbHandlerBase {
@@ -154,4 +153,71 @@ public class dbWarehouseHandler extends dbHandlerBase {
if((it.templateID>2499&&it.templateID<=3050)||template.item_base_name.toLowerCase().contains("of the gods")){
ChatSystemMsgchatMsg=newChatSystemMsg(null,mob.getName()+" in "+mob.getParentZone().zoneName+" has found the "+template.item_base_name+". Are you tough enough to take it?");
if((item.templateID>2499&&item.templateID<=3050)||item.template.item_base_name.toLowerCase().contains("of the gods")){
ChatSystemMsgchatMsg=newChatSystemMsg(null,mob.getName()+" in "+mob.getParentZone().zoneName+" has found the "+item.template.item_base_name+". Are you tough enough to take it?");
@ -91,8 +91,9 @@ public class DestroyBuildingHandler extends AbstractClientMsgHandler {
@@ -91,8 +91,9 @@ public class DestroyBuildingHandler extends AbstractClientMsgHandler {
@ -60,48 +195,24 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -60,48 +195,24 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@ -130,7 +241,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -130,7 +241,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@ -157,12 +267,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -157,12 +267,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@ -172,59 +281,8 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -172,59 +281,8 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
}finally{
origin.sellLock.unlock();
}
}
}
// Method adds an item from the players inventory to the vendor.
// Method completes an item that has been previously rolled
@ -235,7 +293,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -235,7 +293,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
ItemtargetItem;
ItemProductionMsgoutMsg;
inttotalValue=0;
intcurrentStrongbox;
Dispatchdispatch;
if(vendor.getBuilding()==null)
@ -256,12 +313,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -256,12 +313,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
for(intitemUUID:itemList.keySet()){
intitemValue=0;
inttype=itemList.get(itemUUID);
if(type==GameObjectType.Item.ordinal())
targetItem=Item.getFromCache(itemUUID);
else
targetItem=MobLoot.getFromCache(itemUUID);
targetItem=Item.getFromCache(itemUUID);
if(targetItem==null)
continue;
@ -271,7 +323,8 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -271,7 +323,8 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@ -288,18 +341,13 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -288,18 +341,13 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
caseREALMCHARTER:
caseSCROLL:
casePOTION:
itemValue=0;
continue;
}
totalValue+=itemValue;
longstart=System.currentTimeMillis();
vendor.charItemManager.recycle(targetItem);
longend=System.currentTimeMillis();
longtimetook=end-start;
// ChatManager.chatSystemInfo(player, "Took " + timetook + " ms to finish");
@ -307,205 +355,129 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -307,205 +355,129 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@ -185,62 +185,41 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@@ -185,62 +185,41 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
caseBUCKET://water bucket
casePOTION://potions, tears of saedron
caseSCROLL://runes, petition, warrant, scrolls
if(uuid>3000&&uuid<3050){//Discipline Runes
if(ApplyRuneMsg.applyRune(uuid,origin,player)){
itemMan.consume(item);
}
break;
}elseif(uuid>249999&&uuid<250123){//stat and mastery runes
if(ApplyRuneMsg.applyRune(uuid,origin,player)){
itemMan.consume(item);
}
break;
}elseif(uuid>250114&&uuid<250123){//mastery runes
if(ApplyRuneMsg.applyRune(uuid,origin,player)){
itemMan.consume(item);
}
break;
}elseif(uuid>252122&&uuid<252128){//mastery runes
if(ApplyRuneMsg.applyRune(uuid,origin,player)){
itemMan.consume(item);
}
if(uuid>680069&&uuid<680074)//Handle Charter, Deed, Petition, Warrant here
break;
}elseif(uuid>680069&&uuid<680074)//Handle Charter, Deed, Petition, Warrant here
{
break;
}elseif(uuid>910010&&uuid<910019){
intrank=uuid-910010;
if(item.template.item_bane_rank>0){
if(rank<1||rank>8){
ChatManager.chatSystemError(player,"Invalid Rank for bane scroll!");
@ -248,8 +227,6 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@@ -248,8 +227,6 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@ -288,6 +265,10 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@@ -288,6 +265,10 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@ -1358,8 +1358,6 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@@ -1358,8 +1358,6 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
@ -46,13 +45,16 @@ public class ViewResourcesMsgHandler extends AbstractClientMsgHandler {
@@ -46,13 +45,16 @@ public class ViewResourcesMsgHandler extends AbstractClientMsgHandler {
@ -390,8 +356,8 @@ public class ItemProductionMsg extends ClientNetMsg {
@@ -390,8 +356,8 @@ public class ItemProductionMsg extends ClientNetMsg {
reader.getInt();
reader.get();
break;
caseACTION_RECYCLE:
caseACTION_TAKE:
caseRECYCLE:
caseTAKE:
reader.getInt();
reader.getInt();
reader.getInt();
@ -408,9 +374,9 @@ public class ItemProductionMsg extends ClientNetMsg {
@@ -408,9 +374,9 @@ public class ItemProductionMsg extends ClientNetMsg {
tempIDs.put(this.itemUUID,type);
}
reader.getInt();
this.itemIDtoTypeMap=tempIDs;
this.items=tempIDs;
break;
caseACTION_DEPOSIT:
caseDEPOSIT:
this.itemType=reader.getInt();
this.itemUUID=reader.getInt();
reader.getInt();
@ -422,10 +388,10 @@ public class ItemProductionMsg extends ClientNetMsg {
@@ -422,10 +388,10 @@ public class ItemProductionMsg extends ClientNetMsg {
reader.getInt();
reader.get();
break;
caseACTION_JUNK:
caseJUNK:
this.itemType=reader.getInt();
this.itemUUID=reader.getInt();
this.totalProduction=reader.getInt();
this.total_to_produce=reader.getInt();
this.unknown03=reader.getInt();
this.pToken=reader.getInt();
this.sToken=reader.getInt();
@ -437,132 +403,20 @@ public class ItemProductionMsg extends ClientNetMsg {
@@ -437,132 +403,20 @@ public class ItemProductionMsg extends ClientNetMsg {