From 2cf52bad9ba2654a40f5f370eb97c39d70d835a9 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 22 Apr 2015 16:48:31 +0000 Subject: [PATCH] Fixed Talking Island and Faeron Village scrolls of escape. Dropped Batalion Zone due to lack of further development. Added Various missing syncs from L2jServer Ertheia. --- trunk/dist/game/config/Custom.properties | 111 --- trunk/dist/game/data/html/default/33417.htm | 2 +- trunk/dist/game/data/html/default/33418.htm | 2 +- trunk/dist/game/data/html/default/33447.htm | 2 +- trunk/dist/game/data/html/default/33528.htm | 2 +- trunk/dist/game/data/html/default/33529.htm | 2 +- trunk/dist/game/data/html/default/33530.htm | 2 +- trunk/dist/game/data/html/default/33531.htm | 2 +- trunk/dist/game/data/html/default/33532.htm | 2 +- trunk/dist/game/data/html/default/33533.htm | 2 +- trunk/dist/game/data/html/default/33534.htm | 2 +- trunk/dist/game/data/html/default/33551.htm | 2 +- trunk/dist/game/data/html/default/33552.htm | 2 +- trunk/dist/game/data/html/default/33949.htm | 2 +- .../bypasshandlers/ClanWarehouse.java | 2 +- .../bypasshandlers/PrivateWarehouse.java | 2 +- .../handlers/effecthandlers/ConvertItem.java | 2 +- .../itemhandlers/ChangeAttribute.java | 5 +- .../itemhandlers/EnchantAttribute.java | 5 +- .../handlers/itemhandlers/EnchantScrolls.java | 5 +- .../game/data/stats/items/00000-00099.xml | 14 + .../game/data/stats/items/00100-00199.xml | 13 + .../game/data/stats/items/00200-00299.xml | 25 + .../game/data/stats/items/00300-00399.xml | 5 + .../game/data/stats/items/00400-00499.xml | 4 + .../game/data/stats/items/00500-00599.xml | 3 + .../game/data/stats/items/00600-00699.xml | 7 + .../game/data/stats/items/00700-00799.xml | 3 + .../game/data/stats/items/00800-00899.xml | 12 + .../game/data/stats/items/00900-00999.xml | 11 + .../game/data/stats/items/01100-01199.xml | 1 + .../game/data/stats/items/01400-01499.xml | 11 + .../game/data/stats/items/01500-01599.xml | 3 + .../game/data/stats/items/01600-01699.xml | 1 + .../game/data/stats/items/01800-01899.xml | 2 + .../game/data/stats/items/01900-01999.xml | 1 + .../game/data/stats/items/02100-02199.xml | 5 + .../game/data/stats/items/02300-02399.xml | 10 + .../game/data/stats/items/02400-02499.xml | 19 + .../game/data/stats/items/02500-02599.xml | 5 + .../game/data/stats/items/02600-02699.xml | 2 + .../game/data/stats/items/03000-03099.xml | 2 + .../game/data/stats/items/03400-03499.xml | 1 + .../game/data/stats/items/03500-03599.xml | 1 + .../game/data/stats/items/03900-03999.xml | 4 + .../game/data/stats/items/04000-04099.xml | 1 + .../game/data/stats/items/04400-04499.xml | 7 + .../game/data/stats/items/04600-04699.xml | 3 + .../game/data/stats/items/04700-04799.xml | 8 + .../game/data/stats/items/04800-04899.xml | 8 + .../game/data/stats/items/04900-04999.xml | 1 + .../game/data/stats/items/05100-05199.xml | 2 + .../game/data/stats/items/05200-05299.xml | 10 + .../game/data/stats/items/05300-05399.xml | 11 + .../game/data/stats/items/05500-05599.xml | 10 + .../game/data/stats/items/05600-05699.xml | 4 + .../game/data/stats/items/05700-05799.xml | 10 + .../game/data/stats/items/05800-05899.xml | 2 + .../game/data/stats/items/05900-05999.xml | 1 + .../game/data/stats/items/06300-06399.xml | 24 + .../game/data/stats/items/06400-06499.xml | 3 + .../game/data/stats/items/06500-06599.xml | 13 + .../game/data/stats/items/06600-06699.xml | 22 + .../game/data/stats/items/06700-06799.xml | 1 + .../game/data/stats/items/06800-06899.xml | 7 + .../game/data/stats/items/06900-06999.xml | 1 + .../game/data/stats/items/07000-07099.xml | 3 + .../game/data/stats/items/07100-07199.xml | 1 + .../game/data/stats/items/07500-07599.xml | 3 + .../game/data/stats/items/07600-07699.xml | 3 + .../game/data/stats/items/07700-07799.xml | 3 + .../game/data/stats/items/07800-07899.xml | 8 + .../game/data/stats/items/07900-07999.xml | 2 + .../game/data/stats/items/08000-08099.xml | 2 + .../game/data/stats/items/08100-08199.xml | 10 + .../game/data/stats/items/08500-08599.xml | 4 + .../game/data/stats/items/08600-08699.xml | 12 + .../game/data/stats/items/08700-08799.xml | 16 + .../game/data/stats/items/08800-08899.xml | 1 + .../game/data/stats/items/08900-08999.xml | 6 + .../game/data/stats/items/09100-09199.xml | 4 + .../game/data/stats/items/09200-09299.xml | 1 + .../game/data/stats/items/09300-09399.xml | 2 + .../game/data/stats/items/09400-09499.xml | 25 + .../game/data/stats/items/09500-09599.xml | 35 + .../game/data/stats/items/09600-09699.xml | 7 + .../game/data/stats/items/09800-09899.xml | 11 + .../game/data/stats/items/09900-09999.xml | 2 + .../game/data/stats/items/10000-10099.xml | 2 + .../game/data/stats/items/10100-10199.xml | 11 + .../game/data/stats/items/10200-10299.xml | 11 + .../game/data/stats/items/10300-10399.xml | 8 + .../game/data/stats/items/10400-10499.xml | 10 + .../game/data/stats/items/10500-10599.xml | 2 + .../game/data/stats/items/10600-10699.xml | 6 + .../game/data/stats/items/10900-10999.xml | 2 + .../game/data/stats/items/11100-11199.xml | 3 + .../game/data/stats/items/11700-11799.xml | 4 + .../game/data/stats/items/11900-11999.xml | 1 + .../game/data/stats/items/12100-12199.xml | 1 + .../game/data/stats/items/12500-12599.xml | 1 + .../game/data/stats/items/12600-12699.xml | 4 + .../game/data/stats/items/12700-12799.xml | 3 + .../game/data/stats/items/12800-12899.xml | 3 + .../game/data/stats/items/13000-13099.xml | 4 + .../game/data/stats/items/13100-13199.xml | 7 + .../game/data/stats/items/13400-13499.xml | 22 + .../game/data/stats/items/13500-13599.xml | 2 + .../game/data/stats/items/13800-13899.xml | 5 + .../game/data/stats/items/14000-14099.xml | 2 + .../game/data/stats/items/14100-14199.xml | 34 + .../game/data/stats/items/14500-14599.xml | 1 + .../game/data/stats/items/14600-14699.xml | 8 + .../game/data/stats/items/14700-14799.xml | 2 + .../game/data/stats/items/14800-14899.xml | 1 + .../game/data/stats/items/15500-15599.xml | 45 + .../game/data/stats/items/15600-15699.xml | 15 + .../game/data/stats/items/15700-15799.xml | 16 + .../game/data/stats/items/15800-15899.xml | 8 + .../game/data/stats/items/16000-16099.xml | 2 + .../game/data/stats/items/16100-16199.xml | 10 + .../game/data/stats/items/17100-17199.xml | 1 + .../game/data/stats/items/17200-17299.xml | 15 + .../game/data/stats/items/17300-17399.xml | 76 ++ .../game/data/stats/items/17400-17499.xml | 43 + .../game/data/stats/items/17500-17599.xml | 2 + .../game/data/stats/items/17600-17699.xml | 59 ++ .../game/data/stats/items/17700-17799.xml | 15 + .../game/data/stats/items/17900-17999.xml | 3 + .../game/data/stats/items/18000-18099.xml | 19 + .../game/data/stats/items/18100-18199.xml | 4 + .../game/data/stats/items/18500-18599.xml | 27 + .../game/data/stats/items/18600-18699.xml | 7 + .../game/data/stats/items/18700-18799.xml | 21 + .../game/data/stats/items/18800-18899.xml | 17 + .../game/data/stats/items/18900-18999.xml | 14 + .../game/data/stats/items/19100-19199.xml | 1 + .../game/data/stats/items/19400-19499.xml | 27 + .../game/data/stats/items/19500-19599.xml | 61 ++ .../game/data/stats/items/19600-19699.xml | 10 + .../game/data/stats/items/19700-19799.xml | 55 ++ .../game/data/stats/items/19800-19899.xml | 7 + .../game/data/stats/items/19900-19999.xml | 3 + .../game/data/stats/items/20000-20099.xml | 3 + .../game/data/stats/items/20500-20599.xml | 3 + .../game/data/stats/items/20900-20999.xml | 1 + .../game/data/stats/items/21000-21099.xml | 3 + .../game/data/stats/items/21100-21199.xml | 25 + .../game/data/stats/items/21600-21699.xml | 1 + .../game/data/stats/items/21700-21799.xml | 8 + .../game/data/stats/items/21800-21899.xml | 2 + .../game/data/stats/items/21900-21999.xml | 2 + .../game/data/stats/items/22100-22199.xml | 1 + .../game/data/stats/items/22800-22899.xml | 4 + .../game/data/stats/items/23100-23199.xml | 1 + .../game/data/stats/items/23200-23299.xml | 1 + .../game/data/stats/items/23400-23499.xml | 1 + .../game/data/stats/items/23800-23899.xml | 8 + .../game/data/stats/items/30000-30099.xml | 25 + .../game/data/stats/items/30100-30199.xml | 14 + .../game/data/stats/items/30200-30299.xml | 7 + .../game/data/stats/items/30300-30399.xml | 7 + .../game/data/stats/items/30400-30499.xml | 7 + .../game/data/stats/items/32200-32299.xml | 17 +- .../game/data/stats/items/32300-32399.xml | 5 + .../game/data/stats/items/32600-32699.xml | 11 + .../game/data/stats/items/32700-32799.xml | 8 + .../game/data/stats/items/32800-32899.xml | 3 + .../game/data/stats/items/33400-33499.xml | 2 + .../game/data/stats/items/34600-34699.xml | 9 + .../game/data/stats/items/34700-34799.xml | 8 + .../game/data/stats/items/34800-34899.xml | 9 + .../game/data/stats/items/34900-34999.xml | 4 + .../game/data/stats/items/35100-35199.xml | 2 + .../game/data/stats/items/35200-35299.xml | 8 + .../game/data/stats/items/35300-35399.xml | 54 ++ .../game/data/stats/items/35400-35499.xml | 61 ++ .../game/data/stats/items/35500-35599.xml | 13 + .../game/data/stats/items/35600-35699.xml | 10 + .../game/data/stats/items/35700-35799.xml | 19 + .../game/data/stats/items/35800-35899.xml | 18 + .../game/data/stats/items/35900-35999.xml | 12 + .../game/data/stats/items/36100-36199.xml | 9 + .../game/data/stats/items/36200-36299.xml | 11 + .../game/data/stats/items/36300-36399.xml | 11 + .../game/data/stats/items/36500-36599.xml | 52 ++ .../game/data/stats/items/36600-36699.xml | 1 + .../game/data/stats/items/36700-36799.xml | 64 ++ .../game/data/stats/items/36800-36899.xml | 53 ++ .../game/data/stats/items/36900-36999.xml | 12 + .../game/data/stats/items/37000-37099.xml | 30 + .../game/data/stats/items/37100-37199.xml | 2 + .../game/data/stats/items/37400-37499.xml | 2 + .../game/data/stats/items/37500-37599.xml | 16 + .../game/data/stats/items/37600-37699.xml | 2 + .../game/data/stats/items/37700-37799.xml | 14 + .../game/data/stats/items/37800-37899.xml | 8 + .../game/data/stats/items/37900-37999.xml | 27 + .../game/data/stats/items/38000-38099.xml | 37 + .../game/data/stats/items/38100-38199.xml | 5 + .../game/data/stats/items/38200-38299.xml | 20 + .../game/data/stats/items/38300-38399.xml | 16 + .../game/data/stats/items/38500-38599.xml | 3 + .../game/data/stats/items/38800-38899.xml | 32 + .../game/data/stats/items/38900-38999.xml | 8 + .../game/data/stats/items/39300-39399.xml | 20 + .../game/data/stats/items/39400-39499.xml | 19 + .../game/data/stats/items/39500-39599.xml | 6 + .../game/data/stats/items/39600-39699.xml | 63 ++ .../game/data/stats/items/39700-39799.xml | 2 + .../game/data/stats/items/40000-40099.xml | 10 + .../game/data/stats/items/40100-40199.xml | 13 +- .../game/data/stats/items/40200-40299.xml | 7 + .../game/data/stats/items/40300-40399.xml | 3 + .../game/data/stats/items/45300-45399.xml | 1 + .../game/data/stats/items/45400-45499.xml | 14 + .../dist/game/data/stats/npcs/33400-33499.xml | 6 +- .../dist/game/data/stats/npcs/33500-33599.xml | 18 +- .../dist/game/data/stats/npcs/33900-33999.xml | 2 +- .../game/data/stats/skills/18100-18199.xml | 26 +- .../game/data/stats/skills/22000-22099.xml | 14 +- trunk/dist/game/data/xsd/items.xsd | 3 + trunk/dist/game/data/xsd/zones.xsd | 1 - trunk/dist/game/data/zones/battalion.xml | 9 - trunk/dist/tools/sql/game/auction_house.sql | 13 - .../dist/tools/sql/game/commission_items.sql | 8 + trunk/dist/tools/sql/game/items.sql | 2 +- trunk/java/com/l2jserver/Config.java | 132 --- .../com/l2jserver/gameserver/GameServer.java | 4 +- .../gameserver/enums/ItemLocation.java | 2 +- .../l2jserver/gameserver/enums/MailType.java | 2 +- .../instancemanager/AuctionHouseManager.java | 855 ------------------ .../instancemanager/CommissionManager.java | 478 ++++++++++ .../instancemanager/DuelManager.java | 16 +- .../gameserver/model/actor/L2Character.java | 2 +- .../instance/CommissionManagerInstance.java | 49 + .../model/actor/instance/L2PcInstance.java | 144 +-- .../model/actor/knownlist/PcKnownList.java | 1 + .../request/AdenaDistributionRequest.java | 81 ++ .../model/actor/request/CompoundRequest.java | 74 ++ .../request/EnchantItemAttributeRequest.java | 75 ++ .../actor/request/EnchantItemRequest.java | 86 ++ .../model/actor/request/PartyRequest.java | 57 ++ .../model/actor/request/PrimeShopRequest.java | 38 + .../model/commission/CommissionItem.java | 131 +++ .../model/commission/CommissionItemType.java | 123 +++ .../model/commission/CommissionTreeType.java | 117 +++ .../conditions/ConditionChangeWeapon.java | 2 +- .../gameserver/model/entity/Message.java | 44 +- .../model/itemcontainer/PcAuction.java | 55 -- .../model/itemcontainer/PcInventory.java | 4 +- .../gameserver/model/items/L2Item.java | 33 +- .../model/items/instance/L2ItemInstance.java | 4 +- .../gameserver/model/zone/ZoneId.java | 3 +- .../model/zone/type/L2BattalionZone.java | 268 ------ .../network/L2GamePacketHandler.java | 18 +- .../clientpackets/AbstractRefinePacket.java | 4 +- .../network/clientpackets/Logout.java | 10 +- .../clientpackets/RequestAnswerJoinParty.java | 18 +- .../clientpackets/RequestBypassToServer.java | 11 - .../RequestCancelPostAttachment.java | 2 +- .../RequestChangeAttributeCancel.java | 8 +- .../RequestChangeAttributeItem.java | 16 +- .../clientpackets/RequestEnchantItem.java | 55 +- .../RequestExAddEnchantScrollItem.java | 53 +- .../RequestExCancelEnchantItem.java | 11 +- .../RequestExEnchantItemAttribute.java | 37 +- .../RequestExRemoveEnchantSupportItem.java | 18 +- .../RequestExTryToPutEnchantSupportItem.java | 60 +- .../RequestExTryToPutEnchantTargetItem.java | 17 +- .../clientpackets/RequestGetItemFromPet.java | 2 +- .../clientpackets/RequestGiveItemToPet.java | 2 +- .../clientpackets/RequestJoinParty.java | 30 +- .../clientpackets/RequestPackageSend.java | 2 +- .../clientpackets/RequestPostAttachment.java | 2 +- .../network/clientpackets/RequestRestart.java | 10 +- .../clientpackets/RequestSendPost.java | 2 +- .../SendWareHouseDepositList.java | 2 +- .../network/clientpackets/TradeDone.java | 2 +- .../network/clientpackets/UseItem.java | 8 - .../adenadistribution/RequestDivideAdena.java | 126 ++- .../RequestDivideAdenaCancel.java | 25 +- .../RequestDivideAdenaStart.java | 57 +- .../RequestCommissionBuyInfo.java | 72 -- .../RequestCommissionBuyItem.java | 123 --- .../auctionhouse/RequestCommissionCancel.java | 44 - .../auctionhouse/RequestCommissionDelete.java | 80 -- .../auctionhouse/RequestCommissionInfo.java | 52 -- .../auctionhouse/RequestCommissionList.java | 100 -- .../RequestCommissionRegister.java | 157 ---- .../RequestCommissionRegisteredItem.java | 54 -- .../RequestCommissionRegistrableItemList.java | 49 - .../commission/RequestCommissionBuyInfo.java | 83 ++ .../commission/RequestCommissionBuyItem.java | 64 ++ .../commission/RequestCommissionCancel.java | 44 + .../commission/RequestCommissionDelete.java | 65 ++ .../commission/RequestCommissionInfo.java | 74 ++ .../commission/RequestCommissionList.java | 141 +++ .../commission/RequestCommissionRegister.java | 78 ++ .../RequestCommissionRegisteredItem.java | 60 ++ .../RequestCommissionRegistrableItemList.java | 63 ++ .../compound/RequestNewEnchantClose.java | 19 +- .../compound/RequestNewEnchantPushOne.java | 62 +- .../compound/RequestNewEnchantPushTwo.java | 76 +- .../compound/RequestNewEnchantRemoveOne.java | 55 +- .../compound/RequestNewEnchantRemoveTwo.java | 55 +- .../compound/RequestNewEnchantTry.java | 141 +-- .../primeshop/RequestBRBuyProduct.java | 7 +- .../serverpackets/AbstractItemPacket.java | 31 +- .../gameserver/network/serverpackets/Die.java | 12 - .../serverpackets/ExReplyReceivedPost.java | 6 +- .../serverpackets/ExShowReceivedPostList.java | 6 +- .../ExDivideAdenaCancel.java | 6 +- .../adenadistribution/ExDivideAdenaDone.java | 35 +- .../adenadistribution/ExDivideAdenaStart.java | 6 +- .../ExResponseCommissionBuyInfo.java | 64 -- .../ExResponseCommissionBuyItem.java | 36 - .../ExResponseCommissionDelete.java | 37 - .../ExResponseCommissionInfo.java | 50 - .../ExResponseCommissionItemList.java | 50 - .../ExResponseCommissionList.java | 266 ------ .../ExResponseCommissionRegister.java | 37 - .../auctionhouse/ExShowCommission.java | 31 - .../commission/ExCloseCommission.java | 40 + .../ExResponseCommissionBuyInfo.java | 52 ++ .../ExResponseCommissionBuyItem.java | 53 ++ .../ExResponseCommissionDelete.java | 45 + .../commission/ExResponseCommissionInfo.java | 65 ++ .../ExResponseCommissionItemList.java | 49 + .../commission/ExResponseCommissionList.java | 123 +++ .../ExResponseCommissionRegister.java | 45 + .../commission/ExShowCommission.java | 41 + .../serverpackets/compound/ExEnchantFail.java | 20 +- .../compound/ExEnchantOneFail.java | 9 +- .../compound/ExEnchantOneOK.java | 11 +- .../compound/ExEnchantOneRemoveFail.java | 9 +- .../compound/ExEnchantOneRemoveOK.java | 9 +- .../compound/ExEnchantSucess.java | 15 +- .../compound/ExEnchantTwoFail.java | 9 +- .../compound/ExEnchantTwoOK.java | 9 +- .../compound/ExEnchantTwoRemoveFail.java | 9 +- .../compound/ExEnchantTwoRemoveOK.java | 9 +- 342 files changed, 5639 insertions(+), 3430 deletions(-) delete mode 100644 trunk/dist/game/data/zones/battalion.xml delete mode 100644 trunk/dist/tools/sql/game/auction_house.sql create mode 100644 trunk/dist/tools/sql/game/commission_items.sql delete mode 100644 trunk/java/com/l2jserver/gameserver/instancemanager/AuctionHouseManager.java create mode 100644 trunk/java/com/l2jserver/gameserver/instancemanager/CommissionManager.java create mode 100644 trunk/java/com/l2jserver/gameserver/model/actor/instance/CommissionManagerInstance.java create mode 100644 trunk/java/com/l2jserver/gameserver/model/actor/request/AdenaDistributionRequest.java create mode 100644 trunk/java/com/l2jserver/gameserver/model/actor/request/CompoundRequest.java create mode 100644 trunk/java/com/l2jserver/gameserver/model/actor/request/EnchantItemAttributeRequest.java create mode 100644 trunk/java/com/l2jserver/gameserver/model/actor/request/EnchantItemRequest.java create mode 100644 trunk/java/com/l2jserver/gameserver/model/actor/request/PartyRequest.java create mode 100644 trunk/java/com/l2jserver/gameserver/model/actor/request/PrimeShopRequest.java create mode 100644 trunk/java/com/l2jserver/gameserver/model/commission/CommissionItem.java create mode 100644 trunk/java/com/l2jserver/gameserver/model/commission/CommissionItemType.java create mode 100644 trunk/java/com/l2jserver/gameserver/model/commission/CommissionTreeType.java delete mode 100644 trunk/java/com/l2jserver/gameserver/model/itemcontainer/PcAuction.java delete mode 100644 trunk/java/com/l2jserver/gameserver/model/zone/type/L2BattalionZone.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionBuyInfo.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionBuyItem.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionCancel.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionDelete.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionInfo.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionList.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionRegister.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionRegisteredItem.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionRegistrableItemList.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionBuyInfo.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionBuyItem.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionCancel.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionDelete.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionInfo.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionList.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionRegister.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionRegisteredItem.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionRegistrableItemList.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionBuyInfo.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionBuyItem.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionDelete.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionInfo.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionItemList.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionList.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionRegister.java delete mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExShowCommission.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExCloseCommission.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionBuyInfo.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionBuyItem.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionDelete.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionInfo.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionItemList.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionList.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionRegister.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExShowCommission.java diff --git a/trunk/dist/game/config/Custom.properties b/trunk/dist/game/config/Custom.properties index 646a9714c8..dafc712235 100644 --- a/trunk/dist/game/config/Custom.properties +++ b/trunk/dist/game/config/Custom.properties @@ -708,117 +708,6 @@ PremiumRateDropChanceByItemId = 57,2 PremiumRateDropAmountByItemId = 57,2 -# --------------------------------------------------------------------------- -# Battalion zone - a custom feature for your server (Mass or Solo Battalion) -# --------------------------------------------------------------------------- - -# This option will turn on PvP flag to all people when entering to the zone. -BTZEnablePvP = True - -# If set to false, zone will be no-restart zone. -BTZRestartZone = False - -# If set to false, zone will be no-logout zone. -BTZLogoutZone = False - -# If set to false, zone will be no-store zone. -BTZStoreZone = False - -# Give noblesse after revive? -BTZReviveNoblesse = False - -# Heal after revive? -BTZReviveHeal = False - -# If set to true, players will take noblesse blessing when entering. -BTZGiveNoblesse = True - -# Remove buffs when entering to the zone. -BTZRemoveBuffs = False - -# Remove pets when entering to the zone. -BTZRemovePets = False - -# Delay, in seconds, to wait before revive. -# 0 to disable -BTZReviveDelay = 10 - -# Delay, in seconds, to wait before revive (for support classes). -# 0 to disable -BTZReviveSupportDelay = 15 - -# Which are the support classes? -# Example: 93,85,12 -BTZSupport = 93 - -# Set the spawn points where players will be teleported on revive, if enabled. -# Example: 150111,144740,-12248;143665,144418,-12022;144443,147685,-12139 -BTZSpawnLoc = 150111,144740,-12248;143665,144418,-12022;144443,147685,-12139 - -# Random respawn radius -BTZRespawnRadius = 500 - -# List of Items(id's) that won't be usable inside this area and also will be unequiped when entering. -# (armor, weapons, scrolls, potions, etc), example: 728,7575, 6383, 1538 -BTZItems = 728,7575,6383,1538 - -# List of Grades that won't be usable inside this area and also will be unequiped when entering. -# Example: D,C,B,A,S,S80,S84,R,R95,R99 -BTZGrades = C,B,A - -# Items with this enchant or more won't be usable inside this area and also will be unequiped when entering. -# 0 to disable -BTZEnchant = 0 - -# Players with one of that classes won't be able to enter to the zone. -# Example: 93,85,12 -BTZClasses = 92 - -# --------------------------------------------------------------------------- -# Options if you set Battalion zone as Solo. -# --------------------------------------------------------------------------- - -# Disable clan crests? -BTZDisableCrests = False - -# Allow mass skills (heal hp, heal mp, heal cp etc.) for clan/allies members? -BTZHealAllies = False - -# Can attack clan/allies members w.o CTRL on? -BTZAttackAllies = False - -# Character custom name inside zone? -BTZAddCustomName = False - -# Character custom name inside zone? -BTZName = Player - -# Character custom title inside zone? -BTZAddCustomTitle = False - -# Character custom title inside zone? -BTZTitle = Kill Me - -# PvP Count restriction while joining the zone? -# 0 to disable -BTZPvpCount = 500 - -# --------------------------------------------------------------------------- -# Rewards for hunting inside Battalion zone -# --------------------------------------------------------------------------- - -# Reward for every kill you make. -# Example: 57,100000;14720,1 -BTZRewards = 57,100000;14720,1 - -# Reward for every kill your party makes. -# Example: 57,100000;14720,1 -BTZSupportRewards = 57,100000;14720,1 - -# Chances to get rewarded when your party killing someone (calculated in %) -# Example: 57,100000;14720,1 -BTZChanceSupportRewards = 50 - # --------------------------------------------------------------------------- # Anti feed inside Battalion zone # --------------------------------------------------------------------------- diff --git a/trunk/dist/game/data/html/default/33417.htm b/trunk/dist/game/data/html/default/33417.htm index 906bc4cf38..ba1fc79944 100644 --- a/trunk/dist/game/data/html/default/33417.htm +++ b/trunk/dist/game/data/html/default/33417.htm @@ -6,5 +6,5 @@ And, if you have items you want to sell, we can handle those transactions for yo Leave the worry and the paperwork to us! All you need to is pay us a small transaction fee, and we'll take care of the rest. When an item sells, we'll transfer the proceeds to you, minus a slight transaction fee, of course.
What do you think? You interested?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/html/default/33418.htm b/trunk/dist/game/data/html/default/33418.htm index a7869f8c80..f1bfc2a9a6 100644 --- a/trunk/dist/game/data/html/default/33418.htm +++ b/trunk/dist/game/data/html/default/33418.htm @@ -6,5 +6,5 @@ And, if you have items you want to sell, we can handle those transactions for yo Leave the worry and the paperwork to us! All you need to is pay us a small transaction fee, and we'll take care of the rest. When an item sells, we'll transfer the proceeds to you, minus a slight transaction fee, of course.
What do you think? You interested?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/html/default/33447.htm b/trunk/dist/game/data/html/default/33447.htm index 807a41f8c6..5df68204ea 100644 --- a/trunk/dist/game/data/html/default/33447.htm +++ b/trunk/dist/game/data/html/default/33447.htm @@ -6,5 +6,5 @@ And, if you have items you want to sell, we can handle those transactions for yo Leave the worry and the paperwork to us! All you need to is pay us a small transaction fee, and we'll take care of the rest. When an item sells, we'll transfer the proceeds to you, minus a slight transaction fee, of course.
What do you think? You interested?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/html/default/33528.htm b/trunk/dist/game/data/html/default/33528.htm index 91a1eb37eb..04ecdd656c 100644 --- a/trunk/dist/game/data/html/default/33528.htm +++ b/trunk/dist/game/data/html/default/33528.htm @@ -6,5 +6,5 @@ And, if you have items you want to sell, we can handle those transactions for yo Leave the worry and the paperwork to us! All you need to is pay us a small transaction fee, and we'll take care of the rest. When an item sells, we'll transfer the proceeds to you, minus a slight transaction fee, of course.
What do you think? You interested?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/html/default/33529.htm b/trunk/dist/game/data/html/default/33529.htm index b43f921c15..5dd387b741 100644 --- a/trunk/dist/game/data/html/default/33529.htm +++ b/trunk/dist/game/data/html/default/33529.htm @@ -6,5 +6,5 @@ And, if you have items you want to sell, we can handle those transactions for yo Leave the worry and the paperwork to us! All you need to is pay us a small transaction fee, and we'll take care of the rest. When an item sells, we'll transfer the proceeds to you, minus a slight transaction fee, of course.
What do you think? You interested?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/html/default/33530.htm b/trunk/dist/game/data/html/default/33530.htm index ffa2771681..176cc54e3f 100644 --- a/trunk/dist/game/data/html/default/33530.htm +++ b/trunk/dist/game/data/html/default/33530.htm @@ -6,5 +6,5 @@ And, if you have items you want to sell, we can handle those transactions for yo Leave the worry and the paperwork to us! All you need to is pay us a small transaction fee, and we'll take care of the rest. When an item sells, we'll transfer the proceeds to you, minus a slight transaction fee, of course.
What do you think? You interested?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/html/default/33531.htm b/trunk/dist/game/data/html/default/33531.htm index 6f41a55ac5..60cc773794 100644 --- a/trunk/dist/game/data/html/default/33531.htm +++ b/trunk/dist/game/data/html/default/33531.htm @@ -6,5 +6,5 @@ And, if you have items you want to sell, we can handle those transactions for yo Leave the worry and the paperwork to us! All you need to is pay us a small transaction fee, and we'll take care of the rest. When an item sells, we'll transfer the proceeds to you, minus a slight transaction fee, of course.
What do you think? You interested?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/html/default/33532.htm b/trunk/dist/game/data/html/default/33532.htm index 6b603578a7..de3df1cdfc 100644 --- a/trunk/dist/game/data/html/default/33532.htm +++ b/trunk/dist/game/data/html/default/33532.htm @@ -6,5 +6,5 @@ And, if you have items you want to sell, we can handle those transactions for yo Leave the worry and the paperwork to us! All you need to is pay us a small transaction fee, and we'll take care of the rest. When an item sells, we'll transfer the proceeds to you, minus a slight transaction fee, of course.
What do you think? You interested?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/html/default/33533.htm b/trunk/dist/game/data/html/default/33533.htm index 7841d2398a..f9c81cd0f1 100644 --- a/trunk/dist/game/data/html/default/33533.htm +++ b/trunk/dist/game/data/html/default/33533.htm @@ -6,5 +6,5 @@ And, if you have items you want to sell, we can handle those transactions for yo Leave the worry and the paperwork to us! All you need to is pay us a small transaction fee, and we'll take care of the rest. When an item sells, we'll transfer the proceeds to you, minus a slight transaction fee, of course.
What do you think? You interested?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/html/default/33534.htm b/trunk/dist/game/data/html/default/33534.htm index ffc89ef178..6b82ac7158 100644 --- a/trunk/dist/game/data/html/default/33534.htm +++ b/trunk/dist/game/data/html/default/33534.htm @@ -6,5 +6,5 @@ And, if you have items you want to sell, we can handle those transactions for yo Leave the worry and the paperwork to us! All you need to is pay us a small transaction fee, and we'll take care of the rest. When an item sells, we'll transfer the proceeds to you, minus a slight transaction fee, of course.
What do you think? You interested?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/html/default/33551.htm b/trunk/dist/game/data/html/default/33551.htm index 733951671f..46593443d3 100644 --- a/trunk/dist/game/data/html/default/33551.htm +++ b/trunk/dist/game/data/html/default/33551.htm @@ -6,5 +6,5 @@ And, if you have items you want to sell, we can handle those transactions for yo Leave the worry and the paperwork to us! All you need to is pay us a small transaction fee, and we'll take care of the rest. When an item sells, we'll transfer the proceeds to you, minus a slight transaction fee, of course.
What do you think? You interested?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/html/default/33552.htm b/trunk/dist/game/data/html/default/33552.htm index d74c722055..ad97e4a855 100644 --- a/trunk/dist/game/data/html/default/33552.htm +++ b/trunk/dist/game/data/html/default/33552.htm @@ -6,5 +6,5 @@ And, if you have items you want to sell, we can handle those transactions for yo Leave the worry and the paperwork to us! All you need to is pay us a small transaction fee, and we'll take care of the rest. When an item sells, we'll transfer the proceeds to you, minus a slight transaction fee, of course.
What do you think? You interested?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/html/default/33949.htm b/trunk/dist/game/data/html/default/33949.htm index 27e47a4947..f6ff3708b4 100644 --- a/trunk/dist/game/data/html/default/33949.htm +++ b/trunk/dist/game/data/html/default/33949.htm @@ -6,5 +6,5 @@ Of course, if there's anything you want to sell, you can register that item here Just pay a small commission when registering an item. Additionally, a commission will be automatically deducted whenever a transaction takes place.
So, how about it? Would you like to try it out?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java b/trunk/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java index 36d475c595..d0b1cb159a 100644 --- a/trunk/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java +++ b/trunk/dist/game/data/scripts/handlers/bypasshandlers/ClanWarehouse.java @@ -54,7 +54,7 @@ public class ClanWarehouse implements IBypassHandler return false; } - if (activeChar.isEnchanting()) + if (activeChar.hasItemRequest()) { return false; } diff --git a/trunk/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java b/trunk/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java index 0d748abaab..0cdc104a47 100644 --- a/trunk/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java +++ b/trunk/dist/game/data/scripts/handlers/bypasshandlers/PrivateWarehouse.java @@ -50,7 +50,7 @@ public class PrivateWarehouse implements IBypassHandler return false; } - if (activeChar.isEnchanting()) + if (activeChar.hasItemRequest()) { return false; } diff --git a/trunk/dist/game/data/scripts/handlers/effecthandlers/ConvertItem.java b/trunk/dist/game/data/scripts/handlers/effecthandlers/ConvertItem.java index 2a7399274e..94429affe5 100644 --- a/trunk/dist/game/data/scripts/handlers/effecthandlers/ConvertItem.java +++ b/trunk/dist/game/data/scripts/handlers/effecthandlers/ConvertItem.java @@ -57,7 +57,7 @@ public final class ConvertItem extends AbstractEffect } final L2PcInstance player = info.getEffected().getActingPlayer(); - if (player.isEnchanting()) + if (player.hasItemRequest()) { return; } diff --git a/trunk/dist/game/data/scripts/handlers/itemhandlers/ChangeAttribute.java b/trunk/dist/game/data/scripts/handlers/itemhandlers/ChangeAttribute.java index f54d5a47cb..b51b4efbd9 100644 --- a/trunk/dist/game/data/scripts/handlers/itemhandlers/ChangeAttribute.java +++ b/trunk/dist/game/data/scripts/handlers/itemhandlers/ChangeAttribute.java @@ -17,6 +17,7 @@ package handlers.itemhandlers; import com.l2jserver.gameserver.handler.IItemHandler; import com.l2jserver.gameserver.model.actor.L2Playable; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.EnchantItemAttributeRequest; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ExChangeAttributeItemList; @@ -42,13 +43,13 @@ public class ChangeAttribute implements IItemHandler return false; } - if (activeChar.isEnchanting()) + if (activeChar.hasItemRequest()) { activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_IS_IN_PROGRESS_PLEASE_TRY_AGAIN_AFTER_ENDING_THE_PREVIOUS_TASK)); return false; } - activeChar.setActiveEnchantAttrItemId(item.getId()); + activeChar.addRequest(new EnchantItemAttributeRequest(activeChar, item.getObjectId())); activeChar.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.CHANGING_ATTRIBUTES_IS_IN_PROGRESS_PLEASE_TRY_AGAIN_AFTER_ENDING_THE_PREVIOUS_TASK)); activeChar.sendPacket(new ExChangeAttributeItemList(activeChar, item.getObjectId())); return true; diff --git a/trunk/dist/game/data/scripts/handlers/itemhandlers/EnchantAttribute.java b/trunk/dist/game/data/scripts/handlers/itemhandlers/EnchantAttribute.java index 1613520512..7db275903b 100644 --- a/trunk/dist/game/data/scripts/handlers/itemhandlers/EnchantAttribute.java +++ b/trunk/dist/game/data/scripts/handlers/itemhandlers/EnchantAttribute.java @@ -21,6 +21,7 @@ package handlers.itemhandlers; import com.l2jserver.gameserver.handler.IItemHandler; import com.l2jserver.gameserver.model.actor.L2Playable; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.EnchantItemAttributeRequest; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ExChooseInventoryAttributeItem; @@ -42,13 +43,13 @@ public class EnchantAttribute implements IItemHandler return false; } - if (activeChar.isEnchanting()) + if (activeChar.hasItemRequest()) { activeChar.sendPacket(SystemMessageId.ANOTHER_ENCHANTMENT_IS_IN_PROGRESS_PLEASE_COMPLETE_THE_PREVIOUS_TASK_THEN_TRY_AGAIN); return false; } - activeChar.setActiveEnchantAttrItemId(item.getObjectId()); + activeChar.addRequest(new EnchantItemAttributeRequest(activeChar, item.getObjectId())); activeChar.sendPacket(new ExChooseInventoryAttributeItem(activeChar, item)); return true; } diff --git a/trunk/dist/game/data/scripts/handlers/itemhandlers/EnchantScrolls.java b/trunk/dist/game/data/scripts/handlers/itemhandlers/EnchantScrolls.java index 52e9456b9c..e8d22e0324 100644 --- a/trunk/dist/game/data/scripts/handlers/itemhandlers/EnchantScrolls.java +++ b/trunk/dist/game/data/scripts/handlers/itemhandlers/EnchantScrolls.java @@ -21,6 +21,7 @@ package handlers.itemhandlers; import com.l2jserver.gameserver.handler.IItemHandler; import com.l2jserver.gameserver.model.actor.L2Playable; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.EnchantItemRequest; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ChooseInventoryItem; @@ -42,13 +43,13 @@ public class EnchantScrolls implements IItemHandler return false; } - if (activeChar.isEnchanting()) + if (activeChar.hasItemRequest()) { activeChar.sendPacket(SystemMessageId.ANOTHER_ENCHANTMENT_IS_IN_PROGRESS_PLEASE_COMPLETE_THE_PREVIOUS_TASK_THEN_TRY_AGAIN); return false; } - activeChar.setActiveEnchantItemId(item.getObjectId()); + activeChar.addRequest(new EnchantItemRequest(activeChar, item.getObjectId())); activeChar.sendPacket(new ChooseInventoryItem(item.getId())); return true; } diff --git a/trunk/dist/game/data/stats/items/00000-00099.xml b/trunk/dist/game/data/stats/items/00000-00099.xml index 034f43ce54..0e42637ef5 100644 --- a/trunk/dist/game/data/stats/items/00000-00099.xml +++ b/trunk/dist/game/data/stats/items/00000-00099.xml @@ -477,6 +477,7 @@ + @@ -682,6 +683,7 @@ + @@ -749,6 +751,7 @@ + @@ -838,6 +841,7 @@ + @@ -987,6 +991,7 @@ + @@ -1019,6 +1024,7 @@ + @@ -1146,6 +1152,7 @@ + @@ -1173,6 +1180,7 @@ + @@ -1200,6 +1208,7 @@ + @@ -1362,6 +1371,7 @@ + @@ -1389,6 +1399,7 @@ + @@ -1443,6 +1454,7 @@ + @@ -1525,6 +1537,7 @@ + @@ -1877,6 +1890,7 @@ + diff --git a/trunk/dist/game/data/stats/items/00100-00199.xml b/trunk/dist/game/data/stats/items/00100-00199.xml index 09cf565ee2..733529b2cd 100644 --- a/trunk/dist/game/data/stats/items/00100-00199.xml +++ b/trunk/dist/game/data/stats/items/00100-00199.xml @@ -735,6 +735,7 @@ + @@ -1008,6 +1009,7 @@ + @@ -1089,6 +1091,7 @@ + @@ -1311,6 +1314,7 @@ + @@ -1406,6 +1410,7 @@ + @@ -1582,6 +1587,7 @@ + @@ -1636,6 +1642,7 @@ + @@ -1691,6 +1698,7 @@ + @@ -1933,6 +1941,7 @@ + @@ -1961,6 +1970,7 @@ + @@ -2073,6 +2083,7 @@ + @@ -2101,6 +2112,7 @@ + @@ -2157,6 +2169,7 @@ + diff --git a/trunk/dist/game/data/stats/items/00200-00299.xml b/trunk/dist/game/data/stats/items/00200-00299.xml index 41759f7f04..6806dbd041 100644 --- a/trunk/dist/game/data/stats/items/00200-00299.xml +++ b/trunk/dist/game/data/stats/items/00200-00299.xml @@ -46,6 +46,7 @@ + @@ -298,6 +299,7 @@ + @@ -382,6 +384,7 @@ + @@ -601,6 +604,7 @@ + @@ -709,6 +713,7 @@ + @@ -763,6 +768,7 @@ + @@ -790,6 +796,7 @@ + @@ -871,6 +878,7 @@ + @@ -925,6 +933,7 @@ + @@ -979,6 +988,7 @@ + @@ -1562,6 +1572,7 @@ + @@ -1670,6 +1681,7 @@ + @@ -1697,6 +1709,7 @@ + @@ -1724,6 +1737,7 @@ + @@ -1970,6 +1984,7 @@ + @@ -2060,6 +2075,7 @@ + @@ -2090,6 +2106,7 @@ + @@ -2150,6 +2167,7 @@ + @@ -2180,6 +2198,7 @@ + @@ -2240,6 +2259,7 @@ + @@ -2270,6 +2290,7 @@ + @@ -2330,6 +2351,7 @@ + @@ -2499,6 +2521,7 @@ + @@ -2583,6 +2606,7 @@ + @@ -2611,6 +2635,7 @@ + diff --git a/trunk/dist/game/data/stats/items/00300-00399.xml b/trunk/dist/game/data/stats/items/00300-00399.xml index 688945e601..60317f3c30 100644 --- a/trunk/dist/game/data/stats/items/00300-00399.xml +++ b/trunk/dist/game/data/stats/items/00300-00399.xml @@ -1440,6 +1440,7 @@ + @@ -1457,6 +1458,7 @@ + @@ -1576,6 +1578,7 @@ + @@ -1969,6 +1972,7 @@ + @@ -2137,6 +2141,7 @@ + diff --git a/trunk/dist/game/data/stats/items/00400-00499.xml b/trunk/dist/game/data/stats/items/00400-00499.xml index 4111108662..643ccbf1b5 100644 --- a/trunk/dist/game/data/stats/items/00400-00499.xml +++ b/trunk/dist/game/data/stats/items/00400-00499.xml @@ -231,6 +231,7 @@ + @@ -661,6 +662,7 @@ + @@ -1225,6 +1227,7 @@ + @@ -1677,6 +1680,7 @@ + diff --git a/trunk/dist/game/data/stats/items/00500-00599.xml b/trunk/dist/game/data/stats/items/00500-00599.xml index ed08c7dbfa..aafb0002af 100644 --- a/trunk/dist/game/data/stats/items/00500-00599.xml +++ b/trunk/dist/game/data/stats/items/00500-00599.xml @@ -205,6 +205,7 @@ + @@ -765,6 +766,7 @@ + @@ -877,6 +879,7 @@ + diff --git a/trunk/dist/game/data/stats/items/00600-00699.xml b/trunk/dist/game/data/stats/items/00600-00699.xml index 9a7b41e475..c969607910 100644 --- a/trunk/dist/game/data/stats/items/00600-00699.xml +++ b/trunk/dist/game/data/stats/items/00600-00699.xml @@ -11,6 +11,7 @@ + @@ -27,6 +28,7 @@ + @@ -123,6 +125,7 @@ + @@ -139,6 +142,7 @@ + @@ -477,6 +481,7 @@ + @@ -549,6 +554,7 @@ + @@ -694,6 +700,7 @@ + diff --git a/trunk/dist/game/data/stats/items/00700-00799.xml b/trunk/dist/game/data/stats/items/00700-00799.xml index 07c42601b0..870f5ecb40 100644 --- a/trunk/dist/game/data/stats/items/00700-00799.xml +++ b/trunk/dist/game/data/stats/items/00700-00799.xml @@ -413,6 +413,7 @@ + @@ -426,6 +427,7 @@ + @@ -517,6 +519,7 @@ + diff --git a/trunk/dist/game/data/stats/items/00800-00899.xml b/trunk/dist/game/data/stats/items/00800-00899.xml index 147811b44c..603b7e3441 100644 --- a/trunk/dist/game/data/stats/items/00800-00899.xml +++ b/trunk/dist/game/data/stats/items/00800-00899.xml @@ -626,6 +626,7 @@ + @@ -642,6 +643,7 @@ + @@ -658,6 +660,7 @@ + @@ -674,6 +677,7 @@ + @@ -706,6 +710,7 @@ + @@ -804,6 +809,7 @@ + @@ -1109,6 +1115,7 @@ + @@ -1125,6 +1132,7 @@ + @@ -1141,6 +1149,7 @@ + @@ -1157,6 +1166,7 @@ + @@ -1222,6 +1232,7 @@ + @@ -1287,6 +1298,7 @@ + diff --git a/trunk/dist/game/data/stats/items/00900-00999.xml b/trunk/dist/game/data/stats/items/00900-00999.xml index c276adca61..9e365cd07f 100644 --- a/trunk/dist/game/data/stats/items/00900-00999.xml +++ b/trunk/dist/game/data/stats/items/00900-00999.xml @@ -268,6 +268,7 @@ + @@ -316,6 +317,7 @@ + @@ -414,6 +416,7 @@ + @@ -713,6 +716,7 @@ + @@ -726,6 +730,7 @@ + @@ -757,6 +762,7 @@ + @@ -770,6 +776,7 @@ + @@ -801,6 +808,7 @@ + @@ -814,6 +822,7 @@ + @@ -845,6 +854,7 @@ + @@ -858,6 +868,7 @@ + diff --git a/trunk/dist/game/data/stats/items/01100-01199.xml b/trunk/dist/game/data/stats/items/01100-01199.xml index 22c654dfca..2bd27efca2 100644 --- a/trunk/dist/game/data/stats/items/01100-01199.xml +++ b/trunk/dist/game/data/stats/items/01100-01199.xml @@ -624,6 +624,7 @@ + diff --git a/trunk/dist/game/data/stats/items/01400-01499.xml b/trunk/dist/game/data/stats/items/01400-01499.xml index 3f92f1e1fa..39458d7dbf 100644 --- a/trunk/dist/game/data/stats/items/01400-01499.xml +++ b/trunk/dist/game/data/stats/items/01400-01499.xml @@ -157,6 +157,7 @@ + @@ -584,6 +585,7 @@ + @@ -593,6 +595,7 @@ + @@ -602,6 +605,7 @@ + @@ -611,6 +615,7 @@ + @@ -620,6 +625,7 @@ + @@ -633,6 +639,7 @@ + @@ -646,6 +653,7 @@ + @@ -659,6 +667,7 @@ + @@ -672,6 +681,7 @@ + @@ -685,6 +695,7 @@ + diff --git a/trunk/dist/game/data/stats/items/01500-01599.xml b/trunk/dist/game/data/stats/items/01500-01599.xml index 641c767af2..6fab1dcb0c 100644 --- a/trunk/dist/game/data/stats/items/01500-01599.xml +++ b/trunk/dist/game/data/stats/items/01500-01599.xml @@ -358,6 +358,7 @@ + @@ -373,6 +374,7 @@ + @@ -391,6 +393,7 @@ + diff --git a/trunk/dist/game/data/stats/items/01600-01699.xml b/trunk/dist/game/data/stats/items/01600-01699.xml index 95127ae302..1eeeaa79a8 100644 --- a/trunk/dist/game/data/stats/items/01600-01699.xml +++ b/trunk/dist/game/data/stats/items/01600-01699.xml @@ -671,6 +671,7 @@ + diff --git a/trunk/dist/game/data/stats/items/01800-01899.xml b/trunk/dist/game/data/stats/items/01800-01899.xml index 978687aa37..c086e41054 100644 --- a/trunk/dist/game/data/stats/items/01800-01899.xml +++ b/trunk/dist/game/data/stats/items/01800-01899.xml @@ -95,6 +95,7 @@ + @@ -325,6 +326,7 @@ + diff --git a/trunk/dist/game/data/stats/items/01900-01999.xml b/trunk/dist/game/data/stats/items/01900-01999.xml index 3b10298d68..27bafd17b3 100644 --- a/trunk/dist/game/data/stats/items/01900-01999.xml +++ b/trunk/dist/game/data/stats/items/01900-01999.xml @@ -548,6 +548,7 @@ + diff --git a/trunk/dist/game/data/stats/items/02100-02199.xml b/trunk/dist/game/data/stats/items/02100-02199.xml index ae080ba278..7fa6c4ee2b 100644 --- a/trunk/dist/game/data/stats/items/02100-02199.xml +++ b/trunk/dist/game/data/stats/items/02100-02199.xml @@ -277,6 +277,7 @@ + @@ -285,6 +286,7 @@ + @@ -293,6 +295,7 @@ + @@ -301,6 +304,7 @@ + @@ -309,6 +313,7 @@ + diff --git a/trunk/dist/game/data/stats/items/02300-02399.xml b/trunk/dist/game/data/stats/items/02300-02399.xml index 7eee4073f4..7543086cca 100644 --- a/trunk/dist/game/data/stats/items/02300-02399.xml +++ b/trunk/dist/game/data/stats/items/02300-02399.xml @@ -986,6 +986,7 @@ + @@ -1002,6 +1003,7 @@ + @@ -1070,6 +1072,7 @@ + @@ -1087,6 +1090,7 @@ + @@ -1104,6 +1108,7 @@ + @@ -1121,6 +1126,7 @@ + @@ -1253,6 +1259,7 @@ + @@ -1270,6 +1277,7 @@ + @@ -1287,6 +1295,7 @@ + @@ -1374,6 +1383,7 @@ + diff --git a/trunk/dist/game/data/stats/items/02400-02499.xml b/trunk/dist/game/data/stats/items/02400-02499.xml index 7085c802f6..53e7824ff3 100644 --- a/trunk/dist/game/data/stats/items/02400-02499.xml +++ b/trunk/dist/game/data/stats/items/02400-02499.xml @@ -12,6 +12,7 @@ + @@ -66,6 +67,7 @@ + @@ -84,6 +86,7 @@ + @@ -102,6 +105,7 @@ + @@ -138,6 +142,7 @@ + @@ -208,6 +213,7 @@ + @@ -272,6 +278,7 @@ + @@ -288,6 +295,7 @@ + @@ -304,6 +312,7 @@ + @@ -512,6 +521,7 @@ + @@ -528,6 +538,7 @@ + @@ -560,6 +571,7 @@ + @@ -656,6 +668,7 @@ + @@ -880,6 +893,7 @@ + @@ -896,6 +910,7 @@ + @@ -960,6 +975,7 @@ + @@ -1056,6 +1072,7 @@ + @@ -1232,6 +1249,7 @@ + @@ -1424,6 +1442,7 @@ + diff --git a/trunk/dist/game/data/stats/items/02500-02599.xml b/trunk/dist/game/data/stats/items/02500-02599.xml index c86ff7a624..8d130d8a06 100644 --- a/trunk/dist/game/data/stats/items/02500-02599.xml +++ b/trunk/dist/game/data/stats/items/02500-02599.xml @@ -93,6 +93,7 @@ + @@ -120,6 +121,7 @@ + @@ -679,6 +681,7 @@ + @@ -1225,6 +1228,7 @@ + @@ -2517,6 +2521,7 @@ + diff --git a/trunk/dist/game/data/stats/items/02600-02699.xml b/trunk/dist/game/data/stats/items/02600-02699.xml index cec18f9e33..250f8763db 100644 --- a/trunk/dist/game/data/stats/items/02600-02699.xml +++ b/trunk/dist/game/data/stats/items/02600-02699.xml @@ -639,6 +639,7 @@ + @@ -720,6 +721,7 @@ + diff --git a/trunk/dist/game/data/stats/items/03000-03099.xml b/trunk/dist/game/data/stats/items/03000-03099.xml index b889e9f5a5..d8e939d66d 100644 --- a/trunk/dist/game/data/stats/items/03000-03099.xml +++ b/trunk/dist/game/data/stats/items/03000-03099.xml @@ -483,6 +483,7 @@ + @@ -495,6 +496,7 @@ + diff --git a/trunk/dist/game/data/stats/items/03400-03499.xml b/trunk/dist/game/data/stats/items/03400-03499.xml index 0af08dca2a..58195f3d8c 100644 --- a/trunk/dist/game/data/stats/items/03400-03499.xml +++ b/trunk/dist/game/data/stats/items/03400-03499.xml @@ -772,6 +772,7 @@ + diff --git a/trunk/dist/game/data/stats/items/03500-03599.xml b/trunk/dist/game/data/stats/items/03500-03599.xml index c3c1e5918e..7da09449c1 100644 --- a/trunk/dist/game/data/stats/items/03500-03599.xml +++ b/trunk/dist/game/data/stats/items/03500-03599.xml @@ -11,6 +11,7 @@ + diff --git a/trunk/dist/game/data/stats/items/03900-03999.xml b/trunk/dist/game/data/stats/items/03900-03999.xml index 3a1a3c4158..9e715f0874 100644 --- a/trunk/dist/game/data/stats/items/03900-03999.xml +++ b/trunk/dist/game/data/stats/items/03900-03999.xml @@ -714,6 +714,7 @@ + @@ -907,6 +908,7 @@ + @@ -920,6 +922,7 @@ + @@ -933,6 +936,7 @@ + diff --git a/trunk/dist/game/data/stats/items/04000-04099.xml b/trunk/dist/game/data/stats/items/04000-04099.xml index 7bf2b37380..e6074cb468 100644 --- a/trunk/dist/game/data/stats/items/04000-04099.xml +++ b/trunk/dist/game/data/stats/items/04000-04099.xml @@ -910,5 +910,6 @@ + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/04400-04499.xml b/trunk/dist/game/data/stats/items/04400-04499.xml index 687872a4f1..62b3344610 100644 --- a/trunk/dist/game/data/stats/items/04400-04499.xml +++ b/trunk/dist/game/data/stats/items/04400-04499.xml @@ -98,6 +98,7 @@ + @@ -120,6 +121,7 @@ + @@ -131,6 +133,7 @@ + @@ -142,6 +145,7 @@ + @@ -153,6 +157,7 @@ + @@ -164,6 +169,7 @@ + @@ -208,6 +214,7 @@ + diff --git a/trunk/dist/game/data/stats/items/04600-04699.xml b/trunk/dist/game/data/stats/items/04600-04699.xml index dd1ca234f8..9b093488f4 100644 --- a/trunk/dist/game/data/stats/items/04600-04699.xml +++ b/trunk/dist/game/data/stats/items/04600-04699.xml @@ -44,6 +44,7 @@ + @@ -116,6 +117,7 @@ + @@ -206,6 +208,7 @@ + diff --git a/trunk/dist/game/data/stats/items/04700-04799.xml b/trunk/dist/game/data/stats/items/04700-04799.xml index 7f91465006..26426cf6fa 100644 --- a/trunk/dist/game/data/stats/items/04700-04799.xml +++ b/trunk/dist/game/data/stats/items/04700-04799.xml @@ -271,6 +271,7 @@ + @@ -355,6 +356,7 @@ + @@ -495,6 +497,7 @@ + @@ -523,6 +526,7 @@ + @@ -657,6 +661,7 @@ + @@ -1020,6 +1025,7 @@ + @@ -1552,6 +1558,7 @@ + @@ -2200,6 +2207,7 @@ + diff --git a/trunk/dist/game/data/stats/items/04800-04899.xml b/trunk/dist/game/data/stats/items/04800-04899.xml index 1c92c26d7a..adc9fb927e 100644 --- a/trunk/dist/game/data/stats/items/04800-04899.xml +++ b/trunk/dist/game/data/stats/items/04800-04899.xml @@ -103,6 +103,7 @@ + @@ -189,6 +190,7 @@ + @@ -671,6 +673,7 @@ + @@ -858,6 +861,7 @@ + @@ -888,6 +892,7 @@ + @@ -919,6 +924,7 @@ + @@ -1672,6 +1678,7 @@ + @@ -1758,6 +1765,7 @@ + diff --git a/trunk/dist/game/data/stats/items/04900-04999.xml b/trunk/dist/game/data/stats/items/04900-04999.xml index f2440fc5ed..582ee306bf 100644 --- a/trunk/dist/game/data/stats/items/04900-04999.xml +++ b/trunk/dist/game/data/stats/items/04900-04999.xml @@ -50,6 +50,7 @@ + diff --git a/trunk/dist/game/data/stats/items/05100-05199.xml b/trunk/dist/game/data/stats/items/05100-05199.xml index dfa3342c8f..77997344ae 100644 --- a/trunk/dist/game/data/stats/items/05100-05199.xml +++ b/trunk/dist/game/data/stats/items/05100-05199.xml @@ -207,6 +207,7 @@ + @@ -758,6 +759,7 @@ + diff --git a/trunk/dist/game/data/stats/items/05200-05299.xml b/trunk/dist/game/data/stats/items/05200-05299.xml index c4a1a35355..5f6aebae5d 100644 --- a/trunk/dist/game/data/stats/items/05200-05299.xml +++ b/trunk/dist/game/data/stats/items/05200-05299.xml @@ -369,6 +369,7 @@ + @@ -988,6 +989,7 @@ + @@ -1066,6 +1068,7 @@ + @@ -1104,6 +1107,7 @@ + @@ -1120,6 +1124,7 @@ + @@ -1136,6 +1141,7 @@ + @@ -1152,6 +1158,7 @@ + @@ -1219,6 +1226,7 @@ + @@ -1235,6 +1243,7 @@ + @@ -1269,6 +1278,7 @@ + diff --git a/trunk/dist/game/data/stats/items/05300-05399.xml b/trunk/dist/game/data/stats/items/05300-05399.xml index df0eb55a86..47f991d485 100644 --- a/trunk/dist/game/data/stats/items/05300-05399.xml +++ b/trunk/dist/game/data/stats/items/05300-05399.xml @@ -195,6 +195,7 @@ + @@ -211,6 +212,7 @@ + @@ -227,6 +229,7 @@ + @@ -243,6 +246,7 @@ + @@ -259,6 +263,7 @@ + @@ -278,6 +283,7 @@ + @@ -310,6 +316,7 @@ + @@ -326,6 +333,7 @@ + @@ -343,6 +351,7 @@ + @@ -392,6 +401,7 @@ + @@ -491,6 +501,7 @@ + diff --git a/trunk/dist/game/data/stats/items/05500-05599.xml b/trunk/dist/game/data/stats/items/05500-05599.xml index 1931c868a9..ee31baaec8 100644 --- a/trunk/dist/game/data/stats/items/05500-05599.xml +++ b/trunk/dist/game/data/stats/items/05500-05599.xml @@ -422,6 +422,7 @@ + @@ -541,6 +542,7 @@ + @@ -552,6 +554,7 @@ + @@ -676,6 +679,7 @@ + @@ -725,6 +729,7 @@ + @@ -735,6 +740,7 @@ + @@ -745,6 +751,7 @@ + @@ -834,6 +841,7 @@ + @@ -848,6 +856,7 @@ + @@ -862,6 +871,7 @@ + diff --git a/trunk/dist/game/data/stats/items/05600-05699.xml b/trunk/dist/game/data/stats/items/05600-05699.xml index b20292641a..fedb08bdd5 100644 --- a/trunk/dist/game/data/stats/items/05600-05699.xml +++ b/trunk/dist/game/data/stats/items/05600-05699.xml @@ -76,6 +76,7 @@ + @@ -752,6 +753,7 @@ + @@ -1265,6 +1267,7 @@ + @@ -1409,6 +1412,7 @@ + diff --git a/trunk/dist/game/data/stats/items/05700-05799.xml b/trunk/dist/game/data/stats/items/05700-05799.xml index 081a1430da..561a50e881 100644 --- a/trunk/dist/game/data/stats/items/05700-05799.xml +++ b/trunk/dist/game/data/stats/items/05700-05799.xml @@ -117,6 +117,7 @@ + @@ -326,6 +327,7 @@ + @@ -374,6 +376,7 @@ + @@ -582,6 +585,7 @@ + @@ -630,6 +634,7 @@ + @@ -926,6 +931,7 @@ + @@ -942,6 +948,7 @@ + @@ -1070,6 +1077,7 @@ + @@ -1118,6 +1126,7 @@ + @@ -1134,6 +1143,7 @@ + diff --git a/trunk/dist/game/data/stats/items/05800-05899.xml b/trunk/dist/game/data/stats/items/05800-05899.xml index f980afa1d4..56d995a1b6 100644 --- a/trunk/dist/game/data/stats/items/05800-05899.xml +++ b/trunk/dist/game/data/stats/items/05800-05899.xml @@ -166,6 +166,7 @@ + @@ -582,6 +583,7 @@ + diff --git a/trunk/dist/game/data/stats/items/05900-05999.xml b/trunk/dist/game/data/stats/items/05900-05999.xml index 108dafd58e..0b8c7c1541 100644 --- a/trunk/dist/game/data/stats/items/05900-05999.xml +++ b/trunk/dist/game/data/stats/items/05900-05999.xml @@ -144,6 +144,7 @@ + diff --git a/trunk/dist/game/data/stats/items/06300-06399.xml b/trunk/dist/game/data/stats/items/06300-06399.xml index bc6a3447c7..a191108e84 100644 --- a/trunk/dist/game/data/stats/items/06300-06399.xml +++ b/trunk/dist/game/data/stats/items/06300-06399.xml @@ -252,6 +252,7 @@ + @@ -280,6 +281,7 @@ + @@ -468,6 +470,7 @@ + @@ -925,6 +928,7 @@ + @@ -953,6 +957,7 @@ + @@ -1010,6 +1015,7 @@ + @@ -1037,6 +1043,7 @@ + @@ -1066,6 +1073,7 @@ + @@ -1094,6 +1102,7 @@ + @@ -1124,6 +1133,7 @@ + @@ -1152,6 +1162,7 @@ + @@ -1181,6 +1192,7 @@ + @@ -1209,6 +1221,7 @@ + @@ -1238,6 +1251,7 @@ + @@ -1260,6 +1274,7 @@ + @@ -1278,6 +1293,7 @@ + @@ -1295,6 +1311,7 @@ + @@ -1312,6 +1329,7 @@ + @@ -1347,6 +1365,7 @@ + @@ -1365,6 +1384,7 @@ + @@ -1382,6 +1402,7 @@ + @@ -1399,6 +1420,7 @@ + @@ -1416,6 +1438,7 @@ + @@ -1502,6 +1525,7 @@ + diff --git a/trunk/dist/game/data/stats/items/06400-06499.xml b/trunk/dist/game/data/stats/items/06400-06499.xml index c75ed9e685..6cb2395cd6 100644 --- a/trunk/dist/game/data/stats/items/06400-06499.xml +++ b/trunk/dist/game/data/stats/items/06400-06499.xml @@ -69,6 +69,7 @@ + @@ -79,6 +80,7 @@ + @@ -970,6 +972,7 @@ + diff --git a/trunk/dist/game/data/stats/items/06500-06599.xml b/trunk/dist/game/data/stats/items/06500-06599.xml index b773fa2b1c..0c972972bf 100644 --- a/trunk/dist/game/data/stats/items/06500-06599.xml +++ b/trunk/dist/game/data/stats/items/06500-06599.xml @@ -796,6 +796,7 @@ + @@ -809,6 +810,7 @@ + @@ -822,6 +824,7 @@ + @@ -835,6 +838,7 @@ + @@ -848,6 +852,7 @@ + @@ -861,6 +866,7 @@ + @@ -887,6 +893,7 @@ + @@ -900,6 +907,7 @@ + @@ -913,6 +921,7 @@ + @@ -933,6 +942,7 @@ + @@ -963,6 +973,7 @@ + @@ -1107,6 +1118,7 @@ + @@ -1257,6 +1269,7 @@ + diff --git a/trunk/dist/game/data/stats/items/06600-06699.xml b/trunk/dist/game/data/stats/items/06600-06699.xml index 6763f11df8..9010318382 100644 --- a/trunk/dist/game/data/stats/items/06600-06699.xml +++ b/trunk/dist/game/data/stats/items/06600-06699.xml @@ -225,6 +225,7 @@ + @@ -254,6 +255,7 @@ + @@ -945,6 +947,7 @@ + @@ -960,6 +963,7 @@ + @@ -975,6 +979,7 @@ + @@ -1042,6 +1047,7 @@ + @@ -1060,6 +1066,7 @@ + @@ -1078,6 +1085,7 @@ + @@ -1096,6 +1104,7 @@ + @@ -1114,6 +1123,7 @@ + @@ -1132,6 +1142,7 @@ + @@ -1150,6 +1161,7 @@ + @@ -1286,6 +1298,7 @@ + @@ -1319,6 +1332,7 @@ + @@ -1338,6 +1352,7 @@ + @@ -1356,6 +1371,7 @@ + @@ -1373,6 +1389,7 @@ + @@ -1407,6 +1424,7 @@ + @@ -1425,6 +1443,7 @@ + @@ -1443,6 +1462,7 @@ + @@ -1460,6 +1480,7 @@ + @@ -1477,6 +1498,7 @@ + diff --git a/trunk/dist/game/data/stats/items/06700-06799.xml b/trunk/dist/game/data/stats/items/06700-06799.xml index 993888c100..844dbbcd9b 100644 --- a/trunk/dist/game/data/stats/items/06700-06799.xml +++ b/trunk/dist/game/data/stats/items/06700-06799.xml @@ -359,6 +359,7 @@ + diff --git a/trunk/dist/game/data/stats/items/06800-06899.xml b/trunk/dist/game/data/stats/items/06800-06899.xml index 81f912a271..774230e2f7 100644 --- a/trunk/dist/game/data/stats/items/06800-06899.xml +++ b/trunk/dist/game/data/stats/items/06800-06899.xml @@ -496,6 +496,7 @@ + @@ -505,6 +506,7 @@ + @@ -517,6 +519,7 @@ + @@ -526,6 +529,7 @@ + @@ -538,6 +542,7 @@ + @@ -562,6 +567,7 @@ + @@ -1018,6 +1024,7 @@ + diff --git a/trunk/dist/game/data/stats/items/06900-06999.xml b/trunk/dist/game/data/stats/items/06900-06999.xml index c23fa5b41f..8a266fa28c 100644 --- a/trunk/dist/game/data/stats/items/06900-06999.xml +++ b/trunk/dist/game/data/stats/items/06900-06999.xml @@ -90,6 +90,7 @@ + diff --git a/trunk/dist/game/data/stats/items/07000-07099.xml b/trunk/dist/game/data/stats/items/07000-07099.xml index 7a21c5db55..9ec613006e 100644 --- a/trunk/dist/game/data/stats/items/07000-07099.xml +++ b/trunk/dist/game/data/stats/items/07000-07099.xml @@ -851,18 +851,21 @@ + + + diff --git a/trunk/dist/game/data/stats/items/07100-07199.xml b/trunk/dist/game/data/stats/items/07100-07199.xml index 991225024f..e244a5cb2b 100644 --- a/trunk/dist/game/data/stats/items/07100-07199.xml +++ b/trunk/dist/game/data/stats/items/07100-07199.xml @@ -161,6 +161,7 @@ + diff --git a/trunk/dist/game/data/stats/items/07500-07599.xml b/trunk/dist/game/data/stats/items/07500-07599.xml index 8284b76f56..956db3f68c 100644 --- a/trunk/dist/game/data/stats/items/07500-07599.xml +++ b/trunk/dist/game/data/stats/items/07500-07599.xml @@ -716,6 +716,7 @@ + @@ -870,6 +871,7 @@ + @@ -935,6 +937,7 @@ + diff --git a/trunk/dist/game/data/stats/items/07600-07699.xml b/trunk/dist/game/data/stats/items/07600-07699.xml index 64d09cf218..10a1dbdb10 100644 --- a/trunk/dist/game/data/stats/items/07600-07699.xml +++ b/trunk/dist/game/data/stats/items/07600-07699.xml @@ -752,6 +752,7 @@ + @@ -761,6 +762,7 @@ + @@ -782,6 +784,7 @@ + diff --git a/trunk/dist/game/data/stats/items/07700-07799.xml b/trunk/dist/game/data/stats/items/07700-07799.xml index 429375e19c..307c09b930 100644 --- a/trunk/dist/game/data/stats/items/07700-07799.xml +++ b/trunk/dist/game/data/stats/items/07700-07799.xml @@ -297,6 +297,7 @@ + @@ -474,6 +475,7 @@ + @@ -650,6 +652,7 @@ + diff --git a/trunk/dist/game/data/stats/items/07800-07899.xml b/trunk/dist/game/data/stats/items/07800-07899.xml index 570e349ab9..2ed4a11cdd 100644 --- a/trunk/dist/game/data/stats/items/07800-07899.xml +++ b/trunk/dist/game/data/stats/items/07800-07899.xml @@ -1276,6 +1276,7 @@ + @@ -1294,6 +1295,7 @@ + @@ -1312,6 +1314,7 @@ + @@ -1677,6 +1680,7 @@ + @@ -1812,6 +1816,7 @@ + @@ -1839,6 +1844,7 @@ + @@ -1950,6 +1956,7 @@ + @@ -2114,6 +2121,7 @@ + diff --git a/trunk/dist/game/data/stats/items/07900-07999.xml b/trunk/dist/game/data/stats/items/07900-07999.xml index e6cbf6bd50..ad7c002563 100644 --- a/trunk/dist/game/data/stats/items/07900-07999.xml +++ b/trunk/dist/game/data/stats/items/07900-07999.xml @@ -17,6 +17,7 @@ + @@ -44,6 +45,7 @@ + diff --git a/trunk/dist/game/data/stats/items/08000-08099.xml b/trunk/dist/game/data/stats/items/08000-08099.xml index 96a019ef10..188793ca6c 100644 --- a/trunk/dist/game/data/stats/items/08000-08099.xml +++ b/trunk/dist/game/data/stats/items/08000-08099.xml @@ -322,6 +322,7 @@ + @@ -545,6 +546,7 @@ + diff --git a/trunk/dist/game/data/stats/items/08100-08199.xml b/trunk/dist/game/data/stats/items/08100-08199.xml index 482b82d0c1..910a2f37fe 100644 --- a/trunk/dist/game/data/stats/items/08100-08199.xml +++ b/trunk/dist/game/data/stats/items/08100-08199.xml @@ -154,6 +154,7 @@ + @@ -465,6 +466,7 @@ + @@ -889,6 +891,7 @@ + @@ -1651,6 +1654,7 @@ + @@ -1752,6 +1756,7 @@ + @@ -1761,6 +1766,7 @@ + @@ -1770,6 +1776,7 @@ + @@ -1787,6 +1794,7 @@ + @@ -1796,6 +1804,7 @@ + @@ -1836,6 +1845,7 @@ + diff --git a/trunk/dist/game/data/stats/items/08500-08599.xml b/trunk/dist/game/data/stats/items/08500-08599.xml index 24311e62dd..c5e4e481a7 100644 --- a/trunk/dist/game/data/stats/items/08500-08599.xml +++ b/trunk/dist/game/data/stats/items/08500-08599.xml @@ -780,6 +780,7 @@ + @@ -798,6 +799,7 @@ + @@ -818,6 +820,7 @@ + @@ -827,6 +830,7 @@ + diff --git a/trunk/dist/game/data/stats/items/08600-08699.xml b/trunk/dist/game/data/stats/items/08600-08699.xml index a793a8daa5..bc8ee6b703 100644 --- a/trunk/dist/game/data/stats/items/08600-08699.xml +++ b/trunk/dist/game/data/stats/items/08600-08699.xml @@ -180,6 +180,7 @@ + @@ -961,6 +962,7 @@ + @@ -988,6 +990,7 @@ + @@ -1014,6 +1017,7 @@ + @@ -1041,6 +1045,7 @@ + @@ -1068,6 +1073,7 @@ + @@ -1096,6 +1102,7 @@ + @@ -1126,6 +1133,7 @@ + @@ -1153,6 +1161,7 @@ + @@ -1181,6 +1190,7 @@ + @@ -1208,6 +1218,7 @@ + @@ -1236,6 +1247,7 @@ + diff --git a/trunk/dist/game/data/stats/items/08700-08799.xml b/trunk/dist/game/data/stats/items/08700-08799.xml index ef19541577..bb470be9a8 100644 --- a/trunk/dist/game/data/stats/items/08700-08799.xml +++ b/trunk/dist/game/data/stats/items/08700-08799.xml @@ -250,6 +250,7 @@ + @@ -261,6 +262,7 @@ + @@ -272,6 +274,7 @@ + @@ -283,6 +286,7 @@ + @@ -294,6 +298,7 @@ + @@ -316,6 +321,7 @@ + @@ -327,6 +333,7 @@ + @@ -338,6 +345,7 @@ + @@ -349,6 +357,7 @@ + @@ -371,6 +380,7 @@ + @@ -382,6 +392,7 @@ + @@ -415,6 +426,7 @@ + @@ -437,6 +449,7 @@ + @@ -448,6 +461,7 @@ + @@ -459,6 +473,7 @@ + @@ -679,6 +694,7 @@ + diff --git a/trunk/dist/game/data/stats/items/08800-08899.xml b/trunk/dist/game/data/stats/items/08800-08899.xml index 43b838f12e..a9c549d9ea 100644 --- a/trunk/dist/game/data/stats/items/08800-08899.xml +++ b/trunk/dist/game/data/stats/items/08800-08899.xml @@ -576,6 +576,7 @@ + diff --git a/trunk/dist/game/data/stats/items/08900-08999.xml b/trunk/dist/game/data/stats/items/08900-08999.xml index 492f904f6c..d033fb0dff 100644 --- a/trunk/dist/game/data/stats/items/08900-08999.xml +++ b/trunk/dist/game/data/stats/items/08900-08999.xml @@ -140,6 +140,7 @@ + @@ -149,6 +150,7 @@ + @@ -190,6 +192,7 @@ + @@ -199,6 +202,7 @@ + @@ -208,6 +212,7 @@ + @@ -506,6 +511,7 @@ + diff --git a/trunk/dist/game/data/stats/items/09100-09199.xml b/trunk/dist/game/data/stats/items/09100-09199.xml index f446c9f9e1..10e5ce9c7c 100644 --- a/trunk/dist/game/data/stats/items/09100-09199.xml +++ b/trunk/dist/game/data/stats/items/09100-09199.xml @@ -544,6 +544,7 @@ + @@ -568,6 +569,7 @@ + @@ -800,6 +802,7 @@ + @@ -827,6 +830,7 @@ + diff --git a/trunk/dist/game/data/stats/items/09200-09299.xml b/trunk/dist/game/data/stats/items/09200-09299.xml index 4ab3f48b91..e59f389ed6 100644 --- a/trunk/dist/game/data/stats/items/09200-09299.xml +++ b/trunk/dist/game/data/stats/items/09200-09299.xml @@ -210,6 +210,7 @@ + diff --git a/trunk/dist/game/data/stats/items/09300-09399.xml b/trunk/dist/game/data/stats/items/09300-09399.xml index 5050c0d076..b21bc5b11f 100644 --- a/trunk/dist/game/data/stats/items/09300-09399.xml +++ b/trunk/dist/game/data/stats/items/09300-09399.xml @@ -52,6 +52,7 @@ + @@ -3023,6 +3024,7 @@ + diff --git a/trunk/dist/game/data/stats/items/09400-09499.xml b/trunk/dist/game/data/stats/items/09400-09499.xml index 36dfe63361..5d24dabb4e 100644 --- a/trunk/dist/game/data/stats/items/09400-09499.xml +++ b/trunk/dist/game/data/stats/items/09400-09499.xml @@ -289,6 +289,7 @@ + @@ -369,6 +370,7 @@ + @@ -386,6 +388,7 @@ + @@ -422,6 +425,7 @@ + @@ -464,6 +468,7 @@ + @@ -481,6 +486,7 @@ + @@ -498,6 +504,7 @@ + @@ -515,6 +522,7 @@ + @@ -648,6 +656,7 @@ + @@ -666,6 +675,7 @@ + @@ -742,6 +752,7 @@ + @@ -770,6 +781,7 @@ + @@ -798,6 +810,7 @@ + @@ -828,6 +841,7 @@ + @@ -856,6 +870,7 @@ + @@ -885,6 +900,7 @@ + @@ -913,6 +929,7 @@ + @@ -942,6 +959,7 @@ + @@ -970,6 +988,7 @@ + @@ -987,6 +1006,7 @@ + @@ -999,6 +1019,7 @@ + @@ -1015,6 +1036,7 @@ + @@ -1031,6 +1053,7 @@ + @@ -1047,6 +1070,7 @@ + @@ -1081,6 +1105,7 @@ + diff --git a/trunk/dist/game/data/stats/items/09500-09599.xml b/trunk/dist/game/data/stats/items/09500-09599.xml index fba6bd80f7..5558784473 100644 --- a/trunk/dist/game/data/stats/items/09500-09599.xml +++ b/trunk/dist/game/data/stats/items/09500-09599.xml @@ -167,6 +167,7 @@ + @@ -185,6 +186,7 @@ + @@ -202,6 +204,7 @@ + @@ -219,6 +222,7 @@ + @@ -236,6 +240,7 @@ + @@ -254,6 +259,7 @@ + @@ -272,6 +278,7 @@ + @@ -289,6 +296,7 @@ + @@ -306,6 +314,7 @@ + @@ -323,6 +332,7 @@ + @@ -341,6 +351,7 @@ + @@ -360,6 +371,7 @@ + @@ -395,6 +407,7 @@ + @@ -412,6 +425,7 @@ + @@ -590,6 +604,7 @@ + @@ -602,6 +617,7 @@ + @@ -614,6 +630,7 @@ + @@ -626,6 +643,7 @@ + @@ -638,6 +656,7 @@ + @@ -650,6 +669,7 @@ + @@ -662,6 +682,7 @@ + @@ -674,6 +695,7 @@ + @@ -686,6 +708,7 @@ + @@ -698,6 +721,7 @@ + @@ -710,6 +734,7 @@ + @@ -722,6 +747,7 @@ + @@ -864,6 +890,7 @@ + @@ -874,6 +901,7 @@ + @@ -884,6 +912,7 @@ + @@ -892,6 +921,7 @@ + @@ -903,6 +933,7 @@ + @@ -914,6 +945,7 @@ + @@ -925,6 +957,7 @@ + @@ -1046,6 +1079,7 @@ + @@ -1126,6 +1160,7 @@ + diff --git a/trunk/dist/game/data/stats/items/09600-09699.xml b/trunk/dist/game/data/stats/items/09600-09699.xml index 1bdb7d2a70..bdbf036adf 100644 --- a/trunk/dist/game/data/stats/items/09600-09699.xml +++ b/trunk/dist/game/data/stats/items/09600-09699.xml @@ -342,6 +342,7 @@ + @@ -701,6 +702,7 @@ + @@ -717,6 +719,7 @@ + @@ -733,6 +736,7 @@ + @@ -741,6 +745,7 @@ + @@ -749,6 +754,7 @@ + @@ -757,6 +763,7 @@ + diff --git a/trunk/dist/game/data/stats/items/09800-09899.xml b/trunk/dist/game/data/stats/items/09800-09899.xml index 6129c86a6b..397cfe17f0 100644 --- a/trunk/dist/game/data/stats/items/09800-09899.xml +++ b/trunk/dist/game/data/stats/items/09800-09899.xml @@ -163,6 +163,7 @@ + @@ -170,6 +171,7 @@ + @@ -177,6 +179,7 @@ + @@ -184,6 +187,7 @@ + @@ -191,6 +195,7 @@ + @@ -1372,6 +1377,7 @@ + @@ -1432,6 +1438,7 @@ + @@ -1757,6 +1764,7 @@ + @@ -1787,6 +1795,7 @@ + @@ -1796,6 +1805,7 @@ + @@ -1898,6 +1908,7 @@ + diff --git a/trunk/dist/game/data/stats/items/09900-09999.xml b/trunk/dist/game/data/stats/items/09900-09999.xml index 8b4966e82b..0bf5321ef5 100644 --- a/trunk/dist/game/data/stats/items/09900-09999.xml +++ b/trunk/dist/game/data/stats/items/09900-09999.xml @@ -252,6 +252,7 @@ + @@ -1082,6 +1083,7 @@ + diff --git a/trunk/dist/game/data/stats/items/10000-10099.xml b/trunk/dist/game/data/stats/items/10000-10099.xml index d9708a3e37..ac75d70051 100644 --- a/trunk/dist/game/data/stats/items/10000-10099.xml +++ b/trunk/dist/game/data/stats/items/10000-10099.xml @@ -25,6 +25,7 @@ + @@ -91,6 +92,7 @@ + diff --git a/trunk/dist/game/data/stats/items/10100-10199.xml b/trunk/dist/game/data/stats/items/10100-10199.xml index 0df5894539..1260dcbc00 100644 --- a/trunk/dist/game/data/stats/items/10100-10199.xml +++ b/trunk/dist/game/data/stats/items/10100-10199.xml @@ -223,6 +223,7 @@ + @@ -378,6 +379,7 @@ + @@ -407,6 +409,7 @@ + @@ -418,6 +421,7 @@ + @@ -429,6 +433,7 @@ + @@ -440,6 +445,7 @@ + @@ -451,6 +457,7 @@ + @@ -462,6 +469,7 @@ + @@ -473,6 +481,7 @@ + @@ -710,6 +719,7 @@ + @@ -744,6 +754,7 @@ + diff --git a/trunk/dist/game/data/stats/items/10200-10299.xml b/trunk/dist/game/data/stats/items/10200-10299.xml index d3dcf84b08..00882055c2 100644 --- a/trunk/dist/game/data/stats/items/10200-10299.xml +++ b/trunk/dist/game/data/stats/items/10200-10299.xml @@ -282,6 +282,7 @@ + @@ -310,6 +311,7 @@ + @@ -338,6 +340,7 @@ + @@ -423,6 +426,7 @@ + @@ -855,6 +859,7 @@ + @@ -909,6 +914,7 @@ + @@ -936,6 +942,7 @@ + @@ -976,6 +983,7 @@ + @@ -1004,6 +1012,7 @@ + @@ -1565,6 +1574,7 @@ + @@ -1572,6 +1582,7 @@ + diff --git a/trunk/dist/game/data/stats/items/10300-10399.xml b/trunk/dist/game/data/stats/items/10300-10399.xml index 4a4d280df8..1224e18480 100644 --- a/trunk/dist/game/data/stats/items/10300-10399.xml +++ b/trunk/dist/game/data/stats/items/10300-10399.xml @@ -20,6 +20,7 @@ + @@ -27,6 +28,7 @@ + @@ -34,6 +36,7 @@ + @@ -48,6 +51,7 @@ + @@ -140,6 +144,7 @@ + @@ -155,6 +160,7 @@ + @@ -170,6 +176,7 @@ + @@ -186,6 +193,7 @@ + diff --git a/trunk/dist/game/data/stats/items/10400-10499.xml b/trunk/dist/game/data/stats/items/10400-10499.xml index f8e4ab2e9c..44880fe9fb 100644 --- a/trunk/dist/game/data/stats/items/10400-10499.xml +++ b/trunk/dist/game/data/stats/items/10400-10499.xml @@ -343,6 +343,7 @@ + @@ -433,6 +434,7 @@ + @@ -789,6 +791,7 @@ + @@ -1113,6 +1116,7 @@ + @@ -1754,6 +1758,7 @@ + @@ -1764,6 +1769,7 @@ + @@ -1774,6 +1780,7 @@ + @@ -1782,6 +1789,7 @@ + @@ -1793,6 +1801,7 @@ + @@ -1804,6 +1813,7 @@ + diff --git a/trunk/dist/game/data/stats/items/10500-10599.xml b/trunk/dist/game/data/stats/items/10500-10599.xml index 4e3b80d11d..d66c65994c 100644 --- a/trunk/dist/game/data/stats/items/10500-10599.xml +++ b/trunk/dist/game/data/stats/items/10500-10599.xml @@ -46,6 +46,7 @@ + @@ -1102,6 +1103,7 @@ + diff --git a/trunk/dist/game/data/stats/items/10600-10699.xml b/trunk/dist/game/data/stats/items/10600-10699.xml index eb5c6eecb8..5c691e67c1 100644 --- a/trunk/dist/game/data/stats/items/10600-10699.xml +++ b/trunk/dist/game/data/stats/items/10600-10699.xml @@ -420,18 +420,21 @@ + + + @@ -487,18 +490,21 @@ + + + diff --git a/trunk/dist/game/data/stats/items/10900-10999.xml b/trunk/dist/game/data/stats/items/10900-10999.xml index d4ef5fb30e..201085b160 100644 --- a/trunk/dist/game/data/stats/items/10900-10999.xml +++ b/trunk/dist/game/data/stats/items/10900-10999.xml @@ -2285,6 +2285,7 @@ + @@ -2456,6 +2457,7 @@ + diff --git a/trunk/dist/game/data/stats/items/11100-11199.xml b/trunk/dist/game/data/stats/items/11100-11199.xml index 6656b27f47..86eaeb2841 100644 --- a/trunk/dist/game/data/stats/items/11100-11199.xml +++ b/trunk/dist/game/data/stats/items/11100-11199.xml @@ -226,6 +226,7 @@ + @@ -1463,6 +1464,7 @@ + @@ -2933,6 +2935,7 @@ + diff --git a/trunk/dist/game/data/stats/items/11700-11799.xml b/trunk/dist/game/data/stats/items/11700-11799.xml index 1129bbdea0..04dafa92fc 100644 --- a/trunk/dist/game/data/stats/items/11700-11799.xml +++ b/trunk/dist/game/data/stats/items/11700-11799.xml @@ -368,6 +368,7 @@ + @@ -1881,6 +1882,7 @@ + @@ -1930,6 +1932,7 @@ + @@ -2398,6 +2401,7 @@ + diff --git a/trunk/dist/game/data/stats/items/11900-11999.xml b/trunk/dist/game/data/stats/items/11900-11999.xml index 5e145dc209..6b07e14665 100644 --- a/trunk/dist/game/data/stats/items/11900-11999.xml +++ b/trunk/dist/game/data/stats/items/11900-11999.xml @@ -1311,6 +1311,7 @@ + diff --git a/trunk/dist/game/data/stats/items/12100-12199.xml b/trunk/dist/game/data/stats/items/12100-12199.xml index 00200cd35b..0de3d3ff65 100644 --- a/trunk/dist/game/data/stats/items/12100-12199.xml +++ b/trunk/dist/game/data/stats/items/12100-12199.xml @@ -100,6 +100,7 @@ + diff --git a/trunk/dist/game/data/stats/items/12500-12599.xml b/trunk/dist/game/data/stats/items/12500-12599.xml index a8be2669a5..709b5dfa66 100644 --- a/trunk/dist/game/data/stats/items/12500-12599.xml +++ b/trunk/dist/game/data/stats/items/12500-12599.xml @@ -367,6 +367,7 @@ + diff --git a/trunk/dist/game/data/stats/items/12600-12699.xml b/trunk/dist/game/data/stats/items/12600-12699.xml index 25a93c8021..3cea4bb18e 100644 --- a/trunk/dist/game/data/stats/items/12600-12699.xml +++ b/trunk/dist/game/data/stats/items/12600-12699.xml @@ -316,6 +316,7 @@ + @@ -392,6 +393,7 @@ + @@ -1177,6 +1179,7 @@ + @@ -1188,6 +1191,7 @@ + diff --git a/trunk/dist/game/data/stats/items/12700-12799.xml b/trunk/dist/game/data/stats/items/12700-12799.xml index 20879a468d..87bb79753b 100644 --- a/trunk/dist/game/data/stats/items/12700-12799.xml +++ b/trunk/dist/game/data/stats/items/12700-12799.xml @@ -29,6 +29,7 @@ + @@ -758,6 +759,7 @@ + @@ -780,6 +782,7 @@ + diff --git a/trunk/dist/game/data/stats/items/12800-12899.xml b/trunk/dist/game/data/stats/items/12800-12899.xml index 08a5215164..25473f5750 100644 --- a/trunk/dist/game/data/stats/items/12800-12899.xml +++ b/trunk/dist/game/data/stats/items/12800-12899.xml @@ -276,6 +276,7 @@ + @@ -312,6 +313,7 @@ + @@ -432,6 +434,7 @@ + diff --git a/trunk/dist/game/data/stats/items/13000-13099.xml b/trunk/dist/game/data/stats/items/13000-13099.xml index a59c7e74db..4d351d1fa7 100644 --- a/trunk/dist/game/data/stats/items/13000-13099.xml +++ b/trunk/dist/game/data/stats/items/13000-13099.xml @@ -1113,6 +1113,7 @@ + @@ -1122,6 +1123,7 @@ + @@ -1131,6 +1133,7 @@ + @@ -1193,6 +1196,7 @@ + diff --git a/trunk/dist/game/data/stats/items/13100-13199.xml b/trunk/dist/game/data/stats/items/13100-13199.xml index c2e2586dd9..8cc3faacae 100644 --- a/trunk/dist/game/data/stats/items/13100-13199.xml +++ b/trunk/dist/game/data/stats/items/13100-13199.xml @@ -516,6 +516,7 @@ + @@ -567,6 +568,7 @@ + @@ -584,6 +586,7 @@ + @@ -601,6 +604,7 @@ + @@ -618,6 +622,7 @@ + @@ -635,6 +640,7 @@ + @@ -652,6 +658,7 @@ + diff --git a/trunk/dist/game/data/stats/items/13400-13499.xml b/trunk/dist/game/data/stats/items/13400-13499.xml index efcecbc98c..2401b916d4 100644 --- a/trunk/dist/game/data/stats/items/13400-13499.xml +++ b/trunk/dist/game/data/stats/items/13400-13499.xml @@ -433,6 +433,7 @@ + @@ -469,6 +470,7 @@ + @@ -506,6 +508,7 @@ + @@ -524,6 +527,7 @@ + @@ -543,6 +547,7 @@ + @@ -595,6 +600,7 @@ + @@ -769,6 +775,7 @@ + @@ -786,6 +793,7 @@ + @@ -803,6 +811,7 @@ + @@ -880,6 +889,7 @@ + @@ -908,6 +918,7 @@ + @@ -963,6 +974,7 @@ + @@ -1020,6 +1032,7 @@ + @@ -1076,6 +1089,7 @@ + @@ -1134,6 +1148,7 @@ + @@ -1165,6 +1180,7 @@ + @@ -1484,6 +1500,7 @@ + @@ -1502,6 +1519,7 @@ + @@ -1529,6 +1547,7 @@ + @@ -1538,6 +1557,7 @@ + @@ -1547,6 +1567,7 @@ + @@ -1565,6 +1586,7 @@ + diff --git a/trunk/dist/game/data/stats/items/13500-13599.xml b/trunk/dist/game/data/stats/items/13500-13599.xml index 2a34281a46..19c1dba095 100644 --- a/trunk/dist/game/data/stats/items/13500-13599.xml +++ b/trunk/dist/game/data/stats/items/13500-13599.xml @@ -53,6 +53,7 @@ + @@ -747,6 +748,7 @@ + diff --git a/trunk/dist/game/data/stats/items/13800-13899.xml b/trunk/dist/game/data/stats/items/13800-13899.xml index 884518bdd9..817769ff69 100644 --- a/trunk/dist/game/data/stats/items/13800-13899.xml +++ b/trunk/dist/game/data/stats/items/13800-13899.xml @@ -1000,6 +1000,7 @@ + @@ -1064,6 +1065,7 @@ + @@ -1100,6 +1102,7 @@ + @@ -1149,6 +1152,7 @@ + @@ -1220,6 +1224,7 @@ + diff --git a/trunk/dist/game/data/stats/items/14000-14099.xml b/trunk/dist/game/data/stats/items/14000-14099.xml index c12b301d42..5269a96198 100644 --- a/trunk/dist/game/data/stats/items/14000-14099.xml +++ b/trunk/dist/game/data/stats/items/14000-14099.xml @@ -85,6 +85,7 @@ + @@ -651,6 +652,7 @@ + diff --git a/trunk/dist/game/data/stats/items/14100-14199.xml b/trunk/dist/game/data/stats/items/14100-14199.xml index 6a45dbc32a..5c9d207abe 100644 --- a/trunk/dist/game/data/stats/items/14100-14199.xml +++ b/trunk/dist/game/data/stats/items/14100-14199.xml @@ -106,6 +106,7 @@ + @@ -124,6 +125,7 @@ + @@ -143,6 +145,7 @@ + @@ -160,6 +163,7 @@ + @@ -177,6 +181,7 @@ + @@ -193,6 +198,7 @@ + @@ -213,6 +219,7 @@ + @@ -230,6 +237,7 @@ + @@ -247,6 +255,7 @@ + @@ -265,6 +274,7 @@ + @@ -283,6 +293,7 @@ + @@ -300,6 +311,7 @@ + @@ -354,6 +366,7 @@ + @@ -528,6 +541,7 @@ + @@ -587,6 +601,7 @@ + @@ -703,6 +718,7 @@ + @@ -1025,6 +1041,7 @@ + @@ -1241,6 +1258,7 @@ + @@ -1601,6 +1619,7 @@ + @@ -1617,6 +1636,7 @@ + @@ -1633,6 +1653,7 @@ + @@ -1696,6 +1717,7 @@ + @@ -1707,6 +1729,7 @@ + @@ -1718,6 +1741,7 @@ + @@ -1729,6 +1753,7 @@ + @@ -1772,6 +1797,7 @@ + @@ -1782,6 +1808,7 @@ + @@ -1802,6 +1829,7 @@ + @@ -1842,6 +1870,7 @@ + @@ -1852,6 +1881,7 @@ + @@ -1872,6 +1902,7 @@ + @@ -1882,6 +1913,7 @@ + @@ -1902,6 +1934,7 @@ + @@ -1912,6 +1945,7 @@ + diff --git a/trunk/dist/game/data/stats/items/14500-14599.xml b/trunk/dist/game/data/stats/items/14500-14599.xml index 9aa6cc8cba..681bc46e10 100644 --- a/trunk/dist/game/data/stats/items/14500-14599.xml +++ b/trunk/dist/game/data/stats/items/14500-14599.xml @@ -779,6 +779,7 @@ + diff --git a/trunk/dist/game/data/stats/items/14600-14699.xml b/trunk/dist/game/data/stats/items/14600-14699.xml index 17c221b3e1..90431fbd10 100644 --- a/trunk/dist/game/data/stats/items/14600-14699.xml +++ b/trunk/dist/game/data/stats/items/14600-14699.xml @@ -245,6 +245,7 @@ + @@ -1291,6 +1292,7 @@ + @@ -1298,6 +1300,7 @@ + @@ -1362,6 +1365,7 @@ + @@ -1398,6 +1402,7 @@ + @@ -1416,6 +1421,7 @@ + @@ -1505,6 +1511,7 @@ + @@ -1615,5 +1622,6 @@ + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/14700-14799.xml b/trunk/dist/game/data/stats/items/14700-14799.xml index 69c64333da..a8d853087d 100644 --- a/trunk/dist/game/data/stats/items/14700-14799.xml +++ b/trunk/dist/game/data/stats/items/14700-14799.xml @@ -13,6 +13,7 @@ + @@ -30,6 +31,7 @@ + diff --git a/trunk/dist/game/data/stats/items/14800-14899.xml b/trunk/dist/game/data/stats/items/14800-14899.xml index 8d1f22d2da..3c2e75c686 100644 --- a/trunk/dist/game/data/stats/items/14800-14899.xml +++ b/trunk/dist/game/data/stats/items/14800-14899.xml @@ -462,6 +462,7 @@ + diff --git a/trunk/dist/game/data/stats/items/15500-15599.xml b/trunk/dist/game/data/stats/items/15500-15599.xml index 28dd5d0512..fa72601982 100644 --- a/trunk/dist/game/data/stats/items/15500-15599.xml +++ b/trunk/dist/game/data/stats/items/15500-15599.xml @@ -499,6 +499,7 @@ + @@ -509,6 +510,7 @@ + @@ -519,6 +521,7 @@ + @@ -539,6 +542,7 @@ + @@ -566,6 +570,7 @@ + @@ -594,6 +599,7 @@ + @@ -622,6 +628,7 @@ + @@ -651,6 +658,7 @@ + @@ -736,6 +744,7 @@ + @@ -765,6 +774,7 @@ + @@ -824,6 +834,7 @@ + @@ -952,6 +963,7 @@ + @@ -979,6 +991,7 @@ + @@ -1035,6 +1048,7 @@ + @@ -1064,6 +1078,7 @@ + @@ -1091,6 +1106,7 @@ + @@ -1120,6 +1136,7 @@ + @@ -1149,6 +1166,7 @@ + @@ -1178,6 +1196,7 @@ + @@ -1207,6 +1226,7 @@ + @@ -1237,6 +1257,7 @@ + @@ -1357,6 +1378,7 @@ + @@ -1374,6 +1396,7 @@ + @@ -1391,6 +1414,7 @@ + @@ -1409,6 +1433,7 @@ + @@ -1445,6 +1470,7 @@ + @@ -1464,6 +1490,7 @@ + @@ -1482,6 +1509,7 @@ + @@ -1500,6 +1528,7 @@ + @@ -1518,6 +1547,7 @@ + @@ -1535,6 +1565,7 @@ + @@ -1569,6 +1600,7 @@ + @@ -1586,6 +1618,7 @@ + @@ -1603,6 +1636,7 @@ + @@ -1619,6 +1653,7 @@ + @@ -1638,6 +1673,7 @@ + @@ -1656,6 +1692,7 @@ + @@ -1673,6 +1710,7 @@ + @@ -1690,6 +1728,7 @@ + @@ -1708,6 +1747,7 @@ + @@ -1726,6 +1766,7 @@ + @@ -1763,6 +1804,7 @@ + @@ -1781,6 +1823,7 @@ + @@ -1799,6 +1842,7 @@ + @@ -1834,6 +1878,7 @@ + diff --git a/trunk/dist/game/data/stats/items/15600-15699.xml b/trunk/dist/game/data/stats/items/15600-15699.xml index b6f9cfece2..8c2b3ed4ca 100644 --- a/trunk/dist/game/data/stats/items/15600-15699.xml +++ b/trunk/dist/game/data/stats/items/15600-15699.xml @@ -29,6 +29,7 @@ + @@ -46,6 +47,7 @@ + @@ -63,6 +65,7 @@ + @@ -150,6 +153,7 @@ + @@ -168,6 +172,7 @@ + @@ -259,6 +264,7 @@ + @@ -328,6 +334,7 @@ + @@ -658,6 +665,7 @@ + @@ -757,6 +765,7 @@ + @@ -1348,6 +1357,7 @@ + @@ -1365,6 +1375,7 @@ + @@ -1382,6 +1393,7 @@ + @@ -1400,6 +1412,7 @@ + @@ -1418,6 +1431,7 @@ + @@ -1436,6 +1450,7 @@ + diff --git a/trunk/dist/game/data/stats/items/15700-15799.xml b/trunk/dist/game/data/stats/items/15700-15799.xml index f4591b5955..1774477ba3 100644 --- a/trunk/dist/game/data/stats/items/15700-15799.xml +++ b/trunk/dist/game/data/stats/items/15700-15799.xml @@ -31,6 +31,7 @@ + @@ -49,6 +50,7 @@ + @@ -101,6 +103,7 @@ + @@ -135,6 +138,7 @@ + @@ -152,6 +156,7 @@ + @@ -169,6 +174,7 @@ + @@ -186,6 +192,7 @@ + @@ -326,6 +333,7 @@ + @@ -343,6 +351,7 @@ + @@ -816,6 +825,7 @@ + @@ -871,6 +881,7 @@ + @@ -1074,6 +1085,7 @@ + @@ -1090,6 +1102,7 @@ + @@ -1122,6 +1135,7 @@ + @@ -1154,6 +1168,7 @@ + @@ -1212,6 +1227,7 @@ + diff --git a/trunk/dist/game/data/stats/items/15800-15899.xml b/trunk/dist/game/data/stats/items/15800-15899.xml index 6b4855983b..27d23b10ab 100644 --- a/trunk/dist/game/data/stats/items/15800-15899.xml +++ b/trunk/dist/game/data/stats/items/15800-15899.xml @@ -71,6 +71,7 @@ + @@ -506,6 +507,7 @@ + @@ -739,6 +741,7 @@ + @@ -856,6 +859,7 @@ + @@ -1033,6 +1037,7 @@ + @@ -1155,6 +1160,7 @@ + @@ -1246,6 +1252,7 @@ + @@ -1765,6 +1772,7 @@ + diff --git a/trunk/dist/game/data/stats/items/16000-16099.xml b/trunk/dist/game/data/stats/items/16000-16099.xml index 345b2b3333..4600bd5f73 100644 --- a/trunk/dist/game/data/stats/items/16000-16099.xml +++ b/trunk/dist/game/data/stats/items/16000-16099.xml @@ -813,6 +813,7 @@ + @@ -831,6 +832,7 @@ + diff --git a/trunk/dist/game/data/stats/items/16100-16199.xml b/trunk/dist/game/data/stats/items/16100-16199.xml index d0509f291e..3afb0779fe 100644 --- a/trunk/dist/game/data/stats/items/16100-16199.xml +++ b/trunk/dist/game/data/stats/items/16100-16199.xml @@ -26,6 +26,7 @@ + @@ -35,6 +36,7 @@ + @@ -53,6 +55,7 @@ + @@ -80,6 +83,7 @@ + @@ -1000,6 +1004,7 @@ + @@ -1132,6 +1137,7 @@ + @@ -1200,6 +1206,7 @@ + @@ -1222,6 +1229,7 @@ + @@ -1233,6 +1241,7 @@ + @@ -1244,6 +1253,7 @@ + diff --git a/trunk/dist/game/data/stats/items/17100-17199.xml b/trunk/dist/game/data/stats/items/17100-17199.xml index 874148ef2c..efba3c07cf 100644 --- a/trunk/dist/game/data/stats/items/17100-17199.xml +++ b/trunk/dist/game/data/stats/items/17100-17199.xml @@ -1187,6 +1187,7 @@ + diff --git a/trunk/dist/game/data/stats/items/17200-17299.xml b/trunk/dist/game/data/stats/items/17200-17299.xml index da263c2909..c3dbabb041 100644 --- a/trunk/dist/game/data/stats/items/17200-17299.xml +++ b/trunk/dist/game/data/stats/items/17200-17299.xml @@ -394,6 +394,7 @@ + @@ -512,12 +513,14 @@ + + @@ -600,6 +603,7 @@ + @@ -611,6 +615,7 @@ + @@ -742,6 +747,7 @@ + @@ -763,6 +769,7 @@ + @@ -784,6 +791,7 @@ + @@ -805,6 +813,7 @@ + @@ -827,6 +836,7 @@ + @@ -849,6 +859,7 @@ + @@ -870,6 +881,7 @@ + @@ -891,6 +903,7 @@ + @@ -912,6 +925,7 @@ + @@ -933,6 +947,7 @@ + diff --git a/trunk/dist/game/data/stats/items/17300-17399.xml b/trunk/dist/game/data/stats/items/17300-17399.xml index f47fc59769..807cb9216f 100644 --- a/trunk/dist/game/data/stats/items/17300-17399.xml +++ b/trunk/dist/game/data/stats/items/17300-17399.xml @@ -14,6 +14,7 @@ + @@ -58,6 +59,7 @@ + @@ -98,6 +100,7 @@ + @@ -114,6 +117,7 @@ + @@ -130,6 +134,7 @@ + @@ -146,6 +151,7 @@ + @@ -161,6 +167,7 @@ + @@ -177,6 +184,7 @@ + @@ -193,6 +201,7 @@ + @@ -209,6 +218,7 @@ + @@ -227,6 +237,7 @@ + @@ -245,6 +256,7 @@ + @@ -261,6 +273,7 @@ + @@ -277,6 +290,7 @@ + @@ -293,6 +307,7 @@ + @@ -311,6 +326,7 @@ + @@ -329,6 +345,7 @@ + @@ -345,6 +362,7 @@ + @@ -361,6 +379,7 @@ + @@ -377,6 +396,7 @@ + @@ -393,6 +413,7 @@ + @@ -409,6 +430,7 @@ + @@ -428,6 +450,7 @@ + @@ -449,6 +472,7 @@ + @@ -470,6 +494,7 @@ + @@ -491,6 +516,7 @@ + @@ -513,6 +539,7 @@ + @@ -535,6 +562,7 @@ + @@ -556,6 +584,7 @@ + @@ -577,6 +606,7 @@ + @@ -598,6 +628,7 @@ + @@ -619,6 +650,7 @@ + @@ -641,6 +673,7 @@ + @@ -664,6 +697,7 @@ + @@ -685,6 +719,7 @@ + @@ -706,6 +741,7 @@ + @@ -725,6 +761,7 @@ + @@ -741,6 +778,7 @@ + @@ -757,6 +795,7 @@ + @@ -773,6 +812,7 @@ + @@ -788,6 +828,7 @@ + @@ -804,6 +845,7 @@ + @@ -820,6 +862,7 @@ + @@ -836,6 +879,7 @@ + @@ -854,6 +898,7 @@ + @@ -872,6 +917,7 @@ + @@ -888,6 +934,7 @@ + @@ -904,6 +951,7 @@ + @@ -920,6 +968,7 @@ + @@ -938,6 +987,7 @@ + @@ -956,6 +1006,7 @@ + @@ -972,6 +1023,7 @@ + @@ -987,6 +1039,7 @@ + @@ -1003,6 +1056,7 @@ + @@ -1019,6 +1073,7 @@ + @@ -1035,6 +1090,7 @@ + @@ -1213,6 +1269,7 @@ + @@ -1233,24 +1290,28 @@ + + + + @@ -1312,6 +1373,7 @@ + @@ -1333,6 +1395,7 @@ + @@ -1354,6 +1417,7 @@ + @@ -1376,6 +1440,7 @@ + @@ -1398,6 +1463,7 @@ + @@ -1419,6 +1485,7 @@ + @@ -1440,6 +1507,7 @@ + @@ -1461,6 +1529,7 @@ + @@ -1482,6 +1551,7 @@ + @@ -1504,6 +1574,7 @@ + @@ -1527,6 +1598,7 @@ + @@ -1588,6 +1660,7 @@ + @@ -1604,6 +1677,7 @@ + @@ -1620,6 +1694,7 @@ + @@ -1636,6 +1711,7 @@ + diff --git a/trunk/dist/game/data/stats/items/17400-17499.xml b/trunk/dist/game/data/stats/items/17400-17499.xml index dafec4cb10..8018a538b5 100644 --- a/trunk/dist/game/data/stats/items/17400-17499.xml +++ b/trunk/dist/game/data/stats/items/17400-17499.xml @@ -10,6 +10,7 @@ + @@ -26,6 +27,7 @@ + @@ -42,6 +44,7 @@ + @@ -58,6 +61,7 @@ + @@ -76,6 +80,7 @@ + @@ -94,6 +99,7 @@ + @@ -110,6 +116,7 @@ + @@ -126,6 +133,7 @@ + @@ -142,6 +150,7 @@ + @@ -160,6 +169,7 @@ + @@ -178,6 +188,7 @@ + @@ -194,6 +205,7 @@ + @@ -209,6 +221,7 @@ + @@ -225,6 +238,7 @@ + @@ -241,6 +255,7 @@ + @@ -257,6 +272,7 @@ + @@ -276,6 +292,7 @@ + @@ -297,6 +314,7 @@ + @@ -318,6 +336,7 @@ + @@ -404,6 +423,7 @@ + @@ -425,6 +445,7 @@ + @@ -467,6 +488,7 @@ + @@ -489,6 +511,7 @@ + @@ -573,6 +596,7 @@ + @@ -589,6 +613,7 @@ + @@ -605,6 +630,7 @@ + @@ -621,6 +647,7 @@ + @@ -636,6 +663,7 @@ + @@ -652,6 +680,7 @@ + @@ -668,6 +697,7 @@ + @@ -684,6 +714,7 @@ + @@ -702,6 +733,7 @@ + @@ -720,6 +752,7 @@ + @@ -736,6 +769,7 @@ + @@ -752,6 +786,7 @@ + @@ -768,6 +803,7 @@ + @@ -786,6 +822,7 @@ + @@ -804,6 +841,7 @@ + @@ -820,6 +858,7 @@ + @@ -835,6 +874,7 @@ + @@ -850,6 +890,7 @@ + @@ -865,6 +906,7 @@ + @@ -880,6 +922,7 @@ + diff --git a/trunk/dist/game/data/stats/items/17500-17599.xml b/trunk/dist/game/data/stats/items/17500-17599.xml index f56091bd88..6b084d06a3 100644 --- a/trunk/dist/game/data/stats/items/17500-17599.xml +++ b/trunk/dist/game/data/stats/items/17500-17599.xml @@ -196,6 +196,7 @@ + @@ -210,6 +211,7 @@ + diff --git a/trunk/dist/game/data/stats/items/17600-17699.xml b/trunk/dist/game/data/stats/items/17600-17699.xml index e9b01b5d92..1507291da5 100644 --- a/trunk/dist/game/data/stats/items/17600-17699.xml +++ b/trunk/dist/game/data/stats/items/17600-17699.xml @@ -126,6 +126,7 @@ + @@ -142,6 +143,7 @@ + @@ -149,6 +151,7 @@ + @@ -156,6 +159,7 @@ + @@ -163,6 +167,7 @@ + @@ -170,6 +175,7 @@ + @@ -184,6 +190,7 @@ + @@ -191,6 +198,7 @@ + @@ -198,6 +206,7 @@ + @@ -205,6 +214,7 @@ + @@ -212,6 +222,7 @@ + @@ -226,6 +237,7 @@ + @@ -233,6 +245,7 @@ + @@ -240,6 +253,7 @@ + @@ -247,6 +261,7 @@ + @@ -254,6 +269,7 @@ + @@ -275,6 +291,7 @@ + @@ -289,6 +306,7 @@ + @@ -310,6 +328,7 @@ + @@ -317,6 +336,7 @@ + @@ -331,6 +351,7 @@ + @@ -338,6 +359,7 @@ + @@ -352,6 +374,7 @@ + @@ -359,6 +382,7 @@ + @@ -366,6 +390,7 @@ + @@ -373,6 +398,7 @@ + @@ -401,6 +427,7 @@ + @@ -408,6 +435,7 @@ + @@ -415,6 +443,7 @@ + @@ -422,6 +451,7 @@ + @@ -443,6 +473,7 @@ + @@ -450,6 +481,7 @@ + @@ -457,6 +489,7 @@ + @@ -464,6 +497,7 @@ + @@ -478,6 +512,7 @@ + @@ -485,6 +520,7 @@ + @@ -492,6 +528,7 @@ + @@ -499,6 +536,7 @@ + @@ -506,6 +544,7 @@ + @@ -513,6 +552,7 @@ + @@ -520,6 +560,7 @@ + @@ -527,6 +568,7 @@ + @@ -534,6 +576,7 @@ + @@ -541,6 +584,7 @@ + @@ -548,6 +592,7 @@ + @@ -555,6 +600,7 @@ + @@ -562,6 +608,7 @@ + @@ -569,6 +616,7 @@ + @@ -576,6 +624,7 @@ + @@ -583,6 +632,7 @@ + @@ -597,6 +647,7 @@ + @@ -604,6 +655,7 @@ + @@ -611,6 +663,7 @@ + @@ -618,6 +671,7 @@ + @@ -625,6 +679,7 @@ + @@ -632,6 +687,7 @@ + @@ -646,6 +702,7 @@ + @@ -653,6 +710,7 @@ + @@ -660,5 +718,6 @@ + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/17700-17799.xml b/trunk/dist/game/data/stats/items/17700-17799.xml index 48ad137549..f9fd539588 100644 --- a/trunk/dist/game/data/stats/items/17700-17799.xml +++ b/trunk/dist/game/data/stats/items/17700-17799.xml @@ -6,6 +6,7 @@ + @@ -13,6 +14,7 @@ + @@ -20,6 +22,7 @@ + @@ -27,6 +30,7 @@ + @@ -34,6 +38,7 @@ + @@ -48,6 +53,7 @@ + @@ -55,6 +61,7 @@ + @@ -62,6 +69,7 @@ + @@ -69,6 +77,7 @@ + @@ -76,6 +85,7 @@ + @@ -83,6 +93,7 @@ + @@ -90,6 +101,7 @@ + @@ -97,6 +109,7 @@ + @@ -104,6 +117,7 @@ + @@ -352,6 +366,7 @@ + diff --git a/trunk/dist/game/data/stats/items/17900-17999.xml b/trunk/dist/game/data/stats/items/17900-17999.xml index 6df1311407..2385226049 100644 --- a/trunk/dist/game/data/stats/items/17900-17999.xml +++ b/trunk/dist/game/data/stats/items/17900-17999.xml @@ -1369,6 +1369,7 @@ + @@ -1570,6 +1571,7 @@ + @@ -1667,6 +1669,7 @@ + diff --git a/trunk/dist/game/data/stats/items/18000-18099.xml b/trunk/dist/game/data/stats/items/18000-18099.xml index 8c992bed2b..d62e9330db 100644 --- a/trunk/dist/game/data/stats/items/18000-18099.xml +++ b/trunk/dist/game/data/stats/items/18000-18099.xml @@ -157,6 +157,7 @@ + @@ -178,6 +179,7 @@ + @@ -265,6 +267,7 @@ + @@ -286,6 +289,7 @@ + @@ -342,6 +346,7 @@ + @@ -389,6 +394,7 @@ + @@ -437,6 +443,7 @@ + @@ -539,6 +546,7 @@ + @@ -557,6 +565,7 @@ + @@ -618,6 +627,7 @@ + @@ -965,6 +975,7 @@ + @@ -1144,6 +1155,7 @@ + @@ -1162,6 +1174,7 @@ + @@ -1180,6 +1193,7 @@ + @@ -1196,6 +1210,7 @@ + @@ -1226,6 +1241,7 @@ + @@ -1588,6 +1604,7 @@ + @@ -1735,6 +1752,7 @@ + @@ -1834,6 +1852,7 @@ + diff --git a/trunk/dist/game/data/stats/items/18100-18199.xml b/trunk/dist/game/data/stats/items/18100-18199.xml index 5c00dd5b73..a3afe71be8 100644 --- a/trunk/dist/game/data/stats/items/18100-18199.xml +++ b/trunk/dist/game/data/stats/items/18100-18199.xml @@ -99,6 +99,7 @@ + @@ -174,6 +175,7 @@ + @@ -189,6 +191,7 @@ + @@ -514,6 +517,7 @@ + diff --git a/trunk/dist/game/data/stats/items/18500-18599.xml b/trunk/dist/game/data/stats/items/18500-18599.xml index 4185800172..8cf47ed720 100644 --- a/trunk/dist/game/data/stats/items/18500-18599.xml +++ b/trunk/dist/game/data/stats/items/18500-18599.xml @@ -308,61 +308,73 @@ + + + + + + + + + + + + @@ -370,6 +382,7 @@ + @@ -377,6 +390,7 @@ + @@ -384,6 +398,7 @@ + @@ -391,6 +406,7 @@ + @@ -405,6 +421,7 @@ + @@ -412,6 +429,7 @@ + @@ -419,6 +437,7 @@ + @@ -426,6 +445,7 @@ + @@ -440,6 +460,7 @@ + @@ -447,6 +468,7 @@ + @@ -454,6 +476,7 @@ + @@ -461,6 +484,7 @@ + @@ -525,6 +549,7 @@ + @@ -588,6 +613,7 @@ + @@ -846,6 +872,7 @@ + diff --git a/trunk/dist/game/data/stats/items/18600-18699.xml b/trunk/dist/game/data/stats/items/18600-18699.xml index a75ebfaa44..ba46223bf6 100644 --- a/trunk/dist/game/data/stats/items/18600-18699.xml +++ b/trunk/dist/game/data/stats/items/18600-18699.xml @@ -119,6 +119,7 @@ + @@ -141,6 +142,7 @@ + @@ -317,6 +319,7 @@ + @@ -338,6 +341,7 @@ + @@ -1898,6 +1902,7 @@ + @@ -1941,6 +1946,7 @@ + @@ -2008,6 +2014,7 @@ + diff --git a/trunk/dist/game/data/stats/items/18700-18799.xml b/trunk/dist/game/data/stats/items/18700-18799.xml index 33b7d0b94a..af3bbb781f 100644 --- a/trunk/dist/game/data/stats/items/18700-18799.xml +++ b/trunk/dist/game/data/stats/items/18700-18799.xml @@ -122,6 +122,7 @@ + @@ -143,6 +144,7 @@ + @@ -206,6 +208,7 @@ + @@ -227,6 +230,7 @@ + @@ -312,6 +316,7 @@ + @@ -334,6 +339,7 @@ + @@ -378,6 +384,7 @@ + @@ -464,6 +471,7 @@ + @@ -485,6 +493,7 @@ + @@ -506,6 +515,7 @@ + @@ -590,6 +600,7 @@ + @@ -611,6 +622,7 @@ + @@ -674,6 +686,7 @@ + @@ -696,6 +709,7 @@ + @@ -763,6 +777,7 @@ + @@ -809,6 +824,7 @@ + @@ -830,6 +846,7 @@ + @@ -851,6 +868,7 @@ + @@ -872,6 +890,7 @@ + @@ -935,6 +954,7 @@ + @@ -979,6 +999,7 @@ + diff --git a/trunk/dist/game/data/stats/items/18800-18899.xml b/trunk/dist/game/data/stats/items/18800-18899.xml index 09ed69687a..4949d33b3f 100644 --- a/trunk/dist/game/data/stats/items/18800-18899.xml +++ b/trunk/dist/game/data/stats/items/18800-18899.xml @@ -14,6 +14,7 @@ + @@ -354,6 +355,7 @@ + @@ -680,6 +682,7 @@ + @@ -764,6 +767,7 @@ + @@ -848,6 +852,7 @@ + @@ -1022,6 +1027,7 @@ + @@ -1043,6 +1049,7 @@ + @@ -1064,6 +1071,7 @@ + @@ -1169,6 +1177,7 @@ + @@ -1232,6 +1241,7 @@ + @@ -1254,6 +1264,7 @@ + @@ -1321,6 +1332,7 @@ + @@ -1367,6 +1379,7 @@ + @@ -1388,6 +1401,7 @@ + @@ -1409,6 +1423,7 @@ + @@ -1430,6 +1445,7 @@ + @@ -1537,6 +1553,7 @@ + diff --git a/trunk/dist/game/data/stats/items/18900-18999.xml b/trunk/dist/game/data/stats/items/18900-18999.xml index 2a7be2d22a..173c4c8081 100644 --- a/trunk/dist/game/data/stats/items/18900-18999.xml +++ b/trunk/dist/game/data/stats/items/18900-18999.xml @@ -808,6 +808,7 @@ + @@ -981,6 +982,7 @@ + @@ -1111,6 +1113,7 @@ + @@ -1219,6 +1222,7 @@ + @@ -1324,6 +1328,7 @@ + @@ -1345,6 +1350,7 @@ + @@ -1603,6 +1609,7 @@ + @@ -1624,6 +1631,7 @@ + @@ -1666,6 +1674,7 @@ + @@ -1729,6 +1738,7 @@ + @@ -1881,6 +1891,7 @@ + @@ -1904,6 +1915,7 @@ + @@ -1990,6 +2002,7 @@ + @@ -2097,6 +2110,7 @@ + diff --git a/trunk/dist/game/data/stats/items/19100-19199.xml b/trunk/dist/game/data/stats/items/19100-19199.xml index 2702e24948..3d5e096529 100644 --- a/trunk/dist/game/data/stats/items/19100-19199.xml +++ b/trunk/dist/game/data/stats/items/19100-19199.xml @@ -1092,6 +1092,7 @@ + diff --git a/trunk/dist/game/data/stats/items/19400-19499.xml b/trunk/dist/game/data/stats/items/19400-19499.xml index d643c989d8..21c8c102e4 100644 --- a/trunk/dist/game/data/stats/items/19400-19499.xml +++ b/trunk/dist/game/data/stats/items/19400-19499.xml @@ -287,6 +287,7 @@ + @@ -300,6 +301,7 @@ + @@ -313,6 +315,7 @@ + @@ -331,12 +334,14 @@ + + @@ -355,6 +360,7 @@ + @@ -368,6 +374,7 @@ + @@ -396,6 +403,7 @@ + @@ -411,6 +419,7 @@ + @@ -426,6 +435,7 @@ + @@ -456,6 +466,7 @@ + @@ -482,6 +493,7 @@ + @@ -497,6 +509,7 @@ + @@ -512,6 +525,7 @@ + @@ -542,6 +556,7 @@ + @@ -553,6 +568,7 @@ + @@ -568,6 +584,7 @@ + @@ -594,6 +611,7 @@ + @@ -601,24 +619,28 @@ + + + + @@ -630,6 +652,7 @@ + @@ -645,6 +668,7 @@ + @@ -670,6 +694,7 @@ + @@ -710,6 +735,7 @@ + @@ -750,6 +776,7 @@ + diff --git a/trunk/dist/game/data/stats/items/19500-19599.xml b/trunk/dist/game/data/stats/items/19500-19599.xml index 806c6e6fb8..da48a073f8 100644 --- a/trunk/dist/game/data/stats/items/19500-19599.xml +++ b/trunk/dist/game/data/stats/items/19500-19599.xml @@ -16,61 +16,72 @@ + + + + + + + + + + + @@ -144,6 +155,7 @@ + @@ -160,6 +172,7 @@ + @@ -190,6 +203,7 @@ + @@ -236,6 +250,7 @@ + @@ -252,6 +267,7 @@ + @@ -269,6 +285,7 @@ + @@ -286,6 +303,7 @@ + @@ -366,6 +384,7 @@ + @@ -396,6 +415,7 @@ + @@ -412,6 +432,7 @@ + @@ -427,6 +448,7 @@ + @@ -442,6 +464,7 @@ + @@ -457,6 +480,7 @@ + @@ -473,6 +497,7 @@ + @@ -488,6 +513,7 @@ + @@ -504,6 +530,7 @@ + @@ -521,6 +548,7 @@ + @@ -538,6 +566,7 @@ + @@ -553,6 +582,7 @@ + @@ -568,6 +598,7 @@ + @@ -584,6 +615,7 @@ + @@ -601,6 +633,7 @@ + @@ -618,6 +651,7 @@ + @@ -633,6 +667,7 @@ + @@ -648,6 +683,7 @@ + @@ -664,6 +700,7 @@ + @@ -679,6 +716,7 @@ + @@ -694,6 +732,7 @@ + @@ -709,6 +748,7 @@ + @@ -740,6 +780,7 @@ + @@ -756,6 +797,7 @@ + @@ -773,6 +815,7 @@ + @@ -790,6 +833,7 @@ + @@ -805,6 +849,7 @@ + @@ -820,6 +865,7 @@ + @@ -836,6 +882,7 @@ + @@ -853,6 +900,7 @@ + @@ -870,6 +918,7 @@ + @@ -885,6 +934,7 @@ + @@ -900,6 +950,7 @@ + @@ -916,6 +967,7 @@ + @@ -931,6 +983,7 @@ + @@ -946,6 +999,7 @@ + @@ -961,6 +1015,7 @@ + @@ -992,6 +1047,7 @@ + @@ -1042,6 +1098,7 @@ + @@ -1072,6 +1129,7 @@ + @@ -1105,6 +1163,7 @@ + @@ -1122,6 +1181,7 @@ + @@ -1137,6 +1197,7 @@ + diff --git a/trunk/dist/game/data/stats/items/19600-19699.xml b/trunk/dist/game/data/stats/items/19600-19699.xml index b72952c9c3..9bb97f1091 100644 --- a/trunk/dist/game/data/stats/items/19600-19699.xml +++ b/trunk/dist/game/data/stats/items/19600-19699.xml @@ -834,6 +834,7 @@ + @@ -865,6 +866,7 @@ + @@ -880,6 +882,7 @@ + @@ -895,6 +898,7 @@ + @@ -1102,6 +1106,7 @@ + @@ -1308,6 +1313,7 @@ + @@ -1430,6 +1436,7 @@ + @@ -1463,6 +1470,7 @@ + @@ -1480,6 +1488,7 @@ + @@ -1495,6 +1504,7 @@ + diff --git a/trunk/dist/game/data/stats/items/19700-19799.xml b/trunk/dist/game/data/stats/items/19700-19799.xml index 168c60e7f2..e82baaa66e 100644 --- a/trunk/dist/game/data/stats/items/19700-19799.xml +++ b/trunk/dist/game/data/stats/items/19700-19799.xml @@ -216,6 +216,7 @@ + @@ -491,6 +492,7 @@ + @@ -507,6 +509,7 @@ + @@ -522,6 +525,7 @@ + @@ -537,6 +541,7 @@ + @@ -552,6 +557,7 @@ + @@ -568,6 +574,7 @@ + @@ -599,6 +606,7 @@ + @@ -616,6 +624,7 @@ + @@ -743,6 +752,7 @@ + @@ -759,6 +769,7 @@ + @@ -774,6 +785,7 @@ + @@ -789,6 +801,7 @@ + @@ -804,6 +817,7 @@ + @@ -820,6 +834,7 @@ + @@ -835,6 +850,7 @@ + @@ -851,6 +867,7 @@ + @@ -868,6 +885,7 @@ + @@ -885,6 +903,7 @@ + @@ -900,6 +919,7 @@ + @@ -915,6 +935,7 @@ + @@ -931,6 +952,7 @@ + @@ -948,6 +970,7 @@ + @@ -965,6 +988,7 @@ + @@ -980,6 +1004,7 @@ + @@ -995,6 +1020,7 @@ + @@ -1011,6 +1037,7 @@ + @@ -1026,6 +1053,7 @@ + @@ -1041,6 +1069,7 @@ + @@ -1056,6 +1085,7 @@ + @@ -1072,6 +1102,7 @@ + @@ -1087,6 +1118,7 @@ + @@ -1103,6 +1135,7 @@ + @@ -1120,6 +1153,7 @@ + @@ -1137,6 +1171,7 @@ + @@ -1152,6 +1187,7 @@ + @@ -1167,6 +1203,7 @@ + @@ -1183,6 +1220,7 @@ + @@ -1200,6 +1238,7 @@ + @@ -1217,6 +1256,7 @@ + @@ -1232,6 +1272,7 @@ + @@ -1247,6 +1288,7 @@ + @@ -1263,6 +1305,7 @@ + @@ -1278,6 +1321,7 @@ + @@ -1293,6 +1337,7 @@ + @@ -1308,6 +1353,7 @@ + @@ -1339,6 +1385,7 @@ + @@ -1355,6 +1402,7 @@ + @@ -1372,6 +1420,7 @@ + @@ -1389,6 +1438,7 @@ + @@ -1404,6 +1454,7 @@ + @@ -1419,6 +1470,7 @@ + @@ -1435,6 +1487,7 @@ + @@ -1469,6 +1522,7 @@ + @@ -1484,6 +1538,7 @@ + diff --git a/trunk/dist/game/data/stats/items/19800-19899.xml b/trunk/dist/game/data/stats/items/19800-19899.xml index 34948f9bbd..64fee1a3e6 100644 --- a/trunk/dist/game/data/stats/items/19800-19899.xml +++ b/trunk/dist/game/data/stats/items/19800-19899.xml @@ -1238,6 +1238,7 @@ + @@ -1444,6 +1445,7 @@ + @@ -1459,6 +1461,7 @@ + @@ -1490,6 +1493,7 @@ + @@ -1520,6 +1524,7 @@ + @@ -1566,6 +1571,7 @@ + @@ -1582,6 +1588,7 @@ + diff --git a/trunk/dist/game/data/stats/items/19900-19999.xml b/trunk/dist/game/data/stats/items/19900-19999.xml index 863e562655..7d59078c4e 100644 --- a/trunk/dist/game/data/stats/items/19900-19999.xml +++ b/trunk/dist/game/data/stats/items/19900-19999.xml @@ -10,6 +10,7 @@ + @@ -197,6 +198,7 @@ + @@ -1905,6 +1907,7 @@ + diff --git a/trunk/dist/game/data/stats/items/20000-20099.xml b/trunk/dist/game/data/stats/items/20000-20099.xml index fcd4a14716..3d7f44718e 100644 --- a/trunk/dist/game/data/stats/items/20000-20099.xml +++ b/trunk/dist/game/data/stats/items/20000-20099.xml @@ -242,6 +242,7 @@ + @@ -283,6 +284,7 @@ + @@ -397,6 +399,7 @@ + diff --git a/trunk/dist/game/data/stats/items/20500-20599.xml b/trunk/dist/game/data/stats/items/20500-20599.xml index f1cfb282b2..253f135c59 100644 --- a/trunk/dist/game/data/stats/items/20500-20599.xml +++ b/trunk/dist/game/data/stats/items/20500-20599.xml @@ -1269,6 +1269,7 @@ + @@ -1312,6 +1313,7 @@ + @@ -1432,6 +1434,7 @@ + diff --git a/trunk/dist/game/data/stats/items/20900-20999.xml b/trunk/dist/game/data/stats/items/20900-20999.xml index 07b809bf69..0f54d11ab5 100644 --- a/trunk/dist/game/data/stats/items/20900-20999.xml +++ b/trunk/dist/game/data/stats/items/20900-20999.xml @@ -60,6 +60,7 @@ + diff --git a/trunk/dist/game/data/stats/items/21000-21099.xml b/trunk/dist/game/data/stats/items/21000-21099.xml index ecc1cdf9ba..10d312ef28 100644 --- a/trunk/dist/game/data/stats/items/21000-21099.xml +++ b/trunk/dist/game/data/stats/items/21000-21099.xml @@ -1534,6 +1534,7 @@ + @@ -1634,11 +1635,13 @@ + + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/21100-21199.xml b/trunk/dist/game/data/stats/items/21100-21199.xml index e10778f6db..a2ccf17327 100644 --- a/trunk/dist/game/data/stats/items/21100-21199.xml +++ b/trunk/dist/game/data/stats/items/21100-21199.xml @@ -5,6 +5,7 @@ + @@ -23,18 +24,21 @@ + + + @@ -148,6 +152,7 @@ + @@ -188,6 +193,7 @@ + @@ -268,6 +274,7 @@ + @@ -757,6 +764,7 @@ + @@ -771,6 +779,7 @@ + @@ -778,6 +787,7 @@ + @@ -785,6 +795,7 @@ + @@ -792,6 +803,7 @@ + @@ -799,6 +811,7 @@ + @@ -806,6 +819,7 @@ + @@ -820,6 +834,7 @@ + @@ -827,6 +842,7 @@ + @@ -834,6 +850,7 @@ + @@ -841,6 +858,7 @@ + @@ -848,6 +866,7 @@ + @@ -855,6 +874,7 @@ + @@ -862,6 +882,7 @@ + @@ -869,6 +890,7 @@ + @@ -876,6 +898,7 @@ + @@ -883,6 +906,7 @@ + @@ -890,6 +914,7 @@ + diff --git a/trunk/dist/game/data/stats/items/21600-21699.xml b/trunk/dist/game/data/stats/items/21600-21699.xml index d6eea44002..c1532d8911 100644 --- a/trunk/dist/game/data/stats/items/21600-21699.xml +++ b/trunk/dist/game/data/stats/items/21600-21699.xml @@ -235,6 +235,7 @@ + diff --git a/trunk/dist/game/data/stats/items/21700-21799.xml b/trunk/dist/game/data/stats/items/21700-21799.xml index ad76317baf..5f107a6ed5 100644 --- a/trunk/dist/game/data/stats/items/21700-21799.xml +++ b/trunk/dist/game/data/stats/items/21700-21799.xml @@ -144,6 +144,7 @@ + @@ -156,6 +157,7 @@ + @@ -163,6 +165,7 @@ + @@ -170,6 +173,7 @@ + @@ -182,6 +186,7 @@ + @@ -206,6 +211,7 @@ + @@ -230,6 +236,7 @@ + @@ -421,6 +428,7 @@ + diff --git a/trunk/dist/game/data/stats/items/21800-21899.xml b/trunk/dist/game/data/stats/items/21800-21899.xml index f256688984..336d27f657 100644 --- a/trunk/dist/game/data/stats/items/21800-21899.xml +++ b/trunk/dist/game/data/stats/items/21800-21899.xml @@ -1379,6 +1379,7 @@ + @@ -1397,6 +1398,7 @@ + diff --git a/trunk/dist/game/data/stats/items/21900-21999.xml b/trunk/dist/game/data/stats/items/21900-21999.xml index b9664bc680..109157ff13 100644 --- a/trunk/dist/game/data/stats/items/21900-21999.xml +++ b/trunk/dist/game/data/stats/items/21900-21999.xml @@ -80,6 +80,7 @@ + @@ -735,6 +736,7 @@ + diff --git a/trunk/dist/game/data/stats/items/22100-22199.xml b/trunk/dist/game/data/stats/items/22100-22199.xml index bf06cbf70d..b4e84334f4 100644 --- a/trunk/dist/game/data/stats/items/22100-22199.xml +++ b/trunk/dist/game/data/stats/items/22100-22199.xml @@ -1012,6 +1012,7 @@ + diff --git a/trunk/dist/game/data/stats/items/22800-22899.xml b/trunk/dist/game/data/stats/items/22800-22899.xml index 5ec73911cb..c9cf95e6cd 100644 --- a/trunk/dist/game/data/stats/items/22800-22899.xml +++ b/trunk/dist/game/data/stats/items/22800-22899.xml @@ -150,6 +150,7 @@ + @@ -598,6 +599,7 @@ + @@ -620,6 +622,7 @@ + @@ -664,6 +667,7 @@ + diff --git a/trunk/dist/game/data/stats/items/23100-23199.xml b/trunk/dist/game/data/stats/items/23100-23199.xml index 5a7f12fbf2..ec932fc0aa 100644 --- a/trunk/dist/game/data/stats/items/23100-23199.xml +++ b/trunk/dist/game/data/stats/items/23100-23199.xml @@ -517,6 +517,7 @@ + diff --git a/trunk/dist/game/data/stats/items/23200-23299.xml b/trunk/dist/game/data/stats/items/23200-23299.xml index 2b32fe5f64..6162b6fda4 100644 --- a/trunk/dist/game/data/stats/items/23200-23299.xml +++ b/trunk/dist/game/data/stats/items/23200-23299.xml @@ -197,6 +197,7 @@ + diff --git a/trunk/dist/game/data/stats/items/23400-23499.xml b/trunk/dist/game/data/stats/items/23400-23499.xml index 0bbdacca1b..7b03e0ecde 100644 --- a/trunk/dist/game/data/stats/items/23400-23499.xml +++ b/trunk/dist/game/data/stats/items/23400-23499.xml @@ -350,6 +350,7 @@ + diff --git a/trunk/dist/game/data/stats/items/23800-23899.xml b/trunk/dist/game/data/stats/items/23800-23899.xml index 831914d1ef..5f49af552f 100644 --- a/trunk/dist/game/data/stats/items/23800-23899.xml +++ b/trunk/dist/game/data/stats/items/23800-23899.xml @@ -103,6 +103,7 @@ + @@ -353,36 +354,43 @@ + + + + + + + diff --git a/trunk/dist/game/data/stats/items/30000-30099.xml b/trunk/dist/game/data/stats/items/30000-30099.xml index 71340da28a..85632b9851 100644 --- a/trunk/dist/game/data/stats/items/30000-30099.xml +++ b/trunk/dist/game/data/stats/items/30000-30099.xml @@ -77,6 +77,7 @@ + @@ -509,6 +510,7 @@ + @@ -572,6 +574,7 @@ + @@ -593,6 +596,7 @@ + @@ -614,6 +618,7 @@ + @@ -635,6 +640,7 @@ + @@ -699,6 +705,7 @@ + @@ -743,6 +750,7 @@ + @@ -787,6 +795,7 @@ + @@ -872,6 +881,7 @@ + @@ -977,6 +987,7 @@ + @@ -1040,6 +1051,7 @@ + @@ -1061,6 +1073,7 @@ + @@ -1150,6 +1163,7 @@ + @@ -1196,6 +1210,7 @@ + @@ -1217,6 +1232,7 @@ + @@ -1238,6 +1254,7 @@ + @@ -1259,6 +1276,7 @@ + @@ -1366,6 +1384,7 @@ + @@ -1493,6 +1512,7 @@ + @@ -1687,6 +1707,7 @@ + @@ -1751,6 +1772,7 @@ + @@ -1772,6 +1794,7 @@ + @@ -1940,6 +1963,7 @@ + @@ -2138,6 +2162,7 @@ + diff --git a/trunk/dist/game/data/stats/items/30100-30199.xml b/trunk/dist/game/data/stats/items/30100-30199.xml index da59ffb6fe..688ba6735d 100644 --- a/trunk/dist/game/data/stats/items/30100-30199.xml +++ b/trunk/dist/game/data/stats/items/30100-30199.xml @@ -14,6 +14,7 @@ + @@ -56,6 +57,7 @@ + @@ -121,6 +123,7 @@ + @@ -227,6 +230,7 @@ + @@ -248,6 +252,7 @@ + @@ -354,6 +359,7 @@ + @@ -442,6 +448,7 @@ + @@ -527,6 +534,7 @@ + @@ -695,6 +703,7 @@ + @@ -805,6 +814,7 @@ + @@ -914,6 +924,7 @@ + @@ -956,6 +967,7 @@ + @@ -1595,6 +1607,7 @@ + @@ -1705,6 +1718,7 @@ + diff --git a/trunk/dist/game/data/stats/items/30200-30299.xml b/trunk/dist/game/data/stats/items/30200-30299.xml index c4c9daa5d5..2700804a75 100644 --- a/trunk/dist/game/data/stats/items/30200-30299.xml +++ b/trunk/dist/game/data/stats/items/30200-30299.xml @@ -187,6 +187,7 @@ + @@ -376,6 +377,7 @@ + @@ -511,6 +513,7 @@ + @@ -1581,6 +1584,7 @@ + @@ -1705,17 +1709,20 @@ + + + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/30300-30399.xml b/trunk/dist/game/data/stats/items/30300-30399.xml index 132dad8c4b..c84f96ef6f 100644 --- a/trunk/dist/game/data/stats/items/30300-30399.xml +++ b/trunk/dist/game/data/stats/items/30300-30399.xml @@ -5,6 +5,7 @@ + @@ -650,6 +651,7 @@ + @@ -669,6 +671,7 @@ + @@ -688,6 +691,7 @@ + @@ -703,6 +707,7 @@ + @@ -721,6 +726,7 @@ + @@ -739,6 +745,7 @@ + diff --git a/trunk/dist/game/data/stats/items/30400-30499.xml b/trunk/dist/game/data/stats/items/30400-30499.xml index 00949f04e5..5b2c40b448 100644 --- a/trunk/dist/game/data/stats/items/30400-30499.xml +++ b/trunk/dist/game/data/stats/items/30400-30499.xml @@ -108,6 +108,7 @@ + @@ -201,6 +202,7 @@ + @@ -208,6 +210,7 @@ + @@ -215,6 +218,7 @@ + @@ -222,6 +226,7 @@ + @@ -229,6 +234,7 @@ + @@ -236,6 +242,7 @@ + diff --git a/trunk/dist/game/data/stats/items/32200-32299.xml b/trunk/dist/game/data/stats/items/32200-32299.xml index 873f4ab997..569b255d57 100644 --- a/trunk/dist/game/data/stats/items/32200-32299.xml +++ b/trunk/dist/game/data/stats/items/32200-32299.xml @@ -450,7 +450,17 @@ - + + + + + + + + + + + @@ -961,6 +971,7 @@ + @@ -982,6 +993,7 @@ + @@ -996,6 +1008,7 @@ + @@ -1003,6 +1016,7 @@ + @@ -1010,5 +1024,6 @@ + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/32300-32399.xml b/trunk/dist/game/data/stats/items/32300-32399.xml index 6770280820..ec2e78c235 100644 --- a/trunk/dist/game/data/stats/items/32300-32399.xml +++ b/trunk/dist/game/data/stats/items/32300-32399.xml @@ -6,6 +6,7 @@ + @@ -13,6 +14,7 @@ + @@ -27,6 +29,7 @@ + @@ -117,12 +120,14 @@ + + diff --git a/trunk/dist/game/data/stats/items/32600-32699.xml b/trunk/dist/game/data/stats/items/32600-32699.xml index 2a4d6d95e0..4b11ecd456 100644 --- a/trunk/dist/game/data/stats/items/32600-32699.xml +++ b/trunk/dist/game/data/stats/items/32600-32699.xml @@ -82,6 +82,7 @@ + @@ -112,6 +113,7 @@ + @@ -787,6 +789,7 @@ + @@ -847,6 +850,7 @@ + @@ -967,6 +971,7 @@ + @@ -1027,6 +1032,7 @@ + @@ -1072,6 +1078,7 @@ + @@ -1087,6 +1094,7 @@ + @@ -1132,6 +1140,7 @@ + @@ -1147,6 +1156,7 @@ + @@ -1387,6 +1397,7 @@ + diff --git a/trunk/dist/game/data/stats/items/32700-32799.xml b/trunk/dist/game/data/stats/items/32700-32799.xml index 8d7d8555d2..237a2709af 100644 --- a/trunk/dist/game/data/stats/items/32700-32799.xml +++ b/trunk/dist/game/data/stats/items/32700-32799.xml @@ -24,11 +24,13 @@ + + @@ -119,6 +121,7 @@ + @@ -246,18 +249,21 @@ + + + @@ -282,6 +288,7 @@ + @@ -300,6 +307,7 @@ + diff --git a/trunk/dist/game/data/stats/items/32800-32899.xml b/trunk/dist/game/data/stats/items/32800-32899.xml index 9fb22102af..647ba42ddf 100644 --- a/trunk/dist/game/data/stats/items/32800-32899.xml +++ b/trunk/dist/game/data/stats/items/32800-32899.xml @@ -202,6 +202,7 @@ + @@ -209,6 +210,7 @@ + @@ -216,6 +218,7 @@ + diff --git a/trunk/dist/game/data/stats/items/33400-33499.xml b/trunk/dist/game/data/stats/items/33400-33499.xml index 978d8e92e5..53e9d95d70 100644 --- a/trunk/dist/game/data/stats/items/33400-33499.xml +++ b/trunk/dist/game/data/stats/items/33400-33499.xml @@ -874,11 +874,13 @@ + + diff --git a/trunk/dist/game/data/stats/items/34600-34699.xml b/trunk/dist/game/data/stats/items/34600-34699.xml index a27ea7e0b0..80cf63737f 100644 --- a/trunk/dist/game/data/stats/items/34600-34699.xml +++ b/trunk/dist/game/data/stats/items/34600-34699.xml @@ -100,6 +100,7 @@ + @@ -309,6 +310,7 @@ + @@ -316,6 +318,7 @@ + @@ -330,6 +333,7 @@ + @@ -351,6 +355,7 @@ + @@ -372,6 +377,7 @@ + @@ -379,6 +385,7 @@ + @@ -397,6 +404,7 @@ + @@ -421,6 +429,7 @@ + diff --git a/trunk/dist/game/data/stats/items/34700-34799.xml b/trunk/dist/game/data/stats/items/34700-34799.xml index 0fdcaa21dd..46a4bad3f9 100644 --- a/trunk/dist/game/data/stats/items/34700-34799.xml +++ b/trunk/dist/game/data/stats/items/34700-34799.xml @@ -44,12 +44,14 @@ + + @@ -68,6 +70,7 @@ + @@ -635,24 +638,28 @@ + + + + @@ -695,6 +702,7 @@ + diff --git a/trunk/dist/game/data/stats/items/34800-34899.xml b/trunk/dist/game/data/stats/items/34800-34899.xml index 56641f4d86..e6f8d6a18b 100644 --- a/trunk/dist/game/data/stats/items/34800-34899.xml +++ b/trunk/dist/game/data/stats/items/34800-34899.xml @@ -264,21 +264,25 @@ + + + + @@ -340,16 +344,19 @@ + + + @@ -382,6 +389,7 @@ + @@ -438,6 +446,7 @@ + diff --git a/trunk/dist/game/data/stats/items/34900-34999.xml b/trunk/dist/game/data/stats/items/34900-34999.xml index cb9f8a935a..30f8a34245 100644 --- a/trunk/dist/game/data/stats/items/34900-34999.xml +++ b/trunk/dist/game/data/stats/items/34900-34999.xml @@ -29,16 +29,19 @@ + + + @@ -321,6 +324,7 @@ + diff --git a/trunk/dist/game/data/stats/items/35100-35199.xml b/trunk/dist/game/data/stats/items/35100-35199.xml index 9b0c03e444..266b9311a3 100644 --- a/trunk/dist/game/data/stats/items/35100-35199.xml +++ b/trunk/dist/game/data/stats/items/35100-35199.xml @@ -1491,6 +1491,7 @@ + @@ -1857,6 +1858,7 @@ + diff --git a/trunk/dist/game/data/stats/items/35200-35299.xml b/trunk/dist/game/data/stats/items/35200-35299.xml index 2394271c1b..dbadcb1e0d 100644 --- a/trunk/dist/game/data/stats/items/35200-35299.xml +++ b/trunk/dist/game/data/stats/items/35200-35299.xml @@ -1107,6 +1107,7 @@ + @@ -1449,6 +1450,7 @@ + @@ -1956,6 +1958,7 @@ + @@ -1973,6 +1976,7 @@ + @@ -1994,6 +1998,7 @@ + @@ -2001,6 +2006,7 @@ + @@ -2008,6 +2014,7 @@ + @@ -2015,5 +2022,6 @@ + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/35300-35399.xml b/trunk/dist/game/data/stats/items/35300-35399.xml index 81891b54fb..074b1f0672 100644 --- a/trunk/dist/game/data/stats/items/35300-35399.xml +++ b/trunk/dist/game/data/stats/items/35300-35399.xml @@ -6,6 +6,7 @@ + @@ -13,6 +14,7 @@ + @@ -20,6 +22,7 @@ + @@ -27,6 +30,7 @@ + @@ -34,6 +38,7 @@ + @@ -41,6 +46,7 @@ + @@ -48,6 +54,7 @@ + @@ -55,6 +62,7 @@ + @@ -62,6 +70,7 @@ + @@ -69,6 +78,7 @@ + @@ -76,6 +86,7 @@ + @@ -83,6 +94,7 @@ + @@ -90,6 +102,7 @@ + @@ -97,6 +110,7 @@ + @@ -104,6 +118,7 @@ + @@ -111,6 +126,7 @@ + @@ -118,6 +134,7 @@ + @@ -125,6 +142,7 @@ + @@ -132,6 +150,7 @@ + @@ -139,6 +158,7 @@ + @@ -146,6 +166,7 @@ + @@ -153,6 +174,7 @@ + @@ -160,6 +182,7 @@ + @@ -167,6 +190,7 @@ + @@ -195,6 +219,7 @@ + @@ -202,6 +227,7 @@ + @@ -216,6 +242,7 @@ + @@ -223,6 +250,7 @@ + @@ -230,6 +258,7 @@ + @@ -237,6 +266,7 @@ + @@ -244,6 +274,7 @@ + @@ -251,6 +282,7 @@ + @@ -258,6 +290,7 @@ + @@ -265,6 +298,7 @@ + @@ -272,6 +306,7 @@ + @@ -279,6 +314,7 @@ + @@ -286,6 +322,7 @@ + @@ -293,6 +330,7 @@ + @@ -300,6 +338,7 @@ + @@ -307,6 +346,7 @@ + @@ -314,6 +354,7 @@ + @@ -321,6 +362,7 @@ + @@ -328,6 +370,7 @@ + @@ -335,6 +378,7 @@ + @@ -342,6 +386,7 @@ + @@ -349,6 +394,7 @@ + @@ -356,6 +402,7 @@ + @@ -363,6 +410,7 @@ + @@ -370,6 +418,7 @@ + @@ -377,6 +426,7 @@ + @@ -384,6 +434,7 @@ + @@ -391,6 +442,7 @@ + @@ -398,6 +450,7 @@ + @@ -405,6 +458,7 @@ + diff --git a/trunk/dist/game/data/stats/items/35400-35499.xml b/trunk/dist/game/data/stats/items/35400-35499.xml index adcf1c599d..b2363cd2c3 100644 --- a/trunk/dist/game/data/stats/items/35400-35499.xml +++ b/trunk/dist/game/data/stats/items/35400-35499.xml @@ -146,6 +146,7 @@ + @@ -153,6 +154,7 @@ + @@ -160,6 +162,7 @@ + @@ -167,6 +170,7 @@ + @@ -174,6 +178,7 @@ + @@ -181,6 +186,7 @@ + @@ -188,6 +194,7 @@ + @@ -195,6 +202,7 @@ + @@ -202,6 +210,7 @@ + @@ -209,6 +218,7 @@ + @@ -216,6 +226,7 @@ + @@ -223,6 +234,7 @@ + @@ -230,6 +242,7 @@ + @@ -237,6 +250,7 @@ + @@ -244,6 +258,7 @@ + @@ -251,6 +266,7 @@ + @@ -258,6 +274,7 @@ + @@ -265,6 +282,7 @@ + @@ -272,6 +290,7 @@ + @@ -279,6 +298,7 @@ + @@ -286,6 +306,7 @@ + @@ -293,6 +314,7 @@ + @@ -300,6 +322,7 @@ + @@ -307,6 +330,7 @@ + @@ -314,6 +338,7 @@ + @@ -321,6 +346,7 @@ + @@ -328,6 +354,7 @@ + @@ -335,6 +362,7 @@ + @@ -342,6 +370,7 @@ + @@ -349,6 +378,7 @@ + @@ -356,6 +386,7 @@ + @@ -363,6 +394,7 @@ + @@ -370,6 +402,7 @@ + @@ -377,6 +410,7 @@ + @@ -384,6 +418,7 @@ + @@ -391,6 +426,7 @@ + @@ -398,6 +434,7 @@ + @@ -405,6 +442,7 @@ + @@ -412,6 +450,7 @@ + @@ -419,6 +458,7 @@ + @@ -426,6 +466,7 @@ + @@ -433,6 +474,7 @@ + @@ -440,6 +482,7 @@ + @@ -447,6 +490,7 @@ + @@ -454,6 +498,7 @@ + @@ -461,6 +506,7 @@ + @@ -468,6 +514,7 @@ + @@ -482,6 +529,7 @@ + @@ -489,6 +537,7 @@ + @@ -496,6 +545,7 @@ + @@ -503,6 +553,7 @@ + @@ -510,6 +561,7 @@ + @@ -517,6 +569,7 @@ + @@ -524,6 +577,7 @@ + @@ -531,6 +585,7 @@ + @@ -538,6 +593,7 @@ + @@ -545,6 +601,7 @@ + @@ -552,6 +609,7 @@ + @@ -559,6 +617,7 @@ + @@ -566,6 +625,7 @@ + @@ -573,6 +633,7 @@ + diff --git a/trunk/dist/game/data/stats/items/35500-35599.xml b/trunk/dist/game/data/stats/items/35500-35599.xml index 444efd6f9b..464b53a41d 100644 --- a/trunk/dist/game/data/stats/items/35500-35599.xml +++ b/trunk/dist/game/data/stats/items/35500-35599.xml @@ -402,6 +402,7 @@ + @@ -410,6 +411,7 @@ + @@ -432,21 +434,25 @@ + + + + @@ -578,6 +584,7 @@ + @@ -686,6 +693,7 @@ + @@ -698,6 +706,7 @@ + @@ -710,6 +719,7 @@ + @@ -722,6 +732,7 @@ + @@ -734,6 +745,7 @@ + @@ -746,6 +758,7 @@ + diff --git a/trunk/dist/game/data/stats/items/35600-35699.xml b/trunk/dist/game/data/stats/items/35600-35699.xml index 33dda8c214..76fa9ebd98 100644 --- a/trunk/dist/game/data/stats/items/35600-35699.xml +++ b/trunk/dist/game/data/stats/items/35600-35699.xml @@ -199,6 +199,7 @@ + @@ -223,6 +224,7 @@ + @@ -235,6 +237,7 @@ + @@ -247,6 +250,7 @@ + @@ -283,6 +287,7 @@ + @@ -295,6 +300,7 @@ + @@ -555,6 +561,7 @@ + @@ -643,16 +650,19 @@ + + + diff --git a/trunk/dist/game/data/stats/items/35700-35799.xml b/trunk/dist/game/data/stats/items/35700-35799.xml index 9051a47e93..7916325ee6 100644 --- a/trunk/dist/game/data/stats/items/35700-35799.xml +++ b/trunk/dist/game/data/stats/items/35700-35799.xml @@ -222,12 +222,14 @@ + + @@ -246,6 +248,7 @@ + @@ -258,24 +261,28 @@ + + + + @@ -299,11 +306,13 @@ + + @@ -320,30 +329,35 @@ + + + + + @@ -360,6 +374,7 @@ + @@ -371,6 +386,7 @@ + @@ -437,6 +453,7 @@ + @@ -485,6 +502,7 @@ + @@ -587,6 +605,7 @@ + diff --git a/trunk/dist/game/data/stats/items/35800-35899.xml b/trunk/dist/game/data/stats/items/35800-35899.xml index 4c4758e8aa..3e1db41d04 100644 --- a/trunk/dist/game/data/stats/items/35800-35899.xml +++ b/trunk/dist/game/data/stats/items/35800-35899.xml @@ -11,6 +11,7 @@ + @@ -191,6 +192,7 @@ + @@ -203,18 +205,21 @@ + + + @@ -233,6 +238,7 @@ + @@ -245,12 +251,14 @@ + + @@ -263,12 +271,14 @@ + + @@ -281,6 +291,7 @@ + @@ -299,6 +310,7 @@ + @@ -323,6 +335,7 @@ + @@ -335,6 +348,7 @@ + @@ -359,6 +373,7 @@ + @@ -407,12 +422,14 @@ + + @@ -539,6 +556,7 @@ + diff --git a/trunk/dist/game/data/stats/items/35900-35999.xml b/trunk/dist/game/data/stats/items/35900-35999.xml index 0120651a9f..beb284e672 100644 --- a/trunk/dist/game/data/stats/items/35900-35999.xml +++ b/trunk/dist/game/data/stats/items/35900-35999.xml @@ -10,6 +10,7 @@ + @@ -20,16 +21,19 @@ + + + @@ -55,11 +59,13 @@ + + @@ -70,23 +76,27 @@ + + + + @@ -105,6 +115,7 @@ + @@ -171,6 +182,7 @@ + diff --git a/trunk/dist/game/data/stats/items/36100-36199.xml b/trunk/dist/game/data/stats/items/36100-36199.xml index 9fe610af50..3eacbb0ae1 100644 --- a/trunk/dist/game/data/stats/items/36100-36199.xml +++ b/trunk/dist/game/data/stats/items/36100-36199.xml @@ -91,6 +91,7 @@ + @@ -271,6 +272,7 @@ + @@ -311,6 +313,7 @@ + @@ -349,6 +352,7 @@ + @@ -421,6 +425,7 @@ + @@ -428,6 +433,7 @@ + @@ -487,16 +493,19 @@ + + + diff --git a/trunk/dist/game/data/stats/items/36200-36299.xml b/trunk/dist/game/data/stats/items/36200-36299.xml index 0d0a745493..0bc79ea33d 100644 --- a/trunk/dist/game/data/stats/items/36200-36299.xml +++ b/trunk/dist/game/data/stats/items/36200-36299.xml @@ -477,12 +477,14 @@ + + @@ -494,6 +496,7 @@ + @@ -509,6 +512,7 @@ + @@ -529,6 +533,7 @@ + @@ -656,36 +661,42 @@ + + + + + + diff --git a/trunk/dist/game/data/stats/items/36300-36399.xml b/trunk/dist/game/data/stats/items/36300-36399.xml index a6acdfb93d..bc9b1785f3 100644 --- a/trunk/dist/game/data/stats/items/36300-36399.xml +++ b/trunk/dist/game/data/stats/items/36300-36399.xml @@ -29,12 +29,14 @@ + + @@ -113,11 +115,13 @@ + + @@ -167,11 +171,13 @@ + + @@ -187,6 +193,7 @@ + @@ -321,6 +328,7 @@ + @@ -469,6 +477,7 @@ + @@ -487,12 +496,14 @@ + + diff --git a/trunk/dist/game/data/stats/items/36500-36599.xml b/trunk/dist/game/data/stats/items/36500-36599.xml index a5782520cd..9c749fd6d5 100644 --- a/trunk/dist/game/data/stats/items/36500-36599.xml +++ b/trunk/dist/game/data/stats/items/36500-36599.xml @@ -268,18 +268,21 @@ + + + @@ -287,6 +290,7 @@ + @@ -294,6 +298,7 @@ + @@ -301,6 +306,7 @@ + @@ -308,6 +314,7 @@ + @@ -322,6 +329,7 @@ + @@ -329,6 +337,7 @@ + @@ -336,6 +345,7 @@ + @@ -343,6 +353,7 @@ + @@ -350,6 +361,7 @@ + @@ -357,6 +369,7 @@ + @@ -364,6 +377,7 @@ + @@ -371,6 +385,7 @@ + @@ -378,6 +393,7 @@ + @@ -392,6 +408,7 @@ + @@ -399,6 +416,7 @@ + @@ -406,6 +424,7 @@ + @@ -413,6 +432,7 @@ + @@ -420,6 +440,7 @@ + @@ -427,6 +448,7 @@ + @@ -441,6 +463,7 @@ + @@ -448,6 +471,7 @@ + @@ -462,6 +486,7 @@ + @@ -469,6 +494,7 @@ + @@ -476,6 +502,7 @@ + @@ -483,6 +510,7 @@ + @@ -497,6 +525,7 @@ + @@ -504,6 +533,7 @@ + @@ -511,6 +541,7 @@ + @@ -518,6 +549,7 @@ + @@ -525,6 +557,7 @@ + @@ -532,6 +565,7 @@ + @@ -539,6 +573,7 @@ + @@ -546,6 +581,7 @@ + @@ -553,6 +589,7 @@ + @@ -567,6 +604,7 @@ + @@ -574,6 +612,7 @@ + @@ -581,6 +620,7 @@ + @@ -588,6 +628,7 @@ + @@ -595,6 +636,7 @@ + @@ -602,6 +644,7 @@ + @@ -609,6 +652,7 @@ + @@ -616,6 +660,7 @@ + @@ -623,6 +668,7 @@ + @@ -671,6 +717,7 @@ + @@ -691,11 +738,13 @@ + + @@ -731,6 +780,7 @@ + @@ -741,11 +791,13 @@ + + diff --git a/trunk/dist/game/data/stats/items/36600-36699.xml b/trunk/dist/game/data/stats/items/36600-36699.xml index 86c30b2d44..fe79518bd7 100644 --- a/trunk/dist/game/data/stats/items/36600-36699.xml +++ b/trunk/dist/game/data/stats/items/36600-36699.xml @@ -571,6 +571,7 @@ + diff --git a/trunk/dist/game/data/stats/items/36700-36799.xml b/trunk/dist/game/data/stats/items/36700-36799.xml index 46fbc35f30..16c4d8116f 100644 --- a/trunk/dist/game/data/stats/items/36700-36799.xml +++ b/trunk/dist/game/data/stats/items/36700-36799.xml @@ -204,6 +204,7 @@ + @@ -218,6 +219,7 @@ + @@ -225,6 +227,7 @@ + @@ -232,6 +235,7 @@ + @@ -239,6 +243,7 @@ + @@ -246,6 +251,7 @@ + @@ -253,6 +259,7 @@ + @@ -260,6 +267,7 @@ + @@ -267,6 +275,7 @@ + @@ -274,6 +283,7 @@ + @@ -281,6 +291,7 @@ + @@ -288,6 +299,7 @@ + @@ -295,6 +307,7 @@ + @@ -302,6 +315,7 @@ + @@ -309,6 +323,7 @@ + @@ -316,6 +331,7 @@ + @@ -323,6 +339,7 @@ + @@ -330,6 +347,7 @@ + @@ -337,6 +355,7 @@ + @@ -344,6 +363,7 @@ + @@ -351,6 +371,7 @@ + @@ -358,6 +379,7 @@ + @@ -365,6 +387,7 @@ + @@ -372,6 +395,7 @@ + @@ -379,6 +403,7 @@ + @@ -386,6 +411,7 @@ + @@ -393,6 +419,7 @@ + @@ -400,6 +427,7 @@ + @@ -407,6 +435,7 @@ + @@ -428,6 +457,7 @@ + @@ -435,6 +465,7 @@ + @@ -442,6 +473,7 @@ + @@ -449,6 +481,7 @@ + @@ -456,6 +489,7 @@ + @@ -463,6 +497,7 @@ + @@ -470,6 +505,7 @@ + @@ -477,6 +513,7 @@ + @@ -484,6 +521,7 @@ + @@ -491,6 +529,7 @@ + @@ -498,6 +537,7 @@ + @@ -505,6 +545,7 @@ + @@ -512,6 +553,7 @@ + @@ -519,6 +561,7 @@ + @@ -526,6 +569,7 @@ + @@ -533,6 +577,7 @@ + @@ -540,6 +585,7 @@ + @@ -547,6 +593,7 @@ + @@ -554,6 +601,7 @@ + @@ -561,6 +609,7 @@ + @@ -568,6 +617,7 @@ + @@ -575,6 +625,7 @@ + @@ -582,6 +633,7 @@ + @@ -589,6 +641,7 @@ + @@ -596,6 +649,7 @@ + @@ -603,6 +657,7 @@ + @@ -610,6 +665,7 @@ + @@ -617,6 +673,7 @@ + @@ -624,6 +681,7 @@ + @@ -645,6 +703,7 @@ + @@ -652,6 +711,7 @@ + @@ -659,6 +719,7 @@ + @@ -666,6 +727,7 @@ + @@ -673,6 +735,7 @@ + @@ -680,5 +743,6 @@ + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/36800-36899.xml b/trunk/dist/game/data/stats/items/36800-36899.xml index 8732be9244..f62332af91 100644 --- a/trunk/dist/game/data/stats/items/36800-36899.xml +++ b/trunk/dist/game/data/stats/items/36800-36899.xml @@ -6,6 +6,7 @@ + @@ -13,6 +14,7 @@ + @@ -20,6 +22,7 @@ + @@ -27,6 +30,7 @@ + @@ -34,6 +38,7 @@ + @@ -41,6 +46,7 @@ + @@ -48,6 +54,7 @@ + @@ -55,6 +62,7 @@ + @@ -69,6 +77,7 @@ + @@ -76,6 +85,7 @@ + @@ -83,6 +93,7 @@ + @@ -90,6 +101,7 @@ + @@ -111,6 +123,7 @@ + @@ -118,6 +131,7 @@ + @@ -125,6 +139,7 @@ + @@ -139,6 +154,7 @@ + @@ -146,6 +162,7 @@ + @@ -153,6 +170,7 @@ + @@ -167,6 +185,7 @@ + @@ -174,6 +193,7 @@ + @@ -181,6 +201,7 @@ + @@ -188,6 +209,7 @@ + @@ -195,6 +217,7 @@ + @@ -202,6 +225,7 @@ + @@ -209,6 +233,7 @@ + @@ -216,6 +241,7 @@ + @@ -223,6 +249,7 @@ + @@ -230,6 +257,7 @@ + @@ -237,6 +265,7 @@ + @@ -244,6 +273,7 @@ + @@ -251,6 +281,7 @@ + @@ -258,6 +289,7 @@ + @@ -265,6 +297,7 @@ + @@ -272,6 +305,7 @@ + @@ -279,6 +313,7 @@ + @@ -286,6 +321,7 @@ + @@ -293,6 +329,7 @@ + @@ -300,6 +337,7 @@ + @@ -307,6 +345,7 @@ + @@ -314,6 +353,7 @@ + @@ -321,6 +361,7 @@ + @@ -328,6 +369,7 @@ + @@ -335,6 +377,7 @@ + @@ -342,6 +385,7 @@ + @@ -349,6 +393,7 @@ + @@ -356,6 +401,7 @@ + @@ -370,6 +416,7 @@ + @@ -391,6 +438,7 @@ + @@ -433,6 +481,7 @@ + @@ -535,6 +584,7 @@ + @@ -553,6 +603,7 @@ + @@ -595,6 +646,7 @@ + @@ -631,6 +683,7 @@ + diff --git a/trunk/dist/game/data/stats/items/36900-36999.xml b/trunk/dist/game/data/stats/items/36900-36999.xml index 6ca2c1720e..edc91c44e2 100644 --- a/trunk/dist/game/data/stats/items/36900-36999.xml +++ b/trunk/dist/game/data/stats/items/36900-36999.xml @@ -101,6 +101,7 @@ + @@ -161,6 +162,7 @@ + @@ -209,6 +211,7 @@ + @@ -221,6 +224,7 @@ + @@ -257,6 +261,7 @@ + @@ -417,24 +422,28 @@ + + + + @@ -447,6 +456,7 @@ + @@ -489,12 +499,14 @@ + + diff --git a/trunk/dist/game/data/stats/items/37000-37099.xml b/trunk/dist/game/data/stats/items/37000-37099.xml index 0d74c377f4..5732eb136e 100644 --- a/trunk/dist/game/data/stats/items/37000-37099.xml +++ b/trunk/dist/game/data/stats/items/37000-37099.xml @@ -47,6 +47,7 @@ + @@ -59,21 +60,25 @@ + + + + @@ -266,6 +271,7 @@ + @@ -273,6 +279,7 @@ + @@ -596,6 +603,7 @@ + @@ -603,6 +611,7 @@ + @@ -610,6 +619,7 @@ + @@ -617,6 +627,7 @@ + @@ -624,6 +635,7 @@ + @@ -631,6 +643,7 @@ + @@ -638,6 +651,7 @@ + @@ -645,6 +659,7 @@ + @@ -652,6 +667,7 @@ + @@ -659,6 +675,7 @@ + @@ -666,6 +683,7 @@ + @@ -673,6 +691,7 @@ + @@ -680,6 +699,7 @@ + @@ -687,6 +707,7 @@ + @@ -694,6 +715,7 @@ + @@ -701,6 +723,7 @@ + @@ -708,6 +731,7 @@ + @@ -715,6 +739,7 @@ + @@ -722,6 +747,7 @@ + @@ -729,6 +755,7 @@ + @@ -792,17 +819,20 @@ + + + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/37100-37199.xml b/trunk/dist/game/data/stats/items/37100-37199.xml index 44697049cf..9f4a1b42cb 100644 --- a/trunk/dist/game/data/stats/items/37100-37199.xml +++ b/trunk/dist/game/data/stats/items/37100-37199.xml @@ -41,12 +41,14 @@ + + diff --git a/trunk/dist/game/data/stats/items/37400-37499.xml b/trunk/dist/game/data/stats/items/37400-37499.xml index 16be7dde1b..e3c0eec85a 100644 --- a/trunk/dist/game/data/stats/items/37400-37499.xml +++ b/trunk/dist/game/data/stats/items/37400-37499.xml @@ -244,6 +244,7 @@ + @@ -696,6 +697,7 @@ + diff --git a/trunk/dist/game/data/stats/items/37500-37599.xml b/trunk/dist/game/data/stats/items/37500-37599.xml index 5ac2c42351..9316a1a7c3 100644 --- a/trunk/dist/game/data/stats/items/37500-37599.xml +++ b/trunk/dist/game/data/stats/items/37500-37599.xml @@ -50,6 +50,7 @@ + @@ -80,6 +81,7 @@ + @@ -95,6 +97,7 @@ + @@ -110,6 +113,7 @@ + @@ -125,6 +129,7 @@ + @@ -155,6 +160,7 @@ + @@ -185,6 +191,7 @@ + @@ -200,6 +207,7 @@ + @@ -215,6 +223,7 @@ + @@ -224,11 +233,13 @@ + + @@ -255,6 +266,7 @@ + @@ -314,11 +326,13 @@ + + @@ -488,12 +502,14 @@ + + diff --git a/trunk/dist/game/data/stats/items/37600-37699.xml b/trunk/dist/game/data/stats/items/37600-37699.xml index 861b903c70..798a053939 100644 --- a/trunk/dist/game/data/stats/items/37600-37699.xml +++ b/trunk/dist/game/data/stats/items/37600-37699.xml @@ -40,6 +40,7 @@ + @@ -76,6 +77,7 @@ + diff --git a/trunk/dist/game/data/stats/items/37700-37799.xml b/trunk/dist/game/data/stats/items/37700-37799.xml index 2e7150c6cd..cb5f39eb7f 100644 --- a/trunk/dist/game/data/stats/items/37700-37799.xml +++ b/trunk/dist/game/data/stats/items/37700-37799.xml @@ -398,6 +398,7 @@ + @@ -477,6 +478,7 @@ + @@ -484,6 +486,7 @@ + @@ -491,6 +494,7 @@ + @@ -519,6 +523,7 @@ + @@ -526,6 +531,7 @@ + @@ -533,6 +539,7 @@ + @@ -540,6 +547,7 @@ + @@ -547,6 +555,7 @@ + @@ -554,6 +563,7 @@ + @@ -575,6 +585,7 @@ + @@ -582,6 +593,7 @@ + @@ -589,6 +601,7 @@ + @@ -613,6 +626,7 @@ + diff --git a/trunk/dist/game/data/stats/items/37800-37899.xml b/trunk/dist/game/data/stats/items/37800-37899.xml index f71ce9c4ab..d745b9cf35 100644 --- a/trunk/dist/game/data/stats/items/37800-37899.xml +++ b/trunk/dist/game/data/stats/items/37800-37899.xml @@ -124,6 +124,7 @@ + @@ -132,6 +133,7 @@ + @@ -140,6 +142,7 @@ + @@ -148,6 +151,7 @@ + @@ -156,6 +160,7 @@ + @@ -164,6 +169,7 @@ + @@ -525,6 +531,7 @@ + @@ -778,6 +785,7 @@ + diff --git a/trunk/dist/game/data/stats/items/37900-37999.xml b/trunk/dist/game/data/stats/items/37900-37999.xml index 651240eae0..6eb90d65e1 100644 --- a/trunk/dist/game/data/stats/items/37900-37999.xml +++ b/trunk/dist/game/data/stats/items/37900-37999.xml @@ -19,6 +19,7 @@ + @@ -460,6 +461,7 @@ + @@ -475,6 +477,7 @@ + @@ -485,6 +488,7 @@ + @@ -510,6 +514,7 @@ + @@ -520,6 +525,7 @@ + @@ -540,6 +546,7 @@ + @@ -550,6 +557,7 @@ + @@ -565,6 +573,7 @@ + @@ -585,16 +594,19 @@ + + + @@ -615,36 +627,43 @@ + + + + + + + @@ -655,11 +674,13 @@ + + @@ -670,11 +691,13 @@ + + @@ -690,20 +713,24 @@ + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/38000-38099.xml b/trunk/dist/game/data/stats/items/38000-38099.xml index d68cbe7ee3..33fdd72e37 100644 --- a/trunk/dist/game/data/stats/items/38000-38099.xml +++ b/trunk/dist/game/data/stats/items/38000-38099.xml @@ -4,11 +4,13 @@ + + @@ -19,6 +21,7 @@ + @@ -29,16 +32,19 @@ + + + @@ -69,16 +75,19 @@ + + + @@ -94,6 +103,7 @@ + @@ -114,36 +124,43 @@ + + + + + + + @@ -159,6 +176,7 @@ + @@ -174,31 +192,37 @@ + + + + + + @@ -274,11 +298,13 @@ + + @@ -289,11 +315,13 @@ + + @@ -304,11 +332,13 @@ + + @@ -324,36 +354,43 @@ + + + + + + + diff --git a/trunk/dist/game/data/stats/items/38100-38199.xml b/trunk/dist/game/data/stats/items/38100-38199.xml index 12d66a4a0a..f21fa80d06 100644 --- a/trunk/dist/game/data/stats/items/38100-38199.xml +++ b/trunk/dist/game/data/stats/items/38100-38199.xml @@ -35,6 +35,7 @@ + @@ -340,6 +341,7 @@ + @@ -440,6 +442,7 @@ + @@ -516,6 +519,7 @@ + @@ -528,6 +532,7 @@ + diff --git a/trunk/dist/game/data/stats/items/38200-38299.xml b/trunk/dist/game/data/stats/items/38200-38299.xml index b01abbe49c..ff5d3b233d 100644 --- a/trunk/dist/game/data/stats/items/38200-38299.xml +++ b/trunk/dist/game/data/stats/items/38200-38299.xml @@ -34,6 +34,7 @@ + @@ -241,31 +242,37 @@ + + + + + + @@ -385,6 +392,7 @@ + @@ -392,6 +400,7 @@ + @@ -399,6 +408,7 @@ + @@ -406,6 +416,7 @@ + @@ -413,6 +424,7 @@ + @@ -420,6 +432,7 @@ + @@ -427,6 +440,7 @@ + @@ -441,6 +455,7 @@ + @@ -448,6 +463,7 @@ + @@ -462,6 +478,7 @@ + @@ -490,6 +507,7 @@ + @@ -518,6 +536,7 @@ + @@ -693,6 +712,7 @@ + diff --git a/trunk/dist/game/data/stats/items/38300-38399.xml b/trunk/dist/game/data/stats/items/38300-38399.xml index df2a83d94a..05029e454d 100644 --- a/trunk/dist/game/data/stats/items/38300-38399.xml +++ b/trunk/dist/game/data/stats/items/38300-38399.xml @@ -97,6 +97,7 @@ + @@ -139,6 +140,7 @@ + @@ -146,6 +148,7 @@ + @@ -153,6 +156,7 @@ + @@ -167,6 +171,7 @@ + @@ -181,6 +186,7 @@ + @@ -209,6 +215,7 @@ + @@ -216,6 +223,7 @@ + @@ -258,6 +266,7 @@ + @@ -265,6 +274,7 @@ + @@ -300,6 +310,7 @@ + @@ -335,6 +346,7 @@ + @@ -342,6 +354,7 @@ + @@ -349,6 +362,7 @@ + @@ -356,6 +370,7 @@ + @@ -363,6 +378,7 @@ + diff --git a/trunk/dist/game/data/stats/items/38500-38599.xml b/trunk/dist/game/data/stats/items/38500-38599.xml index d0635abce5..cf91a4ef0b 100644 --- a/trunk/dist/game/data/stats/items/38500-38599.xml +++ b/trunk/dist/game/data/stats/items/38500-38599.xml @@ -476,16 +476,19 @@ + + + diff --git a/trunk/dist/game/data/stats/items/38800-38899.xml b/trunk/dist/game/data/stats/items/38800-38899.xml index 109068aba6..bf9ea3097e 100644 --- a/trunk/dist/game/data/stats/items/38800-38899.xml +++ b/trunk/dist/game/data/stats/items/38800-38899.xml @@ -899,6 +899,8 @@ + + @@ -909,6 +911,8 @@ + + @@ -919,6 +923,8 @@ + + @@ -929,6 +935,8 @@ + + @@ -949,6 +957,8 @@ + + @@ -959,6 +969,8 @@ + + @@ -969,6 +981,8 @@ + + @@ -979,6 +993,8 @@ + + @@ -999,6 +1015,8 @@ + + @@ -1009,6 +1027,8 @@ + + @@ -1019,6 +1039,8 @@ + + @@ -1029,6 +1051,8 @@ + + @@ -1049,6 +1073,8 @@ + + @@ -1059,6 +1085,8 @@ + + @@ -1069,6 +1097,8 @@ + + @@ -1079,6 +1109,8 @@ + + diff --git a/trunk/dist/game/data/stats/items/38900-38999.xml b/trunk/dist/game/data/stats/items/38900-38999.xml index 0a35587973..c93d00a3b7 100644 --- a/trunk/dist/game/data/stats/items/38900-38999.xml +++ b/trunk/dist/game/data/stats/items/38900-38999.xml @@ -152,6 +152,8 @@ + + @@ -162,6 +164,8 @@ + + @@ -172,6 +176,8 @@ + + @@ -182,6 +188,8 @@ + + diff --git a/trunk/dist/game/data/stats/items/39300-39399.xml b/trunk/dist/game/data/stats/items/39300-39399.xml index f2c91648ca..9f2bfc032e 100644 --- a/trunk/dist/game/data/stats/items/39300-39399.xml +++ b/trunk/dist/game/data/stats/items/39300-39399.xml @@ -372,11 +372,13 @@ + + @@ -393,6 +395,7 @@ + @@ -440,90 +443,105 @@ + + + + + + + + + + + + + + + @@ -536,12 +554,14 @@ + + diff --git a/trunk/dist/game/data/stats/items/39400-39499.xml b/trunk/dist/game/data/stats/items/39400-39499.xml index 4bebaa400b..14f9930bbc 100644 --- a/trunk/dist/game/data/stats/items/39400-39499.xml +++ b/trunk/dist/game/data/stats/items/39400-39499.xml @@ -5,6 +5,7 @@ + @@ -59,6 +60,7 @@ + @@ -131,30 +133,35 @@ + + + + + @@ -167,30 +174,35 @@ + + + + + @@ -203,6 +215,7 @@ + @@ -311,12 +324,14 @@ + + @@ -370,12 +385,14 @@ + + @@ -500,6 +517,7 @@ + @@ -510,6 +528,7 @@ + diff --git a/trunk/dist/game/data/stats/items/39500-39599.xml b/trunk/dist/game/data/stats/items/39500-39599.xml index aea9662dcc..c6943d456f 100644 --- a/trunk/dist/game/data/stats/items/39500-39599.xml +++ b/trunk/dist/game/data/stats/items/39500-39599.xml @@ -322,6 +322,7 @@ + @@ -332,21 +333,25 @@ + + + + @@ -477,6 +482,7 @@ + diff --git a/trunk/dist/game/data/stats/items/39600-39699.xml b/trunk/dist/game/data/stats/items/39600-39699.xml index 811d7d0179..341ae1d0b2 100644 --- a/trunk/dist/game/data/stats/items/39600-39699.xml +++ b/trunk/dist/game/data/stats/items/39600-39699.xml @@ -306,21 +306,25 @@ + + + + @@ -333,138 +337,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/39700-39799.xml b/trunk/dist/game/data/stats/items/39700-39799.xml index cf611f8be8..e9968cc5d6 100644 --- a/trunk/dist/game/data/stats/items/39700-39799.xml +++ b/trunk/dist/game/data/stats/items/39700-39799.xml @@ -254,6 +254,7 @@ + @@ -301,6 +302,7 @@ + diff --git a/trunk/dist/game/data/stats/items/40000-40099.xml b/trunk/dist/game/data/stats/items/40000-40099.xml index eb3139e433..68d37c1bf8 100644 --- a/trunk/dist/game/data/stats/items/40000-40099.xml +++ b/trunk/dist/game/data/stats/items/40000-40099.xml @@ -332,41 +332,49 @@ + + + + + + + + @@ -385,6 +393,7 @@ + @@ -397,6 +406,7 @@ + diff --git a/trunk/dist/game/data/stats/items/40100-40199.xml b/trunk/dist/game/data/stats/items/40100-40199.xml index 3282716e37..c47992f93c 100644 --- a/trunk/dist/game/data/stats/items/40100-40199.xml +++ b/trunk/dist/game/data/stats/items/40100-40199.xml @@ -567,8 +567,17 @@ - - + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/40200-40299.xml b/trunk/dist/game/data/stats/items/40200-40299.xml index d2af008f46..58984d356f 100644 --- a/trunk/dist/game/data/stats/items/40200-40299.xml +++ b/trunk/dist/game/data/stats/items/40200-40299.xml @@ -46,6 +46,7 @@ + @@ -53,6 +54,7 @@ + @@ -75,6 +77,7 @@ + @@ -82,6 +85,7 @@ + @@ -399,6 +403,7 @@ + @@ -423,6 +428,7 @@ + @@ -520,6 +526,7 @@ + diff --git a/trunk/dist/game/data/stats/items/40300-40399.xml b/trunk/dist/game/data/stats/items/40300-40399.xml index 04d250fc3a..8c65f47d38 100644 --- a/trunk/dist/game/data/stats/items/40300-40399.xml +++ b/trunk/dist/game/data/stats/items/40300-40399.xml @@ -58,6 +58,7 @@ + @@ -78,6 +79,7 @@ + @@ -179,6 +181,7 @@ + diff --git a/trunk/dist/game/data/stats/items/45300-45399.xml b/trunk/dist/game/data/stats/items/45300-45399.xml index 1c1ea2b250..16eaebbbf9 100644 --- a/trunk/dist/game/data/stats/items/45300-45399.xml +++ b/trunk/dist/game/data/stats/items/45300-45399.xml @@ -21,6 +21,7 @@ + diff --git a/trunk/dist/game/data/stats/items/45400-45499.xml b/trunk/dist/game/data/stats/items/45400-45499.xml index f2d8472426..2ba6fffdae 100644 --- a/trunk/dist/game/data/stats/items/45400-45499.xml +++ b/trunk/dist/game/data/stats/items/45400-45499.xml @@ -244,6 +244,7 @@ + @@ -257,6 +258,7 @@ + @@ -270,6 +272,7 @@ + @@ -414,26 +417,31 @@ + + + + + @@ -469,6 +477,7 @@ + @@ -497,16 +506,19 @@ + + + @@ -530,6 +542,7 @@ + @@ -546,6 +559,7 @@ + diff --git a/trunk/dist/game/data/stats/npcs/33400-33499.xml b/trunk/dist/game/data/stats/npcs/33400-33499.xml index fcb8fd08db..3629f2f912 100644 --- a/trunk/dist/game/data/stats/npcs/33400-33499.xml +++ b/trunk/dist/game/data/stats/npcs/33400-33499.xml @@ -426,7 +426,7 @@ - + HUMAN @@ -451,7 +451,7 @@ - + HUMAN @@ -1152,7 +1152,7 @@ - + HUMAN diff --git a/trunk/dist/game/data/stats/npcs/33500-33599.xml b/trunk/dist/game/data/stats/npcs/33500-33599.xml index 2bf23b74bf..0247114421 100644 --- a/trunk/dist/game/data/stats/npcs/33500-33599.xml +++ b/trunk/dist/game/data/stats/npcs/33500-33599.xml @@ -700,7 +700,7 @@ - + HUMAN @@ -725,7 +725,7 @@ - + HUMAN @@ -750,7 +750,7 @@ - + HUMAN @@ -775,7 +775,7 @@ - + HUMAN @@ -800,7 +800,7 @@ - + HUMAN @@ -825,7 +825,7 @@ - + HUMAN @@ -850,7 +850,7 @@ - + HUMAN @@ -1275,7 +1275,7 @@ - + HUMAN @@ -1300,7 +1300,7 @@ - + HUMAN diff --git a/trunk/dist/game/data/stats/npcs/33900-33999.xml b/trunk/dist/game/data/stats/npcs/33900-33999.xml index 7249e0ee12..59c9485688 100644 --- a/trunk/dist/game/data/stats/npcs/33900-33999.xml +++ b/trunk/dist/game/data/stats/npcs/33900-33999.xml @@ -832,7 +832,7 @@ - + HUMAN FEMALE diff --git a/trunk/dist/game/data/stats/skills/18100-18199.xml b/trunk/dist/game/data/stats/skills/18100-18199.xml index 1b1b05eb6f..f426490d5a 100644 --- a/trunk/dist/game/data/stats/skills/18100-18199.xml +++ b/trunk/dist/game/data/stats/skills/18100-18199.xml @@ -42,11 +42,29 @@ - - - - + -80344
+ 248099
+ -3501
+ 40195
+ + + + + + + + + + + + + + + + + +
diff --git a/trunk/dist/game/data/stats/skills/22000-22099.xml b/trunk/dist/game/data/stats/skills/22000-22099.xml index b70e9dd856..78a940fd7f 100644 --- a/trunk/dist/game/data/stats/skills/22000-22099.xml +++ b/trunk/dist/game/data/stats/skills/22000-22099.xml @@ -1021,12 +1021,11 @@
- - - -84200 46915 9723 -45208 115158 -80831 -12728 15633 17860 83378 105760 111388 82916 85289 117052 146818 147922 43840 87326
- 244566 51441 15576 -112502 -178170 149808 122726 142962 170191 147999 113064 219331 53210 16225 76884 25807 -55316 -47779 -143370
- -3728 -2976 -4568 -240 -880 -3040 -3112 -2696 -3496 -3400 -3176 -3544 -1488 -3672 -2688 -2008 -2728 -792 -1319
- 20372 20373 20374 20375 20376 20377 20378 20379 20380 20381 20382 20383 20384 20385 20386 20387 20388 20389 20390
+ + -113980
+ 255728
+ -1499
+ 32226
@@ -1039,9 +1038,6 @@ - - - diff --git a/trunk/dist/game/data/xsd/items.xsd b/trunk/dist/game/data/xsd/items.xsd index f29e549124..4cf77235e7 100644 --- a/trunk/dist/game/data/xsd/items.xsd +++ b/trunk/dist/game/data/xsd/items.xsd @@ -67,6 +67,9 @@ + + + diff --git a/trunk/dist/game/data/xsd/zones.xsd b/trunk/dist/game/data/xsd/zones.xsd index 962ba7794c..befc6e94e3 100644 --- a/trunk/dist/game/data/xsd/zones.xsd +++ b/trunk/dist/game/data/xsd/zones.xsd @@ -150,7 +150,6 @@ - diff --git a/trunk/dist/game/data/zones/battalion.xml b/trunk/dist/game/data/zones/battalion.xml deleted file mode 100644 index ecd4e316e7..0000000000 --- a/trunk/dist/game/data/zones/battalion.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/trunk/dist/tools/sql/game/auction_house.sql b/trunk/dist/tools/sql/game/auction_house.sql deleted file mode 100644 index 96433e2797..0000000000 --- a/trunk/dist/tools/sql/game/auction_house.sql +++ /dev/null @@ -1,13 +0,0 @@ -CREATE TABLE IF NOT EXISTS `auction_house` ( - `auctionID` int(11) NOT NULL DEFAULT '0', - `sellerID` int(11) NOT NULL DEFAULT '0', - `itemName` varchar(50) DEFAULT NULL, - `itemOID` int(11) NOT NULL, - `price` bigint(20) NOT NULL, - `count` bigint(20) unsigned NOT NULL DEFAULT '0', - `category` int(3) NOT NULL, - `duration` int(11) NOT NULL, - `finishTime` bigint(13) NOT NULL, - `itemID` int(13) NOT NULL, - PRIMARY KEY (`sellerID`,`auctionID`) -); \ No newline at end of file diff --git a/trunk/dist/tools/sql/game/commission_items.sql b/trunk/dist/tools/sql/game/commission_items.sql new file mode 100644 index 0000000000..191d8e3377 --- /dev/null +++ b/trunk/dist/tools/sql/game/commission_items.sql @@ -0,0 +1,8 @@ +CREATE TABLE IF NOT EXISTS `commission_items` ( + `commission_id` BIGINT NOT NULL AUTO_INCREMENT, + `item_object_id` INT NOT NULL, + `price_per_unit` BIGINT NOT NULL, + `start_time` TIMESTAMP NOT NULL, + `duration_in_days` TINYINT NOT NULL, + PRIMARY KEY (`commission_id`) +) ENGINE=InnoDB; diff --git a/trunk/dist/tools/sql/game/items.sql b/trunk/dist/tools/sql/game/items.sql index a79b46b0ce..45ad0ecf48 100644 --- a/trunk/dist/tools/sql/game/items.sql +++ b/trunk/dist/tools/sql/game/items.sql @@ -4,7 +4,7 @@ CREATE TABLE IF NOT EXISTS `items` ( `item_id` INT, `count` BIGINT UNSIGNED NOT NULL DEFAULT 0, `enchant_level` INT, - `loc` VARCHAR(13), -- inventory,paperdoll,npc,clan warehouse,pet,and so on + `loc` VARCHAR(10), -- inventory,paperdoll,npc,clan warehouse,pet,and so on `loc_data` INT, -- depending on location: equiped slot,npc id,pet id,etc `time_of_use` INT, -- time of item use, for calculate of breackages `custom_type1` INT DEFAULT 0, diff --git a/trunk/java/com/l2jserver/Config.java b/trunk/java/com/l2jserver/Config.java index a9d9f85c00..cd75cfd489 100644 --- a/trunk/java/com/l2jserver/Config.java +++ b/trunk/java/com/l2jserver/Config.java @@ -849,24 +849,6 @@ public final class Config public static float PREMIUM_RATE_SPOIL_AMOUNT; public static Map PREMIUM_RATE_DROP_CHANCE_BY_ID; public static Map PREMIUM_RATE_DROP_AMOUNT_BY_ID; - public static boolean BTZ_PVP_ENABLED; - public static int[][] BTZ_SPAWN_LOCATIONS; - public static int BTZ_REVIVE_DELAY; - public static boolean BTZ_REVIVE; - public static boolean BTZ_GIVE_NOBLES; - public static List BTZ_ITEMS = new ArrayList<>(); - public static List BTZ_CLASSES = new ArrayList<>(); - public static List BTZ_GRADES = new ArrayList<>(); - public static int BTZ_RADIUS; - public static int BTZ_ENCHANT; - public static boolean BTZ_RESTART_ZONE; - public static boolean BTZ_STORE_ZONE; - public static boolean BTZ_LOGOUT_ZONE; - public static boolean BTZ_REVIVE_NOBLESS; - public static boolean BTZ_REVIVE_HEAL; - public static boolean BTZ_REMOVE_BUFFS; - public static boolean BTZ_REMOVE_PETS; - public static List BTZ_REWARDS; public static boolean PC_BANG_ENABLED; public static int PC_BANG_MAX_POINTS; public static boolean PC_BANG_ENABLE_DOUBLE_POINTS; @@ -2699,71 +2681,6 @@ public final class Config } } - BTZ_PVP_ENABLED = CustomSettings.getBoolean("BTZEnablePvP", false); - BTZ_SPAWN_LOCATIONS = parseZonesList(CustomSettings.getString("BTZSpawnLoc", "150111,144740,-12248")); - BTZ_REVIVE_DELAY = CustomSettings.getInt("BTZReviveDelay", 10); - if (BTZ_REVIVE_DELAY != 0) - { - BTZ_REVIVE = true; - } - BTZ_GIVE_NOBLES = CustomSettings.getBoolean("BTZGiveNoblesse", false); - tempString = CustomSettings.getString("BTZItems", "").split(","); - if (tempString.length != 0) - { - for (String i : tempString) - { - BTZ_ITEMS.add(i); - } - } - tempString = CustomSettings.getString("BTZGrades", "").split(","); - if (tempString.length != 0) - { - for (String i : tempString) - { - if (i.equals("D") || i.equals("C") || i.equals("B") || i.equals("A") || i.equals("S") || i.equals("S80") || i.equals("S84") || i.equals("R") || i.equals("R95") || i.equals("R99")) - { - BTZ_GRADES.add(i); - } - } - } - tempString = CustomSettings.getString("BTZClasses", "").split(","); - if (tempString.length != 0) - { - for (String i : tempString) - { - BTZ_CLASSES.add(i); - } - } - BTZ_RADIUS = CustomSettings.getInt("BTZRespawnRadius", 500); - BTZ_ENCHANT = CustomSettings.getInt("BTZEnchant", 0); - BTZ_REMOVE_BUFFS = CustomSettings.getBoolean("BTZRemoveBuffs", false); - BTZ_REMOVE_PETS = CustomSettings.getBoolean("BTZRemovePets", false); - BTZ_RESTART_ZONE = CustomSettings.getBoolean("BTZRestartZone", false); - BTZ_STORE_ZONE = CustomSettings.getBoolean("BTZStoreZone", false); - BTZ_LOGOUT_ZONE = CustomSettings.getBoolean("BTZLogoutZone", false); - BTZ_REVIVE_NOBLESS = CustomSettings.getBoolean("BTZReviveNoblesse", false); - BTZ_REVIVE_HEAL = CustomSettings.getBoolean("BTZReviveHeal", false); - BTZ_REWARDS = new ArrayList<>(); - tempString = CustomSettings.getString("BTZRewards", "57,100000").split(";"); - for (String reward : tempString) - { - String[] rewardSplit = reward.split(","); - if (rewardSplit.length == 2) - { - try - { - BTZ_REWARDS.add(new int[] - { - Integer.parseInt(rewardSplit[0]), - Integer.parseInt(rewardSplit[1]) - }); - } - catch (NumberFormatException nfe) - { - } - } - } - PC_BANG_ENABLED = CustomSettings.getBoolean("Enabled", false); PC_BANG_MAX_POINTS = CustomSettings.getInt("MaxPcBangPoints", 200000); if (PC_BANG_MAX_POINTS < 0) @@ -4138,55 +4055,6 @@ public final class Config return result; } - private static int[][] parseZonesList(String line) - { - final String[] propertySplit = line.split(";"); - if (propertySplit.length == 0) - { - return null; - } - - int i = 0; - String[] valueSplit; - final int[][] result = new int[propertySplit.length][]; - for (String value : propertySplit) - { - valueSplit = value.split(","); - if (valueSplit.length != 3) - { - return null; - } - - result[i] = new int[3]; - try - { - result[i][0] = Integer.parseInt(valueSplit[0]); - } - catch (NumberFormatException e) - { - return null; - } - try - { - result[i][1] = Integer.parseInt(valueSplit[1]); - } - catch (NumberFormatException e) - { - return null; - } - try - { - result[i][2] = Integer.parseInt(valueSplit[2]); - } - catch (NumberFormatException e) - { - return null; - } - i++; - } - return result; - } - private static class IPConfigData implements IXmlReader { private static final List _subnets = new ArrayList<>(5); diff --git a/trunk/java/com/l2jserver/gameserver/GameServer.java b/trunk/java/com/l2jserver/gameserver/GameServer.java index b2ed8f41c0..965d2a1630 100644 --- a/trunk/java/com/l2jserver/gameserver/GameServer.java +++ b/trunk/java/com/l2jserver/gameserver/GameServer.java @@ -98,7 +98,6 @@ import com.l2jserver.gameserver.handler.EffectHandler; import com.l2jserver.gameserver.idfactory.IdFactory; import com.l2jserver.gameserver.instancemanager.AirShipManager; import com.l2jserver.gameserver.instancemanager.AntiFeedManager; -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager; import com.l2jserver.gameserver.instancemanager.BoatManager; import com.l2jserver.gameserver.instancemanager.CHSiegeManager; import com.l2jserver.gameserver.instancemanager.CastleManager; @@ -106,6 +105,7 @@ import com.l2jserver.gameserver.instancemanager.CastleManorManager; import com.l2jserver.gameserver.instancemanager.ClanEntryManager; import com.l2jserver.gameserver.instancemanager.ClanHallAuctionManager; import com.l2jserver.gameserver.instancemanager.ClanHallManager; +import com.l2jserver.gameserver.instancemanager.CommissionManager; import com.l2jserver.gameserver.instancemanager.CoupleManager; import com.l2jserver.gameserver.instancemanager.CursedWeaponsManager; import com.l2jserver.gameserver.instancemanager.DayNightSpawnManager; @@ -241,7 +241,7 @@ public final class GameServer FishingMonstersData.getInstance(); FishingRodsData.getInstance(); HennaData.getInstance(); - AuctionHouseManager.getInstance(); + CommissionManager.getInstance(); PrimeShopData.getInstance(); AppearanceItemData.getInstance(); diff --git a/trunk/java/com/l2jserver/gameserver/enums/ItemLocation.java b/trunk/java/com/l2jserver/gameserver/enums/ItemLocation.java index 2c161ba007..f42be49490 100644 --- a/trunk/java/com/l2jserver/gameserver/enums/ItemLocation.java +++ b/trunk/java/com/l2jserver/gameserver/enums/ItemLocation.java @@ -31,5 +31,5 @@ public enum ItemLocation REFUND, MAIL, FREIGHT, - AUCTION_HOUSE + COMMISSION } diff --git a/trunk/java/com/l2jserver/gameserver/enums/MailType.java b/trunk/java/com/l2jserver/gameserver/enums/MailType.java index 8b359dba74..885c1f4295 100644 --- a/trunk/java/com/l2jserver/gameserver/enums/MailType.java +++ b/trunk/java/com/l2jserver/gameserver/enums/MailType.java @@ -27,7 +27,7 @@ public enum MailType NEWS_INFORMER, NPC, BIRTHDAY, - SYSTEM, + COMMISSION_ITEM_RETURNED, COMMISSION_ITEM_SOLD, MENTOR_NPC, PRIME_SHOP_GIFT diff --git a/trunk/java/com/l2jserver/gameserver/instancemanager/AuctionHouseManager.java b/trunk/java/com/l2jserver/gameserver/instancemanager/AuctionHouseManager.java deleted file mode 100644 index 26936b34d9..0000000000 --- a/trunk/java/com/l2jserver/gameserver/instancemanager/AuctionHouseManager.java +++ /dev/null @@ -1,855 +0,0 @@ -/* - * Copyright (C) 2004-2015 L2J Server - * - * This file is part of L2J Server. - * - * L2J Server is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * L2J Server is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jserver.gameserver.instancemanager; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.util.HashMap; -import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.logging.Level; -import java.util.logging.Logger; - -import com.l2jserver.L2DatabaseFactory; -import com.l2jserver.gameserver.enums.MailType; -import com.l2jserver.gameserver.model.entity.Message; -import com.l2jserver.gameserver.model.items.L2Item; -import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; -import com.l2jserver.gameserver.network.SystemMessageId; - -/** - * @author Erlandys - */ -public class AuctionHouseManager -{ - Connection con = null; - private static final Logger _log = Logger.getLogger(AuctionHouseManager.class.getName()); - private static List auctions = new CopyOnWriteArrayList<>(); - private static HashMap convertedCategories; - private static HashMap mainCategories; - - public AuctionHouseManager() - { - _log.info(getClass().getSimpleName() + ": Initializing."); - loadCategoryConverter(); - loadMainCategoriesConverter(); - _log.info(getClass().getSimpleName() + ": Loaded " + mainCategories.size() + " Auction Sections."); - load(); - _log.info(getClass().getSimpleName() + ": Loaded " + auctions.size() + " Auctions."); - } - - private void load() - { - auctions.clear(); - int auctionID = 0; - int sellerID = 0; - int count = 0; - int category = 0; - int duration = 0; - int itemOID = 0; - int itemID = 0; - long price = 0; - long finishTime = 0; - String itemName = ""; - try (Connection con = L2DatabaseFactory.getInstance().getConnection(); - PreparedStatement statement = con.prepareStatement("SELECT * FROM auction_house");) - { - ResultSet rset = statement.executeQuery(); - while (rset.next()) - { - auctionID = (rset.getInt("auctionID")); - sellerID = (rset.getInt("sellerID")); - itemName = (rset.getString("itemName")); - itemOID = (rset.getInt("itemOID")); - price = (rset.getLong("price")); - count = (rset.getInt("count")); - category = (rset.getInt("category")); - duration = (rset.getInt("duration")); - finishTime = (rset.getLong("finishTime")); - itemID = (rset.getInt("itemID")); - L2ItemInstance item = new L2ItemInstance(itemOID, itemID); - createAuction(auctionID, sellerID, itemOID, item, itemName, price, count, duration, finishTime, category); - } - statement.execute(); - - rset.close(); - statement.close(); - } - catch (Exception e) - { - System.out.println("Failed loading auction. " + e); - } - } - - public void insertAuction(Auctions auction) - { - try (Connection con = L2DatabaseFactory.getInstance().getConnection(); - PreparedStatement statement = con.prepareStatement("INSERT INTO auction_house (auctionID, sellerID, itemName, itemOID, price, count, category, duration, finishTime, itemID) values (?,?,?,?,?,?,?,?,?,?)");) - { - statement.setInt(1, auction.getAuctionId()); - statement.setInt(2, auction.getPlayerID()); - statement.setString(3, auction.getItemName()); - statement.setInt(4, auction.getItemOID()); - statement.setLong(5, auction.getPrice()); - statement.setLong(6, auction.getCount()); - statement.setInt(7, auction.getCategory()); - statement.setInt(8, auction.getDuration()); - statement.setLong(9, auction.getFinishTime()); - statement.setInt(10, auction.getItem().getId()); - statement.executeUpdate(); - statement.close(); - } - catch (Exception e) - { - _log.log(Level.SEVERE, "Could not insert auction: " + e.getMessage(), e); - } - } - - public void removeAuction(int auctionID) - { - try (Connection con = L2DatabaseFactory.getInstance().getConnection(); - PreparedStatement statement = con.prepareStatement("DELETE FROM auction_house WHERE auctionID=?");) - { - - statement.setInt(1, auctionID); - statement.executeUpdate(); - statement.close(); - } - catch (Exception e) - { - _log.log(Level.SEVERE, "Could not delete auction: " + e.getMessage(), e); - } - } - - private void loadCategoryConverter() - { - convertedCategories = new HashMap<>(); - - convertedCategories.put(4294967, 1); - convertedCategories.put(8589934, 2); - convertedCategories.put(12884901, 3); - convertedCategories.put(17179869, 4); - convertedCategories.put(21474836, 5); - convertedCategories.put(25769803, 6); - convertedCategories.put(30064771, 7); - convertedCategories.put(34359738, 8); - convertedCategories.put(38654705, 9); - convertedCategories.put(42949672, 10); - convertedCategories.put(47244640, 11); - convertedCategories.put(51539607, 12); - convertedCategories.put(55834574, 13); - convertedCategories.put(60129542, 14); - convertedCategories.put(64424509, 15); - convertedCategories.put(68719476, 16); - convertedCategories.put(73014444, 17); - convertedCategories.put(77309411, 18); - - convertedCategories.put(81604378, 19); - convertedCategories.put(85899345, 20); - convertedCategories.put(90194313, 21); - convertedCategories.put(94489280, 22); - convertedCategories.put(98784247, 23); - convertedCategories.put(103079215, 24); - convertedCategories.put(107374182, 25); - convertedCategories.put(111669149, 26); - convertedCategories.put(115964116, 27); - convertedCategories.put(120259084, 28); - convertedCategories.put(124554051, 29); - convertedCategories.put(128849018, 30); - convertedCategories.put(133143986, 31); - convertedCategories.put(137438953, 32); - convertedCategories.put(141733920, 33); - convertedCategories.put(146028888, 34); - - convertedCategories.put(150323855, 35); - convertedCategories.put(154618822, 36); - convertedCategories.put(158913789, 37); - convertedCategories.put(163208757, 38); - convertedCategories.put(167503724, 39); - convertedCategories.put(171798691, 40); - - convertedCategories.put(180388626, 41); - convertedCategories.put(184683593, 42); - - convertedCategories.put(188978561, 43); - convertedCategories.put(193273528, 44); - convertedCategories.put(197568495, 45); - convertedCategories.put(201863462, 46); - convertedCategories.put(206158430, 47); - convertedCategories.put(210453397, 48); - convertedCategories.put(214748364, 49); - convertedCategories.put(219043332, 50); - convertedCategories.put(223338299, 51); - convertedCategories.put(227633266, 52); - convertedCategories.put(231928233, 53); - convertedCategories.put(236223201, 54); - convertedCategories.put(240518168, 55); - convertedCategories.put(244813135, 56); - convertedCategories.put(249108103, 57); - convertedCategories.put(253403070, 58); - } - - private void loadMainCategoriesConverter() - { - mainCategories = new HashMap<>(); - - mainCategories.put(4294967, 61); - mainCategories.put(8589934, 62); - mainCategories.put(12884901, 63); - mainCategories.put(17179869, 64); - mainCategories.put(21474836, 65); - } - - public int getClientCategory(int category) - { - if (convertedCategories.get(category) != null) - { - return convertedCategories.get(category); - } - return -1; - } - - public int getMainClientCategory(int category) - { - if (mainCategories.get(category) != null) - { - return mainCategories.get(category); - } - return -1; - } - - public void createAuction(int auctionID, int playerOID, int itemOID, L2ItemInstance item, String itemName, long price, long count, int duration, long finishTime, int category) - { - auctions.add(new Auctions(auctionID, itemName, itemOID, item, price, count, duration, playerOID, finishTime, category)); - } - - public void deleteAuction(long auctionID) - { - for (int i = 0; i < auctions.size(); i++) - { - if (auctions.get(i).getAuctionId() == auctionID) - { - deleteItemFromPlayer(auctions.get(i).getItemOID(), auctions.get(i).getPlayerID()); - removeAuction(auctions.get(i).getAuctionId()); - auctions.remove(i); - } - } - } - - public void deleteItemFromPlayer(int playerID, int itemOID) - { - try (Connection con = L2DatabaseFactory.getInstance().getConnection(); - PreparedStatement statement = con.prepareStatement("DELETE FROM items WHERE owner_id=? AND object_id=? AND loc='AUCTION_HOUSE'");) - { - statement.setInt(1, playerID); - statement.setInt(2, itemOID); - statement.executeUpdate(); - statement.close(); - } - catch (Exception e) - { - _log.log(Level.SEVERE, "Could not delete auction: " + e.getMessage(), e); - } - } - - public void checkForAuctionsDeletion() - { - int i = 0; - if (!auctions.isEmpty()) - { - for (Auctions auction : auctions) - { - if ((System.currentTimeMillis() / 1000) >= auction.getFinishTime()) - { - Message msg = new Message(auction.getPlayerID(), "CommissionBuyTitle", "Auction Manager", SystemMessageId.THE_REGISTRATION_PERIOD_FOR_THE_ITEM_YOU_REGISTERED_HAS_EXPIRED.getId(), SystemMessageId.THE_AUCTION_HOUSE_REGISTRATION_PERIOD_HAS_EXPIRED_AND_THE_CORRESPONDING_ITEM_IS_BEING_FORWARDED.getId(), MailType.SYSTEM); - msg.createAttachments().addItem("DeleteAuction", auction.getItem().getId(), auction.getCount(), null, null); - MailManager.getInstance().sendMessage(msg); - removeAuction(auction.getAuctionId()); - deleteItemFromPlayer(auction.getItemOID(), auction.getPlayerID()); - auctions.remove(i); - } - i++; - } - } - } - - public Auctions getAuctionById(int id) - { - for (Auctions auction : auctions) - { - if (auction.getAuctionId() == id) - { - return auction; - } - } - - return null; - } - - public Auctions getAuctionById(long id) - { - for (Auctions auction : auctions) - { - if (auction.getAuctionId() == id) - { - return auction; - } - } - - return null; - } - - public int getAuctionsSizeById(int grade, String search) - { - int i = 0; - for (Auctions auction : auctions) - { - if (grade == -1) - { - if (auction.getItem().getName().contains(search)) - { - i++; - } - } - if (grade != -1) - { - if ((grade == auction.getItem().getItem().getCrystalType().getId()) && auction.getItem().getName().contains(search)) - { - i++; - } - } - } - return i; - } - - public int getAuctionsSizeById(long id, int grade, String search) - { - int ids[][] = - { - //@formatter:off - {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}, - {19, 20, 21, 22, 23, 24, 25, 26, 27, 28}, - {29, 30, 31, 32, 33, 34}, - {35, 36, 37, 38, 39, 40}, - {41, 42}, - {43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58} - //@formatter:on - }; - int i = 0; - int IDS[] = null; - if (id == 61) - { - IDS = ids[1]; - } - else if (id == 62) - { - IDS = ids[2]; - } - else if (id == 63) - { - IDS = ids[3]; - } - else if (id == 64) - { - IDS = ids[4]; - } - else if (id == 65) - { - IDS = ids[5]; - } - else if (id == 101) - { - IDS = ids[0]; - } - - if ((((id > 60) && (id < 66)) || (id == 101)) && (IDS != null)) - { - for (int ID : IDS) - { - for (Auctions auction : auctions) - { - if ((grade == -1) && search.equals("")) - { - if (auction.getCategory() == ID) - { - i++; - } - } - else - { - if (grade != -1) - { - if (search.equals("")) - { - if ((auction.getCategory() == ID) && (grade == auction.getItem().getItem().getCrystalType().getId())) - { - i++; - } - } - if (!search.equals("")) - { - if ((auction.getCategory() == ID) && (grade == auction.getItem().getItem().getCrystalType().getId()) && auction.getItem().getName().contains(search)) - { - i++; - } - } - } - else if (!search.equals("")) - { - if ((auction.getCategory() == ID) && auction.getItem().getName().contains(search)) - { - i++; - } - } - } - } - } - } - else - { - for (Auctions auction : auctions) - { - if ((grade == -1) && search.equals("")) - { - if (auction.getCategory() == id) - { - i++; - } - } - else - { - if (grade != -1) - { - if (search.equals("")) - { - if ((auction.getCategory() == id) && (grade == auction.getItem().getItem().getCrystalType().getId())) - { - i++; - } - } - if (!search.equals("")) - { - if ((auction.getCategory() == id) && (grade == auction.getItem().getItem().getCrystalType().getId()) && auction.getItem().getName().contains(search)) - { - i++; - } - } - } - else if (!search.equals("")) - { - if ((auction.getCategory() == id) && auction.getItem().getName().contains(search)) - { - i++; - } - } - } - } - } - - return i; - } - - public int getCategoryByItem(L2ItemInstance item) - { - final String itemName = item.getName().toLowerCase(); - - if (item.isWeapon()) - { - if (item.getItem().isPetItem()) - { - return 41; // Pet Equipment - } - - switch (item.getWeaponItem().getItemType()) - { - case SWORD: - { - if (item.getWeaponItem().getBodyPart() == L2Item.SLOT_LR_HAND) - { - return 5; // 2-H Sword - } - - if (item.getWeaponItem().isMagicWeapon()) - { - return 2; // 1-H Magic Sword - } - - return 1; // 1-H Sword - } - case DAGGER: - { - return 3; // Dagger - } - case RAPIER: - { - return 4; // Rapier - } - case ANCIENTSWORD: - { - return 6; // Ancient - } - case DUAL: - { - return 7; // Dual Swords - } - case DUALDAGGER: - { - return 8; // Dual Daggers - } - case BLUNT: - { - if (item.getWeaponItem().getBodyPart() == L2Item.SLOT_LR_HAND) - { - if (item.getWeaponItem().isMagicWeapon()) - { - return 12; // 2-H Magic Blunt - } - - return 11; // 2-H Blunt - } - - if (item.getWeaponItem().isMagicWeapon()) - { - return 10; // 1-H Magic Blunt - } - - return 9; // 1-H Blunt - } - case DUALBLUNT: - { - return 13; // Dual Blunt - } - case BOW: - { - return 14; // Bow - } - case CROSSBOW: - { - return 15; // Crossbow - } - case DUALFIST: - { - return 16; // Fist Weapon - } - case POLE: - { - return 17; // Spear - } - default: - { - return 18; // Other Weapon - } - } - } - else if (item.isArmor()) - { - if (item.getItem().isPetItem()) - { - return 41; // Pet Equipment - } - - switch (item.getArmorItem().getBodyPart()) - { - case L2Item.SLOT_HEAD: - { - return 19; // Helmet - } - case L2Item.SLOT_CHEST: - { - return 20; // Armor Top - } - case L2Item.SLOT_LEGS: - { - return 21; // Armor Pants - } - case L2Item.SLOT_FULL_ARMOR: - case L2Item.SLOT_ALLDRESS: - { - return 22; // Full Body - } - case L2Item.SLOT_GLOVES: - { - return 23; // Gloves - } - case L2Item.SLOT_FEET: - { - return 24; // Feet - } - case L2Item.SLOT_L_HAND: - { - if (itemName.contains("sigil")) - { - return 26; // Sigil - } - - return 25; // Shield - } - case L2Item.SLOT_UNDERWEAR: - { - return 27; // Underwear - } - case L2Item.SLOT_BACK: - { - return 28; // Cloak - } - } - } - else if (item.isEtcItem()) - { - // Accessory - switch (item.getEtcItem().getBodyPart()) - { - case L2Item.SLOT_R_FINGER: - case L2Item.SLOT_L_FINGER: - case L2Item.SLOT_LR_FINGER: - { - return 29; // Ring - } - case L2Item.SLOT_R_EAR: - case L2Item.SLOT_L_EAR: - case L2Item.SLOT_LR_EAR: - { - return 30; // Earring - } - case L2Item.SLOT_NECK: - { - return 31; // Necklace - } - case L2Item.SLOT_BELT: - { - return 32; // Belt - } - case L2Item.SLOT_R_BRACELET: - case L2Item.SLOT_L_BRACELET: - { - return 33; // Bracelet - } - case L2Item.SLOT_HAIR: - case L2Item.SLOT_HAIR2: - case L2Item.SLOT_HAIRALL: - { - return 34; // Hair Accessory - } - } - - // Supplies - if (item.getEtcItem().isPotion() || item.getEtcItem().isElixir()) - { - return 35; // Potion - } - - if (item.getEtcItem().getHandlerName() != null) - { - switch (item.getEtcItem().getHandlerName()) - { - case "EnchantScrolls": - { - if (itemName.contains("weapon")) - { - return 36; // Scroll: Enchant Weapon - } - - if (itemName.contains("armor")) - { - return 37; // Scroll: Enchant Armor - } - } - case "SoulShots": - { - return 39; // Soulshot - } - case "SpiritShot": - { - return 40; // SpiritShot - } - case "PetFood": - case "BeastSoulShot": - case "BeastSpiritShot": - case "SummonItems": - { - return 42; // Pet Supplies - } - } - } - - if (itemName.contains("scroll")) - { - return 38; // Scroll: Other - } - - // Misc - if (itemName.contains("crystal") && itemName.contains("-grade")) - { - return 43; // Crystal - } - if (itemName.contains("recipe")) - { - return 44; // Recipe - } - if (itemName.contains("life stone")) - { - return 46; // Life Stone - } - if (itemName.contains("soul crystal")) - { - return 47; // Soul Crystal - } - if (itemName.contains("stone") && (itemName.contains("fire") || itemName.contains("water") || itemName.contains("earth") || itemName.contains("wind") || itemName.contains("dark") || itemName.contains("holy"))) - { - return 48; // Attribute Stone - } - if (itemName.contains("weapon") && itemName.contains("enchant") && itemName.contains("stone")) - { - return 49; // Weapon Enchant Stone - } - if (itemName.contains("armor") && itemName.contains("enchant") && itemName.contains("stone")) - { - return 50; // Armor Enchant Stone - } - if (itemName.contains("spellbook") || itemName.contains("forgotten scroll")) - { - return 51; // Spellbook - } - if (itemName.contains("gemstone") && itemName.contains("-grade")) - { - return 52; // Gemstone - } - if (itemName.contains("magic pouch")) - { - return 53; // Pouch - } - if (itemName.contains("magic pin")) - { - return 54; // Pin - } - if (itemName.contains("magic rune clip")) - { - return 55; // Magic Rune Clip - } - if (itemName.contains("magic ornament")) - { - return 56; // Magic Ornament - } - if (itemName.contains("dye") && (itemName.contains("str") || itemName.contains("dex") || itemName.contains("con") || itemName.contains("int") || itemName.contains("wit") || itemName.contains("men") || itemName.contains("luc") || itemName.contains("cha"))) - { - return 57; // Dye - } - if (itemName.contains("ingredient") || itemName.contains("piece") || itemName.contains("edge") || itemName.contains("beads") || itemName.contains("stave") || itemName.contains("design") || itemName.contains("fragment") || itemName.contains("blade") || itemName.contains("head") || itemName.contains("part") || itemName.contains("gem") || itemName.contains("shaft") || itemName.contains("stone") || itemName.contains("fabric") || itemName.contains("pattern") || itemName.contains("lining")) - { - return 45; // Major Crafting Ingredients - } - } - - return 58; // Other Item - } - - public List getAuctions() - { - return auctions; - } - - public class Auctions - { - int auctionID; - int itemOID; - int duration; - int playerID; - int category; - L2ItemInstance item; - long price; - long count; - long finishTime; - String itemName; - - public Auctions(int _auctionID, String _itemName, int _itemOID, L2ItemInstance _item, long _price, long _count, int _duration, int _playerID, long _finishTime, int _category) - { - auctionID = _auctionID; - itemName = _itemName; - itemOID = _itemOID; - item = _item; - price = _price; - count = _count; - duration = _duration; - playerID = _playerID; - finishTime = _finishTime; - category = _category; - } - - public int getAuctionId() - { - return auctionID; - } - - public String getItemName() - { - return itemName; - } - - public int getItemOID() - { - return itemOID; - } - - public L2ItemInstance getItem() - { - return item; - } - - public long getPrice() - { - return price; - } - - public long getCount() - { - return count; - } - - public int getDuration() - { - return duration; - } - - public int getPlayerID() - { - return playerID; - } - - public long getFinishTime() - { - return finishTime; - } - - public int getCategory() - { - return category; - } - } - - public static final AuctionHouseManager getInstance() - { - return SingletonHolder._instance; - } - - private static class SingletonHolder - { - protected static final AuctionHouseManager _instance = new AuctionHouseManager(); - } -} \ No newline at end of file diff --git a/trunk/java/com/l2jserver/gameserver/instancemanager/CommissionManager.java b/trunk/java/com/l2jserver/gameserver/instancemanager/CommissionManager.java new file mode 100644 index 0000000000..1beaaaaa42 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/instancemanager/CommissionManager.java @@ -0,0 +1,478 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.instancemanager; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.sql.Timestamp; +import java.time.Duration; +import java.time.Instant; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentSkipListMap; +import java.util.concurrent.ScheduledFuture; +import java.util.function.Predicate; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.stream.Collectors; + +import com.l2jserver.L2DatabaseFactory; +import com.l2jserver.gameserver.ThreadPoolManager; +import com.l2jserver.gameserver.enums.ItemLocation; +import com.l2jserver.gameserver.enums.MailType; +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.CommissionManagerInstance; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.commission.CommissionItem; +import com.l2jserver.gameserver.model.entity.Message; +import com.l2jserver.gameserver.model.itemcontainer.Inventory; +import com.l2jserver.gameserver.model.itemcontainer.Mail; +import com.l2jserver.gameserver.model.items.L2Item; +import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; +import com.l2jserver.gameserver.network.SystemMessageId; +import com.l2jserver.gameserver.network.serverpackets.commission.ExResponseCommissionBuyItem; +import com.l2jserver.gameserver.network.serverpackets.commission.ExResponseCommissionDelete; +import com.l2jserver.gameserver.network.serverpackets.commission.ExResponseCommissionInfo; +import com.l2jserver.gameserver.network.serverpackets.commission.ExResponseCommissionList; +import com.l2jserver.gameserver.network.serverpackets.commission.ExResponseCommissionList.CommissionListReplyType; +import com.l2jserver.gameserver.network.serverpackets.commission.ExResponseCommissionRegister; + +/** + * @author NosBit + */ +public final class CommissionManager +{ + private static final Logger _log = Logger.getLogger(CommissionManager.class.getName()); + + private static final int INTERACTION_DISTANCE = 250; + private static final int ITEMS_LIMIT_PER_REQUEST = 999; + private static final int MAX_ITEMS_REGISTRED_PER_PLAYER = 10; + private static final long MIN_REGISTRATION_AND_SALE_FEE = 1000; + private static final double REGISTRATION_FEE_PER_DAY = 0.001; + private static final double SALE_FEE_PER_DAY = 0.005; + + private static final String SELECT_ALL_ITEMS = "SELECT * FROM `items` WHERE `loc` = ?"; + private static final String SELECT_ALL_COMMISSION_ITEMS = "SELECT * FROM `commission_items`"; + private static final String INSERT_COMMISSION_ITEM = "INSERT INTO `commission_items`(`item_object_id`, `price_per_unit`, `start_time`, `duration_in_days`) VALUES (?, ?, ?, ?)"; + private static final String DELETE_COMMISSION_ITEM = "DELETE FROM `commission_items` WHERE `commission_id` = ?"; + + private final Map _commissionItems = new ConcurrentSkipListMap<>(); + + protected CommissionManager() + { + final Map itemInstances = new HashMap<>(); + try (Connection con = L2DatabaseFactory.getInstance().getConnection()) + { + try (PreparedStatement ps = con.prepareStatement(SELECT_ALL_ITEMS)) + { + ps.setString(1, ItemLocation.COMMISSION.toString()); + try (ResultSet rs = ps.executeQuery()) + { + while (rs.next()) + { + final int itemOwnerId = rs.getInt("owner_id"); + final int itemObjectId = rs.getInt("object_id"); + final L2ItemInstance itemInstance = L2ItemInstance.restoreFromDb(itemOwnerId, rs); + if (itemInstance == null) + { + _log.warning(getClass().getSimpleName() + ": Failed loading item instance with item object id " + itemObjectId + " and owner id " + itemOwnerId + "."); + continue; + } + + itemInstances.put(itemObjectId, itemInstance); + } + } + } + + try (Statement st = con.createStatement(); + ResultSet rs = st.executeQuery(SELECT_ALL_COMMISSION_ITEMS)) + { + while (rs.next()) + { + final long commissionId = rs.getLong("commission_id"); + final L2ItemInstance itemInstance = itemInstances.get(rs.getInt("item_object_id")); + if (itemInstance == null) + { + _log.warning(getClass().getSimpleName() + ": Failed loading commission item with commission id " + commissionId + " because item instance does not exist or failed to load."); + continue; + } + final CommissionItem commissionItem = new CommissionItem(commissionId, itemInstance, rs.getLong("price_per_unit"), rs.getTimestamp("start_time").toInstant(), rs.getByte("duration_in_days")); + _commissionItems.put(commissionItem.getCommissionId(), commissionItem); + if (commissionItem.getEndTime().isBefore(Instant.now())) + { + expireSale(commissionItem); + } + else + { + commissionItem.setSaleEndTask(ThreadPoolManager.getInstance().scheduleGeneral(() -> expireSale(commissionItem), Duration.between(Instant.now(), commissionItem.getEndTime()).toMillis())); + } + } + } + } + catch (SQLException e) + { + _log.log(Level.WARNING, getClass().getSimpleName() + ": Failed loading commission items.", e); + } + } + + /** + * Shows the player the auctions filtered by filter. + * @param player the player + * @param filter the filter + */ + public void showAuctions(L2PcInstance player, Predicate filter) + { + //@formatter:off + final List commissionItems = _commissionItems.values().stream() + .filter(c -> filter.test(c.getItemInfo().getItem())) + .limit(ITEMS_LIMIT_PER_REQUEST) + .collect(Collectors.toList()); + //@formatter:on + + if (commissionItems.isEmpty()) + { + player.sendPacket(new ExResponseCommissionList(CommissionListReplyType.ITEM_DOES_NOT_EXIST)); + return; + } + + int chunks = commissionItems.size() / ExResponseCommissionList.MAX_CHUNK_SIZE; + if (commissionItems.size() > (chunks * ExResponseCommissionList.MAX_CHUNK_SIZE)) + { + chunks++; + } + + for (int i = chunks - 1; i >= 0; i--) + { + player.sendPacket(new ExResponseCommissionList(CommissionListReplyType.AUCTIONS, commissionItems, i, i * ExResponseCommissionList.MAX_CHUNK_SIZE)); + } + } + + /** + * Shows the player his auctions. + * @param player the player + */ + public void showPlayerAuctions(L2PcInstance player) + { + //@formatter:off + final List commissionItems = _commissionItems.values().stream() + .filter(c -> c.getItemInstance().getOwnerId() == player.getObjectId()) + .limit(MAX_ITEMS_REGISTRED_PER_PLAYER) + .collect(Collectors.toList()); + //@formatter:on + + if (!commissionItems.isEmpty()) + { + player.sendPacket(new ExResponseCommissionList(CommissionListReplyType.PLAYER_AUCTIONS, commissionItems)); + } + else + { + player.sendPacket(new ExResponseCommissionList(CommissionListReplyType.PLAYER_AUCTIONS_EMPTY)); + } + } + + /** + * Registers an item for the given player. + * @param player the player + * @param itemObjectId the item object id + * @param itemCount the item count + * @param pricePerUnit the price per unit + * @param durationInDays the duration in days + */ + public void registerItem(L2PcInstance player, int itemObjectId, long itemCount, long pricePerUnit, byte durationInDays) + { + if (itemCount < 1) + { + player.sendPacket(SystemMessageId.THE_ITEM_HAS_FAILED_TO_BE_REGISTERED); + player.sendPacket(ExResponseCommissionRegister.FAILED); + return; + } + + final long totalPrice = itemCount * pricePerUnit; + if (totalPrice <= MIN_REGISTRATION_AND_SALE_FEE) + { + player.sendPacket(SystemMessageId.THE_ITEM_CANNOT_BE_REGISTERED_BECAUSE_REQUIREMENTS_ARE_NOT_MET); + player.sendPacket(ExResponseCommissionRegister.FAILED); + return; + } + + L2ItemInstance itemInstance = player.getInventory().getItemByObjectId(itemObjectId); + if ((itemInstance == null) || !itemInstance.isAvailable(player, false, false) || (itemInstance.getCount() < itemCount)) + { + player.sendPacket(SystemMessageId.THE_ITEM_HAS_FAILED_TO_BE_REGISTERED); + player.sendPacket(ExResponseCommissionRegister.FAILED); + return; + } + + synchronized (this) + { + //@formatter:off + final long playerRegisteredItems = _commissionItems.values().stream() + .filter(c -> c.getItemInstance().getOwnerId() == player.getObjectId()) + .count(); + //@formatter:on + + if (playerRegisteredItems >= MAX_ITEMS_REGISTRED_PER_PLAYER) + { + player.sendPacket(SystemMessageId.THE_ITEM_HAS_FAILED_TO_BE_REGISTERED); + player.sendPacket(ExResponseCommissionRegister.FAILED); + return; + } + + final long registrationFee = (long) Math.max(MIN_REGISTRATION_AND_SALE_FEE, (totalPrice * REGISTRATION_FEE_PER_DAY) * durationInDays); + if (!player.getInventory().reduceAdena("Commission Registration Fee", registrationFee, player, null)) + { + player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_ADENA_TO_REGISTER_THE_ITEM); + player.sendPacket(ExResponseCommissionRegister.FAILED); + return; + } + + itemInstance = player.getInventory().detachItem("Commission Registration", itemInstance, itemCount, ItemLocation.COMMISSION, player, null); + if (itemInstance == null) + { + player.getInventory().addAdena("Commission error refund", registrationFee, player, null); + player.sendPacket(SystemMessageId.THE_ITEM_HAS_FAILED_TO_BE_REGISTERED); + player.sendPacket(ExResponseCommissionRegister.FAILED); + return; + } + + try (Connection con = L2DatabaseFactory.getInstance().getConnection(); + PreparedStatement ps = con.prepareStatement(INSERT_COMMISSION_ITEM, Statement.RETURN_GENERATED_KEYS)) + { + final Instant startTime = Instant.now(); + ps.setInt(1, itemInstance.getObjectId()); + ps.setLong(2, pricePerUnit); + ps.setTimestamp(3, Timestamp.from(startTime)); + ps.setByte(4, durationInDays); + ps.executeUpdate(); + try (ResultSet rs = ps.getGeneratedKeys()) + { + if (rs.next()) + { + final CommissionItem commissionItem = new CommissionItem(rs.getLong(1), itemInstance, pricePerUnit, startTime, durationInDays); + final ScheduledFuture saleEndTask = ThreadPoolManager.getInstance().scheduleGeneral(() -> expireSale(commissionItem), Duration.between(Instant.now(), commissionItem.getEndTime()).toMillis()); + commissionItem.setSaleEndTask(saleEndTask); + _commissionItems.put(commissionItem.getCommissionId(), commissionItem); + player.getLastCommissionInfos().put(itemInstance.getId(), new ExResponseCommissionInfo(itemInstance.getId(), pricePerUnit, itemCount, (byte) ((durationInDays - 1) / 2))); + player.sendPacket(SystemMessageId.THE_ITEM_HAS_BEEN_SUCCESSFULLY_REGISTERED); + player.sendPacket(ExResponseCommissionRegister.SUCCEED); + } + } + } + catch (SQLException e) + { + _log.log(Level.WARNING, getClass().getSimpleName() + ": Failed inserting commission item. ItemInstance: " + itemInstance, e); + player.sendPacket(SystemMessageId.THE_ITEM_HAS_FAILED_TO_BE_REGISTERED); + player.sendPacket(ExResponseCommissionRegister.FAILED); + } + } + } + + /** + * Deletes an item and returns it to the player. + * @param player the player + * @param commissionId the commission id + */ + public void deleteItem(L2PcInstance player, long commissionId) + { + final CommissionItem commissionItem = getCommissionItem(commissionId); + if (commissionItem == null) + { + player.sendPacket(SystemMessageId.CANCELLATION_OF_SALE_HAS_FAILED_BECAUSE_REQUIREMENTS_ARE_NOT_MET); + player.sendPacket(ExResponseCommissionDelete.FAILED); + return; + } + + if (commissionItem.getItemInstance().getOwnerId() != player.getObjectId()) + { + player.sendPacket(ExResponseCommissionDelete.FAILED); + return; + } + + if ((player.getInventory().getSize(false) >= (player.getInventoryLimit() * 0.8)) || (player.getWeightPenalty() >= 3)) + { + player.sendPacket(SystemMessageId.IF_THE_WEIGHT_IS_80_OR_MORE_AND_THE_INVENTORY_NUMBER_IS_90_OR_MORE_PURCHASE_CANCELLATION_IS_NOT_POSSIBLE); + player.sendPacket(SystemMessageId.CANCELLATION_OF_SALE_HAS_FAILED_BECAUSE_REQUIREMENTS_ARE_NOT_MET); + player.sendPacket(ExResponseCommissionDelete.FAILED); + return; + } + + if ((_commissionItems.remove(commissionId) == null) || !commissionItem.getSaleEndTask().cancel(false)) + { + player.sendPacket(SystemMessageId.CANCELLATION_OF_SALE_HAS_FAILED_BECAUSE_REQUIREMENTS_ARE_NOT_MET); + player.sendPacket(ExResponseCommissionDelete.FAILED); + return; + } + + if (deleteItemFromDB(commissionId)) + { + player.getInventory().addItem("Commission Cancellation", commissionItem.getItemInstance(), player, null); + player.sendPacket(SystemMessageId.CANCELLATION_OF_SALE_FOR_THE_ITEM_IS_SUCCESSFUL); + player.sendPacket(ExResponseCommissionDelete.SUCCEED); + } + else + { + player.sendPacket(SystemMessageId.CANCELLATION_OF_SALE_HAS_FAILED_BECAUSE_REQUIREMENTS_ARE_NOT_MET); + player.sendPacket(ExResponseCommissionDelete.FAILED); + } + } + + /** + * Buys the item for the given player. + * @param player the player + * @param commissionId the commission id + */ + public void buyItem(L2PcInstance player, long commissionId) + { + final CommissionItem commissionItem = getCommissionItem(commissionId); + if (commissionItem == null) + { + player.sendPacket(SystemMessageId.ITEM_PURCHASE_HAS_FAILED); + player.sendPacket(ExResponseCommissionBuyItem.FAILED); + return; + } + + final L2ItemInstance itemInstance = commissionItem.getItemInstance(); + if (itemInstance.getOwnerId() == player.getObjectId()) + { + player.sendPacket(SystemMessageId.ITEM_PURCHASE_HAS_FAILED); + player.sendPacket(ExResponseCommissionBuyItem.FAILED); + return; + } + + if ((player.getInventory().getSize(false) >= (player.getInventoryLimit() * 0.8)) || (player.getWeightPenalty() >= 3)) + { + player.sendPacket(SystemMessageId.IF_THE_WEIGHT_IS_80_OR_MORE_AND_THE_INVENTORY_NUMBER_IS_90_OR_MORE_PURCHASE_CANCELLATION_IS_NOT_POSSIBLE); + player.sendPacket(ExResponseCommissionBuyItem.FAILED); + return; + } + + final long totalPrice = itemInstance.getCount() * commissionItem.getPricePerUnit(); + if (!player.getInventory().reduceAdena("Commission Registration Fee", totalPrice, player, null)) + { + player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_ADENA); + player.sendPacket(ExResponseCommissionBuyItem.FAILED); + return; + } + + if ((_commissionItems.remove(commissionId) == null) || !commissionItem.getSaleEndTask().cancel(false)) + { + player.getInventory().addAdena("Commission error refund", totalPrice, player, null); + player.sendPacket(SystemMessageId.ITEM_PURCHASE_HAS_FAILED); + player.sendPacket(ExResponseCommissionBuyItem.FAILED); + return; + } + + if (deleteItemFromDB(commissionId)) + { + final long saleFee = (long) Math.max(MIN_REGISTRATION_AND_SALE_FEE, (totalPrice * SALE_FEE_PER_DAY) * commissionItem.getDurationInDays()); + final Message mail = new Message(itemInstance.getOwnerId(), itemInstance, MailType.COMMISSION_ITEM_SOLD); + + final Mail attachement = mail.createAttachments(); + attachement.addItem("Commission Item Sold", Inventory.ADENA_ID, totalPrice - saleFee, player, null); + MailManager.getInstance().sendMessage(mail); + + player.sendPacket(new ExResponseCommissionBuyItem(commissionItem)); + player.getInventory().addItem("Commission Buy Item", commissionItem.getItemInstance(), player, null); + } + else + { + player.getInventory().addAdena("Commission error refund", totalPrice, player, null); + player.sendPacket(ExResponseCommissionBuyItem.FAILED); + } + } + + /** + * Deletes a commission item from database. + * @param commissionId the commission item + * @return {@code true} if the item was deleted successfully, {@code false} otherwise + */ + private boolean deleteItemFromDB(long commissionId) + { + try (Connection con = L2DatabaseFactory.getInstance().getConnection(); + PreparedStatement ps = con.prepareStatement(DELETE_COMMISSION_ITEM)) + { + ps.setLong(1, commissionId); + if (ps.executeUpdate() > 0) + { + return true; + } + } + catch (SQLException e) + { + _log.log(Level.WARNING, getClass().getSimpleName() + ": Failed deleting commission item. Commission ID: " + commissionId, e); + } + return false; + } + + /** + * Expires the sale of a commission item and sends the item back to the player. + * @param commissionItem the comission item + */ + private void expireSale(CommissionItem commissionItem) + { + if ((_commissionItems.remove(commissionItem.getCommissionId()) != null) && deleteItemFromDB(commissionItem.getCommissionId())) + { + final Message mail = new Message(commissionItem.getItemInstance().getOwnerId(), commissionItem.getItemInstance(), MailType.COMMISSION_ITEM_RETURNED); + MailManager.getInstance().sendMessage(mail); + } + } + + /** + * Gets the commission item. + * @param commissionId the commission id to get + * @return the commission item if it exists, {@code null} otherwise + */ + public CommissionItem getCommissionItem(long commissionId) + { + return _commissionItems.get(commissionId); + } + + /** + * Checks if the player is allowed to interact with commission manager. + * @param player the player + * @return {@code true} if the player is allowed to interact, {@code false} otherwise + */ + public static boolean isPlayerAllowedToInteract(L2PcInstance player) + { + final L2Npc npc = player.getLastFolkNPC(); + if ((npc != null) && (npc instanceof CommissionManagerInstance)) + { + return npc.calculateDistance(player, true, false) <= INTERACTION_DISTANCE; + } + return false; + } + + /** + * Gets the single instance. + * @return the single instance + */ + public static CommissionManager getInstance() + { + return SingletonHolder._instance; + } + + private static class SingletonHolder + { + protected static final CommissionManager _instance = new CommissionManager(); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/instancemanager/DuelManager.java b/trunk/java/com/l2jserver/gameserver/instancemanager/DuelManager.java index aca752c6b2..5707903357 100644 --- a/trunk/java/com/l2jserver/gameserver/instancemanager/DuelManager.java +++ b/trunk/java/com/l2jserver/gameserver/instancemanager/DuelManager.java @@ -20,6 +20,7 @@ package com.l2jserver.gameserver.instancemanager; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicInteger; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.entity.Duel; @@ -29,20 +30,11 @@ import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; public final class DuelManager { private final Map _duels = new ConcurrentHashMap<>(); - private int _currentDuelId = 0x90; + private final AtomicInteger _currentDuelId = new AtomicInteger(); protected DuelManager() { - } - - private int getNextDuelId() - { - // In case someone wants to run the server forever :) - if (++_currentDuelId >= 2147483640) - { - _currentDuelId = 1; - } - return _currentDuelId; + } public Duel getDuel(int duelId) @@ -104,7 +96,7 @@ public final class DuelManager return; } } - final int duelId = getNextDuelId(); + final int duelId = _currentDuelId.incrementAndGet(); _duels.put(duelId, new Duel(playerA, playerB, partyDuel, duelId)); } diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java b/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java index 57855d3b17..6f73a23473 100644 --- a/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java +++ b/trunk/java/com/l2jserver/gameserver/model/actor/L2Character.java @@ -1762,7 +1762,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe return; } - // Prevent monsters buffing players. + // FIXME: Prevent monsters buffing players. if (isMonster() && !target.isMonster() && !skill.isBad() && skill.getName().contains("NPC")) { setTarget(this); diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/instance/CommissionManagerInstance.java b/trunk/java/com/l2jserver/gameserver/model/actor/instance/CommissionManagerInstance.java new file mode 100644 index 0000000000..d6715c0151 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/model/actor/instance/CommissionManagerInstance.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.model.actor.instance; + +import com.l2jserver.gameserver.enums.InstanceType; +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.templates.L2NpcTemplate; +import com.l2jserver.gameserver.network.serverpackets.commission.ExShowCommission; + +/** + * @author NosBit + */ +public class CommissionManagerInstance extends L2Npc +{ + public CommissionManagerInstance(L2NpcTemplate template) + { + super(template); + setInstanceType(InstanceType.CommissionManagerInstance); + } + + @Override + public void onBypassFeedback(L2PcInstance player, String command) + { + if (command.equalsIgnoreCase("show_commission")) + { + player.sendPacket(ExShowCommission.STATIC_PACKET); + } + else + { + super.onBypassFeedback(player, command); + } + } +} diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java b/trunk/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java index 3ea5061eee..0df9f98453 100644 --- a/trunk/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java +++ b/trunk/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java @@ -221,7 +221,6 @@ import com.l2jserver.gameserver.model.interfaces.IEventListener; import com.l2jserver.gameserver.model.interfaces.ILocational; import com.l2jserver.gameserver.model.itemcontainer.Inventory; import com.l2jserver.gameserver.model.itemcontainer.ItemContainer; -import com.l2jserver.gameserver.model.itemcontainer.PcAuction; import com.l2jserver.gameserver.model.itemcontainer.PcFreight; import com.l2jserver.gameserver.model.itemcontainer.PcInventory; import com.l2jserver.gameserver.model.itemcontainer.PcRefund; @@ -256,7 +255,6 @@ import com.l2jserver.gameserver.model.variables.AccountVariables; import com.l2jserver.gameserver.model.variables.PlayerVariables; import com.l2jserver.gameserver.model.zone.L2ZoneType; import com.l2jserver.gameserver.model.zone.ZoneId; -import com.l2jserver.gameserver.model.zone.type.L2BattalionZone; import com.l2jserver.gameserver.model.zone.type.L2BossZone; import com.l2jserver.gameserver.network.L2GameClient; import com.l2jserver.gameserver.network.SystemMessageId; @@ -332,6 +330,7 @@ import com.l2jserver.gameserver.network.serverpackets.TradeOtherDone; import com.l2jserver.gameserver.network.serverpackets.TradeStart; import com.l2jserver.gameserver.network.serverpackets.UserInfo; import com.l2jserver.gameserver.network.serverpackets.ValidateLocation; +import com.l2jserver.gameserver.network.serverpackets.commission.ExResponseCommissionInfo; import com.l2jserver.gameserver.network.serverpackets.friend.L2FriendStatus; import com.l2jserver.gameserver.taskmanager.AttackStanceTaskManager; import com.l2jserver.gameserver.util.Broadcast; @@ -550,7 +549,6 @@ public final class L2PcInstance extends L2Playable private int _vitalityPoints = 140000; private final PcInventory _inventory = new PcInventory(this); - private final PcAuction _auctionInventory = new PcAuction(this); private final PcFreight _freight = new PcFreight(this); private PcWarehouse _warehouse; private PcRefund _refund; @@ -679,7 +677,7 @@ public final class L2PcInstance extends L2Playable private boolean _exchangeRefusal = false; // Exchange refusal private L2Party _party; - PartyDistributionType _partyDistributionType; + private PartyDistributionType _partyDistributionType; // this is needed to find the inviting player for Party response // there can only be one active party request at once @@ -694,6 +692,8 @@ public final class L2PcInstance extends L2Playable private L2ItemInstance _lure = null; + private volatile Map _lastCommissionInfos; + public boolean isSpawnProtected() { return _protectEndTime > GameTimeController.getInstance().getGameTicks(); @@ -723,17 +723,6 @@ public final class L2PcInstance extends L2Playable private volatile Map, AbstractRequest> _requests; - private boolean _isEnchanting = false; - private int _activeEnchantItemId = ID_NONE; - private int _activeEnchantSupportItemId = ID_NONE; - private int _activeEnchantAttrItemId = ID_NONE; - private long _activeEnchantTimestamp = 0; - - private int _firstCompoundOID = -1; - private int _secondCompoundOID = -1; - - private boolean _usingPrimeShop = false; - protected boolean _inventoryDisable = false; /** Player's cubics. */ private final Map _cubics = new ConcurrentSkipListMap<>(); // TODO(Zoey76): This should be sorted in insert order. @@ -2434,63 +2423,6 @@ public final class L2PcInstance extends L2Playable return getStat().getExp(); } - public void setActiveEnchantAttrItemId(int objectId) - { - _activeEnchantAttrItemId = objectId; - } - - public int getActiveEnchantAttrItemId() - { - return _activeEnchantAttrItemId; - } - - public void setActiveEnchantItemId(int objectId) - { - // If we don't have a Enchant Item, we are not enchanting. - if (objectId == ID_NONE) - { - setActiveEnchantSupportItemId(ID_NONE); - setActiveEnchantTimestamp(0); - setIsEnchanting(false); - } - _activeEnchantItemId = objectId; - } - - public int getActiveEnchantItemId() - { - return _activeEnchantItemId; - } - - public void setActiveEnchantSupportItemId(int objectId) - { - _activeEnchantSupportItemId = objectId; - } - - public int getActiveEnchantSupportItemId() - { - return _activeEnchantSupportItemId; - } - - public long getActiveEnchantTimestamp() - { - return _activeEnchantTimestamp; - } - - public void setActiveEnchantTimestamp(long val) - { - _activeEnchantTimestamp = val; - } - - public void setIsEnchanting(boolean val) - { - _isEnchanting = val; - } - - public boolean isEnchanting() - { - return _isEnchanting; - } - /** * Set the fists weapon of the L2PcInstance (used when no weapon is equiped). * @param weaponItem The fists L2Weapon to set to the L2PcInstance @@ -2858,11 +2790,6 @@ public final class L2PcInstance extends L2Playable return _inventory; } - public PcAuction getAuctionInventory() - { - return _auctionInventory; - } - /** * Delete a ShortCut of the L2PcInstance _shortCuts. * @param objectId @@ -3976,7 +3903,7 @@ public final class L2PcInstance extends L2Playable return null; } - if (getActiveEnchantItemId() == objectId) + if (isProcessingItem(objectId)) { if (Config.DEBUG) { @@ -5645,8 +5572,6 @@ public final class L2PcInstance extends L2Playable { setPvpKills(getPvpKills() + 1); - L2BattalionZone.givereward(this); - // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter UserInfo ui = new UserInfo(this, false); ui.addComponentType(UserInfoType.SOCIAL); @@ -11364,7 +11289,7 @@ public final class L2PcInstance extends L2Playable return false; } - if (getActiveEnchantItemId() == objectId) + if (isProcessingItem(objectId)) { if (Config.DEBUG) { @@ -13983,7 +13908,7 @@ public final class L2PcInstance extends L2Playable sendPacket(sm); } - // Prevent falling in game graphics. + // FIXME: Prevent falling in game graphics. sendPacket(new ValidateLocation(this)); setFalling(); @@ -15093,11 +15018,17 @@ public final class L2PcInstance extends L2Playable return getPlayerSide() == CastleSide.LIGHT; } + /** + * @return the maximum amount of points that player can use + */ public int getMaxSummonPoints() { return (int) getStat().calcStat(Stats.MAX_SUMMON_POINTS, 0, null, null); } + /** + * @return the amount of points that player used + */ public int getSummonPoints() { return getServitors().values().stream().mapToInt(L2Summon::getSummonPoints).sum(); @@ -15232,36 +15163,6 @@ public final class L2PcInstance extends L2Playable _vitalityPoints = points; } - public int getFirstCompoundOID() - { - return _firstCompoundOID; - } - - public void setFirstCompoundOID(int firstCompoundOID) - { - _firstCompoundOID = firstCompoundOID; - } - - public int getSecondCompoundOID() - { - return _secondCompoundOID; - } - - public void setSecondCompoundOID(int secondCompoundOID) - { - _secondCompoundOID = secondCompoundOID; - } - - public void setUsingPrimeShop(boolean isUsing) - { - _usingPrimeShop = isUsing; - } - - public boolean isUsingPrimeShop() - { - return _usingPrimeShop; - } - /** * @return the prime shop points of the player. */ @@ -15282,6 +15183,25 @@ public final class L2PcInstance extends L2Playable vars.storeMe(); } + /** + * Gets the last commission infos. + * @return the last commission infos + */ + public Map getLastCommissionInfos() + { + if (_lastCommissionInfos == null) + { + synchronized (this) + { + if (_lastCommissionInfos == null) + { + _lastCommissionInfos = new ConcurrentHashMap<>(); + } + } + } + return _lastCommissionInfos; + } + /** * Gets the whisperers. * @return the whisperers diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/knownlist/PcKnownList.java b/trunk/java/com/l2jserver/gameserver/model/actor/knownlist/PcKnownList.java index e338da9c13..ac7523ca77 100644 --- a/trunk/java/com/l2jserver/gameserver/model/actor/knownlist/PcKnownList.java +++ b/trunk/java/com/l2jserver/gameserver/model/actor/knownlist/PcKnownList.java @@ -182,6 +182,7 @@ public class PcKnownList extends PlayableKnownList return 2900; } + // Old custom/wrong method. // if (knownlistSize <= 70) // { // return 2300; diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/request/AdenaDistributionRequest.java b/trunk/java/com/l2jserver/gameserver/model/actor/request/AdenaDistributionRequest.java new file mode 100644 index 0000000000..7f612f45f3 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/model/actor/request/AdenaDistributionRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.model.actor.request; + +import java.util.List; + +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.network.serverpackets.adenadistribution.ExDivideAdenaCancel; + +/** + * @author Sdw + */ +public class AdenaDistributionRequest extends AbstractRequest +{ + private final L2PcInstance _distributor; + private final List _players; + private final int _adenaObjectId; + private final long _adenaCount; + + public AdenaDistributionRequest(L2PcInstance activeChar, L2PcInstance distributor, List players, int adenaObjectId, long adenaCount) + { + super(activeChar); + _distributor = distributor; + _adenaObjectId = adenaObjectId; + _players = players; + _adenaCount = adenaCount; + } + + public L2PcInstance getDistributor() + { + return _distributor; + } + + public List getPlayers() + { + return _players; + } + + public int getAdenaObjectId() + { + return _adenaObjectId; + } + + public long getAdenaCount() + { + return _adenaCount; + } + + @Override + public boolean isUsing(int objectId) + { + return objectId == _adenaObjectId; + } + + @Override + public void onTimeout() + { + super.onTimeout(); + _players.forEach(p -> + { + p.removeRequest(AdenaDistributionRequest.class); + p.sendPacket(ExDivideAdenaCancel.STATIC_PACKET); + }); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/request/CompoundRequest.java b/trunk/java/com/l2jserver/gameserver/model/actor/request/CompoundRequest.java new file mode 100644 index 0000000000..5b9dab3630 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/model/actor/request/CompoundRequest.java @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.model.actor.request; + +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; + +/** + * @author UnAfraid + */ +public class CompoundRequest extends AbstractRequest +{ + private int _itemOne; + private int _itemTwo; + + public CompoundRequest(L2PcInstance activeChar) + { + super(activeChar); + } + + public L2ItemInstance getItemOne() + { + return getActiveChar().getInventory().getItemByObjectId(_itemOne); + } + + public void setItemOne(int itemOne) + { + _itemOne = itemOne; + } + + public L2ItemInstance getItemTwo() + { + return getActiveChar().getInventory().getItemByObjectId(_itemTwo); + } + + public void setItemTwo(int itemTwo) + { + _itemTwo = itemTwo; + } + + @Override + public boolean isItemRequest() + { + return true; + } + + @Override + public boolean canWorkWith(AbstractRequest request) + { + return !request.isItemRequest(); + } + + @Override + public boolean isUsing(int objectId) + { + return (objectId > 0) && ((objectId == _itemOne) || (objectId == _itemTwo)); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/request/EnchantItemAttributeRequest.java b/trunk/java/com/l2jserver/gameserver/model/actor/request/EnchantItemAttributeRequest.java new file mode 100644 index 0000000000..1d863b69a9 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/model/actor/request/EnchantItemAttributeRequest.java @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.model.actor.request; + +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; + +/** + * @author UnAfraid + */ +public final class EnchantItemAttributeRequest extends AbstractRequest +{ + private volatile int _enchantingItemObjectId; + private volatile int _enchantingStoneObjectId; + + public EnchantItemAttributeRequest(L2PcInstance activeChar, int enchantingStoneObjectId) + { + super(activeChar); + _enchantingStoneObjectId = enchantingStoneObjectId; + } + + public L2ItemInstance getEnchantingItem() + { + return getActiveChar().getInventory().getItemByObjectId(_enchantingItemObjectId); + } + + public void setEnchantingItem(int objectId) + { + _enchantingItemObjectId = objectId; + } + + public L2ItemInstance getEnchantingStone() + { + return getActiveChar().getInventory().getItemByObjectId(_enchantingStoneObjectId); + } + + public void setEnchantingStone(int objectId) + { + _enchantingStoneObjectId = objectId; + } + + @Override + public boolean isItemRequest() + { + return true; + } + + @Override + public boolean canWorkWith(AbstractRequest request) + { + return !request.isItemRequest(); + } + + @Override + public boolean isUsing(int objectId) + { + return (objectId > 0) && ((objectId == _enchantingItemObjectId) || (objectId == _enchantingStoneObjectId)); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/request/EnchantItemRequest.java b/trunk/java/com/l2jserver/gameserver/model/actor/request/EnchantItemRequest.java new file mode 100644 index 0000000000..f064d9531e --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/model/actor/request/EnchantItemRequest.java @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.model.actor.request; + +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; + +/** + * @author UnAfraid + */ +public final class EnchantItemRequest extends AbstractRequest +{ + private volatile int _enchantingItemObjectId; + private volatile int _enchantingScrollObjectId; + private volatile int _supportItemObjectId; + + public EnchantItemRequest(L2PcInstance activeChar, int enchantingScrollObjectId) + { + super(activeChar); + _enchantingScrollObjectId = enchantingScrollObjectId; + } + + public L2ItemInstance getEnchantingItem() + { + return getActiveChar().getInventory().getItemByObjectId(_enchantingItemObjectId); + } + + public void setEnchantingItem(int objectId) + { + _enchantingItemObjectId = objectId; + } + + public L2ItemInstance getEnchantingScroll() + { + return getActiveChar().getInventory().getItemByObjectId(_enchantingScrollObjectId); + } + + public void setEnchantingScroll(int objectId) + { + _enchantingScrollObjectId = objectId; + } + + public L2ItemInstance getSupportItem() + { + return getActiveChar().getInventory().getItemByObjectId(_supportItemObjectId); + } + + public void setSupportItem(int objectId) + { + _supportItemObjectId = objectId; + } + + @Override + public boolean isItemRequest() + { + return true; + } + + @Override + public boolean canWorkWith(AbstractRequest request) + { + return !request.isItemRequest(); + } + + @Override + public boolean isUsing(int objectId) + { + return (objectId > 0) && ((objectId == _enchantingItemObjectId) || (objectId == _enchantingScrollObjectId) || (objectId == _supportItemObjectId)); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/request/PartyRequest.java b/trunk/java/com/l2jserver/gameserver/model/actor/request/PartyRequest.java new file mode 100644 index 0000000000..cf340b4524 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/model/actor/request/PartyRequest.java @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.model.actor.request; + +import java.util.Objects; + +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; + +/** + * @author UnAfraid + */ +public class PartyRequest extends AbstractRequest +{ + private final L2PcInstance _targetPlayer; + + public PartyRequest(L2PcInstance activeChar, L2PcInstance targetPlayer) + { + super(activeChar); + Objects.requireNonNull(targetPlayer); + _targetPlayer = targetPlayer; + } + + public L2PcInstance getTargetPlayer() + { + return _targetPlayer; + } + + @Override + public boolean isUsing(int objectId) + { + return false; + } + + @Override + public void onTimeout() + { + super.onTimeout(); + getActiveChar().removeRequest(getClass()); + _targetPlayer.removeRequest(getClass()); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/model/actor/request/PrimeShopRequest.java b/trunk/java/com/l2jserver/gameserver/model/actor/request/PrimeShopRequest.java new file mode 100644 index 0000000000..e77e152f20 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/model/actor/request/PrimeShopRequest.java @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.model.actor.request; + +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; + +/** + * @author UnAfraid + */ +public class PrimeShopRequest extends AbstractRequest +{ + public PrimeShopRequest(L2PcInstance activeChar) + { + super(activeChar); + } + + @Override + public boolean isUsing(int objectId) + { + return false; + } +} diff --git a/trunk/java/com/l2jserver/gameserver/model/commission/CommissionItem.java b/trunk/java/com/l2jserver/gameserver/model/commission/CommissionItem.java new file mode 100644 index 0000000000..c51b581741 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/model/commission/CommissionItem.java @@ -0,0 +1,131 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.model.commission; + +import java.time.Instant; +import java.time.temporal.ChronoUnit; +import java.util.concurrent.ScheduledFuture; + +import com.l2jserver.gameserver.model.ItemInfo; +import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; + +/** + * @author NosBit + */ +public class CommissionItem +{ + private final long _commissionId; + private final L2ItemInstance _itemInstance; + private final ItemInfo _itemInfo; + private final long _pricePerUnit; + private final Instant _startTime; + private final byte _durationInDays; + private ScheduledFuture _saleEndTask; + + public CommissionItem(long commissionId, L2ItemInstance itemInstance, long pricePerUnit, Instant startTime, byte durationInDays) + { + _commissionId = commissionId; + _itemInstance = itemInstance; + _itemInfo = new ItemInfo(_itemInstance); + _pricePerUnit = pricePerUnit; + _startTime = startTime; + _durationInDays = durationInDays; + } + + /** + * Gets the commission id. + * @return the commission id + */ + public long getCommissionId() + { + return _commissionId; + } + + /** + * Gets the item instance. + * @return the item instance + */ + public L2ItemInstance getItemInstance() + { + return _itemInstance; + } + + /** + * Gets the item info. + * @return the item info + */ + public ItemInfo getItemInfo() + { + return _itemInfo; + } + + /** + * Gets the price per unit. + * @return the price per unit + */ + public long getPricePerUnit() + { + return _pricePerUnit; + } + + /** + * Gets the start time. + * @return the start time + */ + public Instant getStartTime() + { + return _startTime; + } + + /** + * Gets the duration in days. + * @return the duration in days + */ + public byte getDurationInDays() + { + return _durationInDays; + } + + /** + * Gets the end time. + * @return the end time + */ + public Instant getEndTime() + { + return _startTime.plus(_durationInDays, ChronoUnit.DAYS); + } + + /** + * Gets the sale end task. + * @return the sale end task + */ + public ScheduledFuture getSaleEndTask() + { + return _saleEndTask; + } + + /** + * Sets the sale end task. + * @param saleEndTask the sale end task + */ + public void setSaleEndTask(ScheduledFuture saleEndTask) + { + _saleEndTask = saleEndTask; + } +} diff --git a/trunk/java/com/l2jserver/gameserver/model/commission/CommissionItemType.java b/trunk/java/com/l2jserver/gameserver/model/commission/CommissionItemType.java new file mode 100644 index 0000000000..7ff3aa8675 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/model/commission/CommissionItemType.java @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.model.commission; + +/** + * @author NosBit + */ +public enum CommissionItemType +{ + // Weapon + ONE_HAND_SWORD(1), + ONE_HAND_MAGIC_SWORD(2), + DAGGER(3), + RAPIER(4), + TWO_HAND_SWORD(5), + ANCIENT_SWORD(6), + DUALSWORD(7), + DUAL_DAGGER(8), + BLUNT_WEAPON(9), + ONE_HAND_MAGIC_BLUNT_WEAPON(10), + TWO_HAND_BLUNT_WEAPON(11), + TWO_HAND_MAGIC_BLUNT_WEAPON(12), + DUAL_BLUNT_WEAPON(13), + BOW(14), + CROSSBOW(15), + FIST_WEAPON(16), + SPEAR(17), + OTHER_WEAPON(18), + // Armor + HELMET(19), + ARMOR_TOP(20), + ARMOR_PANTS(21), + FULL_BODY(22), + GLOVES(23), + FEET(24), + SHIELD(25), + SIGIL(26), + UNDERWEAR(27), + CLOAK(28), + // Accessory + RING(29), + EARRING(30), + NECKLACE(31), + BELT(32), + BRACELET(33), + HAIR_ACCESSORY(34), + // Supplies + POTION(35), + SCROLL_ENCHANT_WEAPON(36), + SCROLL_ENCHANT_ARMOR(37), + SCROLL_OTHER(38), + SOULSHOT(39), + SPIRITSHOT(40), + // Pet Goods + PET_EQUIPMENT(42), + PET_SUPPLIES(43), + // Misc. + CRYSTAL(44), + RECIPE(45), + MAJOR_CRAFTING_INGREDIENTS(46), + LIFE_STONE(47), + SOUL_CRYSTAL(48), + ATTRIBUTE_STONE(49), + WEAPON_ENCHANT_STONE(50), + ARMOR_ENCHANT_STONE(51), + SPELLBOOK(52), + GEMSTONE(53), + POUCH(54), + PIN(55), + MAGIC_RUNE_CLIP(56), + MAGIC_ORNAMENT(57), + DYES(58), + OTHER_ITEM(59); + + private final int _clientId; + + private CommissionItemType(int clientId) + { + _clientId = clientId; + } + + /** + * Gets the client id. + * @return the client id + */ + public int getClientId() + { + return _clientId; + } + + /** + * Finds the commission item type by the client id + * @param clientId the client id + * @return the commission item type if its found, {@code null} otherwise + */ + public static CommissionItemType findByClientId(int clientId) + { + for (CommissionItemType value : values()) + { + if (value.getClientId() == clientId) + { + return value; + } + } + return null; + } +} diff --git a/trunk/java/com/l2jserver/gameserver/model/commission/CommissionTreeType.java b/trunk/java/com/l2jserver/gameserver/model/commission/CommissionTreeType.java new file mode 100644 index 0000000000..a12b17c874 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/model/commission/CommissionTreeType.java @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.model.commission; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +/** + * @author NosBit + */ +public enum CommissionTreeType +{ + WEAPON( + 0, + CommissionItemType.ONE_HAND_SWORD, + CommissionItemType.ONE_HAND_MAGIC_SWORD, + CommissionItemType.DAGGER, + CommissionItemType.RAPIER, + CommissionItemType.TWO_HAND_SWORD, + CommissionItemType.ANCIENT_SWORD, + CommissionItemType.DUALSWORD, + CommissionItemType.DUAL_DAGGER, + CommissionItemType.BLUNT_WEAPON, + CommissionItemType.ONE_HAND_MAGIC_BLUNT_WEAPON, + CommissionItemType.TWO_HAND_BLUNT_WEAPON, + CommissionItemType.TWO_HAND_MAGIC_BLUNT_WEAPON, + CommissionItemType.DUAL_BLUNT_WEAPON, + CommissionItemType.BOW, + CommissionItemType.CROSSBOW, + CommissionItemType.FIST_WEAPON, + CommissionItemType.SPEAR, + CommissionItemType.OTHER_WEAPON), + ARMOR(1, CommissionItemType.HELMET, CommissionItemType.ARMOR_TOP, CommissionItemType.ARMOR_PANTS, CommissionItemType.FULL_BODY, CommissionItemType.GLOVES, CommissionItemType.FEET, CommissionItemType.SHIELD, CommissionItemType.SIGIL, CommissionItemType.UNDERWEAR, CommissionItemType.CLOAK), + ACCESSORY(2, CommissionItemType.RING, CommissionItemType.EARRING, CommissionItemType.NECKLACE, CommissionItemType.BELT, CommissionItemType.BRACELET, CommissionItemType.HAIR_ACCESSORY), + SUPPLIES(3, CommissionItemType.POTION, CommissionItemType.SCROLL_ENCHANT_WEAPON, CommissionItemType.SCROLL_ENCHANT_ARMOR, CommissionItemType.SCROLL_OTHER, CommissionItemType.SOULSHOT, CommissionItemType.SPIRITSHOT), + PET_GOODS(4, CommissionItemType.PET_EQUIPMENT, CommissionItemType.PET_SUPPLIES), + MISC( + 5, + CommissionItemType.CRYSTAL, + CommissionItemType.RECIPE, + CommissionItemType.MAJOR_CRAFTING_INGREDIENTS, + CommissionItemType.LIFE_STONE, + CommissionItemType.SOUL_CRYSTAL, + CommissionItemType.ATTRIBUTE_STONE, + CommissionItemType.WEAPON_ENCHANT_STONE, + CommissionItemType.ARMOR_ENCHANT_STONE, + CommissionItemType.SPELLBOOK, + CommissionItemType.GEMSTONE, + CommissionItemType.POUCH, + CommissionItemType.PIN, + CommissionItemType.MAGIC_RUNE_CLIP, + CommissionItemType.MAGIC_ORNAMENT, + CommissionItemType.DYES, + CommissionItemType.OTHER_ITEM); + + private final int _clientId; + private final Set _commissionItemTypes; + + private CommissionTreeType(int clientId, CommissionItemType... commissionItemTypes) + { + _clientId = clientId; + _commissionItemTypes = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(commissionItemTypes))); + } + + /** + * Gets the client id. + * @return the client id + */ + public int getClientId() + { + return _clientId; + } + + /** + * Gets the filter. + * @return the filter + */ + public Set getCommissionItemTypes() + { + return _commissionItemTypes; + } + + /** + * Finds the commission tree type by the client id + * @param clientId the client id + * @return the commission tree type if its found, {@code null} otherwise + */ + public static CommissionTreeType findByClientId(int clientId) + { + for (CommissionTreeType value : values()) + { + if (value.getClientId() == clientId) + { + return value; + } + } + return null; + } +} diff --git a/trunk/java/com/l2jserver/gameserver/model/conditions/ConditionChangeWeapon.java b/trunk/java/com/l2jserver/gameserver/model/conditions/ConditionChangeWeapon.java index 19299ee04a..86a6a0f9e4 100644 --- a/trunk/java/com/l2jserver/gameserver/model/conditions/ConditionChangeWeapon.java +++ b/trunk/java/com/l2jserver/gameserver/model/conditions/ConditionChangeWeapon.java @@ -65,7 +65,7 @@ public class ConditionChangeWeapon extends Condition return false; } - if (effector.getActingPlayer().isEnchanting()) + if (effector.getActingPlayer().hasItemRequest()) { return false; } diff --git a/trunk/java/com/l2jserver/gameserver/model/entity/Message.java b/trunk/java/com/l2jserver/gameserver/model/entity/Message.java index 0b17e6194a..5c24153a83 100644 --- a/trunk/java/com/l2jserver/gameserver/model/entity/Message.java +++ b/trunk/java/com/l2jserver/gameserver/model/entity/Message.java @@ -61,8 +61,6 @@ public class Message private boolean _hasAttachments; private Mail _attachments = null; private ScheduledFuture _unloadTask = null; - private int _systemMessage1 = 0; - private int _systemMessage2 = 0; private int _itemId; private int _enchantLvl; @@ -97,8 +95,6 @@ public class Message _elementals[i] = Integer.parseInt(elemDef[i]); } } - _systemMessage1 = rset.getInt("systemMessage1"); - _systemMessage2 = rset.getInt("systemMessage2"); } /* @@ -119,28 +115,6 @@ public class Message _reqAdena = reqAdena; } - /* - * This constructor used for System Mails - */ - public Message(int receiverId, String subject, String content, int systemMessage1, int systemMessage2, MailType sendBySystem) - { - _messageId = IdFactory.getInstance().getNextId(); - _senderId = -1; - _receiverId = receiverId; - _subject = subject; - _content = content; - _expiration = System.currentTimeMillis() + (EXPIRATION * 3600000); - _reqAdena = 0; - _hasAttachments = false; - _unread = true; - _deletedBySender = true; - _deletedByReceiver = false; - _messageType = sendBySystem; - _returned = false; - _systemMessage1 = systemMessage1; - _systemMessage2 = systemMessage2; - } - /* * This constructor used for System Mails */ @@ -235,7 +209,7 @@ public class Message _elementals[item.getAttackElementType()] = item.getAttackElementPower(); } } - else if (mailType == MailType.SYSTEM) + else if (mailType == MailType.COMMISSION_ITEM_RETURNED) { final Mail attachement = createAttachments(); attachement.addItem("CommissionReturnItem", item, null, null); @@ -244,7 +218,7 @@ public class Message public static final PreparedStatement getStatement(Message msg, Connection con) throws SQLException { - PreparedStatement stmt = con.prepareStatement("INSERT INTO messages (messageId, senderId, receiverId, subject, content, expiration, reqAdena, hasAttachments, isUnread, isDeletedBySender, isDeletedByReceiver, sendBySystem, isReturned, itemId, enchantLvl, elementals, systemMessage1, systemMessage2) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); + PreparedStatement stmt = con.prepareStatement("INSERT INTO messages (messageId, senderId, receiverId, subject, content, expiration, reqAdena, hasAttachments, isUnread, isDeletedBySender, isDeletedByReceiver, sendBySystem, isReturned, itemId, enchantLvl, elementals) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"); stmt.setInt(1, msg._messageId); stmt.setInt(2, msg._senderId); @@ -262,8 +236,6 @@ public class Message stmt.setInt(14, msg._itemId); stmt.setInt(15, msg._enchantLvl); stmt.setString(16, msg._elementals[0] + ";" + msg._elementals[1] + ";" + msg._elementals[2] + ";" + msg._elementals[3] + ";" + msg._elementals[4] + ";" + msg._elementals[5]); - stmt.setInt(17, msg._systemMessage1); - stmt.setInt(18, msg._systemMessage2); return stmt; } @@ -300,7 +272,7 @@ public class Message case NPC: // Handled by NpcName in client case BIRTHDAY: // Handled by Sysstring in client case COMMISSION_ITEM_SOLD: // Handled by Sysstring in client - case SYSTEM: // Handled by Sysstring in client + case COMMISSION_ITEM_RETURNED: // Handled by Sysstring in client case MENTOR_NPC: // Handled in client default: { @@ -353,16 +325,6 @@ public class Message return _unread; } - public final int getSystemMessage1() - { - return _systemMessage1; - } - - public final int getSystemMessage2() - { - return _systemMessage2; - } - public final void markAsRead() { if (_unread) diff --git a/trunk/java/com/l2jserver/gameserver/model/itemcontainer/PcAuction.java b/trunk/java/com/l2jserver/gameserver/model/itemcontainer/PcAuction.java deleted file mode 100644 index 0ca352cc5d..0000000000 --- a/trunk/java/com/l2jserver/gameserver/model/itemcontainer/PcAuction.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.model.itemcontainer; - -import com.l2jserver.gameserver.enums.ItemLocation; -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; - -/** - * @author Erlandys - */ -public class PcAuction extends ItemContainer -{ - private final L2PcInstance _owner; - - public PcAuction(L2PcInstance owner) - { - _owner = owner; - } - - @Override - public String getName() - { - return "Auction"; - } - - @Override - public L2PcInstance getOwner() - { - return _owner; - } - - @Override - public ItemLocation getBaseLocation() - { - return ItemLocation.AUCTION_HOUSE; - } - - @Override - public boolean validateCapacity(long slots) - { - return ((_items.size() + slots) <= 10); - } -} diff --git a/trunk/java/com/l2jserver/gameserver/model/itemcontainer/PcInventory.java b/trunk/java/com/l2jserver/gameserver/model/itemcontainer/PcInventory.java index 922bad5f5d..bc964a666b 100644 --- a/trunk/java/com/l2jserver/gameserver/model/itemcontainer/PcInventory.java +++ b/trunk/java/com/l2jserver/gameserver/model/itemcontainer/PcInventory.java @@ -822,9 +822,9 @@ public class PcInventory extends Inventory getOwner().removeItemFromShortCut(item.getObjectId()); // Removes active Enchant Scroll - if (item.getObjectId() == getOwner().getActiveEnchantItemId()) + if (getOwner().isProcessingItem(item.getObjectId())) { - getOwner().setActiveEnchantItemId(L2PcInstance.ID_NONE); + getOwner().removeRequestsThatProcessesItem(item.getObjectId()); } if (item.getId() == ADENA_ID) diff --git a/trunk/java/com/l2jserver/gameserver/model/items/L2Item.java b/trunk/java/com/l2jserver/gameserver/model/items/L2Item.java index 9ccee5b8cc..4d928c9cd7 100644 --- a/trunk/java/com/l2jserver/gameserver/model/items/L2Item.java +++ b/trunk/java/com/l2jserver/gameserver/model/items/L2Item.java @@ -34,6 +34,7 @@ import com.l2jserver.gameserver.model.StatsSet; import com.l2jserver.gameserver.model.actor.L2Character; import com.l2jserver.gameserver.model.actor.L2Summon; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.commission.CommissionItemType; import com.l2jserver.gameserver.model.conditions.Condition; import com.l2jserver.gameserver.model.events.ListenersContainer; import com.l2jserver.gameserver.model.holders.SkillHolder; @@ -126,7 +127,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable private final int _time; private final int _autoDestroyTime; private final int _bodyPart; - private final String _bodyPartName; private final int _referencePrice; private final int _crystalCount; private final boolean _sellable; @@ -161,6 +161,10 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable private final int _reuseDelay; private final int _sharedReuseGroup; + private final CommissionItemType _commissionItemType; + private final int _compoundItem; + private final float _compoundChance; + /** * Constructor of the L2Item that fill class variables.
*
@@ -179,7 +183,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable _time = set.getInt("time", -1); _autoDestroyTime = set.getInt("auto_destroy_time", -1) * 1000; _bodyPart = ItemTable.SLOTS.get(set.getString("bodypart", "none")); - _bodyPartName = set.getString("bodypart", "none"); _referencePrice = set.getInt("price", 0); _crystalType = set.getEnum("crystal_type", CrystalType.class, CrystalType.NONE); _crystalCount = set.getInt("crystal_count", 0); @@ -206,6 +209,9 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable _defaultEnchantLevel = set.getInt("enchanted", 0); _reuseDelay = set.getInt("reuse_delay", 0); _sharedReuseGroup = set.getInt("shared_reuse_group", 0); + _commissionItemType = set.getEnum("commissionItemType", CommissionItemType.class, CommissionItemType.OTHER_ITEM); + _compoundItem = set.getInt("compoundItem", 0); + _compoundChance = set.getFloat("compoundChance", 0); String skills = set.getString("item_skill", null); if (skills != null) @@ -932,6 +938,21 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable return _sharedReuseGroup; } + public CommissionItemType getCommissionItemType() + { + return _commissionItemType; + } + + public int getCompoundItem() + { + return _compoundItem; + } + + public float getCompoundChance() + { + return _compoundChance; + } + /** * Usable in HTML windows. * @return the icon link in client files @@ -941,14 +962,6 @@ public abstract class L2Item extends ListenersContainer implements IIdentifiable return _icon; } - /** - * @return body part name - */ - public String getBodyPartName() - { - return _bodyPartName; - } - public int getDefaultEnchantLevel() { return _defaultEnchantLevel; diff --git a/trunk/java/com/l2jserver/gameserver/model/items/instance/L2ItemInstance.java b/trunk/java/com/l2jserver/gameserver/model/items/instance/L2ItemInstance.java index 1d077fcd9d..2e293a86dd 100644 --- a/trunk/java/com/l2jserver/gameserver/model/items/instance/L2ItemInstance.java +++ b/trunk/java/com/l2jserver/gameserver/model/items/instance/L2ItemInstance.java @@ -862,9 +862,7 @@ public final class L2ItemInstance extends L2Object && (getItem().getType2() != L2Item.TYPE2_QUEST) // Not Quest Item && ((getItem().getType2() != L2Item.TYPE2_MONEY) || (getItem().getType1() != L2Item.TYPE1_SHIELD_ARMOR)) // not money, not shield && ((pet == null) || (getObjectId() != pet.getControlObjectId())) // Not Control item of currently summoned pet - && (player.getActiveEnchantItemId() != getObjectId()) // Not momentarily used enchant scroll - && (player.getActiveEnchantSupportItemId() != getObjectId()) // Not momentarily used enchant support item - && (player.getActiveEnchantAttrItemId() != getObjectId()) // Not momentarily used enchant attribute item + && !(player.isProcessingItem(getObjectId())) // Not momentarily used enchant scroll && (allowAdena || (getId() != Inventory.ADENA_ID)) // Not Adena && ((player.getCurrentSkill() == null) || (player.getCurrentSkill().getSkill().getItemConsumeId() != getId())) && (!player.isCastingSimultaneouslyNow() || (player.getLastSimultaneousSkillCast() == null) || (player.getLastSimultaneousSkillCast().getItemConsumeId() != getId())) && (allowNonTradeable || (isTradeable() && (!((getItem().getItemType() == EtcItemType.PET_COLLAR) && player.havePetInvItems()))))); } diff --git a/trunk/java/com/l2jserver/gameserver/model/zone/ZoneId.java b/trunk/java/com/l2jserver/gameserver/model/zone/ZoneId.java index bfb8dcaa7c..b382594958 100644 --- a/trunk/java/com/l2jserver/gameserver/model/zone/ZoneId.java +++ b/trunk/java/com/l2jserver/gameserver/model/zone/ZoneId.java @@ -47,8 +47,7 @@ public enum ZoneId NO_BOOKMARK, NO_ITEM_DROP, NO_RESTART, - JUMP, - BATTALION; + JUMP; public static int getZoneCount() { diff --git a/trunk/java/com/l2jserver/gameserver/model/zone/type/L2BattalionZone.java b/trunk/java/com/l2jserver/gameserver/model/zone/type/L2BattalionZone.java deleted file mode 100644 index 782cd89b0b..0000000000 --- a/trunk/java/com/l2jserver/gameserver/model/zone/type/L2BattalionZone.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * Copyright (C) 2004-2015 L2J Server - * - * This file is part of L2J Server. - * - * L2J Server is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * L2J Server is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package com.l2jserver.gameserver.model.zone.type; - -import com.l2jserver.Config; -import com.l2jserver.gameserver.ThreadPoolManager; -import com.l2jserver.gameserver.datatables.ItemTable; -import com.l2jserver.gameserver.datatables.SkillData; -import com.l2jserver.gameserver.model.actor.L2Character; -import com.l2jserver.gameserver.model.actor.L2Summon; -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.model.itemcontainer.PcInventory; -import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; -import com.l2jserver.gameserver.model.skills.Skill; -import com.l2jserver.gameserver.model.zone.L2ZoneRespawn; -import com.l2jserver.gameserver.model.zone.ZoneId; -import com.l2jserver.gameserver.network.SystemMessageId; -import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; -import com.l2jserver.gameserver.network.serverpackets.SystemMessage; -import com.l2jserver.util.Rnd; - -/** - * Another type of damage zone with skills - * @author kerberos - */ -public class L2BattalionZone extends L2ZoneRespawn -{ - private final static Skill NOBLESS_SKILL = SkillData.getInstance().getSkill(1323, 1); - private final static String[] GRADE_NAMES = - { - "", - "D", - "C", - "B", - "A", - "S", - "S80", - "S84", - "R", - "R95", - "R99" - }; - - public L2BattalionZone(int id) - { - super(id); - } - - @Override - protected void onEnter(L2Character character) - { - character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true); - character.setInsideZone(ZoneId.BATTALION, true); - character.setInsideZone(ZoneId.PVP, true); - if (!Config.BTZ_STORE_ZONE) - { - character.setInsideZone(ZoneId.NO_STORE, true); - } - - if (character.isPlayer()) - { - final L2PcInstance activeChar = character.getActingPlayer(); - if ((Config.BTZ_CLASSES != null) && Config.BTZ_CLASSES.contains("" + activeChar.getClassId().getId())) - { - activeChar.teleToLocation(83597, 147888, -3405); - activeChar.sendMessage("Your class is not allowed in the Battalion zone."); - return; - } - - for (L2ItemInstance o : activeChar.getInventory().getItems()) - { - if (o.isEquipable() && o.isEquipped() && !checkItem(o)) - { - int slot = activeChar.getInventory().getSlotFromItem(o); - activeChar.getInventory().unEquipItemInBodySlot(slot); - activeChar.sendMessage(o.getName() + " unequiped because is not allowed inside this zone."); - } - } - activeChar.sendMessage("You entered into the Battalion zone."); - clear(activeChar); - if (Config.BTZ_GIVE_NOBLES) - { - NOBLESS_SKILL.applyEffects(activeChar, activeChar); - } - if (Config.BTZ_PVP_ENABLED) - { - activeChar.updatePvPFlag(1); - } - - } - } - - @Override - protected void onExit(L2Character character) - { - character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false); - character.setInsideZone(ZoneId.BATTALION, false); - character.setInsideZone(ZoneId.PVP, false); - if (!Config.BTZ_STORE_ZONE) - { - character.setInsideZone(ZoneId.NO_STORE, false); - } - - if (character.isPlayer()) - { - final L2PcInstance activeChar = character.getActingPlayer(); - activeChar.sendMessage("You left from a Battalion zone."); - - if (Config.BTZ_PVP_ENABLED) - { - activeChar.stopPvPFlag(); - } - } - } - - @Override - public void onDieInside(final L2Character character) - { - if (character.isPlayer()) - { - final L2PcInstance activeChar = character.getActingPlayer(); - if (Config.BTZ_REVIVE) - { - ThreadPoolManager.getInstance().scheduleGeneral(() -> - { - activeChar.doRevive(); - heal(activeChar); - int[] loc = Config.BTZ_SPAWN_LOCATIONS[Rnd.get(Config.BTZ_SPAWN_LOCATIONS.length)]; - activeChar.teleToLocation(loc[0] + Rnd.get(-Config.BTZ_RADIUS, Config.BTZ_RADIUS), loc[1] + Rnd.get(-Config.BTZ_RADIUS, Config.BTZ_RADIUS), loc[2]); - }, Config.BTZ_REVIVE_DELAY * 1000); - - ExShowScreenMessage revive = new ExShowScreenMessage("You will be respawned in " + Config.BTZ_REVIVE_DELAY + " seconds.", 5000, true, 2); // 5 Seconds display - activeChar.sendPacket(revive); - } - } - } - - @Override - public void onReviveInside(L2Character character) - { - if (character.isPlayer()) - { - final L2PcInstance activeChar = character.getActingPlayer(); - if (Config.BTZ_REVIVE_NOBLESS) - { - NOBLESS_SKILL.applyEffects(activeChar, activeChar); - } - if (Config.BTZ_REVIVE_HEAL) - { - heal(activeChar); - } - } - } - - private void clear(L2PcInstance player) - { - if (Config.BTZ_REMOVE_BUFFS) - { - player.stopAllEffectsExceptThoseThatLastThroughDeath(); - if (Config.BTZ_REMOVE_PETS) - { - L2Summon pet = player.getPet(); - if (pet != null) - { - pet.stopAllEffectsExceptThoseThatLastThroughDeath(); - pet.unSummon(player); - } - } - } - else - { - if (Config.BTZ_REMOVE_PETS) - { - L2Summon pet = player.getPet(); - if (pet != null) - { - pet.unSummon(player); - } - } - } - } - - private static void heal(L2PcInstance activeChar) - { - activeChar.setCurrentHp(activeChar.getMaxHp()); - activeChar.setCurrentCp(activeChar.getMaxCp()); - activeChar.setCurrentMp(activeChar.getMaxMp()); - } - - public static void givereward(L2PcInstance player) - { - if (player.isInsideZone(ZoneId.BATTALION)) - { - SystemMessage systemMessage = null; - - for (int[] reward : Config.BTZ_REWARDS) - { - final PcInventory inv = player.getInventory(); - - if (ItemTable.getInstance().getTemplate(reward[0]).isStackable()) - { - inv.addItem("L2MultiFunctionZone ", reward[0], reward[1], player, player); - - if (reward[1] > 1) - { - systemMessage = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_EARNED_S2_S1_S); - systemMessage.addItemName(reward[0]); - systemMessage.addLong(reward[1]); - } - else - { - systemMessage = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1); - systemMessage.addItemName(reward[0]); - } - player.sendPacket(systemMessage); - } - else - { - for (int i = 0; i < reward[1]; ++i) - { - inv.addItem("L2MultiFunctionZone ", reward[0], 1, player, player); - systemMessage = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_EARNED_S1); - systemMessage.addItemName(reward[0]); - player.sendPacket(systemMessage); - } - } - } - } - } - - public static boolean checkItem(L2ItemInstance item) - { - final int o = item.getItem().getCrystalType().ordinal(); - final int e = item.getEnchantLevel(); - - if ((Config.BTZ_ENCHANT != 0) && (e >= Config.BTZ_ENCHANT)) - { - return false; - } - - if (Config.BTZ_GRADES.contains(GRADE_NAMES[o])) - { - return false; - } - - if ((Config.BTZ_ITEMS != null) && Config.BTZ_ITEMS.contains("" + item.getId())) - { - return false; - } - return true; - } -} \ No newline at end of file diff --git a/trunk/java/com/l2jserver/gameserver/network/L2GamePacketHandler.java b/trunk/java/com/l2jserver/gameserver/network/L2GamePacketHandler.java index fd0122f678..4a38f58f00 100644 --- a/trunk/java/com/l2jserver/gameserver/network/L2GamePacketHandler.java +++ b/trunk/java/com/l2jserver/gameserver/network/L2GamePacketHandler.java @@ -37,15 +37,15 @@ import com.l2jserver.gameserver.network.clientpackets.appearance.RequestExCancel import com.l2jserver.gameserver.network.clientpackets.appearance.RequestExTryToPutShapeShiftingEnchantSupportItem; import com.l2jserver.gameserver.network.clientpackets.appearance.RequestExTryToPutShapeShiftingTargetItem; import com.l2jserver.gameserver.network.clientpackets.appearance.RequestShapeShiftingItem; -import com.l2jserver.gameserver.network.clientpackets.auctionhouse.RequestCommissionBuyInfo; -import com.l2jserver.gameserver.network.clientpackets.auctionhouse.RequestCommissionBuyItem; -import com.l2jserver.gameserver.network.clientpackets.auctionhouse.RequestCommissionCancel; -import com.l2jserver.gameserver.network.clientpackets.auctionhouse.RequestCommissionDelete; -import com.l2jserver.gameserver.network.clientpackets.auctionhouse.RequestCommissionInfo; -import com.l2jserver.gameserver.network.clientpackets.auctionhouse.RequestCommissionList; -import com.l2jserver.gameserver.network.clientpackets.auctionhouse.RequestCommissionRegister; -import com.l2jserver.gameserver.network.clientpackets.auctionhouse.RequestCommissionRegisteredItem; -import com.l2jserver.gameserver.network.clientpackets.auctionhouse.RequestCommissionRegistrableItemList; +import com.l2jserver.gameserver.network.clientpackets.commission.RequestCommissionBuyInfo; +import com.l2jserver.gameserver.network.clientpackets.commission.RequestCommissionBuyItem; +import com.l2jserver.gameserver.network.clientpackets.commission.RequestCommissionCancel; +import com.l2jserver.gameserver.network.clientpackets.commission.RequestCommissionDelete; +import com.l2jserver.gameserver.network.clientpackets.commission.RequestCommissionInfo; +import com.l2jserver.gameserver.network.clientpackets.commission.RequestCommissionList; +import com.l2jserver.gameserver.network.clientpackets.commission.RequestCommissionRegister; +import com.l2jserver.gameserver.network.clientpackets.commission.RequestCommissionRegisteredItem; +import com.l2jserver.gameserver.network.clientpackets.commission.RequestCommissionRegistrableItemList; import com.l2jserver.gameserver.network.clientpackets.compound.RequestNewEnchantClose; import com.l2jserver.gameserver.network.clientpackets.compound.RequestNewEnchantPushOne; import com.l2jserver.gameserver.network.clientpackets.compound.RequestNewEnchantPushTwo; diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/AbstractRefinePacket.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/AbstractRefinePacket.java index d44eae2686..47fc29e9fe 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/AbstractRefinePacket.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/AbstractRefinePacket.java @@ -26,6 +26,8 @@ import com.l2jserver.Config; import com.l2jserver.gameserver.enums.ItemLocation; import com.l2jserver.gameserver.enums.PrivateStoreType; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.EnchantItemAttributeRequest; +import com.l2jserver.gameserver.model.actor.request.EnchantItemRequest; import com.l2jserver.gameserver.model.items.L2Armor; import com.l2jserver.gameserver.model.items.L2Item; import com.l2jserver.gameserver.model.items.L2Weapon; @@ -433,7 +435,7 @@ public abstract class AbstractRefinePacket extends L2GameClientPacket { return false; } - if (player.isEnchanting() || player.isProcessingTransaction()) + if (player.hasRequest(EnchantItemRequest.class, EnchantItemAttributeRequest.class) || player.isProcessingTransaction()) { return false; } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/Logout.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/Logout.java index 06bc157ff6..5522b0c4b3 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/Logout.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/Logout.java @@ -25,7 +25,6 @@ import java.util.logging.Logger; import com.l2jserver.Config; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.entity.L2Event; -import com.l2jserver.gameserver.model.zone.ZoneId; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ActionFailed; import com.l2jserver.gameserver.taskmanager.AttackStanceTaskManager; @@ -54,7 +53,7 @@ public final class Logout extends L2GameClientPacket return; } - if ((player.getActiveEnchantItemId() != L2PcInstance.ID_NONE) || (player.getActiveEnchantAttrItemId() != L2PcInstance.ID_NONE)) + if (player.hasItemRequest()) { player.sendPacket(ActionFailed.STATIC_PACKET); return; @@ -67,13 +66,6 @@ public final class Logout extends L2GameClientPacket return; } - if (player.isInsideZone(ZoneId.BATTALION) && !Config.BTZ_LOGOUT_ZONE) - { - player.sendMessage("You cannot logout while inside a Battalion zone."); - player.sendPacket(ActionFailed.STATIC_PACKET); - return; - } - // Don't allow leaving if player is fighting if (AttackStanceTaskManager.getInstance().hasAttackStanceTask(player)) { diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestAnswerJoinParty.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestAnswerJoinParty.java index fa88ab624c..8bf7392636 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestAnswerJoinParty.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestAnswerJoinParty.java @@ -22,6 +22,7 @@ import com.l2jserver.gameserver.model.L2Party; import com.l2jserver.gameserver.model.PartyMatchRoom; import com.l2jserver.gameserver.model.PartyMatchRoomList; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.PartyRequest; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ExManagePartyRoomMember; import com.l2jserver.gameserver.network.serverpackets.JoinParty; @@ -48,12 +49,19 @@ public final class RequestAnswerJoinParty extends L2GameClientPacket return; } - final L2PcInstance requestor = player.getActiveRequester(); + final PartyRequest request = player.getRequest(PartyRequest.class); + if ((request == null) || request.isProcessing()) + { + return; + } + request.setProcessing(true); + + final L2PcInstance requestor = request.getActiveChar(); if (requestor == null) { return; } - + final L2Party party = requestor.getParty(); requestor.sendPacket(new JoinParty(_response)); switch (_response) @@ -138,11 +146,11 @@ public final class RequestAnswerJoinParty extends L2GameClientPacket if (requestor.isInParty()) { - requestor.getParty().setPendingInvitation(false); // if party is null, there is no need of decreasing + party.setPendingInvitation(false); // if party is null, there is no need of decreasing } - player.setActiveRequester(null); - requestor.onTransactionResponse(); + request.setProcessing(false); + player.removeRequest(request.getClass()); } @Override diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java index 2228290302..0906623fdf 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestBypassToServer.java @@ -47,7 +47,6 @@ import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ActionFailed; import com.l2jserver.gameserver.network.serverpackets.ConfirmDlg; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExShowCommission; import com.l2jserver.gameserver.util.GMAudit; import com.l2jserver.gameserver.util.Util; @@ -70,7 +69,6 @@ public final class RequestBypassToServer extends L2GameClientPacket "_olympiad?command", "menu_select", "manor_menu_select", - "showAuction", "pccafe" }; @@ -289,15 +287,6 @@ public final class RequestBypassToServer extends L2GameClientPacket EventDispatcher.getInstance().notifyEventAsync(new OnNpcManorBypass(activeChar, lastNpc, ask, state, time), lastNpc); } } - else if (_command.equals("showAuction")) - { - final L2PcInstance player = getClient().getActiveChar(); - if (player == null) - { - return; - } - player.sendPacket(new ExShowCommission()); - } else if (_command.startsWith("pccafe")) { final L2PcInstance player = getClient().getActiveChar(); diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestCancelPostAttachment.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestCancelPostAttachment.java index 8e187fb2ec..928f636335 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestCancelPostAttachment.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestCancelPostAttachment.java @@ -88,7 +88,7 @@ public final class RequestCancelPostAttachment extends L2GameClientPacket return; } - if (activeChar.isEnchanting()) + if (activeChar.hasItemRequest()) { activeChar.sendPacket(SystemMessageId.YOU_CANNOT_CANCEL_DURING_AN_ITEM_ENHANCEMENT_OR_ATTRIBUTE_ENHANCEMENT); return; diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestChangeAttributeCancel.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestChangeAttributeCancel.java index 11993c3298..da8d4a1c83 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestChangeAttributeCancel.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestChangeAttributeCancel.java @@ -15,6 +15,7 @@ package com.l2jserver.gameserver.network.clientpackets; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.EnchantItemAttributeRequest; /** * @author Erlandys @@ -36,7 +37,12 @@ public class RequestChangeAttributeCancel extends L2GameClientPacket { return; } - player.setActiveEnchantAttrItemId(0); + final EnchantItemAttributeRequest request = player.getRequest(EnchantItemAttributeRequest.class); + if (request == null) + { + return; + } + player.removeRequest(request.getClass()); } @Override diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestChangeAttributeItem.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestChangeAttributeItem.java index 9fdba8cac8..54b221b123 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestChangeAttributeItem.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestChangeAttributeItem.java @@ -17,6 +17,7 @@ package com.l2jserver.gameserver.network.clientpackets; import com.l2jserver.Config; import com.l2jserver.gameserver.enums.PrivateStoreType; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.EnchantItemAttributeRequest; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ExChangeAttributeFail; @@ -56,30 +57,39 @@ public class RequestChangeAttributeItem extends L2GameClientPacket return; } + final EnchantItemAttributeRequest request = player.getRequest(EnchantItemAttributeRequest.class); + if (request == null) + { + return; + } + request.setProcessing(true); + L2ItemInstance item = player.getInventory().getItemByObjectId(_itemOID); if (player.getPrivateStoreType() != PrivateStoreType.NONE) { player.sendPacket(SystemMessageId.YOU_CANNOT_CHANGE_AN_ATTRIBUTE_WHILE_USING_A_PRIVATE_STORE_OR_WORKSHOP); + player.removeRequest(request.getClass()); return; } if (player.getActiveTradeList() != null) { player.sendPacket(SystemMessageId.YOU_CANNOT_CHANGE_ATTRIBUTES_WHILE_EXCHANGING); + player.removeRequest(request.getClass()); return; } if (!item.isWeapon()) { - player.setActiveEnchantAttrItemId(0); + player.removeRequest(request.getClass()); player.sendPacket(new ExChangeAttributeItemList(player, _attributeOID)); return; } if (_newAttributeID == -1) { - player.setActiveEnchantAttrItemId(0); + player.removeRequest(request.getClass()); player.sendPacket(new ExChangeAttributeItemList(player, _attributeOID)); return; } @@ -123,7 +133,7 @@ public class RequestChangeAttributeItem extends L2GameClientPacket } player.sendPacket(iu); - player.setActiveEnchantAttrItemId(0); + player.removeRequest(request.getClass()); } @Override diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestEnchantItem.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestEnchantItem.java index ac0a30e723..a97e151081 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestEnchantItem.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestEnchantItem.java @@ -27,6 +27,7 @@ import com.l2jserver.gameserver.data.xml.impl.EnchantItemData; import com.l2jserver.gameserver.enums.UserInfoType; import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.EnchantItemRequest; import com.l2jserver.gameserver.model.items.L2Item; import com.l2jserver.gameserver.model.items.enchant.EnchantResultType; import com.l2jserver.gameserver.model.items.enchant.EnchantScroll; @@ -64,38 +65,44 @@ public final class RequestEnchantItem extends L2GameClientPacket protected void runImpl() { final L2PcInstance activeChar = getClient().getActiveChar(); - if ((activeChar == null) || (_objectId == 0)) + if (activeChar == null) { return; } + final EnchantItemRequest request = activeChar.getRequest(EnchantItemRequest.class); + if ((request == null) || request.isProcessing()) + { + return; + } + + request.setEnchantingItem(_objectId); + request.setProcessing(true); + if (!activeChar.isOnline() || getClient().isDetached()) { - activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); + activeChar.removeRequest(request.getClass()); return; } if (activeChar.isProcessingTransaction() || activeChar.isInStoreMode()) { activeChar.sendPacket(SystemMessageId.YOU_CANNOT_ENCHANT_WHILE_OPERATING_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP); - activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); + activeChar.removeRequest(request.getClass()); return; } - L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId); - L2ItemInstance scroll = activeChar.getInventory().getItemByObjectId(activeChar.getActiveEnchantItemId()); - L2ItemInstance support = activeChar.getInventory().getItemByObjectId(activeChar.getActiveEnchantSupportItemId()); - + final L2ItemInstance item = request.getEnchantingItem(); + final L2ItemInstance scroll = request.getEnchantingScroll(); + final L2ItemInstance support = request.getSupportItem(); if ((item == null) || (scroll == null)) { - activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); + activeChar.removeRequest(request.getClass()); return; } // template for scroll final EnchantScroll scrollTemplate = EnchantItemData.getInstance().getEnchantScroll(scroll); - - // scroll not found in list if (scrollTemplate == null) { return; @@ -107,7 +114,7 @@ public final class RequestEnchantItem extends L2GameClientPacket { if (support.getObjectId() != _supportId) { - activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); + activeChar.removeRequest(request.getClass()); return; } supportTemplate = EnchantItemData.getInstance().getSupportItem(support); @@ -117,27 +124,26 @@ public final class RequestEnchantItem extends L2GameClientPacket if (!scrollTemplate.isValid(item, supportTemplate)) { activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS); - activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); + activeChar.removeRequest(request.getClass()); activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0)); return; } // fast auto-enchant cheat check - if ((activeChar.getActiveEnchantTimestamp() == 0) || ((System.currentTimeMillis() - activeChar.getActiveEnchantTimestamp()) < 2000)) + if ((request.getTimestamp() == 0) || ((System.currentTimeMillis() - request.getTimestamp()) < 2000)) { Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " use autoenchant program ", Config.DEFAULT_PUNISH); - activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); + activeChar.removeRequest(request.getClass()); activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0)); return; } // attempting to destroy scroll - scroll = activeChar.getInventory().destroyItem("Enchant", scroll.getObjectId(), 1, activeChar, item); - if (scroll == null) + if (activeChar.getInventory().destroyItem("Enchant", scroll.getObjectId(), 1, activeChar, item) == null) { activeChar.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2); Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " tried to enchant with a scroll he doesn't have", Config.DEFAULT_PUNISH); - activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); + activeChar.removeRequest(request.getClass()); activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0)); return; } @@ -145,12 +151,11 @@ public final class RequestEnchantItem extends L2GameClientPacket // attempting to destroy support if exist if (support != null) { - support = activeChar.getInventory().destroyItem("Enchant", support.getObjectId(), 1, activeChar, item); - if (support == null) + if (activeChar.getInventory().destroyItem("Enchant", support.getObjectId(), 1, activeChar, item) == null) { activeChar.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2); Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " tried to enchant with a support item he doesn't have", Config.DEFAULT_PUNISH); - activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); + activeChar.removeRequest(request.getClass()); activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0)); return; } @@ -163,7 +168,7 @@ public final class RequestEnchantItem extends L2GameClientPacket if ((item.getOwnerId() != activeChar.getObjectId()) || (item.isEnchantable() == 0)) { activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS); - activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); + activeChar.removeRequest(request.getClass()); activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0)); return; } @@ -174,7 +179,7 @@ public final class RequestEnchantItem extends L2GameClientPacket case ERROR: { activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS); - activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); + activeChar.removeRequest(request.getClass()); activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0)); break; } @@ -318,12 +323,11 @@ public final class RequestEnchantItem extends L2GameClientPacket count = 1; } - item = activeChar.getInventory().destroyItem("Enchant", item, activeChar, null); - if (item == null) + if (activeChar.getInventory().destroyItem("Enchant", item, activeChar, null) == null) { // unable to destroy item, cheater ? Util.handleIllegalPlayerAction(activeChar, "Unable to delete item on enchant failure from player " + activeChar.getName() + ", possible cheater !", Config.DEFAULT_PUNISH); - activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); + activeChar.removeRequest(request.getClass()); activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0)); if (Config.LOG_ITEM_ENCHANTS) @@ -429,6 +433,7 @@ public final class RequestEnchantItem extends L2GameClientPacket activeChar.sendPacket(new ItemList(activeChar, true)); } + request.setProcessing(false); activeChar.broadcastUserInfo(UserInfoType.ENCHANTLEVEL); activeChar.sendPacket(new ExUserInfoInvenWeight(activeChar)); activeChar.sendPacket(new ExAdenaInvenCount(activeChar)); diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExAddEnchantScrollItem.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExAddEnchantScrollItem.java index 1a7e226ebb..bff98127e5 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExAddEnchantScrollItem.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExAddEnchantScrollItem.java @@ -20,6 +20,7 @@ package com.l2jserver.gameserver.network.clientpackets; import com.l2jserver.gameserver.data.xml.impl.EnchantItemData; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.EnchantItemRequest; import com.l2jserver.gameserver.model.items.enchant.EnchantScroll; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.network.SystemMessageId; @@ -51,29 +52,39 @@ public class RequestExAddEnchantScrollItem extends L2GameClientPacket return; } - if (activeChar.isEnchanting()) + final EnchantItemRequest request = activeChar.getRequest(EnchantItemRequest.class); + if ((request == null) || request.isProcessing()) { - final L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_enchantObjectId); - final L2ItemInstance scroll = activeChar.getInventory().getItemByObjectId(_scrollObjectId); - - if ((item == null) || (scroll == null)) - { - // message may be custom - activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS); - return; - } - - final EnchantScroll scrollTemplate = EnchantItemData.getInstance().getEnchantScroll(scroll); - - if ((scrollTemplate == null)) - { - // message may be custom - activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS); - activeChar.sendPacket(new ExPutEnchantScrollItemResult(0)); - return; - } - activeChar.sendPacket(new ExPutEnchantScrollItemResult(_scrollObjectId)); + return; } + + request.setEnchantingItem(_enchantObjectId); + request.setEnchantingScroll(_scrollObjectId); + + final L2ItemInstance item = request.getEnchantingItem(); + final L2ItemInstance scroll = request.getEnchantingScroll(); + if ((item == null) || (scroll == null)) + { + // message may be custom + activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS); + activeChar.sendPacket(new ExPutEnchantScrollItemResult(0)); + request.setEnchantingItem(L2PcInstance.ID_NONE); + request.setEnchantingScroll(L2PcInstance.ID_NONE); + return; + } + + final EnchantScroll scrollTemplate = EnchantItemData.getInstance().getEnchantScroll(scroll); + if ((scrollTemplate == null)) + { + // message may be custom + activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS); + activeChar.sendPacket(new ExPutEnchantScrollItemResult(0)); + request.setEnchantingScroll(L2PcInstance.ID_NONE); + return; + } + + request.setTimestamp(System.currentTimeMillis()); + activeChar.sendPacket(new ExPutEnchantScrollItemResult(_scrollObjectId)); } @Override diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExCancelEnchantItem.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExCancelEnchantItem.java index ee451e9773..efaa94e927 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExCancelEnchantItem.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExCancelEnchantItem.java @@ -19,6 +19,7 @@ package com.l2jserver.gameserver.network.clientpackets; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.EnchantItemRequest; import com.l2jserver.gameserver.network.serverpackets.EnchantResult; /** @@ -37,12 +38,14 @@ public class RequestExCancelEnchantItem extends L2GameClientPacket @Override protected void runImpl() { - L2PcInstance activeChar = getClient().getActiveChar(); - if (activeChar != null) + final L2PcInstance activeChar = getClient().getActiveChar(); + if (activeChar == null) { - activeChar.sendPacket(new EnchantResult(2, 0, 0)); - activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); + return; } + + activeChar.sendPacket(new EnchantResult(2, 0, 0)); + activeChar.removeRequest(EnchantItemRequest.class); } @Override diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java index 56af747104..f3e42df326 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExEnchantItemAttribute.java @@ -22,6 +22,7 @@ import com.l2jserver.Config; import com.l2jserver.gameserver.enums.PrivateStoreType; import com.l2jserver.gameserver.model.Elementals; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.EnchantItemAttributeRequest; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ExAttributeEnchantResult; @@ -54,24 +55,32 @@ public class RequestExEnchantItemAttribute extends L2GameClientPacket return; } + final EnchantItemAttributeRequest request = player.getRequest(EnchantItemAttributeRequest.class); + if (request == null) + { + return; + } + + request.setProcessing(true); + if (_objectId == 0xFFFFFFFF) { // Player canceled enchant - player.setActiveEnchantAttrItemId(L2PcInstance.ID_NONE); + player.removeRequest(request.getClass()); player.sendPacket(SystemMessageId.ATTRIBUTE_ITEM_USAGE_HAS_BEEN_CANCELLED); return; } if (!player.isOnline()) { - player.setActiveEnchantAttrItemId(L2PcInstance.ID_NONE); + player.removeRequest(request.getClass()); return; } if (player.getPrivateStoreType() != PrivateStoreType.NONE) { player.sendPacket(SystemMessageId.YOU_CANNOT_ADD_ELEMENTAL_POWER_WHILE_OPERATING_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP); - player.setActiveEnchantAttrItemId(L2PcInstance.ID_NONE); + player.removeRequest(request.getClass()); return; } @@ -80,16 +89,16 @@ public class RequestExEnchantItemAttribute extends L2GameClientPacket { // Cancel trade player.cancelActiveTrade(); - player.setActiveEnchantAttrItemId(L2PcInstance.ID_NONE); + player.removeRequest(request.getClass()); player.sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_TRADING); return; } final L2ItemInstance item = player.getInventory().getItemByObjectId(_objectId); - final L2ItemInstance stone = player.getInventory().getItemByObjectId(player.getActiveEnchantAttrItemId()); + final L2ItemInstance stone = request.getEnchantingStone(); if ((item == null) || (stone == null)) { - player.setActiveEnchantAttrItemId(L2PcInstance.ID_NONE); + player.removeRequest(request.getClass()); player.sendPacket(SystemMessageId.ATTRIBUTE_ITEM_USAGE_HAS_BEEN_CANCELLED); return; } @@ -97,7 +106,7 @@ public class RequestExEnchantItemAttribute extends L2GameClientPacket if (!item.isElementable()) { player.sendPacket(SystemMessageId.ELEMENTAL_POWER_ENHANCER_USAGE_REQUIREMENT_IS_NOT_SUFFICIENT); - player.setActiveEnchantAttrItemId(L2PcInstance.ID_NONE); + player.removeRequest(request.getClass()); return; } @@ -108,14 +117,14 @@ public class RequestExEnchantItemAttribute extends L2GameClientPacket { if (item.getOwnerId() != player.getObjectId()) { - player.setActiveEnchantAttrItemId(L2PcInstance.ID_NONE); + player.removeRequest(request.getClass()); return; } break; } default: { - player.setActiveEnchantAttrItemId(L2PcInstance.ID_NONE); + player.removeRequest(request.getClass()); Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to use enchant Exploit!", Config.DEFAULT_PUNISH); return; } @@ -139,7 +148,7 @@ public class RequestExEnchantItemAttribute extends L2GameClientPacket if ((item.isWeapon() && (oldElement != null) && (oldElement.getElement() != elementToAdd) && (oldElement.getElement() != -2)) || (item.isArmor() && (item.getElemental(elementToAdd) == null) && (item.getElementals() != null) && (item.getElementals().length >= 3))) { player.sendPacket(SystemMessageId.ANOTHER_ELEMENTAL_POWER_HAS_ALREADY_BEEN_ADDED_THIS_ELEMENTAL_POWER_CANNOT_BE_ADDED); - player.setActiveEnchantAttrItemId(L2PcInstance.ID_NONE); + player.removeRequest(request.getClass()); return; } @@ -150,7 +159,7 @@ public class RequestExEnchantItemAttribute extends L2GameClientPacket { if (elm.getElement() == opositeElement) { - player.setActiveEnchantAttrItemId(L2PcInstance.ID_NONE); + player.removeRequest(request.getClass()); Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to add oposite attribute to item!", Config.DEFAULT_PUNISH); return; } @@ -167,7 +176,7 @@ public class RequestExEnchantItemAttribute extends L2GameClientPacket if (powerToAdd <= 0) { player.sendPacket(SystemMessageId.ATTRIBUTE_ITEM_USAGE_HAS_BEEN_CANCELLED); - player.setActiveEnchantAttrItemId(L2PcInstance.ID_NONE); + player.removeRequest(request.getClass()); return; } @@ -267,7 +276,7 @@ public class RequestExEnchantItemAttribute extends L2GameClientPacket iu.addModifiedItem(stone); } - player.setActiveEnchantAttrItemId(L2PcInstance.ID_NONE); + player.removeRequest(request.getClass()); player.sendPacket(new ExAttributeEnchantResult(result, item.isWeapon(), elementToAdd, elementValue, newValue, successfulAttempts, failedAttempts)); player.sendPacket(new UserInfo(player)); player.sendPacket(iu); @@ -290,7 +299,7 @@ public class RequestExEnchantItemAttribute extends L2GameClientPacket if (powerToAdd <= 0) { player.sendPacket(SystemMessageId.ATTRIBUTE_ITEM_USAGE_HAS_BEEN_CANCELLED); - player.setActiveEnchantAttrItemId(L2PcInstance.ID_NONE); + player.removeRequest(EnchantItemAttributeRequest.class); return -1; } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExRemoveEnchantSupportItem.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExRemoveEnchantSupportItem.java index a5c276056b..0830a4ad8e 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExRemoveEnchantSupportItem.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExRemoveEnchantSupportItem.java @@ -19,6 +19,7 @@ package com.l2jserver.gameserver.network.clientpackets; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.EnchantItemRequest; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.network.serverpackets.ExRemoveEnchantSupportItemResult; @@ -39,21 +40,24 @@ public class RequestExRemoveEnchantSupportItem extends L2GameClientPacket protected void runImpl() { final L2PcInstance activeChar = getClient().getActiveChar(); - if (activeChar == null) { return; } - activeChar.setActiveEnchantTimestamp(System.currentTimeMillis()); - - final L2ItemInstance supportItem = activeChar.getInventory().getItemByObjectId(activeChar.getActiveEnchantSupportItemId()); - - if ((supportItem == null) || (supportItem.getCount() < 1)) + final EnchantItemRequest request = activeChar.getRequest(EnchantItemRequest.class); + if ((request == null) || request.isProcessing()) { - activeChar.setActiveEnchantSupportItemId(L2PcInstance.ID_NONE); + return; } + final L2ItemInstance supportItem = request.getSupportItem(); + if ((supportItem == null) || (supportItem.getCount() < 1)) + { + request.setSupportItem(L2PcInstance.ID_NONE); + } + + request.setTimestamp(System.currentTimeMillis()); activeChar.sendPacket(ExRemoveEnchantSupportItemResult.STATIC_PACKET); } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExTryToPutEnchantSupportItem.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExTryToPutEnchantSupportItem.java index a2826de305..30b75f866c 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExTryToPutEnchantSupportItem.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExTryToPutEnchantSupportItem.java @@ -20,6 +20,7 @@ package com.l2jserver.gameserver.network.clientpackets; import com.l2jserver.gameserver.data.xml.impl.EnchantItemData; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.EnchantItemRequest; import com.l2jserver.gameserver.model.items.enchant.EnchantScroll; import com.l2jserver.gameserver.model.items.enchant.EnchantSupportItem; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; @@ -52,34 +53,41 @@ public class RequestExTryToPutEnchantSupportItem extends L2GameClientPacket return; } - if (activeChar.isEnchanting()) + final EnchantItemRequest request = activeChar.getRequest(EnchantItemRequest.class); + if ((request == null) || request.isProcessing()) { - final L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_enchantObjectId); - final L2ItemInstance scroll = activeChar.getInventory().getItemByObjectId(activeChar.getActiveEnchantItemId()); - final L2ItemInstance support = activeChar.getInventory().getItemByObjectId(_supportObjectId); - - if ((item == null) || (scroll == null) || (support == null)) - { - // message may be custom - activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS); - activeChar.setActiveEnchantSupportItemId(L2PcInstance.ID_NONE); - return; - } - - final EnchantScroll scrollTemplate = EnchantItemData.getInstance().getEnchantScroll(scroll); - final EnchantSupportItem supportTemplate = EnchantItemData.getInstance().getSupportItem(support); - - if ((scrollTemplate == null) || (supportTemplate == null) || !scrollTemplate.isValid(item, supportTemplate)) - { - // message may be custom - activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS); - activeChar.setActiveEnchantSupportItemId(L2PcInstance.ID_NONE); - activeChar.sendPacket(new ExPutEnchantSupportItemResult(0)); - return; - } - activeChar.setActiveEnchantSupportItemId(support.getObjectId()); - activeChar.sendPacket(new ExPutEnchantSupportItemResult(_supportObjectId)); + return; } + + request.setEnchantingItem(_enchantObjectId); + request.setSupportItem(_supportObjectId); + + final L2ItemInstance item = request.getEnchantingItem(); + final L2ItemInstance scroll = request.getEnchantingScroll(); + final L2ItemInstance support = request.getSupportItem(); + if ((item == null) || (scroll == null) || (support == null)) + { + // message may be custom + activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS); + request.setEnchantingItem(L2PcInstance.ID_NONE); + request.setSupportItem(L2PcInstance.ID_NONE); + return; + } + + final EnchantScroll scrollTemplate = EnchantItemData.getInstance().getEnchantScroll(scroll); + final EnchantSupportItem supportTemplate = EnchantItemData.getInstance().getSupportItem(support); + if ((scrollTemplate == null) || (supportTemplate == null) || !scrollTemplate.isValid(item, supportTemplate)) + { + // message may be custom + activeChar.sendPacket(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITIONS); + request.setSupportItem(L2PcInstance.ID_NONE); + activeChar.sendPacket(new ExPutEnchantSupportItemResult(0)); + return; + } + + request.setSupportItem(support.getObjectId()); + request.setTimestamp(System.currentTimeMillis()); + activeChar.sendPacket(new ExPutEnchantSupportItemResult(_supportObjectId)); } @Override diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExTryToPutEnchantTargetItem.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExTryToPutEnchantTargetItem.java index 1cbbb68c7f..11f59c8f86 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExTryToPutEnchantTargetItem.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestExTryToPutEnchantTargetItem.java @@ -22,6 +22,7 @@ import java.util.logging.Level; import com.l2jserver.gameserver.data.xml.impl.EnchantItemData; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.EnchantItemRequest; import com.l2jserver.gameserver.model.items.enchant.EnchantScroll; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.network.SystemMessageId; @@ -46,18 +47,21 @@ public class RequestExTryToPutEnchantTargetItem extends L2GameClientPacket protected void runImpl() { final L2PcInstance activeChar = getClient().getActiveChar(); - if ((_objectId == 0) || (activeChar == null)) + if (activeChar == null) { return; } - if (activeChar.isEnchanting()) + final EnchantItemRequest request = activeChar.getRequest(EnchantItemRequest.class); + if ((request == null) || request.isProcessing()) { return; } - final L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId); - final L2ItemInstance scroll = activeChar.getInventory().getItemByObjectId(activeChar.getActiveEnchantItemId()); + request.setEnchantingItem(_objectId); + + final L2ItemInstance item = request.getEnchantingItem(); + final L2ItemInstance scroll = request.getEnchantingScroll(); if ((item == null) || (scroll == null)) { return; @@ -67,7 +71,7 @@ public class RequestExTryToPutEnchantTargetItem extends L2GameClientPacket if ((scrollTemplate == null) || !scrollTemplate.isValid(item, null)) { activeChar.sendPacket(SystemMessageId.DOES_NOT_FIT_STRENGTHENING_CONDITIONS_OF_THE_SCROLL); - activeChar.setActiveEnchantItemId(L2PcInstance.ID_NONE); + activeChar.removeRequest(request.getClass()); activeChar.sendPacket(new ExPutEnchantTargetItemResult(0)); if (scrollTemplate == null) { @@ -75,8 +79,7 @@ public class RequestExTryToPutEnchantTargetItem extends L2GameClientPacket } return; } - activeChar.setIsEnchanting(true); - activeChar.setActiveEnchantTimestamp(System.currentTimeMillis()); + request.setTimestamp(System.currentTimeMillis()); activeChar.sendPacket(new ExPutEnchantTargetItemResult(_objectId)); } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestGetItemFromPet.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestGetItemFromPet.java index d32c47053c..d13a01e9a3 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestGetItemFromPet.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestGetItemFromPet.java @@ -60,7 +60,7 @@ public final class RequestGetItemFromPet extends L2GameClientPacket return; } - if (player.getActiveEnchantItemId() != L2PcInstance.ID_NONE) + if (player.hasItemRequest()) { return; } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestGiveItemToPet.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestGiveItemToPet.java index 6674cc55ea..1a8f953716 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestGiveItemToPet.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestGiveItemToPet.java @@ -59,7 +59,7 @@ public final class RequestGiveItemToPet extends L2GameClientPacket return; } - if (player.getActiveEnchantItemId() != L2PcInstance.ID_NONE) + if (player.hasItemRequest()) { return; } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestJoinParty.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestJoinParty.java index f9d5717aea..8d2ddd2791 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestJoinParty.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestJoinParty.java @@ -23,6 +23,7 @@ import com.l2jserver.gameserver.model.BlockList; import com.l2jserver.gameserver.model.L2Party; import com.l2jserver.gameserver.model.L2World; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.PartyRequest; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ActionFailed; import com.l2jserver.gameserver.network.serverpackets.AskJoinParty; @@ -160,29 +161,27 @@ public final class RequestJoinParty extends L2GameClientPacket if (!party.isLeader(requestor)) { requestor.sendPacket(SystemMessageId.ONLY_THE_LEADER_CAN_GIVE_OUT_INVITATIONS); - return; } - if (party.getMemberCount() >= 9) + else if (party.getMemberCount() >= 9) { requestor.sendPacket(SystemMessageId.THE_PARTY_IS_FULL); - return; } - if (party.getPendingInvitation() && !party.isInvitationRequestExpired()) + else if (party.getPendingInvitation() && !party.isInvitationRequestExpired()) { requestor.sendPacket(SystemMessageId.WAITING_FOR_ANOTHER_REPLY); - return; } - - if (!target.isProcessingRequest()) + else if (!target.hasRequest(PartyRequest.class)) { - requestor.onTransactionRequest(target); - // in case a leader change has happened, use party's mode + final PartyRequest request = new PartyRequest(requestor, target); + request.scheduleTimeout(30 * 1000); + requestor.addRequest(request); + target.addRequest(request); target.sendPacket(new AskJoinParty(requestor.getName(), party.getDistributionType())); party.setPendingInvitation(true); } else { - SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_ON_ANOTHER_TASK_PLEASE_TRY_AGAIN_LATER); + final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_ON_ANOTHER_TASK_PLEASE_TRY_AGAIN_LATER); sm.addString(target.getName()); requestor.sendPacket(sm); } @@ -194,17 +193,20 @@ public final class RequestJoinParty extends L2GameClientPacket */ private void createNewParty(L2PcInstance target, L2PcInstance requestor) { - PartyDistributionType partyDistributionType = PartyDistributionType.findById(_partyDistributionTypeId); + final PartyDistributionType partyDistributionType = PartyDistributionType.findById(_partyDistributionTypeId); if (partyDistributionType == null) { return; } - if (!target.isProcessingRequest()) + if (!target.hasRequest(PartyRequest.class)) { + final PartyRequest request = new PartyRequest(requestor, target); + request.scheduleTimeout(30 * 1000); + requestor.addRequest(request); + target.addRequest(request); target.sendPacket(new AskJoinParty(requestor.getName(), partyDistributionType)); - target.setActiveRequester(requestor); - requestor.onTransactionRequest(target); + requestor.setPartyDistributionType(partyDistributionType); } else diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestPackageSend.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestPackageSend.java index 6f85151aff..ec0d991dc7 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestPackageSend.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestPackageSend.java @@ -93,7 +93,7 @@ public class RequestPackageSend extends L2GameClientPacket return; } - if (player.getActiveEnchantItemId() != L2PcInstance.ID_NONE) + if (player.hasItemRequest()) { Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to use enchant Exploit!", Config.DEFAULT_PUNISH); return; diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestPostAttachment.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestPostAttachment.java index 5402b4e496..2738efcc35 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestPostAttachment.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestPostAttachment.java @@ -91,7 +91,7 @@ public final class RequestPostAttachment extends L2GameClientPacket return; } - if (activeChar.isEnchanting()) + if (activeChar.hasItemRequest()) { activeChar.sendPacket(SystemMessageId.YOU_CANNOT_RECEIVE_MAIL_WHILE_ENCHANTING_AN_ITEM_BESTOWING_AN_ATTRIBUTE_OR_COMBINING_JEWELS); return; diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestRestart.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestRestart.java index 49935dbe18..426f3aea9c 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestRestart.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestRestart.java @@ -26,7 +26,6 @@ import com.l2jserver.Config; import com.l2jserver.gameserver.enums.PrivateStoreType; import com.l2jserver.gameserver.instancemanager.AntiFeedManager; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.model.zone.ZoneId; import com.l2jserver.gameserver.network.L2GameClient; import com.l2jserver.gameserver.network.L2GameClient.GameClientState; import com.l2jserver.gameserver.network.SystemMessageId; @@ -58,7 +57,7 @@ public final class RequestRestart extends L2GameClientPacket return; } - if ((player.getActiveEnchantItemId() != L2PcInstance.ID_NONE) || (player.getActiveEnchantAttrItemId() != L2PcInstance.ID_NONE)) + if (player.hasItemRequest()) { sendPacket(RestartResponse.valueOf(false)); return; @@ -90,13 +89,6 @@ public final class RequestRestart extends L2GameClientPacket return; } - if (player.isInsideZone(ZoneId.BATTALION) && !Config.BTZ_RESTART_ZONE) - { - player.sendMessage("You cannot restart while inside a Battalion zone."); - sendPacket(RestartResponse.valueOf(false)); - return; - } - if (player.isBlockedFromExit()) { sendPacket(RestartResponse.valueOf(false)); diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestSendPost.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestSendPost.java index e648abafa0..2a9cc7de34 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestSendPost.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestSendPost.java @@ -144,7 +144,7 @@ public final class RequestSendPost extends L2GameClientPacket return; } - if (activeChar.isEnchanting()) + if (activeChar.hasItemRequest()) { activeChar.sendPacket(SystemMessageId.YOU_CANNOT_SEND_MAIL_WHILE_ENCHANTING_AN_ITEM_BESTOWING_AN_ATTRIBUTE_OR_COMBINING_JEWELS); return; diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/SendWareHouseDepositList.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/SendWareHouseDepositList.java index 01ba0e3288..f727c3402b 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/SendWareHouseDepositList.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/SendWareHouseDepositList.java @@ -109,7 +109,7 @@ public final class SendWareHouseDepositList extends L2GameClientPacket return; } - if (player.getActiveEnchantItemId() != L2PcInstance.ID_NONE) + if (player.hasItemRequest()) { Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to use enchant Exploit!", Config.DEFAULT_PUNISH); return; diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/TradeDone.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/TradeDone.java index edbc41e12d..d523fb4d44 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/TradeDone.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/TradeDone.java @@ -77,7 +77,7 @@ public final class TradeDone extends L2GameClientPacket return; } - if ((trade.getOwner().getActiveEnchantItemId() != L2PcInstance.ID_NONE) || (trade.getPartner().getActiveEnchantItemId() != L2PcInstance.ID_NONE)) + if ((trade.getOwner().hasItemRequest()) || (trade.getPartner().hasItemRequest())) { return; } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/UseItem.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/UseItem.java index 555ddd8b75..6fa4e56ce2 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/UseItem.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/UseItem.java @@ -42,8 +42,6 @@ import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; import com.l2jserver.gameserver.model.items.type.ArmorType; import com.l2jserver.gameserver.model.items.type.WeaponType; import com.l2jserver.gameserver.model.skills.Skill; -import com.l2jserver.gameserver.model.zone.ZoneId; -import com.l2jserver.gameserver.model.zone.type.L2BattalionZone; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.ActionFailed; import com.l2jserver.gameserver.network.serverpackets.ExUseSharedGroupItem; @@ -129,12 +127,6 @@ public final class UseItem extends L2GameClientPacket return; } - if (activeChar.isInsideZone(ZoneId.BATTALION) && !L2BattalionZone.checkItem(item)) - { - getClient().getActiveChar().sendMessage("You cannot use " + item.getName() + " inside this zone."); - return; - } - if (item.getItem().getType2() == L2Item.TYPE2_QUEST) { activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_QUEST_ITEMS); diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/adenadistribution/RequestDivideAdena.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/adenadistribution/RequestDivideAdena.java index e152aba9b0..747b613819 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/adenadistribution/RequestDivideAdena.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/adenadistribution/RequestDivideAdena.java @@ -18,47 +18,131 @@ */ package com.l2jserver.gameserver.network.clientpackets.adenadistribution; +import java.util.List; +import java.util.Objects; + +import com.l2jserver.gameserver.model.L2CommandChannel; +import com.l2jserver.gameserver.model.L2Party; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.AdenaDistributionRequest; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.adenadistribution.ExDivideAdenaCancel; import com.l2jserver.gameserver.network.serverpackets.adenadistribution.ExDivideAdenaDone; /** - * @author Erlandys + * @author Sdw */ public class RequestDivideAdena extends L2GameClientPacket { - private long _count; + private int _adenaObjId; + private long _adenaCount; @Override protected void readImpl() { - readD(); - _count = readQ(); + _adenaObjId = readD(); + _adenaCount = readQ(); } @Override protected void runImpl() { - final L2PcInstance activeChar = getClient().getActiveChar(); - if (activeChar == null) + final L2PcInstance player = getClient().getActiveChar(); + if (player == null) { return; } - final long count = activeChar.getAdena(); - if (_count > count) + + final AdenaDistributionRequest request = player.getRequest(AdenaDistributionRequest.class); + + if (request == null) { - activeChar.sendPacket(SystemMessageId.YOU_CANNOT_PROCEED_AS_THERE_IS_INSUFFICIENT_ADENA); return; } - final int membersCount = activeChar.getParty().getMemberCount(); - final long dividedCount = (long) Math.floor(_count / membersCount); - activeChar.reduceAdena("AdenaDistribution", membersCount * dividedCount, null, false); - for (L2PcInstance player : activeChar.getParty().getMembers()) + else if (request.getDistributor() != player) { - player.addAdena("AdenaDistribution", dividedCount, null, player.getObjectId() != activeChar.getObjectId()); + cancelDistribution(request); + return; + } + else if (request.getAdenaObjectId() != _adenaObjId) + { + cancelDistribution(request); + return; + } + + final L2Party party = player.getParty(); + + if (party == null) + { + player.sendPacket(SystemMessageId.YOU_CANNOT_PROCEED_AS_YOU_ARE_NOT_IN_AN_ALLIANCE_OR_PARTY); + cancelDistribution(request); + return; + } + + final L2CommandChannel commandChannel = party.getCommandChannel(); + + if ((commandChannel != null) && !commandChannel.isLeader(player)) + { + player.sendPacket(SystemMessageId.YOU_CANNOT_PROCEED_AS_YOU_ARE_NOT_AN_ALLIANCE_LEADER_OR_PARTY_LEADER); + cancelDistribution(request); + return; + } + else if (!party.isLeader(player)) + { + player.sendPacket(SystemMessageId.YOU_CANNOT_PROCEED_AS_YOU_ARE_NOT_A_PARTY_LEADER); + cancelDistribution(request); + return; + } + + final List targets = commandChannel != null ? commandChannel.getMembers() : party.getMembers(); + + if (player.getAdena() < targets.size()) + { + player.sendPacket(SystemMessageId.YOU_CANNOT_PROCEED_AS_THERE_IS_INSUFFICIENT_ADENA); + cancelDistribution(request); + return; + } + + if (player.getAdena() < request.getAdenaCount()) + { + player.sendPacket(SystemMessageId.THE_ADENA_IN_POSSESSION_HAS_BEEN_DECREASED_ADENA_DISTRIBUTION_HAS_BEEN_CANCELLED); + cancelDistribution(request); + return; + } + else if (targets.size() < request.getPlayers().size()) + { + player.sendPacket(SystemMessageId.THE_DISTRIBUTION_PARTICIPANTS_HAVE_CHANGED_ADENA_DISTRIBUTION_HAS_BEEN_CANCELLED); + cancelDistribution(request); + return; + } + else if (player.getAdena() < _adenaCount) + { + player.sendPacket(SystemMessageId.DISTRIBUTION_CANNOT_PROCEED_AS_THERE_IS_INSUFFICIENT_ADENA_FOR_DISTRIBUTION); + cancelDistribution(request); + return; + } + + final long memberAdenaGet = (long) Math.floor(_adenaCount / targets.size()); + if (player.reduceAdena("Adena Distribution", memberAdenaGet * targets.size(), player, false)) + { + for (L2PcInstance target : targets) + { + if ((target == null)) + { + // TODO : handle that case here + regive adena OR filter with Objects::nonNull on memberCount ? + // those sys msg exists and bother me ADENA_WAS_NOT_DISTRIBUTED_TO_S1 / YOU_DID_NOT_RECEIVE_ADENA_DISTRIBUTION + continue; + } + target.addAdena("Adena Distribution", memberAdenaGet, player, false); + target.sendPacket(new ExDivideAdenaDone(_adenaCount, memberAdenaGet, targets.size(), player.getName())); + target.removeRequest(AdenaDistributionRequest.class); + } + } + else + { + cancelDistribution(request); } - activeChar.sendPacket(new ExDivideAdenaDone(membersCount, _count, dividedCount, activeChar.getName())); } @Override @@ -66,4 +150,14 @@ public class RequestDivideAdena extends L2GameClientPacket { return getClass().getSimpleName(); } -} + + private void cancelDistribution(AdenaDistributionRequest request) + { + request.getPlayers().stream().filter(Objects::nonNull).forEach(p -> + { + p.sendPacket(SystemMessageId.ADENA_DISTRIBUTION_HAS_BEEN_CANCELLED); + p.sendPacket(ExDivideAdenaCancel.STATIC_PACKET); + p.removeRequest(AdenaDistributionRequest.class); + }); + } +} \ No newline at end of file diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/adenadistribution/RequestDivideAdenaCancel.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/adenadistribution/RequestDivideAdenaCancel.java index 7808eeadaf..fef1f1b15b 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/adenadistribution/RequestDivideAdenaCancel.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/adenadistribution/RequestDivideAdenaCancel.java @@ -18,36 +18,45 @@ */ package com.l2jserver.gameserver.network.clientpackets.adenadistribution; +import java.util.Objects; + import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.AdenaDistributionRequest; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; import com.l2jserver.gameserver.network.serverpackets.adenadistribution.ExDivideAdenaCancel; /** - * @author Erlandys + * @author Sdw */ public class RequestDivideAdenaCancel extends L2GameClientPacket { - private int _cancel; + private boolean _cancel; @Override protected void readImpl() { - _cancel = readC(); + _cancel = readC() == 0; } @Override protected void runImpl() { - final L2PcInstance activeChar = getClient().getActiveChar(); - if (activeChar == null) + final L2PcInstance player = getClient().getActiveChar(); + if (player == null) { return; } - if (_cancel == 0) + + if (_cancel) { - activeChar.sendPacket(SystemMessageId.ADENA_DISTRIBUTION_HAS_BEEN_CANCELLED); - activeChar.sendPacket(new ExDivideAdenaCancel()); + final AdenaDistributionRequest request = player.getRequest(AdenaDistributionRequest.class); + request.getPlayers().stream().filter(Objects::nonNull).forEach(p -> + { + p.sendPacket(SystemMessageId.ADENA_DISTRIBUTION_HAS_BEEN_CANCELLED); + p.sendPacket(ExDivideAdenaCancel.STATIC_PACKET); + p.removeRequest(AdenaDistributionRequest.class); + }); } } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/adenadistribution/RequestDivideAdenaStart.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/adenadistribution/RequestDivideAdenaStart.java index aacebdb16a..adbf7dcf8f 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/adenadistribution/RequestDivideAdenaStart.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/adenadistribution/RequestDivideAdenaStart.java @@ -18,41 +18,80 @@ */ package com.l2jserver.gameserver.network.clientpackets.adenadistribution; +import java.util.List; + +import com.l2jserver.gameserver.model.L2CommandChannel; +import com.l2jserver.gameserver.model.L2Party; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.AdenaDistributionRequest; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; import com.l2jserver.gameserver.network.serverpackets.adenadistribution.ExDivideAdenaStart; /** - * @author Erlandys + * @author Sdw */ public class RequestDivideAdenaStart extends L2GameClientPacket { @Override protected void readImpl() { + // Nothing to read } @Override protected void runImpl() { - final L2PcInstance activeChar = getClient().getActiveChar(); - if (activeChar == null) + final L2PcInstance player = getClient().getActiveChar(); + if (player == null) { return; } - if (activeChar.getParty() == null) + + final L2Party party = player.getParty(); + + if (party == null) { - activeChar.sendPacket(SystemMessageId.YOU_CANNOT_PROCEED_AS_YOU_ARE_NOT_IN_AN_ALLIANCE_OR_PARTY); + player.sendPacket(SystemMessageId.YOU_CANNOT_PROCEED_AS_YOU_ARE_NOT_IN_AN_ALLIANCE_OR_PARTY); return; } - if (activeChar.getParty().getLeaderObjectId() != activeChar.getObjectId()) + + final L2CommandChannel commandChannel = party.getCommandChannel(); + + if ((commandChannel != null) && !commandChannel.isLeader(player)) { - activeChar.sendPacket(SystemMessageId.YOU_CANNOT_PROCEED_AS_YOU_ARE_NOT_A_PARTY_LEADER); + player.sendPacket(SystemMessageId.YOU_CANNOT_PROCEED_AS_YOU_ARE_NOT_AN_ALLIANCE_LEADER_OR_PARTY_LEADER); return; } - activeChar.sendPacket(SystemMessageId.ADENA_DISTRIBUTION_HAS_STARTED); - activeChar.sendPacket(new ExDivideAdenaStart()); + else if (!party.isLeader(player)) + { + player.sendPacket(SystemMessageId.YOU_CANNOT_PROCEED_AS_YOU_ARE_NOT_A_PARTY_LEADER); + return; + } + + final List targets = commandChannel != null ? commandChannel.getMembers() : party.getMembers(); + + if (player.getAdena() < targets.size()) + { + player.sendPacket(SystemMessageId.YOU_CANNOT_PROCEED_AS_THERE_IS_INSUFFICIENT_ADENA); + return; + } + + if (targets.stream().anyMatch(t -> t.hasRequest(AdenaDistributionRequest.class))) + { + // Handle that case ? + return; + } + + final int adenaObjectId = player.getInventory().getAdenaInstance().getObjectId(); + + targets.forEach(t -> + { + t.sendPacket(SystemMessageId.ADENA_DISTRIBUTION_HAS_STARTED); + t.addRequest(new AdenaDistributionRequest(t, player, targets, adenaObjectId, player.getAdena())); + }); + + player.sendPacket(ExDivideAdenaStart.STATIC_PACKET); } @Override diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionBuyInfo.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionBuyInfo.java deleted file mode 100644 index fcd66bd372..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionBuyInfo.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.clientpackets.auctionhouse; - -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager; -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager.Auctions; -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.network.SystemMessageId; -import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionBuyInfo; - -/** - * @author Erlandys - */ -public final class RequestCommissionBuyInfo extends L2GameClientPacket -{ - private static final String _C__D0_A1_REQUESTCOMMISSIONBUYINFO = "[C] D0:A1 RequestCommissionBuyInfo"; - - private long _auctionID; - - @Override - protected void readImpl() - { - _auctionID = readQ(); - readD(); // Category - unused - } - - @Override - protected void runImpl() - { - L2PcInstance activeChar = getClient().getActiveChar(); - if (activeChar == null) - { - return; - } - AuctionHouseManager am = AuctionHouseManager.getInstance(); - Auctions auction = am.getAuctionById(_auctionID); - if (auction != null) - { - if (activeChar.getObjectId() == auction.getPlayerID()) - { - activeChar.sendPacket(SystemMessageId.ITEM_PURCHASE_HAS_FAILED); - } - else - { - activeChar.sendPacket(new ExResponseCommissionBuyInfo(auction)); - } - } - else - { - activeChar.sendPacket(SystemMessageId.ITEM_PURCHASE_IS_NOT_AVAILABLE_BECAUSE_THE_CORRESPONDING_ITEM_DOES_NOT_EXIST); - } - } - - @Override - public String getType() - { - return _C__D0_A1_REQUESTCOMMISSIONBUYINFO; - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionBuyItem.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionBuyItem.java deleted file mode 100644 index d6f3c7cfda..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionBuyItem.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.clientpackets.auctionhouse; - -import com.l2jserver.gameserver.enums.MailType; -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager; -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager.Auctions; -import com.l2jserver.gameserver.instancemanager.MailManager; -import com.l2jserver.gameserver.model.L2World; -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.model.entity.Message; -import com.l2jserver.gameserver.network.SystemMessageId; -import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; -import com.l2jserver.gameserver.network.serverpackets.SystemMessage; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionItemList; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionList; - -/** - * @author Erlandys - */ -public final class RequestCommissionBuyItem extends L2GameClientPacket -{ - private static final String _C__D0_A2_REQUESTCOMMISSIONREGISTRABLEITEMLIST = "[C] D0:A2 RequestCommissionRegistrableItemList"; - - private long _auctionID; - private int _category; - - @Override - protected void readImpl() - { - _auctionID = readQ(); - _category = readD(); - } - - @Override - protected void runImpl() - { - L2PcInstance player = getClient().getActiveChar(); - if (player == null) - { - return; - } - AuctionHouseManager am = AuctionHouseManager.getInstance(); - Auctions auction; - if (am.getAuctionById(_auctionID) != null) - { - auction = am.getAuctionById(_auctionID); - long fee = auction.getPrice(); - switch (auction.getDuration()) - { - case 0: - fee *= 0.005; - break; - case 1: - fee *= 0.015; - break; - case 2: - fee *= 0.025; - break; - case 3: - fee *= 0.035; - } - if (fee < 10000) - { - fee = 1000; - } - long price = auction.getPrice() * auction.getCount(); - if ((player.getInventory().getItemByItemId(57) == null) || (player.getInventory().getItemByItemId(57).getCount() < price)) - { - player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_ADENA); - player.sendPacket(new ExResponseCommissionList(player, _category, -1, -1, "")); - player.sendPacket(new ExResponseCommissionItemList(player)); - return; - } - player.getInventory().destroyItemByItemId("BuyFromAuction", 57, price, null, null); - player.getInventory().addItem("BuyFromAuction", auction.getItem().getId(), auction.getCount(), player, null); - Message msg = new Message(auction.getPlayerID(), "The item you registered has been sold.", auction.getItemName() + " has been sold.", MailType.SYSTEM); - if ((price - fee) > 0) - { - msg.createAttachments().addItem("BuyFromAuction", 57, (price - fee), null, null); - } - MailManager.getInstance().sendMessage(msg); - SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.YOU_HAVE_SUCCESSFULLY_PURCHASED_S2_OF_S1); - sm.addLong(auction.getCount()); - sm.addString(auction.getItemName()); - player.sendPacket(sm); - if (L2World.getInstance().getPlayer(auction.getPlayerID()) != null) - { - L2PcInstance seller = L2World.getInstance().getPlayer(auction.getPlayerID()); - sm = SystemMessage.getSystemMessage(SystemMessageId.THE_ITEM_YOU_REGISTERED_HAS_BEEN_SOLD); - seller.sendPacket(sm); - } - - am.deleteAuction(_auctionID); - player.sendPacket(new ExResponseCommissionList(player, _category, -1, -1, "")); - player.sendPacket(new ExResponseCommissionItemList(player)); - } - else - { - player.sendPacket(SystemMessageId.ITEM_PURCHASE_IS_NOT_AVAILABLE_BECAUSE_THE_CORRESPONDING_ITEM_DOES_NOT_EXIST); - player.sendPacket(new ExResponseCommissionList(player, _category, -1, -1, "")); - player.sendPacket(new ExResponseCommissionItemList(player)); - } - } - - @Override - public String getType() - { - return _C__D0_A2_REQUESTCOMMISSIONREGISTRABLEITEMLIST; - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionCancel.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionCancel.java deleted file mode 100644 index 34d9ac7688..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionCancel.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.clientpackets.auctionhouse; - -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; - -public final class RequestCommissionCancel extends L2GameClientPacket -{ - private static final String _C__D0_A3_REQUESTCOMMISSIONCANCEL = "[C] D0:A3 RequestCommissionCancel"; - - @Override - protected void readImpl() - { - } - - @Override - protected void runImpl() - { - L2PcInstance player = getClient().getActiveChar(); - if (player == null) - { - return; - } - } - - @Override - public String getType() - { - return _C__D0_A3_REQUESTCOMMISSIONCANCEL; - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionDelete.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionDelete.java deleted file mode 100644 index 8929daad80..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionDelete.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.clientpackets.auctionhouse; - -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager; -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager.Auctions; -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.network.SystemMessageId; -import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionDelete; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionItemList; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionList; - -/** - * @author Erlandys - */ -public final class RequestCommissionDelete extends L2GameClientPacket -{ - private static final String _C__D0_9F_REQUESTCOMMISSIONDELETE = "[C] D0:9F RequestCommissionDelete"; - - long _auctionID; - int _category; - int _duration; - - @Override - protected void readImpl() - { - _auctionID = readQ(); - _category = readD(); - _duration = readD(); - } - - @Override - protected void runImpl() - { - L2PcInstance player = getClient().getActiveChar(); - if (player == null) - { - return; - } - AuctionHouseManager am = AuctionHouseManager.getInstance(); - am.checkForAuctionsDeletion(); - Auctions auction = am.getAuctionById(_auctionID); - if (auction != null) - { - player.addItem("DeleteAuction", auction.getItem(), null, false); - player.getAuctionInventory().destroyItemByItemId("DeleteAuction", auction.getItem().getId(), auction.getCount(), player, null); - am.deleteAuction(_auctionID); - player.sendPacket(SystemMessageId.CANCELLATION_OF_SALE_FOR_THE_ITEM_IS_SUCCESSFUL); - player.sendPacket(new ExResponseCommissionDelete(true)); - player.sendPacket(new ExResponseCommissionList(player)); - player.sendPacket(new ExResponseCommissionItemList(player)); - } - else - { - player.sendPacket(SystemMessageId.ITEM_PURCHASE_IS_NOT_AVAILABLE_BECAUSE_THE_CORRESPONDING_ITEM_DOES_NOT_EXIST); - player.sendPacket(new ExResponseCommissionDelete(false)); - player.sendPacket(new ExResponseCommissionList(player)); - player.sendPacket(new ExResponseCommissionItemList(player)); - } - } - - @Override - public String getType() - { - return _C__D0_9F_REQUESTCOMMISSIONDELETE; - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionInfo.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionInfo.java deleted file mode 100644 index 9b0cdd5c7d..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionInfo.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.clientpackets.auctionhouse; - -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionInfo; - -/** - * @author Erlandys - */ -public final class RequestCommissionInfo extends L2GameClientPacket -{ - private static final String _C__D0_9C_REQUESTCOMMISSIONINFO = "[C] D0:9C RequestCommissionInfo"; - - private int _itemOID; - - @Override - protected void readImpl() - { - _itemOID = readD(); - } - - @Override - protected void runImpl() - { - final L2PcInstance player = getClient().getActiveChar(); - if (player == null) - { - return; - } - player.sendPacket(new ExResponseCommissionInfo(player, _itemOID, true)); - } - - @Override - public String getType() - { - return _C__D0_9C_REQUESTCOMMISSIONINFO; - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionList.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionList.java deleted file mode 100644 index 592e8c84df..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionList.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.clientpackets.auctionhouse; - -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager; -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.network.SystemMessageId; -import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionList; - -/** - * @author Erlandys - */ -public final class RequestCommissionList extends L2GameClientPacket -{ - private static final String _C__D0_A0_REQUESTCOMMISSIONLIST = "[C] D0:A0 RequestCommissionList"; - - private long _category; - private int _type; - private int _grade; - private String _searchName; - - @Override - protected void readImpl() - { - _category = readQ(); - _type = readD(); - _grade = readD(); - _searchName = readS(); - } - - @Override - protected void runImpl() - { - L2PcInstance activeChar = getClient().getActiveChar(); - if (activeChar == null) - { - return; - } - AuctionHouseManager am = AuctionHouseManager.getInstance(); - - if (_category == 0) - { - _category = 100; - } - else if (_category == 1) - { - _category = 101; - } - - if ((_category != 101) && (_category != 100) && ((_category % 10000) != 7297) && ((_category % 10000) != 4593) && ((_category % 10000) != 1889) && ((_category % 10000) != 9185) && ((_category % 10000) != 6481)) - { - _category = am.getClientCategory((int) (_category / 1000)); - } - else if ((_category != 101) && (_category != 100)) - { - _category = am.getMainClientCategory((int) (_category / 1000)); - } - - if (((_category > 60) && (_category < 66)) || (_category == 101)) - { - if (am.getAuctionsSizeById(_category, _grade, _searchName) > 999) - { - activeChar.sendPacket(SystemMessageId.THE_SEARCH_RESULT_EXCEEDED_THE_MAXIMUM_ALLOWED_RANGE_FOR_OUTPUT_PLEASE_SEARCH_BY_SELECTING_DETAILED_CATEGORY); - } - else if (am.getAuctionsSizeById(_category, _grade, _searchName) <= 0) - { - activeChar.sendPacket(SystemMessageId.CURRENTLY_THERE_ARE_NO_REGISTERED_ITEMS); - } - } - else if (_category == 100) - { - if (am.getAuctionsSizeById(_grade, _searchName) > 999) - { - activeChar.sendPacket(SystemMessageId.THE_SEARCH_RESULT_EXCEEDED_THE_MAXIMUM_ALLOWED_RANGE_FOR_OUTPUT_PLEASE_SEARCH_BY_SELECTING_DETAILED_CATEGORY); - } - } - - am.checkForAuctionsDeletion(); - activeChar.sendPacket(new ExResponseCommissionList(activeChar, _category, _type, _grade, _searchName)); - } - - @Override - public String getType() - { - return _C__D0_A0_REQUESTCOMMISSIONLIST; - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionRegister.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionRegister.java deleted file mode 100644 index 22e6a89011..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionRegister.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.clientpackets.auctionhouse; - -import com.l2jserver.gameserver.datatables.ItemTable; -import com.l2jserver.gameserver.idfactory.IdFactory; -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager; -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.model.items.L2Item; -import com.l2jserver.gameserver.network.SystemMessageId; -import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; -import com.l2jserver.gameserver.network.serverpackets.InventoryUpdate; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionInfo; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionItemList; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionList; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionRegister; - -/** - * @author Erlandys - */ -public final class RequestCommissionRegister extends L2GameClientPacket -{ - private static final String _C__D0_9D_REQUESTCOMMISSIONREGISTER = "[C] D0:9D RequestCommissionRegister"; - - private int _itemOID; - private String _itemName; - private long _price; - private long _count; - private int _duration; - - @Override - protected void readImpl() - { - _itemOID = readD(); - _itemName = readS(); - _price = readQ(); - _count = readQ(); - _duration = readD(); - readQ(); // Unknown - } - - @Override - protected void runImpl() - { - final L2PcInstance player = getClient().getActiveChar(); - if (player == null) - { - return; - } - long destroyPrice = _price; - AuctionHouseManager am = AuctionHouseManager.getInstance(); - am.checkForAuctionsDeletion(); - long timeToAdd = 0; - switch (_duration) - { - case 0: - timeToAdd = 86400000; - destroyPrice *= 0.0001; - break; - case 1: - timeToAdd = 259200000; - destroyPrice *= 0.0003; - break; - case 2: - timeToAdd = 432000000; - destroyPrice *= 0.0005; - break; - case 3: - timeToAdd = 604800000; - destroyPrice *= 0.0007; - } - - if (destroyPrice < 1000) - { - destroyPrice = 1000; - } - - if ((player.getInventory().getItemByItemId(57) == null) || (player.getInventory().getItemByItemId(57).getCount() < destroyPrice)) - { - player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_ADENA); - reloadAuction(player, false); - return; - } - - if (player.getInventory().getItemByObjectId(_itemOID) == null) - { - player.sendPacket(SystemMessageId.REGISTRATION_IS_NOT_AVAILABLE_BECAUSE_THE_CORRESPONDING_ITEM_DOES_NOT_EXIST); - reloadAuction(player, false); - return; - } - - if (player.getInventory().getItemByObjectId(_itemOID).isEquipped()) - { - player.sendPacket(SystemMessageId.THE_ITEM_THAT_IS_CURRENTLY_WORN_CANNOT_BE_REGISTERED); - reloadAuction(player, false); - return; - } - - final int itemID = player.getInventory().getItemByObjectId(_itemOID).getId(); - final L2Item item = ItemTable.getInstance().getTemplate(itemID); - - if (((player.getAuctionInventory().getSize() >= 10) && !player.isGM()) || ((player.getAuctionInventory().getSize() >= 99999) && player.isGM()) || !item.isTradeable() || !item.isSellable()) - { - player.sendPacket(SystemMessageId.THE_ITEM_CANNOT_BE_REGISTERED_BECAUSE_REQUIREMENTS_ARE_NOT_MET); - reloadAuction(player, false); - return; - } - - final int category = am.getCategoryByItem(player.getInventory().getItemByObjectId(_itemOID)); - player.getInventory().destroyItemByItemId("CreateAuction", 57, destroyPrice, null, null); - player.getInventory().transferItem("CreateAuction", _itemOID, _count, player.getAuctionInventory(), player, null); - final long finishTime = (System.currentTimeMillis() + timeToAdd) / 1000; - - int auctionID = IdFactory.getInstance().getNextId(); - if (player.getAuctionInventory().getItemByObjectId(_itemOID) == null) - { - am.createAuction(auctionID, player.getObjectId(), _itemOID, player.getAuctionInventory().getItemByItemId(itemID), _itemName, _price, _count, _duration, finishTime, category); - } - else - { - am.createAuction(auctionID, player.getObjectId(), _itemOID, player.getAuctionInventory().getItemByObjectId(_itemOID), _itemName, _price, _count, _duration, finishTime, category); - } - am.insertAuction(am.getAuctionById(auctionID)); - player.sendPacket(SystemMessageId.THE_ITEM_HAS_BEEN_SUCCESSFULLY_REGISTERED); - InventoryUpdate iu = new InventoryUpdate(); - iu.addModifiedItem(player.getInventory().getItemByItemId(57)); - iu.addModifiedItem(player.getAuctionInventory().getItemByObjectId(_itemOID)); - player.sendPacket(iu); - reloadAuction(player, true); - } - - private void reloadAuction(L2PcInstance player, boolean success) - { - player.sendPacket(new ExResponseCommissionRegister(success)); - player.sendPacket(new ExResponseCommissionList(player)); - player.sendPacket(new ExResponseCommissionInfo(player, 0, success)); - player.sendPacket(new ExResponseCommissionItemList(player)); - } - - @Override - public String getType() - { - return _C__D0_9D_REQUESTCOMMISSIONREGISTER; - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionRegisteredItem.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionRegisteredItem.java deleted file mode 100644 index 290460ed36..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionRegisteredItem.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.clientpackets.auctionhouse; - -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager; -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionList; - -/** - * @author Erlandys - */ -public final class RequestCommissionRegisteredItem extends L2GameClientPacket -{ - private static final String _C__D0_A3_REQUESTCOMMISSIONREGISTEREDITEM = "[C] D0:A3 RequestCommissionRegisteredItem"; - - @Override - protected void readImpl() - { - } - - @Override - protected void runImpl() - { - final L2PcInstance player = getClient().getActiveChar(); - if (player == null) - { - return; - } - AuctionHouseManager am = AuctionHouseManager.getInstance(); - - am.checkForAuctionsDeletion(); - - player.sendPacket(new ExResponseCommissionList(player)); - } - - @Override - public String getType() - { - return _C__D0_A3_REQUESTCOMMISSIONREGISTEREDITEM; - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionRegistrableItemList.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionRegistrableItemList.java deleted file mode 100644 index 24a745428d..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/auctionhouse/RequestCommissionRegistrableItemList.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.clientpackets.auctionhouse; - -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; -import com.l2jserver.gameserver.network.serverpackets.auctionhouse.ExResponseCommissionItemList; - -/** - * @author Erlandys - */ -public final class RequestCommissionRegistrableItemList extends L2GameClientPacket -{ - private static final String _C__D0_9B_REQUESTCOMMISSIONREGISTRABLEITEMLIST = "[C] D0:9B RequestCommissionRegistrableItemList"; - - @Override - protected void readImpl() - { - } - - @Override - protected void runImpl() - { - final L2PcInstance player = getClient().getActiveChar(); - if (player == null) - { - return; - } - player.sendPacket(new ExResponseCommissionItemList(player)); - } - - @Override - public String getType() - { - return _C__D0_9B_REQUESTCOMMISSIONREGISTRABLEITEMLIST; - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionBuyInfo.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionBuyInfo.java new file mode 100644 index 0000000000..306ed97337 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionBuyInfo.java @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.clientpackets.commission; + +import com.l2jserver.gameserver.instancemanager.CommissionManager; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.commission.CommissionItem; +import com.l2jserver.gameserver.network.SystemMessageId; +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.commission.ExCloseCommission; +import com.l2jserver.gameserver.network.serverpackets.commission.ExResponseCommissionBuyInfo; + +/** + * @author NosBit + */ +public class RequestCommissionBuyInfo extends L2GameClientPacket +{ + private long _commissionId; + + @Override + protected void readImpl() + { + _commissionId = readQ(); + // readD(); // CommissionItemType + } + + @Override + protected void runImpl() + { + final L2PcInstance player = getActiveChar(); + if (player == null) + { + return; + } + + if (!CommissionManager.isPlayerAllowedToInteract(player)) + { + player.sendPacket(ExCloseCommission.STATIC_PACKET); + return; + } + + if ((player.getInventory().getSize(false) >= (player.getInventoryLimit() * 0.8)) || (player.getWeightPenalty() >= 3)) + { + player.sendPacket(SystemMessageId.IF_THE_WEIGHT_IS_80_OR_MORE_AND_THE_INVENTORY_NUMBER_IS_90_OR_MORE_PURCHASE_CANCELLATION_IS_NOT_POSSIBLE); + player.sendPacket(ExResponseCommissionBuyInfo.FAILED); + return; + } + + final CommissionItem commissionItem = CommissionManager.getInstance().getCommissionItem(_commissionId); + if (commissionItem != null) + { + player.sendPacket(new ExResponseCommissionBuyInfo(commissionItem)); + } + else + { + player.sendPacket(SystemMessageId.ITEM_PURCHASE_IS_NOT_AVAILABLE_BECAUSE_THE_CORRESPONDING_ITEM_DOES_NOT_EXIST); + player.sendPacket(ExResponseCommissionBuyInfo.FAILED); + } + } + + @Override + public String getType() + { + return getClass().getSimpleName(); + } + +} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionBuyItem.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionBuyItem.java new file mode 100644 index 0000000000..6ca1ba49fd --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionBuyItem.java @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.clientpackets.commission; + +import com.l2jserver.gameserver.instancemanager.CommissionManager; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.commission.ExCloseCommission; + +/** + * @author NosBit + */ +public class RequestCommissionBuyItem extends L2GameClientPacket +{ + private long _commissionId; + + @Override + protected void readImpl() + { + _commissionId = readQ(); + // readD(); // CommissionItemType + } + + @Override + protected void runImpl() + { + final L2PcInstance player = getActiveChar(); + if (player == null) + { + return; + } + + if (!CommissionManager.isPlayerAllowedToInteract(player)) + { + player.sendPacket(ExCloseCommission.STATIC_PACKET); + return; + } + + CommissionManager.getInstance().buyItem(player, _commissionId); + } + + @Override + public String getType() + { + return getClass().getSimpleName(); + } + +} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionCancel.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionCancel.java new file mode 100644 index 0000000000..cf06e64f26 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionCancel.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.clientpackets.commission; + +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; + +/** + * This Packet doesn't seem to be doing anything. + * @author NosBit + */ +public class RequestCommissionCancel extends L2GameClientPacket +{ + @Override + protected void readImpl() + { + } + + @Override + protected void runImpl() + { + } + + @Override + public String getType() + { + return getClass().getSimpleName(); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionDelete.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionDelete.java new file mode 100644 index 0000000000..e07ef1dc57 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionDelete.java @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.clientpackets.commission; + +import com.l2jserver.gameserver.instancemanager.CommissionManager; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.commission.ExCloseCommission; + +/** + * @author NosBit + */ +public class RequestCommissionDelete extends L2GameClientPacket +{ + private long _commissionId; + + @Override + protected void readImpl() + { + _commissionId = readQ(); + // readD(); // CommissionItemType + // readD(); // CommissionDurationType + } + + @Override + protected void runImpl() + { + final L2PcInstance player = getActiveChar(); + if (player == null) + { + return; + } + + if (!CommissionManager.isPlayerAllowedToInteract(player)) + { + player.sendPacket(ExCloseCommission.STATIC_PACKET); + return; + } + + CommissionManager.getInstance().deleteItem(player, _commissionId); + } + + @Override + public String getType() + { + return getClass().getSimpleName(); + } + +} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionInfo.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionInfo.java new file mode 100644 index 0000000000..cd503b01b1 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionInfo.java @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.clientpackets.commission; + +import com.l2jserver.gameserver.instancemanager.CommissionManager; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.commission.ExCloseCommission; +import com.l2jserver.gameserver.network.serverpackets.commission.ExResponseCommissionInfo; + +/** + * @author NosBit + */ +public class RequestCommissionInfo extends L2GameClientPacket +{ + private int _itemObjectId; + + @Override + protected void readImpl() + { + _itemObjectId = readD(); + } + + @Override + protected void runImpl() + { + final L2PcInstance player = getActiveChar(); + if (player == null) + { + return; + } + + if (!CommissionManager.isPlayerAllowedToInteract(player)) + { + player.sendPacket(ExCloseCommission.STATIC_PACKET); + return; + } + + final L2ItemInstance itemInstance = player.getInventory().getItemByObjectId(_itemObjectId); + if (itemInstance != null) + { + player.sendPacket(player.getLastCommissionInfos().getOrDefault(itemInstance.getId(), ExResponseCommissionInfo.EMPTY)); + } + else + { + player.sendPacket(ExResponseCommissionInfo.EMPTY); + } + + } + + @Override + public String getType() + { + return getClass().getSimpleName(); + } + +} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionList.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionList.java new file mode 100644 index 0000000000..babbe86034 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionList.java @@ -0,0 +1,141 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.clientpackets.commission; + +import java.util.function.Predicate; + +import com.l2jserver.gameserver.instancemanager.CommissionManager; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.commission.CommissionItemType; +import com.l2jserver.gameserver.model.commission.CommissionTreeType; +import com.l2jserver.gameserver.model.items.L2Item; +import com.l2jserver.gameserver.model.items.type.CrystalType; +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.commission.ExCloseCommission; + +/** + * @author NosBit + */ +public class RequestCommissionList extends L2GameClientPacket +{ + private int _treeViewDepth; + private int _itemType; + private int _type; + private int _grade; + private String _query; + + @Override + protected void readImpl() + { + _treeViewDepth = readD(); + _itemType = readD(); + _type = readD(); + _grade = readD(); + _query = readS(); + } + + @Override + protected void runImpl() + { + final L2PcInstance player = getActiveChar(); + if (player == null) + { + return; + } + + if (!CommissionManager.isPlayerAllowedToInteract(player)) + { + player.sendPacket(ExCloseCommission.STATIC_PACKET); + return; + } + + Predicate filter = i -> true; + switch (_treeViewDepth) + { + case 1: + final CommissionTreeType commissionTreeType = CommissionTreeType.findByClientId(_itemType); + if (commissionTreeType != null) + { + filter = filter.and(i -> commissionTreeType.getCommissionItemTypes().contains(i.getCommissionItemType())); + } + break; + case 2: + final CommissionItemType commissionItemType = CommissionItemType.findByClientId(_itemType); + if (commissionItemType != null) + { + filter = filter.and(i -> i.getCommissionItemType() == commissionItemType); + } + break; + } + + switch (_type) + { + case 0: // General + filter = filter.and(i -> true); // TODO: condition + break; + case 1: // Rare + filter = filter.and(i -> true); // TODO: condition + break; + } + + switch (_grade) + { + case 0: + filter = filter.and(i -> i.getCrystalType() == CrystalType.NONE); + break; + case 1: + filter = filter.and(i -> i.getCrystalType() == CrystalType.D); + break; + case 2: + filter = filter.and(i -> i.getCrystalType() == CrystalType.C); + break; + case 3: + filter = filter.and(i -> i.getCrystalType() == CrystalType.B); + break; + case 4: + filter = filter.and(i -> i.getCrystalType() == CrystalType.A); + break; + case 5: + filter = filter.and(i -> i.getCrystalType() == CrystalType.S); + break; + case 6: + filter = filter.and(i -> i.getCrystalType() == CrystalType.S80); + break; + case 7: + filter = filter.and(i -> i.getCrystalType() == CrystalType.R); + break; + case 8: + filter = filter.and(i -> i.getCrystalType() == CrystalType.R95); + break; + case 9: + filter = filter.and(i -> i.getCrystalType() == CrystalType.R99); + break; + } + + filter = filter.and(i -> _query.isEmpty() || i.getName().toLowerCase().contains(_query.toLowerCase())); + + CommissionManager.getInstance().showAuctions(player, filter); + } + + @Override + public String getType() + { + return getClass().getSimpleName(); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionRegister.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionRegister.java new file mode 100644 index 0000000000..c59a6043de --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionRegister.java @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.clientpackets.commission; + +import com.l2jserver.gameserver.instancemanager.CommissionManager; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.commission.ExCloseCommission; + +/** + * @author NosBit + */ +public class RequestCommissionRegister extends L2GameClientPacket +{ + private int _itemObjectId; + private long _pricePerUnit; + private long _itemCount; + private int _durationType; // -1 = None, 0 = 1 Day, 1 = 3 Days, 2 = 5 Days, 3 = 7 Days + + @Override + protected void readImpl() + { + _itemObjectId = readD(); + readS(); // Item Name they use it for search we will use server side available names. + _pricePerUnit = readQ(); + _itemCount = readQ(); + _durationType = readD(); + // readD(); // Unknown + // readD(); // Unknown + } + + @Override + protected void runImpl() + { + final L2PcInstance player = getActiveChar(); + if (player == null) + { + return; + } + + if ((_durationType < 0) || (_durationType > 3)) + { + _log.warning("Player " + player + " sent incorrect commission duration type: " + _durationType + "."); + return; + } + + if (!CommissionManager.isPlayerAllowedToInteract(player)) + { + player.sendPacket(ExCloseCommission.STATIC_PACKET); + return; + } + + CommissionManager.getInstance().registerItem(player, _itemObjectId, _itemCount, _pricePerUnit, (byte) ((_durationType * 2) + 1)); + } + + @Override + public String getType() + { + return getClass().getSimpleName(); + } + +} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionRegisteredItem.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionRegisteredItem.java new file mode 100644 index 0000000000..35c4573ef3 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionRegisteredItem.java @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.clientpackets.commission; + +import com.l2jserver.gameserver.instancemanager.CommissionManager; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.commission.ExCloseCommission; + +/** + * @author NosBit + */ +public class RequestCommissionRegisteredItem extends L2GameClientPacket +{ + @Override + protected void readImpl() + { + } + + @Override + protected void runImpl() + { + final L2PcInstance player = getActiveChar(); + if (player == null) + { + return; + } + + if (!CommissionManager.isPlayerAllowedToInteract(player)) + { + player.sendPacket(ExCloseCommission.STATIC_PACKET); + return; + } + + CommissionManager.getInstance().showPlayerAuctions(player); + } + + @Override + public String getType() + { + return getClass().getSimpleName(); + } + +} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionRegistrableItemList.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionRegistrableItemList.java new file mode 100644 index 0000000000..1c5e98562c --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/commission/RequestCommissionRegistrableItemList.java @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.clientpackets.commission; + +import java.util.Arrays; + +import com.l2jserver.gameserver.instancemanager.CommissionManager; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.commission.ExCloseCommission; +import com.l2jserver.gameserver.network.serverpackets.commission.ExResponseCommissionItemList; + +/** + * @author NosBit + */ +public class RequestCommissionRegistrableItemList extends L2GameClientPacket +{ + @Override + protected void readImpl() + { + } + + @Override + protected void runImpl() + { + final L2PcInstance player = getActiveChar(); + if (player == null) + { + return; + } + + if (!CommissionManager.isPlayerAllowedToInteract(player)) + { + player.sendPacket(ExCloseCommission.STATIC_PACKET); + return; + } + + player.sendPacket(new ExResponseCommissionItemList(Arrays.asList(player.getInventory().getAvailableItems(false, false, false)))); + } + + @Override + public String getType() + { + return getClass().getSimpleName(); + } + +} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantClose.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantClose.java index 9006acd46a..941310f657 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantClose.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantClose.java @@ -19,35 +19,30 @@ package com.l2jserver.gameserver.network.clientpackets.compound; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.CompoundRequest; import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; /** - * @author Erlandys + * @author UnAfraid */ -public final class RequestNewEnchantClose extends L2GameClientPacket +public class RequestNewEnchantClose extends L2GameClientPacket { - private static final String _C__D0_F8_REQUESTNEWENCHANTCLOSE = "[C] D0:F8 RequestNewEnchantClose"; @Override protected void readImpl() { + } @Override protected void runImpl() { - final L2PcInstance activeChar = getClient().getActiveChar(); + final L2PcInstance activeChar = getActiveChar(); if (activeChar == null) { return; } - activeChar.setFirstCompoundOID(-1); - activeChar.setSecondCompoundOID(-1); - } - - @Override - public String getType() - { - return _C__D0_F8_REQUESTNEWENCHANTCLOSE; + + activeChar.removeRequest(CompoundRequest.class); } } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantPushOne.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantPushOne.java index a44acfc05c..64c014e524 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantPushOne.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantPushOne.java @@ -19,56 +19,72 @@ package com.l2jserver.gameserver.network.clientpackets.compound; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.model.items.L2Item; +import com.l2jserver.gameserver.model.actor.request.CompoundRequest; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; +import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantOneFail; import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantOneOK; /** - * @author Erlandys + * @author UnAfraid */ -public final class RequestNewEnchantPushOne extends L2GameClientPacket +public class RequestNewEnchantPushOne extends L2GameClientPacket { - private static final String _C__D0_F4_REQUESTNEWENCHANTPUSHONE = "[C] D0:F4 RequestNewEnchantPushOne"; - - private int _itemId; + private int _objectId; @Override protected void readImpl() { - _itemId = readD(); + _objectId = readD(); } @Override protected void runImpl() { - final L2PcInstance activeChar = getClient().getActiveChar(); + final L2PcInstance activeChar = getActiveChar(); if (activeChar == null) { return; } - final L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_itemId); - if (item == null) + else if (activeChar.isInStoreMode()) { + activeChar.sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_IN_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP); + activeChar.sendPacket(ExEnchantOneFail.STATIC_PACKET); return; } - final int secondCompoundOID = activeChar.getSecondCompoundOID(); - final L2ItemInstance secondItem = activeChar.getInventory().getItemByObjectId(secondCompoundOID); - if ((item.getItem().getBodyPart() != L2Item.SLOT_BROOCH_JEWEL) || ((secondItem != null) && ((secondItem.getObjectId() == item.getObjectId()) || (secondItem.getId() != item.getId()))) || ((item.getId() == 38931) || ((item.getId() % 10) == 4) || ((item.getId() % 10) == 9))) + else if (activeChar.isProcessingTransaction() || activeChar.isProcessingRequest()) { - activeChar.sendPacket(new ExEnchantOneFail()); + activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_THIS_SYSTEM_DURING_TRADING_PRIVATE_STORE_AND_WORKSHOP_SETUP); + activeChar.sendPacket(ExEnchantOneFail.STATIC_PACKET); + return; } - else + + final CompoundRequest request = new CompoundRequest(activeChar); + if (!activeChar.addRequest(request)) { - activeChar.setFirstCompoundOID(_itemId); - activeChar.sendPacket(new ExEnchantOneOK()); + activeChar.sendPacket(ExEnchantOneFail.STATIC_PACKET); + return; } - } - - @Override - public String getType() - { - return _C__D0_F4_REQUESTNEWENCHANTPUSHONE; + + // Make sure player owns this item. + request.setItemOne(_objectId); + final L2ItemInstance itemOne = request.getItemOne(); + if (itemOne == null) + { + activeChar.sendPacket(ExEnchantOneFail.STATIC_PACKET); + activeChar.removeRequest(request.getClass()); + return; + } + + // Not implemented or not able to merge! + if ((itemOne.getItem().getCompoundItem() == 0) || (itemOne.getItem().getCompoundChance() == 0)) + { + activeChar.sendPacket(ExEnchantOneOK.STATIC_PACKET); + activeChar.removeRequest(request.getClass()); + return; + } + + activeChar.sendPacket(ExEnchantOneOK.STATIC_PACKET); } } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantPushTwo.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantPushTwo.java index 94a62bc563..91ab44f064 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantPushTwo.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantPushTwo.java @@ -19,56 +19,86 @@ package com.l2jserver.gameserver.network.clientpackets.compound; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.model.items.L2Item; +import com.l2jserver.gameserver.model.actor.request.CompoundRequest; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; +import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantOneFail; import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantTwoFail; import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantTwoOK; /** - * @author Erlandys + * @author UnAfraid */ -public final class RequestNewEnchantPushTwo extends L2GameClientPacket +public class RequestNewEnchantPushTwo extends L2GameClientPacket { - private static final String _C__D0_F6_REQUESTNEWENCHANTPUSHTWO = "[C] D0:F6 RequestNewEnchantPushTwo"; - - private int _itemId; + private int _objectId; @Override protected void readImpl() { - _itemId = readD(); + _objectId = readD(); } @Override protected void runImpl() { - final L2PcInstance activeChar = getClient().getActiveChar(); + final L2PcInstance activeChar = getActiveChar(); if (activeChar == null) { return; } - final L2ItemInstance item = activeChar.getInventory().getItemByObjectId(_itemId); - if (item == null) + else if (activeChar.isInStoreMode()) { + activeChar.sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_IN_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP); + activeChar.sendPacket(ExEnchantOneFail.STATIC_PACKET); return; } - final int firstCompoundOID = activeChar.getFirstCompoundOID(); - final L2ItemInstance firstItem = activeChar.getInventory().getItemByObjectId(firstCompoundOID); - if ((item.getItem().getBodyPart() != L2Item.SLOT_BROOCH_JEWEL) || ((firstItem != null) && ((firstItem.getObjectId() == item.getObjectId()) || (firstItem.getId() != item.getId()))) || ((item.getId() == 38931) || ((item.getId() % 10) == 4) || ((item.getId() % 10) == 9))) + else if (activeChar.isProcessingTransaction() || activeChar.isProcessingRequest()) { - activeChar.sendPacket(new ExEnchantTwoFail()); + activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_THIS_SYSTEM_DURING_TRADING_PRIVATE_STORE_AND_WORKSHOP_SETUP); + activeChar.sendPacket(ExEnchantOneFail.STATIC_PACKET); + return; } - else + + final CompoundRequest request = activeChar.getRequest(CompoundRequest.class); + if ((request == null) || request.isProcessing()) { - activeChar.setSecondCompoundOID(_itemId); - activeChar.sendPacket(new ExEnchantTwoOK()); + activeChar.sendPacket(ExEnchantTwoFail.STATIC_PACKET); + return; } - } - - @Override - public String getType() - { - return _C__D0_F6_REQUESTNEWENCHANTPUSHTWO; + + // Make sure player owns this item. + request.setItemTwo(_objectId); + final L2ItemInstance itemOne = request.getItemOne(); + final L2ItemInstance itemTwo = request.getItemTwo(); + if ((itemOne == null) || (itemTwo == null)) + { + activeChar.sendPacket(ExEnchantTwoFail.STATIC_PACKET); + return; + } + + // Lets prevent using same item twice + if (itemOne.getObjectId() == itemTwo.getObjectId()) + { + activeChar.sendPacket(ExEnchantTwoFail.STATIC_PACKET); + return; + } + + // Combining only same items! + if (itemOne.getItem().getId() != itemTwo.getItem().getId()) + { + activeChar.sendPacket(ExEnchantTwoFail.STATIC_PACKET); + return; + } + + // Not implemented or not able to merge! + if ((itemOne.getItem().getCompoundItem() == 0) || (itemOne.getItem().getCompoundChance() == 0)) + { + activeChar.sendPacket(ExEnchantTwoFail.STATIC_PACKET); + return; + } + + activeChar.sendPacket(ExEnchantTwoOK.STATIC_PACKET); } } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantRemoveOne.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantRemoveOne.java index a41e53900b..ffd9d82eff 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantRemoveOne.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantRemoveOne.java @@ -19,38 +19,63 @@ package com.l2jserver.gameserver.network.clientpackets.compound; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.CompoundRequest; +import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; +import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantOneFail; +import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantOneRemoveFail; +import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantOneRemoveOK; /** - * @author Erlandys + * @author UnAfraid */ -public final class RequestNewEnchantRemoveOne extends L2GameClientPacket +public class RequestNewEnchantRemoveOne extends L2GameClientPacket { - private static final String _C__D0_F5_REQUESTNEWENCHANTREMOVEONE = "[C] D0:F4 RequestNewEnchantRemoveOne"; - - @SuppressWarnings("unused") - private int _itemId; + private int _objectId; @Override protected void readImpl() { - _itemId = readD(); + _objectId = readD(); } @Override protected void runImpl() { - final L2PcInstance activeChar = getClient().getActiveChar(); + final L2PcInstance activeChar = getActiveChar(); if (activeChar == null) { return; } - System.out.println(_C__D0_F5_REQUESTNEWENCHANTREMOVEONE); - } - - @Override - public String getType() - { - return _C__D0_F5_REQUESTNEWENCHANTREMOVEONE; + else if (activeChar.isInStoreMode()) + { + activeChar.sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_IN_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP); + activeChar.sendPacket(ExEnchantOneFail.STATIC_PACKET); + return; + } + else if (activeChar.isProcessingTransaction() || activeChar.isProcessingRequest()) + { + activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_THIS_SYSTEM_DURING_TRADING_PRIVATE_STORE_AND_WORKSHOP_SETUP); + activeChar.sendPacket(ExEnchantOneFail.STATIC_PACKET); + return; + } + + final CompoundRequest request = activeChar.getRequest(CompoundRequest.class); + if ((request == null) || request.isProcessing()) + { + activeChar.sendPacket(ExEnchantOneRemoveFail.STATIC_PACKET); + return; + } + + final L2ItemInstance item = request.getItemOne(); + if ((item == null) || (item.getObjectId() != _objectId)) + { + activeChar.sendPacket(ExEnchantOneRemoveFail.STATIC_PACKET); + return; + } + request.setItemOne(0); + + activeChar.sendPacket(ExEnchantOneRemoveOK.STATIC_PACKET); } } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantRemoveTwo.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantRemoveTwo.java index 3ed5f5ee3f..860c3ccccf 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantRemoveTwo.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantRemoveTwo.java @@ -19,38 +19,63 @@ package com.l2jserver.gameserver.network.clientpackets.compound; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.CompoundRequest; +import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; +import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantOneFail; +import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantTwoRemoveFail; +import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantTwoRemoveOK; /** - * @author Erlandys + * @author UnAfraid */ -public final class RequestNewEnchantRemoveTwo extends L2GameClientPacket +public class RequestNewEnchantRemoveTwo extends L2GameClientPacket { - private static final String _C__D0_F7_REQUESTNEWENCHANTREMOVETWO = "[C] D0:F7 RequestNewEnchantRemoveTwo"; - - @SuppressWarnings("unused") - private int _itemId; + private int _objectId; @Override protected void readImpl() { - _itemId = readD(); + _objectId = readD(); } @Override protected void runImpl() { - final L2PcInstance activeChar = getClient().getActiveChar(); + final L2PcInstance activeChar = getActiveChar(); if (activeChar == null) { return; } - System.out.println(_C__D0_F7_REQUESTNEWENCHANTREMOVETWO); - } - - @Override - public String getType() - { - return _C__D0_F7_REQUESTNEWENCHANTREMOVETWO; + else if (activeChar.isInStoreMode()) + { + activeChar.sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_IN_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP); + activeChar.sendPacket(ExEnchantOneFail.STATIC_PACKET); + return; + } + else if (activeChar.isProcessingTransaction() || activeChar.isProcessingRequest()) + { + activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_THIS_SYSTEM_DURING_TRADING_PRIVATE_STORE_AND_WORKSHOP_SETUP); + activeChar.sendPacket(ExEnchantOneFail.STATIC_PACKET); + return; + } + + final CompoundRequest request = activeChar.getRequest(CompoundRequest.class); + if ((request == null) || request.isProcessing()) + { + activeChar.sendPacket(ExEnchantTwoRemoveFail.STATIC_PACKET); + return; + } + + final L2ItemInstance item = request.getItemTwo(); + if ((item == null) || (item.getObjectId() != _objectId)) + { + activeChar.sendPacket(ExEnchantTwoRemoveFail.STATIC_PACKET); + return; + } + request.setItemTwo(0); + + activeChar.sendPacket(ExEnchantTwoRemoveOK.STATIC_PACKET); } } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java index dd26783498..02df40cf34 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/compound/RequestNewEnchantTry.java @@ -18,89 +18,122 @@ */ package com.l2jserver.gameserver.network.clientpackets.compound; -import com.l2jserver.Config; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.CompoundRequest; import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; +import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.ExAdenaInvenCount; +import com.l2jserver.gameserver.network.serverpackets.ExUserInfoInvenWeight; +import com.l2jserver.gameserver.network.serverpackets.InventoryUpdate; import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantFail; +import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantOneFail; import com.l2jserver.gameserver.network.serverpackets.compound.ExEnchantSucess; import com.l2jserver.util.Rnd; /** - * @author Erlandys + * @author UnAfraid */ -public final class RequestNewEnchantTry extends L2GameClientPacket +public class RequestNewEnchantTry extends L2GameClientPacket { - private static final String _C__D0_F9_REQUESTNEWENCHANTTRY = "[C] D0:F9 RequestNewEnchantTry"; - @Override protected void readImpl() { + } @Override protected void runImpl() { - final L2PcInstance activeChar = getClient().getActiveChar(); + final L2PcInstance activeChar = getActiveChar(); if (activeChar == null) { return; } - final L2ItemInstance firstItem = activeChar.getInventory().getItemByObjectId(activeChar.getFirstCompoundOID()); - final L2ItemInstance secondItem = activeChar.getInventory().getItemByObjectId(activeChar.getSecondCompoundOID()); - if ((firstItem == null) || (secondItem == null)) + else if (activeChar.isInStoreMode()) { + activeChar.sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_IN_A_PRIVATE_STORE_OR_PRIVATE_WORKSHOP); + activeChar.sendPacket(ExEnchantOneFail.STATIC_PACKET); return; } - int levelOfStone = 0; - if (firstItem.getId() < 38900) + else if (activeChar.isProcessingTransaction() || activeChar.isProcessingRequest()) { - levelOfStone = (firstItem.getId() % 5) + 1; + activeChar.sendPacket(SystemMessageId.YOU_CANNOT_USE_THIS_SYSTEM_DURING_TRADING_PRIVATE_STORE_AND_WORKSHOP_SETUP); + activeChar.sendPacket(ExEnchantOneFail.STATIC_PACKET); + return; + } + + final CompoundRequest request = activeChar.getRequest(CompoundRequest.class); + if ((request == null) || request.isProcessing()) + { + activeChar.sendPacket(ExEnchantFail.STATIC_PACKET); + return; + } + + request.setProcessing(true); + + final L2ItemInstance itemOne = request.getItemOne(); + final L2ItemInstance itemTwo = request.getItemTwo(); + if ((itemOne == null) || (itemTwo == null)) + { + activeChar.sendPacket(ExEnchantFail.STATIC_PACKET); + activeChar.removeRequest(request.getClass()); + return; + } + + // Lets prevent using same item twice + if (itemOne.getObjectId() == itemTwo.getObjectId()) + { + activeChar.sendPacket(new ExEnchantFail(itemOne.getItem().getId(), itemTwo.getItem().getId())); + activeChar.removeRequest(request.getClass()); + return; + } + + // Combining only same items! + if (itemOne.getItem().getId() != itemTwo.getItem().getId()) + { + activeChar.sendPacket(new ExEnchantFail(itemOne.getItem().getId(), itemTwo.getItem().getId())); + activeChar.removeRequest(request.getClass()); + return; + } + + // Not implemented or not able to merge! + if ((itemOne.getItem().getCompoundItem() == 0) || (itemOne.getItem().getCompoundChance() == 0)) + { + activeChar.sendPacket(new ExEnchantFail(itemOne.getItem().getId(), itemTwo.getItem().getId())); + activeChar.removeRequest(request.getClass()); + return; + } + + final InventoryUpdate iu = new InventoryUpdate(); + final double random = Rnd.nextDouble() * 100; + + // Success + if (random < itemOne.getItem().getCompoundChance()) + { + iu.addRemovedItem(itemOne); + iu.addRemovedItem(itemTwo); + + if (activeChar.destroyItem("Compound-Item-One", itemOne, null, true) && activeChar.destroyItem("Compound-Item-Two", itemTwo, null, true)) + { + final L2ItemInstance item = activeChar.addItem("Compound-Result", itemOne.getItem().getCompoundItem(), 1, null, true); + activeChar.sendPacket(new ExEnchantSucess(item.getItem().getId())); + } } else { - levelOfStone = (firstItem.getId() - 38926); + iu.addRemovedItem(itemTwo); + + // Upon fail we destroy the second item. + if (activeChar.destroyItem("Compound-Item-Two-Fail", itemTwo, null, true)) + { + activeChar.sendPacket(new ExEnchantFail(itemOne.getItem().getId(), itemTwo.getItem().getId())); + } } - if ((levelOfStone == 0) || (levelOfStone == 5)) - { - return; - } - int percent = 0; - switch (levelOfStone) - { - case 1: - percent = Config.SECOND_LEVEL_UPGRADE_CHANCE; - break; - case 2: - percent = Config.THIRD_LEVEL_UPGRADE_CHANCE; - break; - case 3: - percent = Config.FOURTH_LEVEL_UPGRADE_CHANCE; - break; - case 4: - percent = Config.FITH_LEVEL_UPGRADE_CHANCE; - break; - } - if (Rnd.get(100) <= percent) - { - int newItem = firstItem.getId() + 1; - activeChar.destroyItem("FirstCompoundItem", firstItem, null, true); - activeChar.destroyItem("SecondCompoundItem", secondItem, null, true); - activeChar.addItem("CompoundItem", newItem, 1, null, true); - activeChar.sendPacket(new ExEnchantSucess(newItem)); - } - else - { - activeChar.sendPacket(new ExEnchantFail(firstItem.getId(), secondItem.getId())); - activeChar.destroyItem("SecondCompoundItem", secondItem, null, true); - } - activeChar.setFirstCompoundOID(-1); - activeChar.setSecondCompoundOID(-1); - } - - @Override - public String getType() - { - return _C__D0_F9_REQUESTNEWENCHANTTRY; + + activeChar.sendPacket(iu); + activeChar.sendPacket(new ExAdenaInvenCount(activeChar)); + activeChar.sendPacket(new ExUserInfoInvenWeight(activeChar)); + activeChar.removeRequest(request.getClass()); } } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java index 14353c615e..018e63aae8 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java @@ -23,6 +23,7 @@ import java.util.Calendar; import com.l2jserver.Config; import com.l2jserver.gameserver.data.xml.impl.PrimeShopData; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.actor.request.PrimeShopRequest; import com.l2jserver.gameserver.model.itemcontainer.Inventory; import com.l2jserver.gameserver.model.primeshop.PrimeShopGroup; import com.l2jserver.gameserver.model.primeshop.PrimeShopItem; @@ -58,13 +59,13 @@ public final class RequestBRBuyProduct extends L2GameClientPacket return; } - if (activeChar.isUsingPrimeShop()) + if (activeChar.hasItemRequest() || activeChar.hasRequest(PrimeShopRequest.class)) { activeChar.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVALID_USER_STATE)); return; } - activeChar.setUsingPrimeShop(true); + activeChar.addRequest(new PrimeShopRequest(activeChar)); final PrimeShopGroup item = PrimeShopData.getInstance().getItem(_brId); if (validatePlayer(item, _count, activeChar)) @@ -104,7 +105,7 @@ public final class RequestBRBuyProduct extends L2GameClientPacket activeChar.sendPacket(new ExBRGamePoint(activeChar)); } - activeChar.setUsingPrimeShop(false); + activeChar.removeRequest(PrimeShopRequest.class); } /** diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/AbstractItemPacket.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/AbstractItemPacket.java index 8c9dbd9453..682217965b 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/AbstractItemPacket.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/AbstractItemPacket.java @@ -18,9 +18,7 @@ */ package com.l2jserver.gameserver.network.serverpackets; -import com.l2jserver.gameserver.data.sql.impl.CharNameTable; import com.l2jserver.gameserver.enums.ItemListType; -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager.Auctions; import com.l2jserver.gameserver.model.ItemInfo; import com.l2jserver.gameserver.model.TradeItem; import com.l2jserver.gameserver.model.buylist.Product; @@ -204,25 +202,16 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket 0)) || isInFortDefense; } - if (activeChar.isInsideZone(ZoneId.BATTALION) && !Config.BTZ_REVIVE) - { - _toVillage = false; - _toClanHall = false; - _toCastle = false; - _toOutpost = false; - _useFeather = false; - _toFortress = false; - } - _isSweepable = activeChar.isAttackable() && activeChar.isSweepActive(); } diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/ExReplyReceivedPost.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/ExReplyReceivedPost.java index a8318159b6..3e6bd319f0 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/ExReplyReceivedPost.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/ExReplyReceivedPost.java @@ -55,10 +55,10 @@ public class ExReplyReceivedPost extends AbstractItemPacket writeC(0xFE); writeH(0xAC); writeD(_msg.getMailType().ordinal()); // GOD - if (_msg.getMailType() == MailType.SYSTEM) + if (_msg.getMailType() == MailType.COMMISSION_ITEM_RETURNED) { - writeD(_msg.getSystemMessage1()); - writeD(_msg.getSystemMessage2()); + writeD(SystemMessageId.THE_REGISTRATION_PERIOD_FOR_THE_ITEM_YOU_REGISTERED_HAS_EXPIRED.getId()); + writeD(SystemMessageId.THE_AUCTION_HOUSE_REGISTRATION_PERIOD_HAS_EXPIRED_AND_THE_CORRESPONDING_ITEM_IS_BEING_FORWARDED.getId()); } else if (_msg.getMailType() == MailType.COMMISSION_ITEM_SOLD) { diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/ExShowReceivedPostList.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/ExShowReceivedPostList.java index 13bf437297..e4ba5725ef 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/ExShowReceivedPostList.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/ExShowReceivedPostList.java @@ -53,9 +53,9 @@ public class ExShowReceivedPostList extends L2GameServerPacket { writeD(SystemMessageId.THE_ITEM_YOU_REGISTERED_HAS_BEEN_SOLD.getId()); } - else if (msg.getMailType() == MailType.SYSTEM) + else if (msg.getMailType() == MailType.COMMISSION_ITEM_RETURNED) { - writeD(msg.getSystemMessage1()); + writeD(SystemMessageId.THE_REGISTRATION_PERIOD_FOR_THE_ITEM_YOU_REGISTERED_HAS_EXPIRED.getId()); } writeD(msg.getId()); writeS(msg.getSubject()); @@ -63,7 +63,7 @@ public class ExShowReceivedPostList extends L2GameServerPacket writeD(msg.isLocked() ? 0x01 : 0x00); writeD(msg.getExpirationSeconds()); writeD(msg.isUnread() ? 0x01 : 0x00); - writeD(((msg.getMailType() == MailType.COMMISSION_ITEM_SOLD) || (msg.getMailType() == MailType.SYSTEM)) ? 0 : 1); + writeD(((msg.getMailType() == MailType.COMMISSION_ITEM_SOLD) || (msg.getMailType() == MailType.COMMISSION_ITEM_RETURNED)) ? 0 : 1); writeD(msg.hasAttachments() ? 0x01 : 0x00); writeD(msg.isReturned() ? 0x01 : 0x00); writeD(0x00); // SysString in some case it seems diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/adenadistribution/ExDivideAdenaCancel.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/adenadistribution/ExDivideAdenaCancel.java index 1fc0fa1c46..def5909b8f 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/adenadistribution/ExDivideAdenaCancel.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/adenadistribution/ExDivideAdenaCancel.java @@ -21,16 +21,18 @@ package com.l2jserver.gameserver.network.serverpackets.adenadistribution; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; /** - * @author Erlandys + * @author Sdw */ public class ExDivideAdenaCancel extends L2GameServerPacket { public static final ExDivideAdenaCancel STATIC_PACKET = new ExDivideAdenaCancel(); @Override - protected final void writeImpl() + protected void writeImpl() { writeC(0xFE); writeH(0x15C); + + writeC(0x00); // TODO: Find me } } diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/adenadistribution/ExDivideAdenaDone.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/adenadistribution/ExDivideAdenaDone.java index 15802f8145..d44f5f66bc 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/adenadistribution/ExDivideAdenaDone.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/adenadistribution/ExDivideAdenaDone.java @@ -21,33 +21,34 @@ package com.l2jserver.gameserver.network.serverpackets.adenadistribution; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; /** - * @author Erlandys + * @author Sdw */ public class ExDivideAdenaDone extends L2GameServerPacket { - private final int _friendsCount; - private final long _count; - private final long _dividedCount; - private final String _name; + private final long _adenaCount; + private final long _distributedAdenaCount; + private final int _memberCount; + private final String _distributorName; - public ExDivideAdenaDone(int friendsCount, long count, long dividedCount, String name) + public ExDivideAdenaDone(long adenaCount, long distributedAdenaCount, int memberCount, String distributorName) { - _friendsCount = friendsCount; - _count = count; - _dividedCount = dividedCount; - _name = name; + _adenaCount = adenaCount; + _distributedAdenaCount = distributedAdenaCount; + _memberCount = memberCount; + _distributorName = distributorName; } @Override - protected final void writeImpl() + protected void writeImpl() { writeC(0xFE); writeH(0x15D); - writeC(0x01); // Always 1 - writeC(0x00); // Always 0 - writeD(_friendsCount); // Friends count - writeQ(_dividedCount); // Divided count - writeQ(_count); // Whole count - writeS(_name); // Giver name + + writeC(0x00); // TODO: Find me / type ?? + writeC(0x00); // TODO: Find me + writeD(_memberCount); + writeQ(_distributedAdenaCount); + writeQ(_adenaCount); + writeS(_distributorName); } } diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/adenadistribution/ExDivideAdenaStart.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/adenadistribution/ExDivideAdenaStart.java index 8446b9b062..dd7230c9d9 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/adenadistribution/ExDivideAdenaStart.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/adenadistribution/ExDivideAdenaStart.java @@ -21,16 +21,16 @@ package com.l2jserver.gameserver.network.serverpackets.adenadistribution; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; /** - * @author Erlandys + * @author Sdw */ public class ExDivideAdenaStart extends L2GameServerPacket { public static final ExDivideAdenaStart STATIC_PACKET = new ExDivideAdenaStart(); @Override - protected final void writeImpl() + protected void writeImpl() { writeC(0xFE); writeH(0x15B); } -} +} \ No newline at end of file diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionBuyInfo.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionBuyInfo.java deleted file mode 100644 index 4dece86549..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionBuyInfo.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.serverpackets.auctionhouse; - -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager.Auctions; -import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; -import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; - -/** - * @author Erlandys - */ -public class ExResponseCommissionBuyInfo extends L2GameServerPacket -{ - private final Auctions _auction; - - public ExResponseCommissionBuyInfo(Auctions auction) - { - _auction = auction; - } - - @Override - protected void writeImpl() - { - writeC(0xFE); - writeH(0xF8); - - writeD(0x01); // Unknown - - final L2ItemInstance item = _auction.getItem(); - - writeQ(_auction.getPrice()); - writeD(_auction.getCategory()); - writeD(0x00); // Unkown - writeD(item.getId()); - writeQ(item.getCount()); - writeH(item.getItem().getType2()); - writeD(item.getItem().getBodyPart()); - writeH(item.getEnchantLevel()); - writeH(item.getCustomType2()); - writeD(item.getAugmentation() != null ? item.getAugmentation().getAugmentationId() : 0x00); - writeH(item.getAttackElementType()); - writeH(item.getAttackElementPower()); - for (byte d = 0; d < 6; d++) - { - writeH(item.getElementDefAttr(d)); - } - - writeH(0); // unknown - writeH(0); // unknown - writeH(0); // unknown - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionBuyItem.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionBuyItem.java deleted file mode 100644 index 4d9a6d7e31..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionBuyItem.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.serverpackets.auctionhouse; - -import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; - -/** - * @author Erlandys - */ -public class ExResponseCommissionBuyItem extends L2GameServerPacket -{ - public static final ExResponseCommissionBuyItem STATIC_PACKET = new ExResponseCommissionBuyItem(); - - @Override - protected void writeImpl() - { - writeC(0xFE); - writeH(0xF8); - writeD(1); // unk - writeD(0); // unk - writeD(58); // Item ID - writeQ(1); // count - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionDelete.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionDelete.java deleted file mode 100644 index f0af75e432..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionDelete.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.serverpackets.auctionhouse; - -import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; - -/** - * @author Erlandys - */ -public class ExResponseCommissionDelete extends L2GameServerPacket -{ - private final boolean success; - - public ExResponseCommissionDelete(boolean _success) - { - success = _success; - } - - @Override - protected final void writeImpl() - { - writeC(0xd3); - writeD(success ? 0x01 : 0x00); - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionInfo.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionInfo.java deleted file mode 100644 index a20628d3e4..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionInfo.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.serverpackets.auctionhouse; - -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; -import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; - -/** - * @author Erlandys - */ -public class ExResponseCommissionInfo extends L2GameServerPacket -{ - L2PcInstance player; - L2ItemInstance item; - boolean success; - - public ExResponseCommissionInfo(L2PcInstance _player, int _itemOID, boolean _success) - { - player = _player; - item = player.getInventory().getItemByObjectId(_itemOID); - success = _success; - } - - @Override - protected void writeImpl() - { - writeC(0xFE); - writeH(0xF4); - writeD(success ? 0x01 : 0x00); // TODO: Success - writeD(0x00); // ItemID - writeD(0x00); // TODO: Price - writeQ(0x00); // TODO: Count - writeD(0x00); // TODO: Duration - writeD(-0x01); // TODO: Unknown - writeD(0x00); // TODO: Unknown - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionItemList.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionItemList.java deleted file mode 100644 index da7035fe0b..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionItemList.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.serverpackets.auctionhouse; - -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; -import com.l2jserver.gameserver.network.serverpackets.AbstractItemPacket; - -/** - * @author Erlandys - */ -public class ExResponseCommissionItemList extends AbstractItemPacket -{ - private final L2PcInstance _player; - - public ExResponseCommissionItemList(L2PcInstance player) - { - _player = player; - } - - @Override - protected void writeImpl() - { - writeC(0xFE); - writeH(0xF3); - - writeD(_player.getInventory().getSize(false)); - - for (L2ItemInstance item : _player.getInventory().getItems()) - { - if (!item.isSellable() || !item.isTradeable() || item.isEquipped() || (item.getId() == 57) || item.isQuestItem()) - { - continue; - } - writeItem(item); - } - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionList.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionList.java deleted file mode 100644 index 054addbd23..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionList.java +++ /dev/null @@ -1,266 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.serverpackets.auctionhouse; - -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager; -import com.l2jserver.gameserver.instancemanager.AuctionHouseManager.Auctions; -import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; -import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; -import com.l2jserver.gameserver.network.serverpackets.AbstractItemPacket; - -/** - * @author Erlandys - */ -public class ExResponseCommissionList extends AbstractItemPacket -{ - L2PcInstance _player; - L2ItemInstance _item; - long _category; - int _type; - int _grade; - String _search; - boolean _yourAuction; - AuctionHouseManager _am; - int _yourAuctionsSize = 0; - int _categories[][] = - { - { - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18 - }, - { - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 - }, - { - 29, - 30, - 31, - 32, - 33, - 34 - }, - { - 35, - 36, - 37, - 38, - 39, - 40 - }, - { - 41, - 42 - }, - { - 43, - 44, - 45, - 46, - 47, - 48, - 49, - 50, - 51, - 52, - 53, - 54, - 55, - 56, - 57, - 58 - } - }; - - public ExResponseCommissionList(L2PcInstance player, long category, int type, int grade, String searchName) - { - _player = player; - _category = category; - _type = type; - _grade = grade; - _search = searchName; - _yourAuction = false; - _am = AuctionHouseManager.getInstance(); - } - - public ExResponseCommissionList(L2PcInstance player) - { - _player = player; - _yourAuction = true; - _am = AuctionHouseManager.getInstance(); - for (Auctions auction : _am.getAuctions()) - { - if (auction.getPlayerID() == player.getObjectId()) - { - _yourAuctionsSize++; - } - } - } - - @Override - protected void writeImpl() - { - writeC(0xFE); - writeH(0xF7); - if (_yourAuction) - { - writeD(_yourAuctionsSize <= 0 ? -2 : 0x02); - writeD((int) (System.currentTimeMillis() / 1000)); - writeD(0x00); - writeD(_yourAuctionsSize); - for (Auctions auction : _am.getAuctions()) - { - if (auction.getPlayerID() == _player.getObjectId()) - { - writeAuctionItem(auction); - } - } - } - else - { - writeD((_search != null) && (_category == 100) && (_am.getAuctionsSizeById(_grade, _search) > 0) ? 3 : (_am.getAuctionsSizeById(_grade, _search) <= 0) || (_am.getAuctionsSizeById(_category, _grade, _search) <= 0) ? -1 : 3); - writeD((int) (System.currentTimeMillis() / 1000)); - writeD(0x00); - if (((_category > 60) && (_category < 66)) || (_category == 101)) - { - writeD(_am.getAuctionsSizeById(_category, _grade, _search)); - for (Auctions auction : _am.getAuctions()) - { - int cat = _category == 101 ? 0 : (int) (_category % 60); - for (int ID : _categories[cat]) - { - if ((_grade == -1) && _search.equals("")) - { - if (auction.getCategory() == ID) - { - writeAuctionItem(auction); - } - } - else if (_grade != -1) - { - if (_search.equals("")) - { - if ((auction.getCategory() == ID) && (_grade == auction.getItem().getItem().getCrystalType().getId())) - { - writeAuctionItem(auction); - } - } - if (!_search.equals("")) - { - if ((auction.getCategory() == ID) && (_grade == auction.getItem().getItem().getCrystalType().getId()) && auction.getItem().getName().contains(_search)) - { - writeAuctionItem(auction); - } - } - } - else if (!_search.equals("")) - { - if ((auction.getCategory() == ID) && auction.getItem().getName().contains(_search)) - { - writeAuctionItem(auction); - } - } - } - } - } - else if (_category < 60) - { - writeD(_am.getAuctionsSizeById(_category, _grade, _search)); // Auction count, maybe items putted in auction??? - for (Auctions auction : _am.getAuctions()) - { - if ((_grade == -1) && _search.equals("")) - { - if (auction.getCategory() == _category) - { - writeAuctionItem(auction); - } - } - else if (_grade != -1) - { - if (_search.equals("")) - { - if ((auction.getCategory() == _category) && (_grade == auction.getItem().getItem().getCrystalType().getId())) - { - writeAuctionItem(auction); - } - } - if (!_search.equals("")) - { - if ((auction.getCategory() == _category) && (_grade == auction.getItem().getItem().getCrystalType().getId()) && auction.getItem().getName().contains(_search)) - { - writeAuctionItem(auction); - } - } - } - else if (!_search.equals("")) - { - if ((auction.getCategory() == _category) && auction.getItem().getName().contains(_search)) - { - writeAuctionItem(auction); - } - } - } - } - else - { - if (_search != null) - { - writeD(_am.getAuctionsSizeById(_grade, _search)); // Auction count, maybe items putted in auction??? - for (Auctions auction : _am.getAuctions()) - { - if (_grade == -1) - { - if (auction.getItem().getName().contains(_search)) - { - writeAuctionItem(auction); - } - } - if (_grade != -1) - { - if ((_grade == auction.getItem().getItem().getCrystalType().getId()) && auction.getItem().getName().contains(_search)) - { - writeAuctionItem(auction); - } - } - } - } - } - } - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionRegister.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionRegister.java deleted file mode 100644 index 7532088c93..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExResponseCommissionRegister.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.serverpackets.auctionhouse; - -import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; - -/** - * @author Erlandys - */ -public class ExResponseCommissionRegister extends L2GameServerPacket -{ - private final boolean success; - - public ExResponseCommissionRegister(boolean _success) - { - success = _success; - } - - @Override - protected final void writeImpl() - { - writeC(0xd3); - writeD(success ? 1 : 0); // Success - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExShowCommission.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExShowCommission.java deleted file mode 100644 index 5417b3913e..0000000000 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/auctionhouse/ExShowCommission.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, either version 3 of the License, or (at your option) any later - * version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ -package com.l2jserver.gameserver.network.serverpackets.auctionhouse; - -import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; - -/** - * @author mrTJO - */ -public class ExShowCommission extends L2GameServerPacket -{ - @Override - protected void writeImpl() - { - writeC(0xFE); - writeH(0xF2); - writeD(0x01); // Just for showing window... - } -} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExCloseCommission.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExCloseCommission.java new file mode 100644 index 0000000000..84b4b4948a --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExCloseCommission.java @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.serverpackets.commission; + +import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; + +/** + * @author NosBit + */ +public class ExCloseCommission extends L2GameServerPacket +{ + public static final ExCloseCommission STATIC_PACKET = new ExCloseCommission(); + + private ExCloseCommission() + { + } + + @Override + protected void writeImpl() + { + writeC(0xFE); + writeH(0x112); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionBuyInfo.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionBuyInfo.java new file mode 100644 index 0000000000..43419b30d2 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionBuyInfo.java @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.serverpackets.commission; + +import com.l2jserver.gameserver.model.commission.CommissionItem; +import com.l2jserver.gameserver.network.serverpackets.AbstractItemPacket; + +/** + * @author NosBit + */ +public class ExResponseCommissionBuyInfo extends AbstractItemPacket +{ + public static final ExResponseCommissionBuyInfo FAILED = new ExResponseCommissionBuyInfo(null); + + private final CommissionItem _commissionItem; + + public ExResponseCommissionBuyInfo(CommissionItem commissionItem) + { + _commissionItem = commissionItem; + } + + @Override + protected void writeImpl() + { + writeC(0xFE); + writeH(0xF8); + writeD(_commissionItem != null ? 1 : 0); + if (_commissionItem != null) + { + writeQ(_commissionItem.getPricePerUnit()); + writeQ(_commissionItem.getCommissionId()); + writeD(0); // CommissionItemType seems client does not really need it. + writeCommissionItem(_commissionItem.getItemInfo()); + } + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionBuyItem.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionBuyItem.java new file mode 100644 index 0000000000..b2572abd71 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionBuyItem.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.serverpackets.commission; + +import com.l2jserver.gameserver.model.ItemInfo; +import com.l2jserver.gameserver.model.commission.CommissionItem; +import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; + +/** + * @author NosBit + */ +public class ExResponseCommissionBuyItem extends L2GameServerPacket +{ + public static final ExResponseCommissionBuyItem FAILED = new ExResponseCommissionBuyItem(null); + + private final CommissionItem _commissionItem; + + public ExResponseCommissionBuyItem(CommissionItem commissionItem) + { + _commissionItem = commissionItem; + } + + @Override + protected void writeImpl() + { + writeC(0xFE); + writeH(0xF9); + writeD(_commissionItem != null ? 1 : 0); + if (_commissionItem != null) + { + final ItemInfo itemInfo = _commissionItem.getItemInfo(); + writeD(itemInfo.getEnchant()); + writeD(itemInfo.getItem().getId()); + writeQ(itemInfo.getCount()); + } + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionDelete.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionDelete.java new file mode 100644 index 0000000000..73dcb4ed28 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionDelete.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.serverpackets.commission; + +import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; + +/** + * @author NosBit + */ +public class ExResponseCommissionDelete extends L2GameServerPacket +{ + public static final ExResponseCommissionDelete SUCCEED = new ExResponseCommissionDelete(1); + public static final ExResponseCommissionDelete FAILED = new ExResponseCommissionDelete(0); + + private final int _result; + + private ExResponseCommissionDelete(int result) + { + _result = result; + } + + @Override + protected void writeImpl() + { + writeC(0xFE); + writeH(0xF6); + writeD(_result); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionInfo.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionInfo.java new file mode 100644 index 0000000000..346b27f113 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionInfo.java @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.serverpackets.commission; + +import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; + +/** + * @author NosBit + */ +public class ExResponseCommissionInfo extends L2GameServerPacket +{ + public static final ExResponseCommissionInfo EMPTY = new ExResponseCommissionInfo(); + + private final int _result; + private final int _itemId; + private final long _presetPricePerUnit; + private final long _presetAmount; + private final int _presetDurationType; + + private ExResponseCommissionInfo() + { + _result = 0; + _itemId = 0; + _presetPricePerUnit = 0; + _presetAmount = 0; + _presetDurationType = -1; + } + + public ExResponseCommissionInfo(int itemId, long presetPricePerUnit, long presetAmount, int presetDurationType) + { + _result = 1; + _itemId = itemId; + _presetPricePerUnit = presetPricePerUnit; + _presetAmount = presetAmount; + _presetDurationType = presetDurationType; + } + + @Override + protected void writeImpl() + { + writeC(0xFE); + writeH(0xF4); + writeD(_result); + writeD(_itemId); + writeQ(_presetPricePerUnit); + writeQ(_presetAmount); + writeD(_presetDurationType); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionItemList.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionItemList.java new file mode 100644 index 0000000000..332475e86e --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionItemList.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.serverpackets.commission; + +import java.util.List; + +import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; +import com.l2jserver.gameserver.network.serverpackets.AbstractItemPacket; + +/** + * @author NosBit + */ +public class ExResponseCommissionItemList extends AbstractItemPacket +{ + private final List _items; + + public ExResponseCommissionItemList(List items) + { + _items = items; + } + + @Override + protected void writeImpl() + { + writeC(0xFE); + writeH(0xF3); + writeD(_items.size()); + for (L2ItemInstance itemInstance : _items) + { + writeItem(itemInstance); + } + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionList.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionList.java new file mode 100644 index 0000000000..e9228e34af --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionList.java @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.serverpackets.commission; + +import java.time.Instant; +import java.util.Collections; +import java.util.List; + +import com.l2jserver.gameserver.model.commission.CommissionItem; +import com.l2jserver.gameserver.network.serverpackets.AbstractItemPacket; + +/** + * @author NosBit + */ +public class ExResponseCommissionList extends AbstractItemPacket +{ + public static final int MAX_CHUNK_SIZE = 120; + + private final CommissionListReplyType _replyType; + private final List _items; + private final int _chunkId; + private final int _listIndexStart; + + public ExResponseCommissionList(CommissionListReplyType replyType) + { + this(replyType, Collections.emptyList(), 0); + } + + public ExResponseCommissionList(CommissionListReplyType replyType, List items) + { + this(replyType, items, 0); + } + + public ExResponseCommissionList(CommissionListReplyType replyType, List items, int chunkId) + { + this(replyType, items, chunkId, 0); + } + + public ExResponseCommissionList(CommissionListReplyType replyType, List items, int chunkId, int listIndexStart) + { + _replyType = replyType; + _items = items; + _chunkId = chunkId; + _listIndexStart = listIndexStart; + } + + @Override + protected void writeImpl() + { + writeC(0xFE); + writeH(0xF7); + writeD(_replyType.getClientId()); + switch (_replyType) + { + case PLAYER_AUCTIONS: + case AUCTIONS: + { + writeD((int) Instant.now().getEpochSecond()); + writeD(_chunkId); + + int chunkSize = _items.size() - _listIndexStart; + if (chunkSize > MAX_CHUNK_SIZE) + { + chunkSize = MAX_CHUNK_SIZE; + } + + writeD(chunkSize); + for (int i = _listIndexStart; i < (_listIndexStart + chunkSize); i++) + { + final CommissionItem commissionItem = _items.get(i); + writeQ(commissionItem.getCommissionId()); + writeQ(commissionItem.getPricePerUnit()); + writeD(0); // CommissionItemType seems client does not really need it. + writeD((commissionItem.getDurationInDays() - 1) / 2); + writeD((int) commissionItem.getEndTime().getEpochSecond()); + writeS(null); // Seller Name its not displayed somewhere so i am not sending it to decrease traffic. + writeCommissionItem(commissionItem.getItemInfo()); + } + break; + } + } + } + + public enum CommissionListReplyType + { + PLAYER_AUCTIONS_EMPTY(-2), + ITEM_DOES_NOT_EXIST(-1), + PLAYER_AUCTIONS(2), + AUCTIONS(3); + + private final int _clientId; + + private CommissionListReplyType(int clientId) + { + _clientId = clientId; + } + + /** + * Gets the client id. + * @return the client id + */ + public int getClientId() + { + return _clientId; + } + } +} \ No newline at end of file diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionRegister.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionRegister.java new file mode 100644 index 0000000000..3f86342ce2 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExResponseCommissionRegister.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.serverpackets.commission; + +import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; + +/** + * @author NosBit + */ +public class ExResponseCommissionRegister extends L2GameServerPacket +{ + public static final ExResponseCommissionRegister SUCCEED = new ExResponseCommissionRegister(1); + public static final ExResponseCommissionRegister FAILED = new ExResponseCommissionRegister(0); + + private final int _result; + + private ExResponseCommissionRegister(int result) + { + _result = result; + } + + @Override + protected void writeImpl() + { + writeC(0xFE); + writeH(0xF5); + writeD(_result); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExShowCommission.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExShowCommission.java new file mode 100644 index 0000000000..858edabf21 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/commission/ExShowCommission.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2004-2015 L2J Server + * + * This file is part of L2J Server. + * + * L2J Server is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * L2J Server is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package com.l2jserver.gameserver.network.serverpackets.commission; + +import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; + +/** + * @author NosBit + */ +public class ExShowCommission extends L2GameServerPacket +{ + public static final ExShowCommission STATIC_PACKET = new ExShowCommission(); + + private ExShowCommission() + { + } + + @Override + protected void writeImpl() + { + writeC(0xFE); + writeH(0xF2); + writeD(1); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantFail.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantFail.java index a481afcb78..1d7b5775a2 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantFail.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantFail.java @@ -20,23 +20,27 @@ package com.l2jserver.gameserver.network.serverpackets.compound; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; +/** + * @author UnAfraid + */ public class ExEnchantFail extends L2GameServerPacket { - private final int _itemId1; - private final int _itemId2; + public static final ExEnchantFail STATIC_PACKET = new ExEnchantFail(0, 0); + private final int _itemOne; + private final int _itemTwo; - public ExEnchantFail(int itemId1, int itemId2) + public ExEnchantFail(int itemOne, int itemTwo) { - _itemId1 = itemId1; - _itemId2 = itemId2; + _itemOne = itemOne; + _itemTwo = itemTwo; } @Override - protected final void writeImpl() + protected void writeImpl() { writeC(0xFE); writeH(0x171); - writeD(_itemId1); - writeD(_itemId2); + writeD(_itemOne); + writeD(_itemTwo); } } diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneFail.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneFail.java index 79c22bbf33..3646d40354 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneFail.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneFail.java @@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; +/** + * @author UnAfraid + */ public class ExEnchantOneFail extends L2GameServerPacket { public static final ExEnchantOneFail STATIC_PACKET = new ExEnchantOneFail(); + private ExEnchantOneFail() + { + } + @Override - protected final void writeImpl() + protected void writeImpl() { writeC(0xFE); writeH(0x169); diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneOK.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneOK.java index 4c4f765e0f..9ff367c373 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneOK.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneOK.java @@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; +/** + * @author UnAfraid + */ public class ExEnchantOneOK extends L2GameServerPacket { - public static final ExEnchantOneOK STATIC_PACKET = new ExEnchantOneOK(); + public static ExEnchantOneOK STATIC_PACKET = new ExEnchantOneOK(); + + private ExEnchantOneOK() + { + } @Override - protected final void writeImpl() + protected void writeImpl() { writeC(0xFE); writeH(0x168); diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneRemoveFail.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneRemoveFail.java index 38124536b5..59307a8c95 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneRemoveFail.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneRemoveFail.java @@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; +/** + * @author UnAfraid + */ public class ExEnchantOneRemoveFail extends L2GameServerPacket { public static final ExEnchantOneRemoveFail STATIC_PACKET = new ExEnchantOneRemoveFail(); + private ExEnchantOneRemoveFail() + { + } + @Override - protected final void writeImpl() + protected void writeImpl() { writeC(0xFE); writeH(0x16B); diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneRemoveOK.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneRemoveOK.java index 51639a918f..88f98bf8ad 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneRemoveOK.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantOneRemoveOK.java @@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; +/** + * @author UnAfraid + */ public class ExEnchantOneRemoveOK extends L2GameServerPacket { public static final ExEnchantOneRemoveOK STATIC_PACKET = new ExEnchantOneRemoveOK(); + private ExEnchantOneRemoveOK() + { + } + @Override - protected final void writeImpl() + protected void writeImpl() { writeC(0xFE); writeH(0x16A); diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantSucess.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantSucess.java index d671326e7d..5672a430c2 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantSucess.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantSucess.java @@ -20,20 +20,23 @@ package com.l2jserver.gameserver.network.serverpackets.compound; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; +/** + * @author UnAfraid + */ public class ExEnchantSucess extends L2GameServerPacket { - int _newItemId; + private final int _itemId; - public ExEnchantSucess(int newItemId) + public ExEnchantSucess(int itemId) { - _newItemId = newItemId; + _itemId = itemId; } @Override - protected final void writeImpl() + protected void writeImpl() { writeC(0xFE); writeH(0x170); - writeD(_newItemId); + writeD(_itemId); } -} \ No newline at end of file +} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoFail.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoFail.java index 95d3243c6d..1d88c944ed 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoFail.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoFail.java @@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; +/** + * @author UnAfraid + */ public class ExEnchantTwoFail extends L2GameServerPacket { public static final ExEnchantTwoFail STATIC_PACKET = new ExEnchantTwoFail(); + private ExEnchantTwoFail() + { + } + @Override - protected final void writeImpl() + protected void writeImpl() { writeC(0xFE); writeH(0x16D); diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoOK.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoOK.java index cb8334f04c..21c3c69c52 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoOK.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoOK.java @@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; +/** + * @author UnAfraid + */ public class ExEnchantTwoOK extends L2GameServerPacket { public static final ExEnchantTwoOK STATIC_PACKET = new ExEnchantTwoOK(); + private ExEnchantTwoOK() + { + } + @Override - protected final void writeImpl() + protected void writeImpl() { writeC(0xFE); writeH(0x16C); diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoRemoveFail.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoRemoveFail.java index 86eecb1cff..f6e2d16655 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoRemoveFail.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoRemoveFail.java @@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; +/** + * @author UnAfraid + */ public class ExEnchantTwoRemoveFail extends L2GameServerPacket { public static final ExEnchantTwoRemoveFail STATIC_PACKET = new ExEnchantTwoRemoveFail(); + private ExEnchantTwoRemoveFail() + { + } + @Override - protected final void writeImpl() + protected void writeImpl() { writeC(0xFE); writeH(0x16F); diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoRemoveOK.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoRemoveOK.java index 04ef906551..ba5f252f3a 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoRemoveOK.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/compound/ExEnchantTwoRemoveOK.java @@ -20,12 +20,19 @@ package com.l2jserver.gameserver.network.serverpackets.compound; import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; +/** + * @author UnAfraid + */ public class ExEnchantTwoRemoveOK extends L2GameServerPacket { public static final ExEnchantTwoRemoveOK STATIC_PACKET = new ExEnchantTwoRemoveOK(); + private ExEnchantTwoRemoveOK() + { + } + @Override - protected final void writeImpl() + protected void writeImpl() { writeC(0xFE); writeH(0x16E);