From 2cb3a52ed2ed327d5c7c5695ce8772462ec092fd Mon Sep 17 00:00:00 2001 From: mobius <8391001+MobiusDevelopment@users.noreply.github.com> Date: Thu, 29 Jan 2015 05:18:04 +0000 Subject: [PATCH] Sync with L2JServer Jan 28th 2015. --- trunk/dist/game/config/Feature.properties | 96 --- trunk/dist/game/config/Server.properties | 4 +- trunk/dist/game/data/AppearanceStones.xml | 50 +- trunk/dist/game/data/PrimeShop.xml | 735 ++++++++++++++++++ trunk/dist/game/data/buylists/0000001.xml | 18 + trunk/dist/game/data/buylists/0000002.xml | 10 + trunk/dist/game/data/buylists/0000003.xml | 18 + trunk/dist/game/data/buylists/0000004.xml | 10 + trunk/dist/game/data/buylists/0000005.xml | 10 + trunk/dist/game/data/buylists/0000006.xml | 48 ++ trunk/dist/game/data/buylists/0000021.xml | 15 + trunk/dist/game/data/buylists/0000022.xml | 14 + trunk/dist/game/data/buylists/0000023.xml | 18 + trunk/dist/game/data/buylists/0000024.xml | 16 + trunk/dist/game/data/buylists/0000025.xml | 16 + trunk/dist/game/data/buylists/0000026.xml | 16 + trunk/dist/game/data/buylists/0000027.xml | 16 + trunk/dist/game/data/buylists/0000028.xml | 15 + trunk/dist/game/data/buylists/0000029.xml | 8 + trunk/dist/game/data/buylists/0000030.xml | 9 + trunk/dist/game/data/buylists/0000031.xml | 6 + trunk/dist/game/data/buylists/0000032.xml | 6 + trunk/dist/game/data/buylists/0000033.xml | 22 + trunk/dist/game/data/html/admin/gmshops.htm | 1 + .../data/html/admin/gmstore/appearance.htm | 53 ++ trunk/dist/game/data/html/default/32981.htm | 5 + .../ai/npc/MentorGuide/MentorGuide.java | 29 +- .../scripts/handlers/EffectMasterHandler.java | 2 + .../data/scripts/handlers/MasterHandler.java | 4 +- .../admincommandhandlers/AdminReload.java | 7 + .../handlers/effecthandlers/KnockBack.java | 73 ++ .../handlers/effecthandlers/KnockDown.java | 75 ++ .../handlers/itemhandlers/Appearance.java | 60 ++ .../itemhandlers/ChangeAttribute.java | 5 +- .../handlers/itemhandlers/ItemAppearance.java | 44 -- .../HarnakUndergroundRuins.java | 17 +- .../{32972-01a.html => 32972-01a.htm} | 0 .../32972-01b.html | 5 - .../32972-02.htm | 7 +- .../32972-03.htm | 6 +- .../{32972-04.html => 32972-04.htm} | 5 +- .../{32972-05.html => 32972-05.htm} | 3 +- .../{32975-01.html => 32975-01.htm} | 2 +- .../{32975-02.html => 32975-02.htm} | 0 .../{32975-03.html => 32975-03.htm} | 0 .../32975-04.htm | 4 + .../Q10320_LetsGoToTheCentralSquare.java | 19 +- .../{32974-01.html => 32974-01.htm} | 2 +- .../{32974-02.html => 32974-02.htm} | 0 .../{32974-03.html => 32974-03.htm} | 2 +- .../32974-04.htm | 4 + .../32975-01.htm | 2 +- .../32975-01b.htm | 5 - .../32975-02.htm | 2 +- .../32975-03.htm | 5 +- .../{32975-04.html => 32975-04.htm} | 5 +- .../{32975-05.html => 32975-05.htm} | 3 +- .../Q10321_QualificationsOfTheSeeker.java | 46 +- .../32974-01.htm | 2 +- .../32974-01a.htm | 5 +- .../32974-01b.htm | 5 - .../32974-02.htm | 4 +- .../32974-03.htm | 4 +- .../32974-04.htm | 4 + .../32974-04.html | 5 - .../{32974-05.html => 32974-05.htm} | 5 +- .../{32981-01.html => 32981-01.htm} | 2 +- .../{32981-02.html => 32981-02.htm} | 0 .../{32981-03.html => 32981-03.htm} | 0 .../32981-04.htm | 4 + .../{33464-01.html => 33464-01.htm} | 0 .../{33464-02.html => 33464-02.htm} | 2 +- .../{33464-03.html => 33464-03.htm} | 2 +- .../{33464-04.html => 33464-04.htm} | 0 .../{33464-05.html => 33464-05.htm} | 2 +- .../{33464-06.html => 33464-06.htm} | 0 .../33464-07.htm | 4 + .../33464-08.htm | 4 + ...Q10322_SearchingForTheMysteriousPower.java | 186 +++-- .../Q10323_TrainLikeItsReal/32974-01.htm | 2 +- .../Q10323_TrainLikeItsReal/32974-03.htm | 4 + .../Q10323_TrainLikeItsReal/32974-04.htm | 4 + .../Q10323_TrainLikeItsReal/32974-05.htm | 4 + .../Q10323_TrainLikeItsReal/33464-03.htm | 3 +- .../Q10323_TrainLikeItsReal/33464-04.htm | 4 + .../Q10323_TrainLikeItsReal/33464-05.htm | 4 + .../Q10323_TrainLikeItsReal.java | 143 ++-- .../{32974-04.html => 32974-04.htm} | 0 .../{32974-05.html => 32974-05.htm} | 0 .../{32980-01.html => 32980-01.htm} | 2 +- .../{32980-02.html => 32980-02.htm} | 0 .../{32980-03.html => 32980-03.htm} | 0 .../32980-04.htm | 4 + .../Q10324_FindingMagisterGallint.java | 65 +- .../Q10325_SearchingForNewPower/32144-01.htm | 5 + .../Q10325_SearchingForNewPower/32144-02.htm | 3 + .../Q10325_SearchingForNewPower/32144-03.htm | 4 + .../Q10325_SearchingForNewPower/32144-04.htm | 3 + .../Q10325_SearchingForNewPower/32148-01.htm | 6 + .../Q10325_SearchingForNewPower/32148-02.htm | 3 + .../Q10325_SearchingForNewPower/32148-03.htm | 4 + .../Q10325_SearchingForNewPower/32148-04.htm | 3 + .../Q10325_SearchingForNewPower/32151-01.htm | 5 + .../Q10325_SearchingForNewPower/32151-02.htm | 3 + .../Q10325_SearchingForNewPower/32151-03.htm | 4 + .../Q10325_SearchingForNewPower/32151-04.htm | 3 + .../Q10325_SearchingForNewPower/32156-01.htm | 7 + .../Q10325_SearchingForNewPower/32156-02.htm | 3 + .../Q10325_SearchingForNewPower/32156-03.htm | 4 + .../Q10325_SearchingForNewPower/32156-04.htm | 3 + .../Q10325_SearchingForNewPower/32159-01.htm | 5 + .../Q10325_SearchingForNewPower/32159-02.htm | 3 + .../Q10325_SearchingForNewPower/32159-03.htm | 3 + .../Q10325_SearchingForNewPower/32159-04.htm | 3 + .../Q10325_SearchingForNewPower/32161-01.htm | 7 + .../Q10325_SearchingForNewPower/32161-02.htm | 3 + .../Q10325_SearchingForNewPower/32161-03.htm | 4 + .../Q10325_SearchingForNewPower/32161-04.htm | 3 + .../Q10325_SearchingForNewPower/32980-01.htm | 5 + .../Q10325_SearchingForNewPower/32980-02.htm | 5 + .../Q10325_SearchingForNewPower/32980-03.htm | 3 + .../Q10325_SearchingForNewPower/32980-04.htm | 3 + .../Q10325_SearchingForNewPower/32980-05.htm | 4 + .../Q10325_SearchingForNewPower/32980-06.htm | 3 + .../Q10325_SearchingForNewPower/32980-07.htm | 3 + .../Q10325_SearchingForNewPower/32980-08.htm | 3 + .../Q10325_SearchingForNewPower/32980-09.htm | 3 + .../Q10325_SearchingForNewPower/32980-10.htm | 3 + .../Q10325_SearchingForNewPower/32980-11.htm | 3 + .../Q10325_SearchingForNewPower/32980-12.htm | 4 + .../Q10325_SearchingForNewPower.java | 299 +++++++ .../Q10326_RespectYourElders/32972-01.htm | 5 + .../Q10326_RespectYourElders/32972-02.htm | 4 + .../Q10326_RespectYourElders/32972-03.htm | 4 + .../Q10326_RespectYourElders/32980-01.htm | 4 + .../Q10326_RespectYourElders/32980-02.htm | 6 + .../Q10326_RespectYourElders/32980-03.htm | 3 + .../Q10326_RespectYourElders/32980-04.htm | 4 + .../Q10326_RespectYourElders/32980-05.htm | 4 + .../Q10326_RespectYourElders.java | 210 +++++ .../scripts/quests/QuestMasterHandler.java | 4 + .../game/data/stats/items/22400-22499.xml | 39 +- .../game/data/stats/items/22600-22699.xml | 68 ++ .../game/data/stats/items/22700-22799.xml | 52 ++ .../game/data/stats/items/23100-23199.xml | 22 + .../game/data/stats/items/23200-23299.xml | 28 + .../game/data/stats/items/23300-23399.xml | 28 + .../game/data/stats/items/23400-23499.xml | 14 + .../game/data/stats/items/23500-23599.xml | 100 +++ .../game/data/stats/items/23600-23699.xml | 80 ++ .../game/data/stats/items/23700-23799.xml | 24 + .../game/data/stats/items/23800-23899.xml | 18 + .../game/data/stats/items/23900-23999.xml | 42 + .../game/data/stats/items/24100-24199.xml | 2 + .../game/data/stats/items/24300-24399.xml | 2 + .../game/data/stats/items/36600-36699.xml | 40 + .../game/data/stats/items/37000-37099.xml | 40 + .../game/data/stats/items/37300-37399.xml | 2 + .../game/data/stats/items/37400-37499.xml | 64 ++ .../game/data/stats/items/37800-37899.xml | 90 +++ .../game/data/stats/items/37900-37999.xml | 36 + .../game/data/stats/items/38100-38199.xml | 50 ++ .../game/data/stats/items/38200-38299.xml | 22 + .../game/data/stats/items/38400-38499.xml | 12 + .../game/data/stats/items/38900-38999.xml | 10 + .../game/data/stats/items/45400-45499.xml | 4 + trunk/dist/game/data/xsd/AppearanceStones.xsd | 14 +- trunk/dist/game/data/xsd/PrimeShop.xsd | 43 + trunk/java/com/l2jserver/Config.java | 65 +- .../commons/geodriver/GeoDriver.java | 20 - .../l2jserver/commons/geodriver/IBlock.java | 8 - .../l2jserver/commons/geodriver/IRegion.java | 8 - .../geodriver/blocks/ComplexBlock.java | 9 +- .../commons/geodriver/blocks/FlatBlock.java | 10 +- .../geodriver/blocks/MultilayerBlock.java | 12 +- .../commons/geodriver/regions/NullRegion.java | 24 - .../commons/geodriver/regions/Region.java | 24 - .../com/l2jserver/gameserver/GameServer.java | 6 +- .../com/l2jserver/gameserver/GeoData.java | 84 +- ...tonesData.java => AppearanceItemData.java} | 41 +- .../data/xml/impl/PrimeShopData.java | 255 ++++++ .../gameserver/datatables/ItemTable.java | 26 + .../GlobalVariablesManager.java | 16 + .../l2jserver/gameserver/model/ItemInfo.java | 24 +- .../l2jserver/gameserver/model/StatsSet.java | 24 + .../l2jserver/gameserver/model/TradeItem.java | 24 +- .../l2jserver/gameserver/model/TradeList.java | 2 +- .../model/actor/instance/L2PcInstance.java | 39 +- .../model/entity/AppearanceStone.java | 20 +- .../gameserver/model/entity/Instance.java | 7 + .../model/interfaces/IParserAdvUtils.java | 4 + .../model/interfaces/IParserUtils.java | 4 + .../model/itemcontainer/Inventory.java | 17 +- .../gameserver/model/items/L2EtcItem.java | 4 +- .../model/items/L2WarehouseItem.java | 2 +- .../model/items/instance/L2ItemInstance.java | 4 +- .../model/primeshop/PrimeShopGroup.java | 205 +++++ .../model/primeshop/PrimeShopItem.java | 48 ++ .../model/variables/AbstractVariables.java | 18 +- .../model/variables/AccountVariables.java | 23 + .../model/variables/NpcVariables.java | 6 + .../model/variables/PlayerVariables.java | 23 + .../gameserver/network/L2GameClient.java | 1 + .../network/L2GamePacketHandler.java | 15 +- .../network/clientpackets/Logout.java | 9 - .../clientpackets/RequestGetItemFromPet.java | 2 +- .../clientpackets/RequestJoinParty.java | 23 - .../clientpackets/SetPrivateStoreListBuy.java | 2 +- ...tExTryToPut_Shape_Shifting_TargetItem.java | 2 +- .../RequestShape_Shifting_Item.java | 8 +- .../primeshop/RequestBRBuyProduct.java} | 45 +- .../primeshop/RequestBRGamePoint.java | 51 ++ .../primeshop/RequestBRProductInfo.java | 53 ++ .../primeshop/RequestBRProductList.java | 77 ++ .../primeshop/RequestBRRecentProductList.java | 46 ++ .../serverpackets/AbstractItemPacket.java | 7 +- .../network/serverpackets/CharInfo.java | 13 +- .../serverpackets/ExUserInfoEquipSlot.java | 2 +- .../primeshop/ExBRBuyProduct.java | 74 ++ .../primeshop/ExBRGamePoint.java | 47 ++ .../primeshop/ExBRProductInfo.java | 53 ++ .../primeshop/ExBRProductList.java | 87 +++ .../l2jserver/gameserver/util/GeoUtils.java | 2 +- .../com/l2jserver/gameserver/util/Util.java | 14 + 224 files changed, 4690 insertions(+), 835 deletions(-) create mode 100644 trunk/dist/game/data/PrimeShop.xml create mode 100644 trunk/dist/game/data/buylists/0000001.xml create mode 100644 trunk/dist/game/data/buylists/0000002.xml create mode 100644 trunk/dist/game/data/buylists/0000003.xml create mode 100644 trunk/dist/game/data/buylists/0000004.xml create mode 100644 trunk/dist/game/data/buylists/0000005.xml create mode 100644 trunk/dist/game/data/buylists/0000006.xml create mode 100644 trunk/dist/game/data/buylists/0000021.xml create mode 100644 trunk/dist/game/data/buylists/0000022.xml create mode 100644 trunk/dist/game/data/buylists/0000023.xml create mode 100644 trunk/dist/game/data/buylists/0000024.xml create mode 100644 trunk/dist/game/data/buylists/0000025.xml create mode 100644 trunk/dist/game/data/buylists/0000026.xml create mode 100644 trunk/dist/game/data/buylists/0000027.xml create mode 100644 trunk/dist/game/data/buylists/0000028.xml create mode 100644 trunk/dist/game/data/buylists/0000029.xml create mode 100644 trunk/dist/game/data/buylists/0000030.xml create mode 100644 trunk/dist/game/data/buylists/0000031.xml create mode 100644 trunk/dist/game/data/buylists/0000032.xml create mode 100644 trunk/dist/game/data/buylists/0000033.xml create mode 100644 trunk/dist/game/data/html/admin/gmstore/appearance.htm create mode 100644 trunk/dist/game/data/html/default/32981.htm create mode 100644 trunk/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java create mode 100644 trunk/dist/game/data/scripts/handlers/effecthandlers/KnockDown.java create mode 100644 trunk/dist/game/data/scripts/handlers/itemhandlers/Appearance.java delete mode 100644 trunk/dist/game/data/scripts/handlers/itemhandlers/ItemAppearance.java rename trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/{32972-01a.html => 32972-01a.htm} (100%) delete mode 100644 trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-01b.html rename trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/{32972-04.html => 32972-04.htm} (56%) rename trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/{32972-05.html => 32972-05.htm} (60%) rename trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/{32975-01.html => 32975-01.htm} (76%) rename trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/{32975-02.html => 32975-02.htm} (100%) rename trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/{32975-03.html => 32975-03.htm} (100%) create mode 100644 trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-04.htm rename trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/{32974-01.html => 32974-01.htm} (65%) rename trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/{32974-02.html => 32974-02.htm} (100%) rename trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/{32974-03.html => 32974-03.htm} (57%) create mode 100644 trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-04.htm delete mode 100644 trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-01b.htm rename trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/{32975-04.html => 32975-04.htm} (57%) rename trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/{32975-05.html => 32975-05.htm} (71%) delete mode 100644 trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-01b.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-04.htm delete mode 100644 trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-04.html rename trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/{32974-05.html => 32974-05.htm} (59%) rename trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/{32981-01.html => 32981-01.htm} (79%) rename trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/{32981-02.html => 32981-02.htm} (100%) rename trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/{32981-03.html => 32981-03.htm} (100%) create mode 100644 trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-04.htm rename trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/{33464-01.html => 33464-01.htm} (100%) rename trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/{33464-02.html => 33464-02.htm} (71%) rename trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/{33464-03.html => 33464-03.htm} (75%) rename trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/{33464-04.html => 33464-04.htm} (100%) rename trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/{33464-05.html => 33464-05.htm} (67%) rename trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/{33464-06.html => 33464-06.htm} (100%) create mode 100644 trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-07.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-08.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-05.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/33464-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/33464-05.htm rename trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/{32974-04.html => 32974-04.htm} (100%) rename trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/{32974-05.html => 32974-05.htm} (100%) rename trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/{32980-01.html => 32980-01.htm} (72%) rename trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/{32980-02.html => 32980-02.htm} (100%) rename trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/{32980-03.html => 32980-03.htm} (100%) create mode 100644 trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-05.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-06.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-07.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-08.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-09.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-10.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-11.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-12.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/Q10325_SearchingForNewPower.java create mode 100644 trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32972-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32972-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32972-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-01.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-02.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-03.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-04.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-05.htm create mode 100644 trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/Q10326_RespectYourElders.java create mode 100644 trunk/dist/game/data/xsd/PrimeShop.xsd rename trunk/java/com/l2jserver/gameserver/data/xml/impl/{AppearanceStonesData.java => AppearanceItemData.java} (69%) create mode 100644 trunk/java/com/l2jserver/gameserver/data/xml/impl/PrimeShopData.java create mode 100644 trunk/java/com/l2jserver/gameserver/model/primeshop/PrimeShopGroup.java create mode 100644 trunk/java/com/l2jserver/gameserver/model/primeshop/PrimeShopItem.java rename trunk/java/com/l2jserver/{commons/geodriver/blocks/AbstractBlock.java => gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java} (50%) create mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRGamePoint.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRProductInfo.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRProductList.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRRecentProductList.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRBuyProduct.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRGamePoint.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRProductInfo.java create mode 100644 trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRProductList.java diff --git a/trunk/dist/game/config/Feature.properties b/trunk/dist/game/config/Feature.properties index 96c2e32597..0d40529ff8 100644 --- a/trunk/dist/game/config/Feature.properties +++ b/trunk/dist/game/config/Feature.properties @@ -215,102 +215,6 @@ FortressFeeForCastle = 25000 FortressMaximumOwnTime = 168 -# --------------------------------------------------------------------------- -# Seven Signs -# --------------------------------------------------------------------------- - -# Determines whether castle ownership is determined by clan or by alliance. -# Default is by alliance, as on official servers. -AltRequireClanCastle = False - -# Dawn: -# True - Players not owning castle need pay participation fee -# False - Anyone can join Dawn -AltCastleForDawn = True - -# Dusk: -# True - Players owning castle can not join Dusk side -# False - Anyone can join Dusk -AltCastleForDusk = True - -# Minimum Players for participate in SevenSigns Festival. -# Default: 5 -AltFestivalMinPlayer = 5 - -# Maximum seal stone contribution per player during festival. -# Default: 1000000 -AltMaxPlayerContrib = 1000000 - -# Festival Manager Start time (set in milliseconds; 1000 = 1 second). -# Default: 2 minutes -AltFestivalManagerStart = 120000 - -# Festival Length (set in milliseconds; 1000 = 1 second). -# Default: 18 minutes -AltFestivalLength = 1080000 - -# Festival Cycle Length. -# Default: 38 Minutes (20 minutes wait time + Festival Length) (set in milliseconds; 1000 = 1 second). -AltFestivalCycleLength = 2280000 - -# At what point the first festival spawn occurs. -# Default: 2 minutes (set in milliseconds; 1000 = 1 second). -AltFestivalFirstSpawn = 120000 - -# At what Point the first festival swarm occurs. -# Default: 5 minutes (set in milliseconds; 1000 = 1 second). -AltFestivalFirstSwarm = 300000 - -# At what Point the second festival spawn occurs. -# Default: 9 minutes (set in milliseconds; 1000 = 1 second). -AltFestivalSecondSpawn = 540000 - -# At what Point the second festival spawn occurs. -# Default: 12 minutes (set in milliseconds; 1000 = 1 second). -AltFestivalSecondSwarm = 720000 - -# At what point the chests spawn in. -# Default: 15 minutes (set in milliseconds; 1000 = 1 second). -AltFestivalChestSpawn = 900000 - -# This multipliers are used to change P.Def/M.Def of castle gates/walls while Seal of Strife is controlled by one of the sides. -# Default: 1.1,0.8,1.1,0.8 -AltDawnGatesPdefMult = 1.1 -AltDuskGatesPdefMult = 0.8 -AltDawnGatesMdefMult = 1.1 -AltDuskGatesMdefMult = 0.8 - -# If this = true only cabal period owners can use merchant and blacksmith of mammon. -# If false any player can use. -# Default: True -StrictSevenSigns = True - -# Save SevenSigns status only each 30 minutes and after period change. -# Player info saved only during periodic data store (set by CharacterDataStoreInterval) and logout. -# If False then save info and status immediately after changes. -# Default: True -AltSevenSignsLazyUpdate = True - -# Total count of available tickets. -# Default: 300 -SevenSignsDawnTicketQuantity = 300 - -# Price of each ticket. -# Default: 1000 -SevenSignsDawnTicketPrice = 1000 - -# Tickets bundle (exchanged in amounts of). -# Default: 10 -SevenSignsDawnTicketBundle = 10 - -# Ticket item Id. -# Default: 6388 -SevenSignsManorsAgreementId = 6388 - -# Fee for joining Dawn -SevenSignsJoinDawnFee = 50000 - - # --------------------------------------------------------------------------- # Clan Reputation Points # --------------------------------------------------------------------------- diff --git a/trunk/dist/game/config/Server.properties b/trunk/dist/game/config/Server.properties index a2dd9de329..f096d3167b 100644 --- a/trunk/dist/game/config/Server.properties +++ b/trunk/dist/game/config/Server.properties @@ -84,8 +84,8 @@ MaximumOnlineUsers = 2000 # Numbers of protocol revisions that server allows to connect. # Delimiter is ; # WARNING: Changing the protocol revision may result in incompatible communication and many errors in game! -# Default: 267;268;271;273 -AllowedProtocolRevisions = 603;606 +# Default: 603;606;607 +AllowedProtocolRevisions = 603;606;607 # --------------------------------------------------------------------------- diff --git a/trunk/dist/game/data/AppearanceStones.xml b/trunk/dist/game/data/AppearanceStones.xml index 9937bf4171..a3e758bdd7 100644 --- a/trunk/dist/game/data/AppearanceStones.xml +++ b/trunk/dist/game/data/AppearanceStones.xml @@ -1,4 +1,52 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/PrimeShop.xml b/trunk/dist/game/data/PrimeShop.xml new file mode 100644 index 0000000000..9b26180fe5 --- /dev/null +++ b/trunk/dist/game/data/PrimeShop.xml @@ -0,0 +1,735 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/buylists/0000001.xml b/trunk/dist/game/data/buylists/0000001.xml new file mode 100644 index 0000000000..ab3bcd316b --- /dev/null +++ b/trunk/dist/game/data/buylists/0000001.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000002.xml b/trunk/dist/game/data/buylists/0000002.xml new file mode 100644 index 0000000000..d080a5e359 --- /dev/null +++ b/trunk/dist/game/data/buylists/0000002.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000003.xml b/trunk/dist/game/data/buylists/0000003.xml new file mode 100644 index 0000000000..b1aeda37f7 --- /dev/null +++ b/trunk/dist/game/data/buylists/0000003.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000004.xml b/trunk/dist/game/data/buylists/0000004.xml new file mode 100644 index 0000000000..827c2c52c4 --- /dev/null +++ b/trunk/dist/game/data/buylists/0000004.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000005.xml b/trunk/dist/game/data/buylists/0000005.xml new file mode 100644 index 0000000000..3b2bb97bbd --- /dev/null +++ b/trunk/dist/game/data/buylists/0000005.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000006.xml b/trunk/dist/game/data/buylists/0000006.xml new file mode 100644 index 0000000000..edf272fbd5 --- /dev/null +++ b/trunk/dist/game/data/buylists/0000006.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000021.xml b/trunk/dist/game/data/buylists/0000021.xml new file mode 100644 index 0000000000..ce5d0b7e73 --- /dev/null +++ b/trunk/dist/game/data/buylists/0000021.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000022.xml b/trunk/dist/game/data/buylists/0000022.xml new file mode 100644 index 0000000000..3eb23ea976 --- /dev/null +++ b/trunk/dist/game/data/buylists/0000022.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000023.xml b/trunk/dist/game/data/buylists/0000023.xml new file mode 100644 index 0000000000..0d0cd41bec --- /dev/null +++ b/trunk/dist/game/data/buylists/0000023.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000024.xml b/trunk/dist/game/data/buylists/0000024.xml new file mode 100644 index 0000000000..12ff9d73fc --- /dev/null +++ b/trunk/dist/game/data/buylists/0000024.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000025.xml b/trunk/dist/game/data/buylists/0000025.xml new file mode 100644 index 0000000000..195768e5cb --- /dev/null +++ b/trunk/dist/game/data/buylists/0000025.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000026.xml b/trunk/dist/game/data/buylists/0000026.xml new file mode 100644 index 0000000000..4a22938762 --- /dev/null +++ b/trunk/dist/game/data/buylists/0000026.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000027.xml b/trunk/dist/game/data/buylists/0000027.xml new file mode 100644 index 0000000000..75f8c25110 --- /dev/null +++ b/trunk/dist/game/data/buylists/0000027.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000028.xml b/trunk/dist/game/data/buylists/0000028.xml new file mode 100644 index 0000000000..6fde6795ae --- /dev/null +++ b/trunk/dist/game/data/buylists/0000028.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000029.xml b/trunk/dist/game/data/buylists/0000029.xml new file mode 100644 index 0000000000..ebe8569761 --- /dev/null +++ b/trunk/dist/game/data/buylists/0000029.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000030.xml b/trunk/dist/game/data/buylists/0000030.xml new file mode 100644 index 0000000000..d91abcd687 --- /dev/null +++ b/trunk/dist/game/data/buylists/0000030.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/trunk/dist/game/data/buylists/0000031.xml b/trunk/dist/game/data/buylists/0000031.xml new file mode 100644 index 0000000000..464eec6fed --- /dev/null +++ b/trunk/dist/game/data/buylists/0000031.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/trunk/dist/game/data/buylists/0000032.xml b/trunk/dist/game/data/buylists/0000032.xml new file mode 100644 index 0000000000..a96921fa5e --- /dev/null +++ b/trunk/dist/game/data/buylists/0000032.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/trunk/dist/game/data/buylists/0000033.xml b/trunk/dist/game/data/buylists/0000033.xml new file mode 100644 index 0000000000..82d6d8be0f --- /dev/null +++ b/trunk/dist/game/data/buylists/0000033.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/html/admin/gmshops.htm b/trunk/dist/game/data/html/admin/gmshops.htm index c34a807559..7511885006 100644 --- a/trunk/dist/game/data/html/admin/gmshops.htm +++ b/trunk/dist/game/data/html/admin/gmshops.htm @@ -53,6 +53,7 @@ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/MentorGuide/MentorGuide.java b/trunk/dist/game/data/scripts/ai/npc/MentorGuide/MentorGuide.java index 4e892bd88e..c4f6990a04 100644 --- a/trunk/dist/game/data/scripts/ai/npc/MentorGuide/MentorGuide.java +++ b/trunk/dist/game/data/scripts/ai/npc/MentorGuide/MentorGuide.java @@ -82,6 +82,9 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader new SkillHolder(9230, 1), // Mentor's Poem of Organ new SkillHolder(9231, 1), // Mentor's Poem of Guitar new SkillHolder(9232, 1), // Mentor's Poem of Harp + new SkillHolder(17082, 1), // Mentor's Prevailing Sonata + new SkillHolder(17083, 1), // Mentor's Daring Sonata + new SkillHolder(17084, 1), // Mentor's Refreshing Sonata new SkillHolder(9233, 1), // Mentor's Guidance }; @@ -92,6 +95,10 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader private static final SkillHolder MENTEE_MENTOR_SUMMON = new SkillHolder(9379, 1); // Mentee's Mentor Summon + private static final SkillHolder MENTOR_KNIGHTS_HARMONY = new SkillHolder(9376, 1); // Mentor's Knight's Harmony + private static final SkillHolder MENTOR_WIZARDS_HARMONY = new SkillHolder(9377, 1); // Mentor's Wizard's Harmony + private static final SkillHolder MENTOR_WARRIORS_HARMONY = new SkillHolder(9378, 1); // Mentor's Warrior's Harmony + // Misc private static final int MAX_LEVEL = 85; private static final String LEVEL_UP_TITLE = "Mentee coin from Mentee leveling"; @@ -199,6 +206,11 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader // Add the mentee skill event.getMentee().addSkill(MENTEE_MENTOR_SUMMON.getSkill(), true); + // Add the mentor skills + event.getMentor().addSkill(MENTOR_KNIGHTS_HARMONY.getSkill(), true); + event.getMentor().addSkill(MENTOR_WIZARDS_HARMONY.getSkill(), true); + event.getMentor().addSkill(MENTOR_WARRIORS_HARMONY.getSkill(), true); + // Send mail with the headphone sendMail(event.getMentee(), MENTEE_ADDED_TITLE, MENTEE_ADDED_BODY, MENTEE_HEADPHONE, 1); } @@ -367,7 +379,7 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader final L2PcInstance player = event.getMentee(); // Remove the mentee skills - player.removeSkill(MENTEE_MENTOR_SUMMON.getSkillId()); + player.removeSkill(MENTEE_MENTOR_SUMMON.getSkill(), true); // Clear mentee status player.sendPacket(new ExMentorList(player)); @@ -378,19 +390,28 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader public void onMenteeRemove(OnPlayerMenteeRemove event) { final L2Mentee mentee = event.getMentee(); + final L2PcInstance mentor = event.getMentor(); final L2PcInstance player = mentee.getPlayerInstance(); if (player != null) { // Remove the mentee skills - player.removeSkill(MENTEE_MENTOR_SUMMON.getSkillId()); + player.removeSkill(MENTEE_MENTOR_SUMMON.getSkill(), true); // Clear mentee status player.sendPacket(new ExMentorList(player)); } + // If player does not have any mentees anymore remove mentor skills. + if (MentorManager.getInstance().getMentees(mentor.getObjectId()) == null) + { + mentor.removeSkill(MENTOR_KNIGHTS_HARMONY.getSkill(), true); + mentor.removeSkill(MENTOR_WIZARDS_HARMONY.getSkill(), true); + mentor.removeSkill(MENTOR_WARRIORS_HARMONY.getSkill(), true); + } + // Remove mentee from the list - event.getMentor().sendPacket(new ExMentorList(event.getMentor())); + event.getMentor().sendPacket(new ExMentorList(mentor)); } private void handleGraduateMentee(L2PcInstance player) @@ -414,7 +435,7 @@ public class MentorGuide extends AbstractNpcAI implements IXmlReader } // Remove the mentee skills - player.removeSkill(MENTEE_MENTOR_SUMMON.getSkillId()); + player.removeSkill(MENTEE_MENTOR_SUMMON.getSkill(), true); // Clear mentee status player.sendPacket(new ExMentorList(player)); diff --git a/trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java b/trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java index f99591f325..3a2d34d670 100644 --- a/trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/trunk/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -111,6 +111,8 @@ public final class EffectMasterHandler ImmobileBuff.class, ImmobilePetBuff.class, Invincible.class, + KnockBack.class, + KnockDown.class, Lethal.class, Lucky.class, MagicalAttack.class, diff --git a/trunk/dist/game/data/scripts/handlers/MasterHandler.java b/trunk/dist/game/data/scripts/handlers/MasterHandler.java index ebadf88b44..e2e3e03bb3 100644 --- a/trunk/dist/game/data/scripts/handlers/MasterHandler.java +++ b/trunk/dist/game/data/scripts/handlers/MasterHandler.java @@ -155,6 +155,7 @@ import handlers.communityboard.HomepageBoard; import handlers.communityboard.MailBoard; import handlers.communityboard.MemoBoard; import handlers.communityboard.RegionBoard; +import handlers.itemhandlers.Appearance; import handlers.itemhandlers.BeastSoulShot; import handlers.itemhandlers.BeastSpiritShot; import handlers.itemhandlers.BlessedSpiritShot; @@ -171,7 +172,6 @@ import handlers.itemhandlers.ExtractableItems; import handlers.itemhandlers.FatedSupportBox; import handlers.itemhandlers.FishShots; import handlers.itemhandlers.Harvester; -import handlers.itemhandlers.ItemAppearance; import handlers.itemhandlers.ItemSkills; import handlers.itemhandlers.ItemSkillsTemplate; import handlers.itemhandlers.ManaPotion; @@ -461,6 +461,7 @@ public class MasterHandler }, { // Item Handlers + Appearance.class, BeastSoulShot.class, BeastSpiritShot.class, BlessedSpiritShot.class, @@ -477,7 +478,6 @@ public class MasterHandler FatedSupportBox.class, FishShots.class, Harvester.class, - ItemAppearance.class, ItemSkills.class, ItemSkillsTemplate.class, ManaPotion.class, diff --git a/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java b/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java index 5d7c8a35e2..49cf5a2d3b 100644 --- a/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java +++ b/trunk/dist/game/data/scripts/handlers/admincommandhandlers/AdminReload.java @@ -29,6 +29,7 @@ import com.l2jserver.gameserver.data.sql.impl.CrestTable; import com.l2jserver.gameserver.data.sql.impl.TeleportLocationTable; import com.l2jserver.gameserver.data.xml.impl.AbilityPointsData; import com.l2jserver.gameserver.data.xml.impl.AdminData; +import com.l2jserver.gameserver.data.xml.impl.AppearanceItemData; import com.l2jserver.gameserver.data.xml.impl.BuyListData; import com.l2jserver.gameserver.data.xml.impl.DoorData; import com.l2jserver.gameserver.data.xml.impl.EnchantItemData; @@ -263,6 +264,12 @@ public class AdminReload implements IAdminCommandHandler AdminData.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded ability points data."); break; } + case "appearance": + { + AppearanceItemData.getInstance().load(); + AdminData.getInstance().broadcastMessageToGMs(activeChar.getName() + ": Reloaded appearance item data."); + break; + } default: { activeChar.sendMessage(RELOAD_USAGE); diff --git a/trunk/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java b/trunk/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java new file mode 100644 index 0000000000..39511bb1c3 --- /dev/null +++ b/trunk/dist/game/data/scripts/handlers/effecthandlers/KnockBack.java @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2004-2015 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack 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 DataPack 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 handlers.effecthandlers; + +import com.l2jserver.gameserver.GeoData; +import com.l2jserver.gameserver.ai.CtrlIntention; +import com.l2jserver.gameserver.model.Location; +import com.l2jserver.gameserver.model.StatsSet; +import com.l2jserver.gameserver.model.actor.L2Character; +import com.l2jserver.gameserver.model.conditions.Condition; +import com.l2jserver.gameserver.model.effects.AbstractEffect; +import com.l2jserver.gameserver.model.skills.BuffInfo; +import com.l2jserver.gameserver.network.serverpackets.FlyToLocation; +import com.l2jserver.gameserver.network.serverpackets.FlyToLocation.FlyType; +import com.l2jserver.gameserver.network.serverpackets.ValidateLocation; +import com.l2jserver.gameserver.util.Util; + +/** + * @author UnAfraid + */ +public final class KnockBack extends AbstractEffect +{ + private int _distance = 50; + private int _speed = 0; + private int _delay = 0; + private int _animationSpeed = 0; + + public KnockBack(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params) + { + super(attachCond, applyCond, set, params); + if (params != null) + { + _distance = params.getInt("distance", 50); + _speed = params.getInt("speed", 0); + _delay = params.getInt("delay", 0); + _animationSpeed = params.getInt("animationSpeed", 0); + } + } + + @Override + public void onStart(BuffInfo info) + { + final L2Character effected = info.getEffected(); + final double radians = Math.toRadians(Util.calculateAngleFrom(info.getEffector(), info.getEffected())); + final int x = (int) (info.getEffected().getX() + (_distance * Math.cos(radians))); + final int y = (int) (info.getEffected().getY() + (_distance * Math.sin(radians))); + final int z = effected.getZ(); + final Location loc = GeoData.getInstance().moveCheck(effected.getX(), effected.getY(), effected.getZ(), x, y, z, effected.getInstanceId()); + + effected.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + effected.broadcastPacket(new FlyToLocation(effected, loc, FlyType.PUSH_HORIZONTAL, _speed, _delay, _animationSpeed)); + effected.abortAttack(); + effected.abortCast(); + effected.setXYZ(loc); + effected.broadcastPacket(new ValidateLocation(effected)); + } +} diff --git a/trunk/dist/game/data/scripts/handlers/effecthandlers/KnockDown.java b/trunk/dist/game/data/scripts/handlers/effecthandlers/KnockDown.java new file mode 100644 index 0000000000..b6904335cb --- /dev/null +++ b/trunk/dist/game/data/scripts/handlers/effecthandlers/KnockDown.java @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2004-2015 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack 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 DataPack 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 handlers.effecthandlers; + +import com.l2jserver.gameserver.GeoData; +import com.l2jserver.gameserver.ai.CtrlIntention; +import com.l2jserver.gameserver.model.Location; +import com.l2jserver.gameserver.model.StatsSet; +import com.l2jserver.gameserver.model.actor.L2Character; +import com.l2jserver.gameserver.model.conditions.Condition; +import com.l2jserver.gameserver.model.effects.AbstractEffect; +import com.l2jserver.gameserver.model.skills.BuffInfo; +import com.l2jserver.gameserver.network.serverpackets.FlyToLocation; +import com.l2jserver.gameserver.network.serverpackets.FlyToLocation.FlyType; +import com.l2jserver.gameserver.network.serverpackets.ValidateLocation; +import com.l2jserver.gameserver.util.Util; + +/** + * @author UnAfraid + */ +public final class KnockDown extends AbstractEffect +{ + private int _distance = 50; + private int _speed = 0; + private int _delay = 0; + private int _animationSpeed = 0; + + public KnockDown(Condition attachCond, Condition applyCond, StatsSet set, StatsSet params) + { + super(attachCond, applyCond, set, params); + if (params != null) + { + _distance = params.getInt("distance", 50); + _speed = params.getInt("speed", 0); + _delay = params.getInt("delay", 0); + _animationSpeed = params.getInt("animationSpeed", 0); + } + } + + @Override + public void onStart(BuffInfo info) + { + final L2Character effected = info.getEffected(); + final double radians = Math.toRadians(Util.calculateAngleFrom(info.getEffector(), info.getEffected())); + final int newHeading = Util.calculateHeadingFrom(info.getEffected(), info.getEffector()); + final int x = (int) (info.getEffected().getX() + (_distance * Math.cos(radians))); + final int y = (int) (info.getEffected().getY() + (_distance * Math.sin(radians))); + final int z = effected.getZ(); + final Location loc = GeoData.getInstance().moveCheck(effected.getX(), effected.getY(), effected.getZ(), x, y, z, effected.getInstanceId()); + + effected.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + effected.broadcastPacket(new FlyToLocation(effected, loc, FlyType.PUSH_DOWN_HORIZONTAL, _speed, _delay, _animationSpeed)); + effected.abortAttack(); + effected.abortCast(); + effected.setXYZ(loc); + effected.setHeading(newHeading); + effected.broadcastPacket(new ValidateLocation(effected)); + } +} diff --git a/trunk/dist/game/data/scripts/handlers/itemhandlers/Appearance.java b/trunk/dist/game/data/scripts/handlers/itemhandlers/Appearance.java new file mode 100644 index 0000000000..8cced60fa9 --- /dev/null +++ b/trunk/dist/game/data/scripts/handlers/itemhandlers/Appearance.java @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2004-2015 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack 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 DataPack 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 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.items.instance.L2ItemInstance; +import com.l2jserver.gameserver.network.SystemMessageId; +import com.l2jserver.gameserver.network.serverpackets.itemappearance.ExChoose_Shape_Shifting_Item; + +/** + * @author Erlandys + */ +public class Appearance implements IItemHandler +{ + @Override + public boolean useItem(L2Playable playable, L2ItemInstance item, boolean forceUse) + { + if (!playable.isPlayer()) + { + playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM); + return false; + } + + final L2PcInstance player = playable.getActingPlayer(); + + if (player.getUsingAppearanceStone() != null) + { + player.sendPacket(SystemMessageId.APPEARANCE_MODIFICATION_OR_RESTORATION_IN_PROGRESS_PLEASE_TRY_AGAIN_AFTER_COMPLETING_THIS_TASK); + return false; + } + + if ((item == null) || !item.isEtcItem() || (item.isEtcItem() && (item.getEtcItem().getAppearanceStone() == null))) + { + player.sendMessage("This item is either not an appearance stone or is currently not handled!"); + return false; + } + + player.sendPacket(new ExChoose_Shape_Shifting_Item(item.getEtcItem().getAppearanceStone())); + player.setUsingAppearanceStone(item); + return true; + } +} diff --git a/trunk/dist/game/data/scripts/handlers/itemhandlers/ChangeAttribute.java b/trunk/dist/game/data/scripts/handlers/itemhandlers/ChangeAttribute.java index dd2bbf7dfb..f54d5a47cb 100644 --- a/trunk/dist/game/data/scripts/handlers/itemhandlers/ChangeAttribute.java +++ b/trunk/dist/game/data/scripts/handlers/itemhandlers/ChangeAttribute.java @@ -30,12 +30,13 @@ public class ChangeAttribute implements IItemHandler @Override public boolean useItem(L2Playable playable, L2ItemInstance item, boolean forceUse) { - if (!(playable instanceof L2PcInstance)) + if (!playable.isPlayer()) { + playable.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_THIS_ITEM); return false; } - final L2PcInstance activeChar = (L2PcInstance) playable; + final L2PcInstance activeChar = playable.getActingPlayer(); if (activeChar.isCastingNow()) { return false; diff --git a/trunk/dist/game/data/scripts/handlers/itemhandlers/ItemAppearance.java b/trunk/dist/game/data/scripts/handlers/itemhandlers/ItemAppearance.java deleted file mode 100644 index 2fe9947cce..0000000000 --- a/trunk/dist/game/data/scripts/handlers/itemhandlers/ItemAppearance.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 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.items.instance.L2ItemInstance; -import com.l2jserver.gameserver.network.serverpackets.itemappearance.ExChoose_Shape_Shifting_Item; - -/** - * @author Erlandys - */ -public class ItemAppearance implements IItemHandler -{ - @Override - public boolean useItem(L2Playable playable, L2ItemInstance item, boolean forceUse) - { - if (!(playable instanceof L2PcInstance)) - { - return false; - } - final L2PcInstance activeChar = (L2PcInstance) playable; - if ((item == null) || !item.isEtcItem() || (item.isEtcItem() && (item.getEtcItem().getAppearanceStone() == null))) - { - return false; - } - activeChar.sendPacket(new ExChoose_Shape_Shifting_Item(item.getEtcItem().getAppearanceStone())); - activeChar.setUsingAppearanceStone(item); - return true; - } -} diff --git a/trunk/dist/game/data/scripts/instances/HarnakUndergroundRuins/HarnakUndergroundRuins.java b/trunk/dist/game/data/scripts/instances/HarnakUndergroundRuins/HarnakUndergroundRuins.java index bd1552c091..1027128f1d 100644 --- a/trunk/dist/game/data/scripts/instances/HarnakUndergroundRuins/HarnakUndergroundRuins.java +++ b/trunk/dist/game/data/scripts/instances/HarnakUndergroundRuins/HarnakUndergroundRuins.java @@ -236,7 +236,7 @@ public class HarnakUndergroundRuins extends AbstractNpcAI if (powerSource != null) { powerSource.setTarget(player); - startQuestTimer("cast_light_heal", 1, powerSource, player); + startQuestTimer("cast_light_heal", 3000, powerSource, player); } } break; @@ -373,7 +373,7 @@ public class HarnakUndergroundRuins extends AbstractNpcAI { final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player); - if (world.isStatus(3)) + if ((npc != null) && (world != null) && (world.isStatus(3) || world.isStatus(4))) { if (npc.calculateDistance(player, true, false) < LIGHT_HEAL.getSkill().getCastRange()) { @@ -381,15 +381,11 @@ public class HarnakUndergroundRuins extends AbstractNpcAI } startQuestTimer("cast_light_heal", 3000, npc, player); } - else - { - npc.deleteMe(); - } break; } case "fail_instance": { - player.getKnownList().getKnownCharacters().forEach(L2Character::deleteMe); + InstanceManager.getInstance().getInstance(player.getInstanceId()).removeSpawnedNpcs(); player.showQuestMovie(FAILED_ENDING); startQuestTimer("exit", 13500, npc, player); break; @@ -435,7 +431,7 @@ public class HarnakUndergroundRuins extends AbstractNpcAI if (world.enabledSeal == 2) { cancelQuestTimer("fail_instance", null, player); - player.getKnownList().getKnownCharacters().forEach(L2Character::deleteMe); + InstanceManager.getInstance().getInstance(world.getInstanceId()).removeSpawnedNpcs(); player.showQuestMovie(SUCCES_ENDING); startQuestTimer("spawn_hermuncus", 25050, npc, player); } @@ -709,8 +705,8 @@ public class HarnakUndergroundRuins extends AbstractNpcAI } else if (npc.getId() == HARNAKS_WRAITH) { - cancelQuestTimer("fail_instance", npc, killer); - killer.getKnownList().getKnownCharacters().forEach(L2Character::deleteMe); + cancelQuestTimer("fail_instance", null, killer); + InstanceManager.getInstance().getInstance(world.getInstanceId()).removeSpawnedNpcs(); killer.showQuestMovie(SUCCES_ENDING); startQuestTimer("spawn_hermuncus", 25050, npc, killer); } @@ -798,6 +794,7 @@ public class HarnakUndergroundRuins extends AbstractNpcAI player.sendPacket(new ExSendUIEvent(player, false, false, 60, 0, NpcStringId.REMAINING_TIME)); showOnScreenMsg(player, NpcStringId.NO_THE_SEAL_CONTROLS_HAVE_BEEN_EXPOSED_GUARDS_PROTECT_THE_SEAL_CONTROLS, ExShowScreenMessage.TOP_CENTER, 10000); startQuestTimer("spawn_npc4", 1, npc, player); + cancelQuestTimer("fail_instance", null, player); startQuestTimer("fail_instance", 60000, null, player); } } diff --git a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-01a.html b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-01a.htm similarity index 100% rename from trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-01a.html rename to trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-01a.htm diff --git a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-01b.html b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-01b.html deleted file mode 100644 index 174430aad7..0000000000 --- a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-01b.html +++ /dev/null @@ -1,5 +0,0 @@ -Pantheon:
-You are Ertheia. You should continue your learning somewhere else.
-(This quest is only available for characters of a non-Ertheia class.) -
- \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-02.htm b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-02.htm index 60d1f4d227..0121f82a9c 100644 --- a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-02.htm +++ b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-02.htm @@ -1,9 +1,6 @@ Pantheon:
-It is a devastating tale that you will soon learn. Once one of the seals that bound the Goddess of Destruction was released, many catastrophic events -followed. Such was the case with the fall of Ye Sagira.
+It is a devastating tale that you will soon learn. Once one of the seals that bound the Goddess of Destruction was released, many catastrophic events followed. Such was the case with the fall of Ye Sagira.
Scholars including myself were dispatched to study the ruins. Soon all other races came as well.
-I cannot recall the event fully, but Theodore knows more about when the migration of all the races came to Talking Island Village. You should speak with -him.
+I cannot recall the event fully, but Theodore knows more about when the migration of all the races came to Talking Island Village. You should speak with him.
-
\ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-03.htm b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-03.htm index 6be017c084..1fd342880b 100644 --- a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-03.htm +++ b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-03.htm @@ -1,5 +1,3 @@ -Pantheon:
-Theodore can be found in the Central Square of this village. He is responsible for the Ruins of Ye Sagira Rangers. However they are terribly shorthanded these days. Who knows, maybe if you can prove yourself he might be interested in having you join them. - -
+Pantheon:
+Theodore can be found in the Central Square of this village. He is responsible for the Ruins of Ye Sagira Rangers. However they are terribly shorthanded these days. Who knows, maybe if you can prove yourself he might be interested in having you join them. \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-04.html b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-04.htm similarity index 56% rename from trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-04.html rename to trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-04.htm index c3820d7616..7aa8b1486f 100644 --- a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-04.html +++ b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-04.htm @@ -1,4 +1,3 @@ -Pantheon:
-Have you met Theodore? He's in the Town Square Center. -
+Pantheon:
+Have you met Theodore? He's in the Town Square Center. \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-05.html b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-05.htm similarity index 60% rename from trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-05.html rename to trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-05.htm index e4b7184e18..5c7cc68efd 100644 --- a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-05.html +++ b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32972-05.htm @@ -1,4 +1,3 @@ -Pantheon:
+Pantheon:
I will ask again if there's something to ask. -
\ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-01.html b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-01.htm similarity index 76% rename from trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-01.html rename to trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-01.htm index 245be719e3..de192bb66d 100644 --- a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-01.html +++ b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-01.htm @@ -1,4 +1,4 @@ Theodore:
Ah, I see the Pantheon has sent another to ask me about the migration of the races here in Talking Island Village. Is this what you've come to discuss?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-02.html b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-02.htm similarity index 100% rename from trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-02.html rename to trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-02.htm diff --git a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-03.html b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-03.htm similarity index 100% rename from trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-03.html rename to trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-03.htm diff --git a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-04.htm b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-04.htm new file mode 100644 index 0000000000..4ed22175ff --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/32975-04.htm @@ -0,0 +1,4 @@ +Theodore:
+Go away! I'm busy! Come back when you have something to say.
+(The quest is not in progress or the conditions are not satisfied.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/Q10320_LetsGoToTheCentralSquare.java b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/Q10320_LetsGoToTheCentralSquare.java index 7509d8df09..a8515e10a0 100644 --- a/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/Q10320_LetsGoToTheCentralSquare.java +++ b/trunk/dist/game/data/scripts/quests/Q10320_LetsGoToTheCentralSquare/Q10320_LetsGoToTheCentralSquare.java @@ -39,7 +39,7 @@ import com.l2jserver.gameserver.util.Broadcast; /** * Let's Go To The Central Square (10320) - * @author ivantotov + * @author ivantotov, Gladicek */ public final class Q10320_LetsGoToTheCentralSquare extends Quest { @@ -62,8 +62,8 @@ public final class Q10320_LetsGoToTheCentralSquare extends Quest addStartNpc(PANTHEON); addTalkId(PANTHEON, THEODORE); addEnterZoneId(TALKING_ISLAND_PRESENTATION_MOVIE_ZONE); - addCondMaxLevel(MAX_LEVEL, "32972-01a.html"); - addCondNotRace(Race.ERTHEIA, "32972-01b.html"); + addCondMaxLevel(MAX_LEVEL, "32972-01a.htm"); + addCondNotRace(Race.ERTHEIA, "32972-01b.htm"); } @Override @@ -90,7 +90,7 @@ public final class Q10320_LetsGoToTheCentralSquare extends Quest htmltext = event; break; } - case "32975-02.html": + case "32975-02.htm": { giveAdena(player, 30, true); addExpAndSp(player, 30, 5); @@ -107,26 +107,23 @@ public final class Q10320_LetsGoToTheCentralSquare extends Quest public String onTalk(L2Npc npc, L2PcInstance player) { final QuestState qs = getQuestState(player, true); - String htmltext = getNoQuestMsg(player); + String htmltext = null; switch (qs.getState()) { case State.CREATED: { - if (npc.getId() == PANTHEON) - { - htmltext = "32972-01.htm"; - } + htmltext = npc.getId() == PANTHEON ? "32972-01.htm" : "32975-04.htm"; break; } case State.STARTED: { - htmltext = npc.getId() == PANTHEON ? "32972-04.html" : "32975-01.html"; + htmltext = npc.getId() == PANTHEON ? "32972-04.htm" : "32975-01.htm"; break; } case State.COMPLETED: { - htmltext = npc.getId() == PANTHEON ? "32972-05.html" : "32975-03.html"; + htmltext = npc.getId() == PANTHEON ? "32972-05.htm" : "32975-03.htm"; break; } } diff --git a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-01.html b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-01.htm similarity index 65% rename from trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-01.html rename to trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-01.htm index 487cb3cca7..68951ffb78 100644 --- a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-01.html +++ b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-01.htm @@ -1,5 +1,5 @@ Shannon:
Eh? You want to be a seeker
You look weak.
- + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-02.html b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-02.htm similarity index 100% rename from trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-02.html rename to trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-02.htm diff --git a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-03.html b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-03.htm similarity index 57% rename from trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-03.html rename to trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-03.htm index 2d0e054ed1..edfd9c8581 100644 --- a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-03.html +++ b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-03.htm @@ -1,4 +1,4 @@ Shannon:
Nice day, eh?
-(you have already completed the quest.) +(You have already completed the quest.) \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-04.htm b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-04.htm new file mode 100644 index 0000000000..58d70143cf --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32974-04.htm @@ -0,0 +1,4 @@ +Shannon:
+You're wasting my time. Go away.
+(The quest is not in progress, or the conditions have not been satisfied.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-01.htm b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-01.htm index 2c58a0cf70..4705e67db6 100644 --- a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-01.htm +++ b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-01.htm @@ -1,4 +1,4 @@ -Theodore:
+Theodore:
Haa... There are so many things to do around here!
There's one problem here, and there another problem... I get a steady influx of seekers, but the pile of work just gets higher and higher. I'm not sure there are enough Seekers in the world to tackle this amount of work...
diff --git a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-01b.htm b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-01b.htm deleted file mode 100644 index 23a6386bbb..0000000000 --- a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-01b.htm +++ /dev/null @@ -1,5 +0,0 @@ -Theodore:
-You are Ertheia. You should continue your learning somewhere else.
-(This quest is only available for characters of a non-Ertheia class.) -
- \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-02.htm b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-02.htm index 704806a566..e5d9ff40a8 100644 --- a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-02.htm +++ b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-02.htm @@ -1,4 +1,4 @@ -Theodore:
+Theodore:
Seekers are scholars and warriors dedicated to searching through the Ruins of Ye Sagira.
However, they recently ran into a spot of bother after the local monsters decided to get all territorial. Now, a good number of my Seekers are injured, and the work just keeps on piling up...
diff --git a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-03.htm b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-03.htm index 95870c6906..3ca433dc55 100644 --- a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-03.htm +++ b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-03.htm @@ -1,7 +1,6 @@ -Theodore:
+Theodore:
You what? Really? Even after what I just told you??
-Well, anyone can become a seeker, but you must first get certified. Shannon can start you on that path - head to the Training Grounds to see her, and she'll teach you about scouts.
+Well, anyone can become a seeker, but you must first get certified. Shannon can start you on that path - head to the Training Grounds to see her, and she'll teach you about scouts.
Now get going - speed is of the essence and all that!
I will briefly tell you how to get there. -
\ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-04.html b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-04.htm similarity index 57% rename from trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-04.html rename to trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-04.htm index 2d7373a5c8..d784b6691c 100644 --- a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-04.html +++ b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-04.htm @@ -1,4 +1,3 @@ -Theodore:
-Have you met Shannon yet? She's in the Training Area. -
+Theodore:
+Have you met Shannon yet? She's in the Training Area. \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-05.html b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-05.htm similarity index 71% rename from trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-05.html rename to trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-05.htm index a008310052..35bbe24e33 100644 --- a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-05.html +++ b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/32975-05.htm @@ -1,4 +1,3 @@ -Theodore:
+Theodore:
Ah... Thanks for your help. If you can handle it again next time, that would be great. -
\ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/Q10321_QualificationsOfTheSeeker.java b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/Q10321_QualificationsOfTheSeeker.java index 9d1a45c82d..58eafb6563 100644 --- a/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/Q10321_QualificationsOfTheSeeker.java +++ b/trunk/dist/game/data/scripts/quests/Q10321_QualificationsOfTheSeeker/Q10321_QualificationsOfTheSeeker.java @@ -20,16 +20,20 @@ package quests.Q10321_QualificationsOfTheSeeker; import quests.Q10320_LetsGoToTheCentralSquare.Q10320_LetsGoToTheCentralSquare; -import com.l2jserver.gameserver.enums.Race; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.quest.State; +import com.l2jserver.gameserver.network.NpcStringId; +import com.l2jserver.gameserver.network.clientpackets.Say2; +import com.l2jserver.gameserver.network.serverpackets.NpcSay; import com.l2jserver.gameserver.network.serverpackets.TutorialShowHtml; +import com.l2jserver.gameserver.util.Broadcast; /** * Qualifications Of The Seeker (10321) - * @author ivantotov + * @author ivantotov, Gladicek */ public final class Q10321_QualificationsOfTheSeeker extends Quest { @@ -45,7 +49,6 @@ public final class Q10321_QualificationsOfTheSeeker extends Quest addStartNpc(THEODORE); addTalkId(THEODORE, SHANNON); addCondMaxLevel(MAX_LEVEL, "32975-01a.htm"); - addCondNotRace(Race.ERTHEIA, "32975-01b.htm"); addCondCompletedQuest(Q10320_LetsGoToTheCentralSquare.class.getSimpleName(), "32975-01a.htm"); } @@ -73,11 +76,12 @@ public final class Q10321_QualificationsOfTheSeeker extends Quest htmltext = event; break; } - case "32974-02.html": + case "32974-02.htm": { giveAdena(player, 50, true); addExpAndSp(player, 40, 5); qs.exitQuest(false, true); + Broadcast.toKnownPlayers(npc, new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getTemplate().getDisplayId(), NpcStringId.HM_DON_T_JUST_GO_I_STILL_HAVE_TONS_TO_TEACH_YOU)); htmltext = event; break; } @@ -89,34 +93,24 @@ public final class Q10321_QualificationsOfTheSeeker extends Quest public String onTalk(L2Npc npc, L2PcInstance player) { final QuestState qs = getQuestState(player, true); - String htmltext = getNoQuestMsg(player); - if (qs.isCreated()) + String htmltext = null; + + switch (qs.getState()) { - if (npc.getId() == THEODORE) + case State.CREATED: { - htmltext = "32975-01.htm"; + htmltext = npc.getId() == THEODORE ? "32975-01.htm" : "32974-04.htm"; + break; } - } - else if (qs.isStarted()) - { - if (npc.getId() == THEODORE) + case State.STARTED: { - htmltext = "32975-04.html"; + htmltext = npc.getId() == THEODORE ? "32975-04.htm" : "32974-01.htm"; + break; } - else if (npc.getId() == SHANNON) + case State.COMPLETED: { - htmltext = "32974-01.html"; - } - } - else if (qs.isCompleted()) - { - if (npc.getId() == THEODORE) - { - htmltext = "32975-05.html"; - } - else if (npc.getId() == SHANNON) - { - htmltext = "32974-03.html"; + htmltext = npc.getId() == THEODORE ? "32975-05.htm" : "32974-03.htm"; + break; } } return htmltext; diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-01.htm b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-01.htm index 276ef0ee6d..f5e7b0d3e0 100644 --- a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-01.htm +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-01.htm @@ -1,4 +1,4 @@ -Shannon:
+Shannon:
You've got style, friend, but you're missing a few key techniques.
Hmm... you know, I could help you get stronger... teach you a few tricks of the trade...
diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-01a.htm b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-01a.htm index 88ffebd3e8..84a430dac4 100644 --- a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-01a.htm +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-01a.htm @@ -1,5 +1,4 @@ -Shannon:
+Shannon:
Did you need me?
-(Only characters under level 20, who have completed "Conditions of Scout" may start this quest) -
+(Only characters under level 20, who have completed "Conditions of Scout" may start this quest.) \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-01b.htm b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-01b.htm deleted file mode 100644 index ebbd52def4..0000000000 --- a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-01b.htm +++ /dev/null @@ -1,5 +0,0 @@ -Shannon:
-You are Ertheia. You should continue your learning somewhere else.
-(This quest is only available for characters of a non-Ertheia class.) -
- \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-02.htm b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-02.htm index 0af62d5652..3463b0a4c3 100644 --- a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-02.htm +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-02.htm @@ -1,5 +1,5 @@ -Shannon:
-Why would I do that? +Shannon:
+Why would I do that? Well, let me see. For starters, I'm training up the entire district, so it's kind of what I do. Second, we need all the help we can get, and third, maybe I think you might have what it takes to be someone in this place. Thought about that?
You know, suspicious isn't an attractive trait. Either you calm down and tell me where you need help, or you can jog on and find your own way.
diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-03.htm b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-03.htm index b5892c619b..b3a35d19ae 100644 --- a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-03.htm +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-03.htm @@ -1,7 +1,5 @@ -Shannon:
+Shannon:
Well, guess what? I can help. That's right - H.E.L.P.
I've set up a little test for newbies - just head down the hill until you see Evain.
Go on. You'll have fun, probably. - -
\ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-04.htm b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-04.htm new file mode 100644 index 0000000000..64eb0f24c9 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-04.htm @@ -0,0 +1,4 @@ +Shannon:
+What are you waiting for? +Head down the hill until you see Evain ! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-04.html b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-04.html deleted file mode 100644 index 4a3b0b5076..0000000000 --- a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-04.html +++ /dev/null @@ -1,5 +0,0 @@ -Shannon:
-What are you waiting for? - Head down the hill until you see Evain ! -
- \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-05.html b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-05.htm similarity index 59% rename from trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-05.html rename to trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-05.htm index b390bde5dd..0b03dd216e 100644 --- a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-05.html +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32974-05.htm @@ -1,5 +1,4 @@ -Shannon:
+Shannon:
Still trying to get stronger? You'll have to look elsewhere, friend. I've taught you all I know.
-(You've already completed this quest) -
+(You've already completed this quest.) \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-01.html b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-01.htm similarity index 79% rename from trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-01.html rename to trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-01.htm index 3076e43fb0..3902da3d6d 100644 --- a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-01.html +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-01.htm @@ -2,5 +2,5 @@ Did Shannon or Evain send you? Well, I guess I'll tell you what I know about the mysterious power.
It's not complicated. You just have to dedicate yourself. Practice makes perfect.
I can help if need be. What would you like to do?
- + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-02.html b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-02.htm similarity index 100% rename from trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-02.html rename to trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-02.htm diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-03.html b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-03.htm similarity index 100% rename from trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-03.html rename to trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-03.htm diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-04.htm b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-04.htm new file mode 100644 index 0000000000..79e5009f61 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/32981-04.htm @@ -0,0 +1,4 @@ +Adventurers' Guide for Training:
+If you don't mind, I'll get back to work now.
+(Quest not in progress) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-01.html b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-01.htm similarity index 100% rename from trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-01.html rename to trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-01.htm diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-02.html b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-02.htm similarity index 71% rename from trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-02.html rename to trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-02.htm index 89a463c37b..35c46e1b9a 100644 --- a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-02.html +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-02.htm @@ -1,4 +1,4 @@ Evain:
Unused weapon becomes dull and rusty.
-The mission I give you is not that diffcult - just attack any of the Scarecrow araund here! +The mission I give you is not that diffcult - just attack any of the Scarecrow around here! \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-03.html b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-03.htm similarity index 75% rename from trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-03.html rename to trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-03.htm index ab37436143..6c352d9f6a 100644 --- a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-03.html +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-03.htm @@ -1,4 +1,4 @@ Evain:
-Good, but know that tis is just the beginning.
+Good, but know that this is just the beginning.
Go and seek the Training Newbie Helper for strength, then attack the scarecrow again. You'll get there! \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-04.html b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-04.htm similarity index 100% rename from trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-04.html rename to trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-04.htm diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-05.html b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-05.htm similarity index 67% rename from trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-05.html rename to trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-05.htm index 265cf6e121..f5a063335c 100644 --- a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-05.html +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-05.htm @@ -1,4 +1,4 @@ Evain:
Attack the Scarecrow again.
-You'll feel yourself changed from earlier +You'll feel yourself changed from earlier. \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-06.html b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-06.htm similarity index 100% rename from trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-06.html rename to trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-06.htm diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-07.htm b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-07.htm new file mode 100644 index 0000000000..1e7fe20aaa --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-07.htm @@ -0,0 +1,4 @@ +Evain:
+Why did you come here?
+(Only characters under level 20, who have completed the Looking for Mysterious Power quest, may start this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-08.htm b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-08.htm new file mode 100644 index 0000000000..071457948b --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/33464-08.htm @@ -0,0 +1,4 @@ +Evain:
+It's good to see you growing stronger with each passing day. Is there something you want from me?
+(This quest has already been completed) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/Q10322_SearchingForTheMysteriousPower.java b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/Q10322_SearchingForTheMysteriousPower.java index d4924ba732..79219db79c 100644 --- a/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/Q10322_SearchingForTheMysteriousPower.java +++ b/trunk/dist/game/data/scripts/quests/Q10322_SearchingForTheMysteriousPower/Q10322_SearchingForTheMysteriousPower.java @@ -20,20 +20,23 @@ package quests.Q10322_SearchingForTheMysteriousPower; import quests.Q10321_QualificationsOfTheSeeker.Q10321_QualificationsOfTheSeeker; -import com.l2jserver.gameserver.enums.Race; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.holders.SkillHolder; import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.quest.State; import com.l2jserver.gameserver.network.NpcStringId; +import com.l2jserver.gameserver.network.clientpackets.Say2; import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; +import com.l2jserver.gameserver.network.serverpackets.NpcSay; import com.l2jserver.gameserver.network.serverpackets.TutorialShowHtml; +import com.l2jserver.gameserver.util.Broadcast; import com.l2jserver.gameserver.util.Util; /** * Searching For The Mysterious Power (10322) - * @author ivantotov + * @author ivantotov, Gladicek */ public final class Q10322_SearchingForTheMysteriousPower extends Quest { @@ -53,10 +56,8 @@ public final class Q10322_SearchingForTheMysteriousPower extends Quest private static final int APPRENTICE_ADVENTURERS_CESTUS = 7819; private static final int APPRENTICE_ADVENTURERS_BOW = 7820; private static final int APPRENTICE_ADVENTURERS_LONG_SWORD = 7821; - // Message // Misc private static final int MAX_LEVEL = 20; - private static final ExShowScreenMessage MESSAGE = new ExShowScreenMessage(NpcStringId.WEAPONS_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, 2, 5000); // Buffs private static final SkillHolder[] FIGHTER_BUFFS = { @@ -85,7 +86,6 @@ public final class Q10322_SearchingForTheMysteriousPower extends Quest addTalkId(SHANNON, ADVENTURERS_GUIDE, EVAIN); addKillId(SCARECROW); addCondMaxLevel(MAX_LEVEL, "32974-01a.htm"); - addCondNotRace(Race.ERTHEIA, "32974-01b.htm"); addCondCompletedQuest(Q10321_QualificationsOfTheSeeker.class.getSimpleName(), "32974-01a.htm"); } @@ -112,7 +112,7 @@ public final class Q10322_SearchingForTheMysteriousPower extends Quest htmltext = event; break; } - case "32981-02.html": + case "32981-02.htm": { if (qs.isCond(4)) { @@ -157,90 +157,122 @@ public final class Q10322_SearchingForTheMysteriousPower extends Quest public String onTalk(L2Npc npc, L2PcInstance player) { final QuestState qs = getQuestState(player, true); - String htmltext = getNoQuestMsg(player); - if (qs.isCreated()) + String htmltext = null; + + switch (qs.getState()) { - if (npc.getId() == SHANNON) + case State.CREATED: { - htmltext = "32974-01.htm"; - } - } - else if (qs.isStarted()) - { - if (npc.getId() == SHANNON) - { - if (qs.isCond(1)) + if (npc.getId() == SHANNON) { - htmltext = "32974-04.html"; + htmltext = "32974-01.htm"; + break; + } + else if (npc.getId() == EVAIN) + { + htmltext = "33464-07.htm"; + break; + } + else if (npc.getId() == ADVENTURERS_GUIDE) + { + htmltext = "32981-04.htm"; + break; } } - else if (npc.getId() == ADVENTURERS_GUIDE) + case State.STARTED: { - if (qs.isCond(4)) + if (npc.getId() == SHANNON) { - htmltext = "32981-01.html"; - } - else if (qs.isCond(5)) - { - htmltext = "32981-03.html"; - } - } - else if (npc.getId() == EVAIN) - { - switch (qs.getCond()) - { - case 1: + if (qs.isCond(1)) { - qs.setCond(2, true); - htmltext = "33464-01.html"; - break; - } - case 2: - { - htmltext = "33464-02.html"; - break; - } - case 3: - { - qs.setCond(4, true); - htmltext = "33464-03.html"; - break; - } - case 4: - { - htmltext = "33464-04.html"; - break; - } - case 5: - { - htmltext = "33464-05.html"; - break; - } - case 6: - { - htmltext = "33464-06.html"; - player.sendPacket(MESSAGE); - giveItems(player, WOODEN_ARROW, 500); - giveItems(player, ADENA, 70); - giveItems(player, HEALING_POTION, 50); - giveItems(player, APPRENTICE_ADVENTURERS_STAFF, 1); - giveItems(player, APPRENTICE_ADVENTURERS_BONE_CLUB, 1); - giveItems(player, APPRENTICE_ADVENTURERS_KNIFE, 1); - giveItems(player, APPRENTICE_ADVENTURERS_CESTUS, 1); - giveItems(player, APPRENTICE_ADVENTURERS_BOW, 1); - giveItems(player, APPRENTICE_ADVENTURERS_LONG_SWORD, 1); - addExpAndSp(player, 300, 5); - qs.exitQuest(false, true); + htmltext = "32974-04.htm"; break; } } + else if (npc.getId() == ADVENTURERS_GUIDE) + { + if (qs.isCond(4)) + { + htmltext = "32981-01.htm"; + break; + } + else if (qs.isCond(5)) + { + htmltext = "32981-03.htm"; + break; + } + } + else if (npc.getId() == EVAIN) + { + switch (qs.getCond()) + { + case 1: + { + qs.setCond(2, true); + htmltext = "33464-01.htm"; + break; + } + case 2: + { + htmltext = "33464-02.htm"; + break; + } + case 3: + { + qs.setCond(4, true); + htmltext = "33464-03.htm"; + break; + } + case 4: + { + htmltext = "33464-04.htm"; + break; + } + case 5: + { + htmltext = "33464-05.htm"; + break; + } + case 6: + { + htmltext = "33464-06.htm"; + showOnScreenMsg(player, NpcStringId.WEAPONS_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 4500); + giveItems(player, WOODEN_ARROW, 500); + giveItems(player, ADENA, 70); + giveItems(player, HEALING_POTION, 50); + giveItems(player, APPRENTICE_ADVENTURERS_STAFF, 1); + giveItems(player, APPRENTICE_ADVENTURERS_BONE_CLUB, 1); + giveItems(player, APPRENTICE_ADVENTURERS_KNIFE, 1); + giveItems(player, APPRENTICE_ADVENTURERS_CESTUS, 1); + giveItems(player, APPRENTICE_ADVENTURERS_BOW, 1); + giveItems(player, APPRENTICE_ADVENTURERS_LONG_SWORD, 1); + addExpAndSp(player, 300, 5); + Broadcast.toKnownPlayers(npc, new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getTemplate().getDisplayId(), NpcStringId.THERE_S_THE_NEXT_TRAINING_STEP)); + qs.exitQuest(false, true); + break; + } + } + } + break; } - } - else if (qs.isCompleted()) - { - if (npc.getId() == SHANNON) + case State.COMPLETED: { - htmltext = "32974-05.html"; + if (npc.getId() == SHANNON) + { + htmltext = "32974-05.htm"; + break; + } + else if (npc.getId() == EVAIN) + { + htmltext = "33464-08.htm"; + break; + } + // Official is using same html for created/completed + else if (npc.getId() == ADVENTURERS_GUIDE) + { + htmltext = "32981-04.htm"; + break; + } } } return htmltext; diff --git a/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-01.htm b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-01.htm index 79e8a7d81c..190619ac79 100644 --- a/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-01.htm +++ b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-01.htm @@ -1,4 +1,4 @@ Shannon:
-Did you learn a lot from Evain? Fight off the hordes of scarecrows? Travel to any exotic underground locations? Ha ha ha. You need to learn from the field! Did you learn ANYTHING there? +Did you learn a lot from Evain? Fight off the hordes of scarecrows? Travel to any exotic underground locations? Ha ha ha. You need to learn from the field! Did you learn ANYTHING there?
\ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-03.htm b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-03.htm new file mode 100644 index 0000000000..3345075185 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-03.htm @@ -0,0 +1,4 @@ +Shannon:
+You're wasting my time! Talk to me when you have something to say!
+(Only characters of level 20 or lower, who have completed the Searching for the Mysterious Power quest, may start this quest) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-04.htm b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-04.htm new file mode 100644 index 0000000000..3345075185 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-04.htm @@ -0,0 +1,4 @@ +Shannon:
+You're wasting my time! Talk to me when you have something to say!
+(Only characters of level 20 or lower, who have completed the Searching for the Mysterious Power quest, may start this quest) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-05.htm b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-05.htm new file mode 100644 index 0000000000..91736b2dd4 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/32974-05.htm @@ -0,0 +1,4 @@ +Shannon:
+You're wasting my time! Talk to me when you have something to say!
+(You have already completed this quest) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/33464-03.htm b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/33464-03.htm index eca86bd4ef..af9105c0d3 100644 --- a/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/33464-03.htm +++ b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/33464-03.htm @@ -1,5 +1,4 @@ Evain:
-No need to hurry. Also, the mission is managed by -Holden at the Training Grounds Underground Facility Entrance. +No need to hurry. Also, the mission is managed by Holden at the Training Grounds Underground Facility Entrance. If you tell him that I sent you, he will give you details. \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/33464-04.htm b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/33464-04.htm new file mode 100644 index 0000000000..071457948b --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/33464-04.htm @@ -0,0 +1,4 @@ +Evain:
+It's good to see you growing stronger with each passing day. Is there something you want from me?
+(This quest has already been completed) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/33464-05.htm b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/33464-05.htm new file mode 100644 index 0000000000..852ff1b568 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/33464-05.htm @@ -0,0 +1,4 @@ +Evain:
+Why did you come here?
+(Only characters under level 20, who have completed the Looking for Mysterious Power quest, may start this quest) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/Q10323_TrainLikeItsReal.java b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/Q10323_TrainLikeItsReal.java index d3187e1ae2..15d144562d 100644 --- a/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/Q10323_TrainLikeItsReal.java +++ b/trunk/dist/game/data/scripts/quests/Q10323_TrainLikeItsReal/Q10323_TrainLikeItsReal.java @@ -21,18 +21,19 @@ package quests.Q10323_TrainLikeItsReal; import quests.Q10322_SearchingForTheMysteriousPower.Q10322_SearchingForTheMysteriousPower; import com.l2jserver.gameserver.enums.QuestSound; -import com.l2jserver.gameserver.enums.Race; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.holders.ItemHolder; import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.quest.State; import com.l2jserver.gameserver.network.NpcStringId; +import com.l2jserver.gameserver.network.serverpackets.ExQuestNpcLogList; import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; import com.l2jserver.gameserver.network.serverpackets.TutorialShowHtml; /** - * @author Sdw + * @author Sdw, Gladicek */ public class Q10323_TrainLikeItsReal extends Quest { @@ -44,7 +45,6 @@ public class Q10323_TrainLikeItsReal extends Quest private static final int TRAINING_GOLEM = 27532; // Misc private static final int MAX_LEVEL = 20; - private static final String KILL_VAR = "Q10323_KILL"; // Items private static final ItemHolder SPIRITSHOTS = new ItemHolder(2509, 500); private static final ItemHolder SOULSHOTS = new ItemHolder(1835, 500); @@ -55,9 +55,8 @@ public class Q10323_TrainLikeItsReal extends Quest addStartNpc(EVAIN); addTalkId(HOLDEN, EVAIN, SHANNON); addKillId(TRAINING_GOLEM); - addCondMaxLevel(MAX_LEVEL, "fixme.htm"); - addCondNotRace(Race.ERTHEIA, "fixme.htm"); - addCondCompletedQuest(Q10322_SearchingForTheMysteriousPower.class.getSimpleName(), "fixme.htm"); + addCondMaxLevel(MAX_LEVEL, "33464-05.htm"); + addCondCompletedQuest(Q10322_SearchingForTheMysteriousPower.class.getSimpleName(), "33464-05.htm"); } @Override @@ -100,6 +99,9 @@ public class Q10323_TrainLikeItsReal extends Quest if (qs.isCond(1)) { qs.setCond(2, true); + final ExQuestNpcLogList packet = new ExQuestNpcLogList(getId()); + packet.addNpc(TRAINING_GOLEM, 0); + player.sendPacket(packet); htmltext = event; } break; @@ -108,7 +110,7 @@ public class Q10323_TrainLikeItsReal extends Quest { if (qs.isCond(3)) { - qs.set(KILL_VAR, 0); + qs.setMemoState(0); if (player.isMageClass()) { giveItems(player, SPIRITSHOTS); @@ -133,7 +135,7 @@ public class Q10323_TrainLikeItsReal extends Quest { if (qs.isCond(8)) { - qs.setCond(9); + qs.setCond(9, true); htmltext = event; } break; @@ -158,72 +160,87 @@ public class Q10323_TrainLikeItsReal extends Quest public String onTalk(L2Npc npc, L2PcInstance player) { final QuestState qs = getQuestState(player, true); - String htmltext = getNoQuestMsg(player); + String htmltext = null; - if (qs.isCompleted()) + switch (qs.getState()) { - htmltext = getAlreadyCompletedMsg(player); - } - - switch (npc.getId()) - { - case EVAIN: + case State.CREATED: { - if (qs.isCreated()) + if (npc.getId() == EVAIN) { htmltext = "33464-01.htm"; + break; } - else if (qs.isStarted()) + else if (npc.getId() == SHANNON) + { + htmltext = "32974-03.htm"; + break; + } + } + case State.STARTED: + { + if (npc.getId() == EVAIN) { htmltext = "33464-03.htm"; + break; } - break; - } - case HOLDEN: - { - switch (qs.getCond()) + else if (npc.getId() == HOLDEN) { - case 1: + switch (qs.getCond()) { - htmltext = "33194-01.htm"; - break; - } - case 3: - { - htmltext = "33194-04.htm"; - break; - } - case 4: - { - htmltext = "33194-06.htm"; - qs.setCond(6); - break; - } - case 5: - { - htmltext = "33194-06.htm"; - qs.setCond(7); - break; - } - case 8: - { - htmltext = "33194-07.htm"; - break; + case 1: + { + htmltext = "33194-01.htm"; + break; + } + case 3: + { + htmltext = "33194-04.htm"; + break; + } + case 4: + { + htmltext = "33194-06.htm"; + qs.setCond(6, true); + break; + } + case 5: + { + htmltext = "33194-06.htm"; + qs.setCond(7, true); + break; + } + case 8: + { + htmltext = "33194-07.htm"; + break; + } } + break; } - break; - } - case SHANNON: - { - if (qs.isCond(9)) + else if (npc.getId() == SHANNON) { - htmltext = "32974-01.htm"; + if (qs.isCond(9)) + { + htmltext = "32974-01.htm"; + break; + } + } + } + case State.COMPLETED: + { + if (npc.getId() == EVAIN) + { + htmltext = "33464-04.htm"; + break; + } + else if (npc.getId() == SHANNON) + { + htmltext = "32974-05.htm"; + break; } - break; } - } - return htmltext; } @@ -234,31 +251,37 @@ public class Q10323_TrainLikeItsReal extends Quest if ((qs != null) && qs.isStarted()) { - int killedGolem = qs.getInt(KILL_VAR); + int killedGolem = qs.getMemoState(); if (qs.isCond(2)) { killedGolem++; + final ExQuestNpcLogList packet = new ExQuestNpcLogList(getId()); + packet.addNpcString(NpcStringId.ELIMINATE_THE_TRAINING_GOLEM, killedGolem); + killer.sendPacket(packet); if (killedGolem >= 4) { qs.setCond(3, true); } else { - qs.set(KILL_VAR, killedGolem); + qs.setMemoState(killedGolem); playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); } } else if (qs.isCond(6) || qs.isCond(7)) { killedGolem++; + final ExQuestNpcLogList packet = new ExQuestNpcLogList(getId()); + packet.addNpcString(NpcStringId.ELIMINATE_THE_TRAINING_GOLEM2, killedGolem); + killer.sendPacket(packet); if (killedGolem >= 4) { qs.setCond(8, true); } else { - qs.set(KILL_VAR, killedGolem); + qs.setMemoState(killedGolem); playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET); } } diff --git a/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32974-04.html b/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32974-04.htm similarity index 100% rename from trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32974-04.html rename to trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32974-04.htm diff --git a/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32974-05.html b/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32974-05.htm similarity index 100% rename from trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32974-05.html rename to trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32974-05.htm diff --git a/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-01.html b/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-01.htm similarity index 72% rename from trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-01.html rename to trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-01.htm index a214d2f72d..379720ca99 100644 --- a/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-01.html +++ b/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-01.htm @@ -1,4 +1,4 @@ Gallint:
I'm very busy! I haven't gotten a single day's rest since I was dropped off on Talking Island! Why did you come? - + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-02.html b/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-02.htm similarity index 100% rename from trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-02.html rename to trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-02.htm diff --git a/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-03.html b/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-03.htm similarity index 100% rename from trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-03.html rename to trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-03.htm diff --git a/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-04.htm b/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-04.htm new file mode 100644 index 0000000000..12918b36ad --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/32980-04.htm @@ -0,0 +1,4 @@ +Gallint:
+There's an order to everything, friend.
+(The Looking for Sorcecer Gallint quest can be started by talking to Shannon in the Basic Training Ground) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/Q10324_FindingMagisterGallint.java b/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/Q10324_FindingMagisterGallint.java index c149898764..40304a335f 100644 --- a/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/Q10324_FindingMagisterGallint.java +++ b/trunk/dist/game/data/scripts/quests/Q10324_FindingMagisterGallint/Q10324_FindingMagisterGallint.java @@ -20,16 +20,16 @@ package quests.Q10324_FindingMagisterGallint; import quests.Q10323_TrainLikeItsReal.Q10323_TrainLikeItsReal; -import com.l2jserver.gameserver.enums.Race; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.quest.State; import com.l2jserver.gameserver.network.serverpackets.TutorialShowHtml; /** * Finding Magister Gallint (10324) - * @author ivantotov + * @author ivantotov, Gladicek */ public final class Q10324_FindingMagisterGallint extends Quest { @@ -45,7 +45,6 @@ public final class Q10324_FindingMagisterGallint extends Quest addStartNpc(SHANNON); addTalkId(SHANNON, GALLINT); addCondMaxLevel(MAX_LEVEL, "32974-01a.htm"); - addCondNotRace(Race.ERTHEIA, "32974-01a.htm"); addCondCompletedQuest(Q10323_TrainLikeItsReal.class.getSimpleName(), "32974-01a.htm"); } @@ -72,7 +71,7 @@ public final class Q10324_FindingMagisterGallint extends Quest htmltext = event; break; } - case "32980-02.html": + case "32980-02.htm": { player.sendPacket(new TutorialShowHtml(npc.getObjectId(), "..\\L2Text\\QT_004_skill_01.htm", TutorialShowHtml.LARGE_WINDOW)); giveAdena(player, 110, true); @@ -89,34 +88,48 @@ public final class Q10324_FindingMagisterGallint extends Quest public String onTalk(L2Npc npc, L2PcInstance player) { final QuestState qs = getQuestState(player, true); - String htmltext = getNoQuestMsg(player); - if (qs.isCreated()) + String htmltext = null; + + switch (qs.getState()) { - if (npc.getId() == SHANNON) + case State.CREATED: { - htmltext = "32974-01.htm"; + if (npc.getId() == SHANNON) + { + htmltext = "32974-01.htm"; + break; + } + else if (npc.getId() == GALLINT) + { + htmltext = "32980-04.htm"; + break; + } } - } - else if (qs.isStarted()) - { - if (npc.getId() == SHANNON) + case State.STARTED: { - htmltext = "32974-04.html"; + if (npc.getId() == SHANNON) + { + htmltext = "32974-04.htm"; + break; + } + else if (npc.getId() == GALLINT) + { + htmltext = "32980-01.htm"; + break; + } } - else if (npc.getId() == GALLINT) + case State.COMPLETED: { - htmltext = "32980-01.html"; - } - } - else if (qs.isCompleted()) - { - if (npc.getId() == SHANNON) - { - htmltext = "32974-05.html"; - } - else if (npc.getId() == GALLINT) - { - htmltext = "32980-03.html"; + if (npc.getId() == SHANNON) + { + htmltext = "32974-05.htm"; + break; + } + else if (npc.getId() == GALLINT) + { + htmltext = "32980-03.htm"; + break; + } } } return htmltext; diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-01.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-01.htm new file mode 100644 index 0000000000..4a67d33110 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-01.htm @@ -0,0 +1,5 @@ +Master Xonia:
+Welcome, Kamael.
I am Xonia. I wish to teach you about the classes available to our kind.
+Kamael Soldiers are powerful with both spell and sword, and attack with great speed. They use their opponents' souls to unleash their most powerful skills!
+As your strength grows, you'll notice a Skill Window automatically popping up from time to time. You can also use the shortcut key ALT+K to check out the list of skills you already know of. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-02.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-02.htm new file mode 100644 index 0000000000..0caee3fcbd --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-02.htm @@ -0,0 +1,3 @@ +Master Xonia:
+I'm finished with my explanation. Now, you can return to Gallint and report. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-03.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-03.htm new file mode 100644 index 0000000000..c429a6b2ed --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-03.htm @@ -0,0 +1,4 @@ +Master Xonia:
+Kamael strength to you, friend.
+(You have already completed this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-04.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-04.htm new file mode 100644 index 0000000000..3e5b14e552 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32144-04.htm @@ -0,0 +1,3 @@ +Master Xonia:
+I teach the Kamael, not your kind. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-01.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-01.htm new file mode 100644 index 0000000000..49eda78169 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-01.htm @@ -0,0 +1,6 @@ +Master Cidnet:
+Welcome! I am Cidnet, skillmaster to the Elves!
+If you have a moment, I would like to tell you a little about some of the classes available to us Elves.
Elven Fighters have high Evasion Rate, Attack Accuracy, and are skilled with bows.
+Elven Mages can cast ferociously quickly, and recover lost mana at quite a rate!
+If your powers improve and gain access to stronger skills, a Skill Window will automatically pop up. Furthermore, you can use the shortcut key ALT+K, to check out the list of skills you've learned. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-02.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-02.htm new file mode 100644 index 0000000000..f6c3400924 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-02.htm @@ -0,0 +1,3 @@ +Master Cidnet:
+I'm finished with my explanation! You can return to Gallint and report. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-03.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-03.htm new file mode 100644 index 0000000000..df125ce0d0 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-03.htm @@ -0,0 +1,4 @@ +Master Cidnet:
+Good, good! I have trained you well.
+(You have already completed this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-04.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-04.htm new file mode 100644 index 0000000000..287aefebee --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32148-04.htm @@ -0,0 +1,3 @@ +Master Cidnet:
+I train Elves, you bulderbuss! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-01.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-01.htm new file mode 100644 index 0000000000..a5fcb6f310 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-01.htm @@ -0,0 +1,5 @@ +Prefect Herz:
+Welcome, warrior of flame. I am Herz, the Orc race trainer. Listen up! I'll explain the characteristics and skills of Orc race classes to you.
+Orc Fighters have fast and good physical and Mana healings, making long battles possible.
Even though an Orc Mystic uses magic, the class also has warrior abilities. We are Orcs, after all.
+When your abilities improve, and you have new skills that you can learn, the Skill Window will automatically appear. You can check the list of skills that you have by using the shortcut keys ALT+K. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-02.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-02.htm new file mode 100644 index 0000000000..b44c90bf00 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-02.htm @@ -0,0 +1,3 @@ +Prefect Herz:
+I'm finished with my explanation. Hurry and return to Gallint and report. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-03.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-03.htm new file mode 100644 index 0000000000..8c095f204f --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-03.htm @@ -0,0 +1,4 @@ +Prefect Herz:
+Keep working hard
+(You have already completed this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-04.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-04.htm new file mode 100644 index 0000000000..b71c51e392 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32151-04.htm @@ -0,0 +1,3 @@ +Prefect Herz:
+Hmm? I'm in charge of Orc race's training. I think you might be confusing your races. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-01.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-01.htm new file mode 100644 index 0000000000..117c57f3f4 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-01.htm @@ -0,0 +1,7 @@ +Master Talbot:
+Welcome!
+I am Talbot, human skillmaster, here to explain the benefits and drawbacks of the classes we can choose from.
+Human Fighters mainly employ short-range melee attacks, and can handle most basic weapons and armor types.
+Human Mages have an innate affinity for the power of the spoken word. They use Elemental Magic, White Magic, Supplemental Magic, Dark Magic and Summon Magic!
+As your strength grows, you'll notice a Skill Window automatically show up from time to time. You can also use the shortcut key ALT+K to check out the skills you already know. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-02.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-02.htm new file mode 100644 index 0000000000..7a8ea7280a --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-02.htm @@ -0,0 +1,3 @@ +Master Talbot:
+I'm finished with my explanation! Return to Gallint and report. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-03.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-03.htm new file mode 100644 index 0000000000..fd828c3f37 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-03.htm @@ -0,0 +1,4 @@ +Master Talbot:
+Never look back.
+(You have already completed this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-04.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-04.htm new file mode 100644 index 0000000000..1b67050781 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32156-04.htm @@ -0,0 +1,3 @@ +Master Talbot:
+Sorry, I only train Humans. I think you were confused. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-01.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-01.htm new file mode 100644 index 0000000000..14b9419023 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-01.htm @@ -0,0 +1,5 @@ +Blacksmith Kincaid:
+I'm Kincaid, responsible for teaching the dwarven race. I'll tell you about characteristics and skills of certain dwarven classes, so listen closely.
+The Dwarven fighter crafts items from materials acquired form monsters. If you want to improve your power with pure capital, this would be the class for you.
+And yes, you'll have new skills. Your skill window will open automatically when you press ALT+K, showing the full list of skills you have. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-02.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-02.htm new file mode 100644 index 0000000000..df5e16da71 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-02.htm @@ -0,0 +1,3 @@ +Blacksmith Kincaid:
+The explanation's over. Hurry back to Gallint! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-03.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-03.htm new file mode 100644 index 0000000000..df5e16da71 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-03.htm @@ -0,0 +1,3 @@ +Blacksmith Kincaid:
+The explanation's over. Hurry back to Gallint! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-04.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-04.htm new file mode 100644 index 0000000000..75ee6b8b2c --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32159-04.htm @@ -0,0 +1,3 @@ +Blacksmith Kincaid:
+I'm responsible for the education of dwarves, so I'm afraid you're a bit outside my purview. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-01.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-01.htm new file mode 100644 index 0000000000..f3f3ad08a6 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-01.htm @@ -0,0 +1,7 @@ +Master Black:
+Welcome! My name is Black and I am a skillmaster to the Dark Elves.
+I want to take a minute to tell you about the different classes I train.
+Dark Fighters fight extremely quickly thanks to their high Atk and Evasion rates.
+Dark Mages have powerful M. Atk. and high Healing abilities.
+As you gain new levels and stronger skills become available a Skill Window icon will automatically appear. Click it to open your Skills Window. Furthermore, you can open your Skills Window by pressing ALT+K, to see your Active, Passive, and Skills you can learn. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-02.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-02.htm new file mode 100644 index 0000000000..8f31467782 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-02.htm @@ -0,0 +1,3 @@ +Master Black:
+I'm finished with my explanation! Hurry and return to Gallint to report. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-03.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-03.htm new file mode 100644 index 0000000000..92a2f76973 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-03.htm @@ -0,0 +1,4 @@ +Master Black:
+Stay true to your nature, friend.
+(You have already completed this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-04.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-04.htm new file mode 100644 index 0000000000..eb7dade7e4 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32161-04.htm @@ -0,0 +1,3 @@ +Master Black:
+Sorry - I only train Dark Elves. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-01.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-01.htm new file mode 100644 index 0000000000..a2b2fab1ce --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-01.htm @@ -0,0 +1,5 @@ +Gallint:
+I guess I can take a few minutes to help you. Tell me - have you seen your race master yet?
+You can find out the specialities of your class and develop yourself in a multitude of directions.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-02.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-02.htm new file mode 100644 index 0000000000..ac793dd30b --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-02.htm @@ -0,0 +1,5 @@ +Gallint:
+Tsk tsk! You haven't met him!
+Race masters are found in front of the Administration Office! Go and hear about your future!
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-03.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-03.htm new file mode 100644 index 0000000000..3b4cf68386 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-03.htm @@ -0,0 +1,3 @@ +Gallint:
+Have you met your race master? They're all stationed In front of the Administration Office. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-04.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-04.htm new file mode 100644 index 0000000000..1dcef24770 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-04.htm @@ -0,0 +1,3 @@ +Gallint:
+Ah! Have you learned about your later class choices already? Remember, you'll learn a great many skills as your strength increases. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-05.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-05.htm new file mode 100644 index 0000000000..5ca7819418 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-05.htm @@ -0,0 +1,4 @@ +Gallint:
+Books are food for your mind. Do not let your mind go hungry
+(You already completed this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-06.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-06.htm new file mode 100644 index 0000000000..42a9ef815b --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-06.htm @@ -0,0 +1,3 @@ +Gallint:
+Talbot! Go and find them - they should be in front of the Administration Office. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-07.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-07.htm new file mode 100644 index 0000000000..b75a847bce --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-07.htm @@ -0,0 +1,3 @@ +Gallint:
+Cidnet! Go and find them... they should be in front of the Administration Office. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-08.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-08.htm new file mode 100644 index 0000000000..085c5d13d0 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-08.htm @@ -0,0 +1,3 @@ +Gallint:
+Black! Go and find them... they should be in front of the Administration Office. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-09.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-09.htm new file mode 100644 index 0000000000..2114eb55ea --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-09.htm @@ -0,0 +1,3 @@ +Gallint:
+Herz! Go and find them... they should be in front of the Administration Office. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-10.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-10.htm new file mode 100644 index 0000000000..9fb49e4daf --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-10.htm @@ -0,0 +1,3 @@ +Gallint:
+Kincaid! Go and find them... they should be in front of the Administration Office. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-11.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-11.htm new file mode 100644 index 0000000000..d220faca05 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-11.htm @@ -0,0 +1,3 @@ +Gallint:
+Xonia! Go and find them... they should be in front of the Administration Office. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-12.htm b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-12.htm new file mode 100644 index 0000000000..a68a904718 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/32980-12.htm @@ -0,0 +1,4 @@ +Gallint:
+My entire life, I've been paired with academia. But if there's anything, in all that time I now know, it is that I know nothing.
+(Only characters below level 20 who have completed the Looking for Sorcecer Gallint quest, can start this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/Q10325_SearchingForNewPower.java b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/Q10325_SearchingForNewPower.java new file mode 100644 index 0000000000..0687a0880f --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10325_SearchingForNewPower/Q10325_SearchingForNewPower.java @@ -0,0 +1,299 @@ +/* + * Copyright (C) 2004-2015 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack 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 DataPack 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 quests.Q10325_SearchingForNewPower; + +import quests.Q10324_FindingMagisterGallint.Q10324_FindingMagisterGallint; + +import com.l2jserver.gameserver.enums.Race; +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.holders.ItemHolder; +import com.l2jserver.gameserver.model.quest.Quest; +import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.quest.State; + +/** + * Searching For New Power (10325) + * @author Gladicek, Neanrakyr + */ +public class Q10325_SearchingForNewPower extends Quest +{ + // NPCs + private static final int GALLINT = 32980; + private static final int TALBOT = 32156; + private static final int CIDNET = 32148; + private static final int BLACK = 32161; + private static final int HERTZ = 32151; + private static final int KINCAID = 32159; + private static final int XONIA = 32144; + // Items + private static final ItemHolder SPIRITSHOTS = new ItemHolder(2509, 1000); + private static final ItemHolder SOULSHOTS = new ItemHolder(1835, 1000); + // Misc + private static final int MAX_LEVEL = 20; + + public Q10325_SearchingForNewPower() + { + super(10325, Q10325_SearchingForNewPower.class.getSimpleName(), "Searching For New Power"); + addStartNpc(GALLINT); + addTalkId(GALLINT, TALBOT, CIDNET, BLACK, HERTZ, KINCAID, XONIA); + addCondMaxLevel(MAX_LEVEL, "32980-12.htm"); + addCondCompletedQuest(Q10324_FindingMagisterGallint.class.getSimpleName(), "32980-12.htm"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + + if (event.equals("check_race")) + { + switch (player.getRace()) + { + case HUMAN: + { + qs.startQuest(); + qs.setMemoState(1); + htmltext = "32980-06.htm"; + qs.setCond(2); + break; + } + case ELF: + { + qs.startQuest(); + qs.setMemoState(1); + htmltext = "32980-07.htm"; + qs.setCond(3); + break; + } + case DARK_ELF: + { + qs.startQuest(); + qs.setMemoState(1); + htmltext = "32980-08.htm"; + qs.setCond(4); + break; + } + case ORC: + { + qs.startQuest(); + qs.setMemoState(1); + htmltext = "32980-09.htm"; + qs.setCond(5); + break; + } + case DWARF: + { + qs.startQuest(); + qs.setMemoState(1); + htmltext = "32980-10.htm"; + qs.setCond(6); + break; + } + case KAMAEL: + { + qs.startQuest(); + qs.setMemoState(1); + htmltext = "32980-11.htm"; + qs.setCond(7); + break; + } + } + } + else if (event.equals("32980-02.htm")) + { + htmltext = event; + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = null; + + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == GALLINT) + { + htmltext = "32980-01.htm"; + break; + } + } + case State.STARTED: + { + switch (npc.getId()) + { + case GALLINT: + { + if (qs.isCond(8)) + { + if (player.isMageClass()) + { + giveItems(player, SPIRITSHOTS); + } + else + { + giveItems(player, SOULSHOTS); + } + addExpAndSp(player, 4654, 5); + giveAdena(player, 120, true); + htmltext = "32980-04.htm"; + qs.exitQuest(false, true); + break; + } + else if (qs.isMemoState(1)) + { + htmltext = "32980-03.htm"; + } + break; + } + case TALBOT: + { + if (player.getRace() == Race.HUMAN) + { + if ((qs.isCond(2))) + { + htmltext = "32156-01.htm"; + qs.setCond(8); + break; + } + htmltext = "32156-02.htm"; + break; + } + htmltext = "32156-04.htm"; + break; + } + case CIDNET: + { + if (player.getRace() == Race.ELF) + { + if ((qs.isCond(3))) + { + htmltext = "32148-01.htm"; + qs.setCond(8); + break; + } + htmltext = "32148-02.htm"; + break; + } + htmltext = "32148-04.htm"; + break; + } + case BLACK: + { + if (player.getRace() == Race.DARK_ELF) + { + if ((qs.isCond(4))) + { + htmltext = "32161-01.htm"; + qs.setCond(8); + break; + } + htmltext = "32161-02.htm"; + break; + } + htmltext = "32161-04.htm"; + break; + } + case HERTZ: + { + if (player.getRace() == Race.ORC) + { + if ((qs.isCond(5))) + { + htmltext = "32151-01.htm"; + qs.setCond(8); + break; + } + htmltext = "32151-02.htm"; + break; + } + htmltext = "32151-04.htm"; + break; + } + case KINCAID: + { + if (player.getRace() == Race.DWARF) + { + if ((qs.isCond(6))) + { + htmltext = "32159-01.htm"; + qs.setCond(8); + break; + } + htmltext = "32159-02.htm"; + break; + } + htmltext = "32159-04.htm"; + break; + } + case XONIA: + { + if (player.getRace() == Race.KAMAEL) + { + if ((qs.isCond(7))) + { + htmltext = "32144-01.htm"; + qs.setCond(8); + break; + } + htmltext = "32144-02.htm"; + break; + } + htmltext = "32144-04.htm"; + break; + } + } + break; + } + case State.COMPLETED: + { + switch (npc.getId()) + { + case GALLINT: + { + htmltext = "32980-05.htm"; + break; + } + case TALBOT: + case CIDNET: + case BLACK: + case HERTZ: + case KINCAID: + case XONIA: + { + htmltext = npc.getId() + "-03.htm"; + break; + } + } + } + } + return htmltext; + } +} \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32972-01.htm b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32972-01.htm new file mode 100644 index 0000000000..e133f80ed6 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32972-01.htm @@ -0,0 +1,5 @@ +Pantheon:
+Hmm? You came Gallint instead? Injured by falling book... How is he? He could not move away from the shock of the fall of the Island, but still continued to work... Even don `t know what to say... just restless... Hmm...
+Right. What Gallint asked me to tell me?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32972-02.htm b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32972-02.htm new file mode 100644 index 0000000000..fd5156ed6b --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32972-02.htm @@ -0,0 +1,4 @@ +Pantheon:
+Suspicious Types... Now I remember that in recent times have also seen in the Museum of strange personalities. It seemed to me that they are looking for material on the Giants... Maybe they're one of those bands that were seen in the Ruins?

+They tried to steal a book called War of the Gods and the Giants . In this ancient manuscript contains information in the power of the Giants, the origin of their powers, monsters era Giants and the like. I am afraid that now, after the fall of the Island of Giants, this information can be used for evil purposes. It is necessary to rearrange the book elsewhere. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32972-03.htm b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32972-03.htm new file mode 100644 index 0000000000..9473586429 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32972-03.htm @@ -0,0 +1,4 @@ +Pantheon:
+I worry about Gallint. When Ye Sagira dropped onto Talking Island, he was in Aden. He came back to find everything had been changed. He's struggling with adjusting. I can't say I blame him.
+(You have already completed this quest) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-01.htm b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-01.htm new file mode 100644 index 0000000000..1d18acbc8e --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-01.htm @@ -0,0 +1,4 @@ +Gallint:
+Ah-ah! My back... Something I overworked these documents... Ah... I wanted to give something... How am I so...
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-02.htm b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-02.htm new file mode 100644 index 0000000000..2829fc85dc --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-02.htm @@ -0,0 +1,6 @@ +Gallint:
+You know... Today I long for the first time, brought order to the documents. There were so many that had to move folders using magic.

+But these manuscripts was so much dust that I started sneezing. Distracted, and documents that are carried through the air, dropped over. Now sore lower back.

+For three days had passed on his feet I stood up, but moving all Yeshe hard. It was necessary to convey something of the Pantheon. Phew.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-03.htm b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-03.htm new file mode 100644 index 0000000000..66636836f1 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-03.htm @@ -0,0 +1,3 @@ +Gallint:
+You are so kind. Pantheon is located at the Museum. Tell him: "In Esagire caught suspicious characters". And pass. I beg you. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-04.htm b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-04.htm new file mode 100644 index 0000000000..5fe208f68f --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-04.htm @@ -0,0 +1,4 @@ +Gallint:
+Come back... laster! Too much... pain, and you can't help Argh!
+(Only characters level 20 or above may take on this quest) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-05.htm b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-05.htm new file mode 100644 index 0000000000..77deba60fc --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/32980-05.htm @@ -0,0 +1,4 @@ +Gallint:
+Come back... laster! Too much... pain, and you can't help Argh!
+(Only characters under level 20 who have completed the Looking for New Power quest may take on this quest) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/Q10326_RespectYourElders.java b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/Q10326_RespectYourElders.java new file mode 100644 index 0000000000..de094fe2c3 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10326_RespectYourElders/Q10326_RespectYourElders.java @@ -0,0 +1,210 @@ +/* + * Copyright (C) 2004-2015 L2J DataPack + * + * This file is part of L2J DataPack. + * + * L2J DataPack 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 DataPack 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 quests.Q10326_RespectYourElders; + +import quests.Q10325_SearchingForNewPower.Q10325_SearchingForNewPower; + +import com.l2jserver.gameserver.model.Location; +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.quest.Quest; +import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.quest.State; +import com.l2jserver.gameserver.network.NpcStringId; +import com.l2jserver.gameserver.network.clientpackets.Say2; +import com.l2jserver.gameserver.network.serverpackets.ExRotation; +import com.l2jserver.gameserver.network.serverpackets.NpcSay; +import com.l2jserver.gameserver.util.Util; + +/** + * Respect Your Elders (10326) + * @author Gladicek, St3eT, Neanrakyr + */ +public class Q10326_RespectYourElders extends Quest +{ + // Npcs + private static final int GALLINT = 32980; + private static final int PANTHEON = 32972; + private static final int HANDERMONKEY = 32971; + // Misc + private static final int MAX_LEVEL = 20; + private static final Location HANDERMONKEY_SPAWN = new Location(-116617, 255497, -1432); + private final static Location[] HANDERMONKEY_LOC = + { + new Location(-116560, 255951, -1457), + new Location(-116688, 256597, -1472), + new Location(-116518, 257309, -1512), + new Location(-116418, 257746, -1512), + new Location(-115907, 257780, -1312), + new Location(-115449, 257782, -1136), + new Location(-114946, 257760, -1316), + new Location(-114637, 257349, -1142), + new Location(-114414, 257318, -1136), + }; + + public Q10326_RespectYourElders() + { + super(10326, Q10326_RespectYourElders.class.getSimpleName(), "Respect Your Elders"); + addStartNpc(GALLINT); + addTalkId(GALLINT, PANTHEON); + addSpawnId(HANDERMONKEY); + addMoveFinishedId(HANDERMONKEY); + addCondMaxLevel(MAX_LEVEL, "32980-04.htm"); + addCondCompletedQuest(Q10325_SearchingForNewPower.class.getSimpleName(), "32980-05.htm"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "32980-03.htm": + { + qs.startQuest(); + htmltext = event; + final L2Npc handerMonkey = addSpawn(HANDERMONKEY, HANDERMONKEY_SPAWN, false, 300000); + startQuestTimer("MOVE_DELAY", 500, handerMonkey, player); + break; + } + case "32972-02.htm": + { + giveAdena(player, 140, true); + addExpAndSp(player, 6700, 5); + qs.exitQuest(false, true); + htmltext = event; + break; + } + case "32980-02.htm": + { + htmltext = event; + break; + } + case "CHECK_PLAYER": + { + final L2PcInstance owner = npc.getVariables().getObject("OWNER", L2PcInstance.class); + if (owner != null) + { + if (npc.calculateDistance(owner, false, false) < 120) + { + npc.getVariables().set("FAIL_COUNT", 0); + final int loc_index = npc.getVariables().getInt("MOVE_INDEX", -1) + 1; + if (loc_index > 0) + { + if (loc_index == 9) + { + npc.broadcastPacket(new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getTemplate().getDisplayId(), NpcStringId.GO_GO_GO_CREEK)); + startQuestTimer("DELETE_NPC", 2000, npc, owner); + break; + } + npc.getVariables().set("MOVE_INDEX", loc_index); + addMoveToDesire(npc, HANDERMONKEY_LOC[loc_index], 0); + } + } + else + { + final int failCount = npc.getVariables().getInt("FAIL_COUNT", 0); + npc.getVariables().set("FAIL_COUNT", failCount + 1); + + if (failCount >= 30) + { + npc.deleteMe(); + break; + } + + startQuestTimer("CHECK_PLAYER", 2000, npc, owner); + + if (getRandom(100) < 10) + { + npc.broadcastPacket(new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getTemplate().getDisplayId(), NpcStringId.COME_ON_CREEK)); + } + } + } + else + { + npc.deleteMe(); + } + break; + } + case "MOVE_DELAY": + { + npc.getVariables().set("OWNER", player); + npc.setTitle(player.getName()); + npc.setIsRunning(true); + npc.broadcastInfo(); + addMoveToDesire(npc, HANDERMONKEY_LOC[0], 0); + npc.getVariables().set("MOVE_INDEX", 0); + break; + } + case "DELETE_NPC": + { + npc.deleteMe(); + break; + } + } + return htmltext; + } + + @Override + public void onMoveFinished(L2Npc npc) + { + npc.broadcastPacket(new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getTemplate().getDisplayId(), NpcStringId.COME_ON_CREEK)); + final L2PcInstance owner = npc.getVariables().getObject("OWNER", L2PcInstance.class); + + if (owner != null) + { + startQuestTimer("CHECK_PLAYER", 2000, npc, owner); + npc.setHeading(Util.calculateHeadingFrom(npc, owner)); + npc.broadcastPacket(new ExRotation(npc.getObjectId(), npc.getHeading())); + } + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = null; + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = npc.getId() == GALLINT ? "32980-01.htm" : "32972-01a.htm"; + break; + } + case State.STARTED: + { + htmltext = npc.getId() == GALLINT ? "32980-03.htm" : "32972-01.htm"; + break; + } + case State.COMPLETED: + { + htmltext = npc.getId() == GALLINT ? "32980-04.htm" : "32972-03.htm"; + break; + } + } + return htmltext; + } +} \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java index 787b43d620..a16311b4ef 100644 --- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -298,6 +298,8 @@ import quests.Q10321_QualificationsOfTheSeeker.Q10321_QualificationsOfTheSeeker; import quests.Q10322_SearchingForTheMysteriousPower.Q10322_SearchingForTheMysteriousPower; import quests.Q10323_TrainLikeItsReal.Q10323_TrainLikeItsReal; import quests.Q10324_FindingMagisterGallint.Q10324_FindingMagisterGallint; +import quests.Q10325_SearchingForNewPower.Q10325_SearchingForNewPower; +import quests.Q10326_RespectYourElders.Q10326_RespectYourElders; import quests.Q10338_SeizeYourDestiny.Q10338_SeizeYourDestiny; import quests.Q10501_ZakenEmbroideredSoulCloak.Q10501_ZakenEmbroideredSoulCloak; import quests.Q10502_FreyaEmbroideredSoulCloak.Q10502_FreyaEmbroideredSoulCloak; @@ -604,6 +606,8 @@ public class QuestMasterHandler Q10322_SearchingForTheMysteriousPower.class, Q10323_TrainLikeItsReal.class, Q10324_FindingMagisterGallint.class, + Q10325_SearchingForNewPower.class, + Q10326_RespectYourElders.class, Q10338_SeizeYourDestiny.class, Q10501_ZakenEmbroideredSoulCloak.class, Q10502_FreyaEmbroideredSoulCloak.class, diff --git a/trunk/dist/game/data/stats/items/22400-22499.xml b/trunk/dist/game/data/stats/items/22400-22499.xml index 613076a2e7..c33b78d796 100644 --- a/trunk/dist/game/data/stats/items/22400-22499.xml +++ b/trunk/dist/game/data/stats/items/22400-22499.xml @@ -14,97 +14,134 @@ + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/22600-22699.xml b/trunk/dist/game/data/stats/items/22600-22699.xml index 1777ac63a1..7dfdca7b74 100644 --- a/trunk/dist/game/data/stats/items/22600-22699.xml +++ b/trunk/dist/game/data/stats/items/22600-22699.xml @@ -535,171 +535,239 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/22700-22799.xml b/trunk/dist/game/data/stats/items/22700-22799.xml index 6c51d5f967..614490fcb0 100644 --- a/trunk/dist/game/data/stats/items/22700-22799.xml +++ b/trunk/dist/game/data/stats/items/22700-22799.xml @@ -3,51 +3,71 @@ + + + + + + + + + + + + + + + + + + + + @@ -301,81 +321,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/23100-23199.xml b/trunk/dist/game/data/stats/items/23100-23199.xml index 3c92eb1c12..5a7f12fbf2 100644 --- a/trunk/dist/game/data/stats/items/23100-23199.xml +++ b/trunk/dist/game/data/stats/items/23100-23199.xml @@ -653,6 +653,8 @@ + + @@ -744,51 +746,71 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/23200-23299.xml b/trunk/dist/game/data/stats/items/23200-23299.xml index 6b7a81fb47..2b32fe5f64 100644 --- a/trunk/dist/game/data/stats/items/23200-23299.xml +++ b/trunk/dist/game/data/stats/items/23200-23299.xml @@ -66,61 +66,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -183,11 +207,15 @@ + + + + diff --git a/trunk/dist/game/data/stats/items/23300-23399.xml b/trunk/dist/game/data/stats/items/23300-23399.xml index 20c6002e79..f1643a7276 100644 --- a/trunk/dist/game/data/stats/items/23300-23399.xml +++ b/trunk/dist/game/data/stats/items/23300-23399.xml @@ -270,31 +270,43 @@ + + + + + + + + + + + + @@ -315,31 +327,43 @@ + + + + + + + + + + + + @@ -360,11 +384,15 @@ + + + + diff --git a/trunk/dist/game/data/stats/items/23400-23499.xml b/trunk/dist/game/data/stats/items/23400-23499.xml index a73d5eb2f8..0bbdacca1b 100644 --- a/trunk/dist/game/data/stats/items/23400-23499.xml +++ b/trunk/dist/game/data/stats/items/23400-23499.xml @@ -443,11 +443,15 @@ + + + + @@ -478,26 +482,36 @@ + + + + + + + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/23500-23599.xml b/trunk/dist/game/data/stats/items/23500-23599.xml index 4b27aa7eb0..bb9cdc81a9 100644 --- a/trunk/dist/game/data/stats/items/23500-23599.xml +++ b/trunk/dist/game/data/stats/items/23500-23599.xml @@ -3,36 +3,50 @@ + + + + + + + + + + + + + + @@ -44,11 +58,15 @@ + + + + @@ -69,80 +87,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -221,51 +269,71 @@ + + + + + + + + + + + + + + + + + + + + @@ -302,90 +370,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/23600-23699.xml b/trunk/dist/game/data/stats/items/23600-23699.xml index c2cc0bf6fe..f905acd9d9 100644 --- a/trunk/dist/game/data/stats/items/23600-23699.xml +++ b/trunk/dist/game/data/stats/items/23600-23699.xml @@ -308,216 +308,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -573,21 +645,29 @@ + + + + + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/23700-23799.xml b/trunk/dist/game/data/stats/items/23700-23799.xml index 72d074b849..297406fdc1 100644 --- a/trunk/dist/game/data/stats/items/23700-23799.xml +++ b/trunk/dist/game/data/stats/items/23700-23799.xml @@ -23,21 +23,29 @@ + + + + + + + + @@ -63,21 +71,29 @@ + + + + + + + + @@ -103,21 +119,29 @@ + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/23800-23899.xml b/trunk/dist/game/data/stats/items/23800-23899.xml index f730a91b04..831914d1ef 100644 --- a/trunk/dist/game/data/stats/items/23800-23899.xml +++ b/trunk/dist/game/data/stats/items/23800-23899.xml @@ -310,6 +310,8 @@ + + @@ -440,6 +442,8 @@ + + @@ -451,6 +455,8 @@ + + @@ -461,6 +467,8 @@ + + @@ -491,26 +499,36 @@ + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/23900-23999.xml b/trunk/dist/game/data/stats/items/23900-23999.xml index b48f93d68b..9b39a7830a 100644 --- a/trunk/dist/game/data/stats/items/23900-23999.xml +++ b/trunk/dist/game/data/stats/items/23900-23999.xml @@ -317,96 +317,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -568,26 +600,36 @@ + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/24100-24199.xml b/trunk/dist/game/data/stats/items/24100-24199.xml index a7bbc3522d..39e6bff07a 100644 --- a/trunk/dist/game/data/stats/items/24100-24199.xml +++ b/trunk/dist/game/data/stats/items/24100-24199.xml @@ -309,6 +309,8 @@ + + diff --git a/trunk/dist/game/data/stats/items/24300-24399.xml b/trunk/dist/game/data/stats/items/24300-24399.xml index 9627da92f7..ac94cf515c 100644 --- a/trunk/dist/game/data/stats/items/24300-24399.xml +++ b/trunk/dist/game/data/stats/items/24300-24399.xml @@ -514,6 +514,8 @@ + + diff --git a/trunk/dist/game/data/stats/items/36600-36699.xml b/trunk/dist/game/data/stats/items/36600-36699.xml index 4ef8e29a87..86c30b2d44 100644 --- a/trunk/dist/game/data/stats/items/36600-36699.xml +++ b/trunk/dist/game/data/stats/items/36600-36699.xml @@ -28,11 +28,15 @@ + + + + @@ -182,12 +186,16 @@ + + + + @@ -429,96 +437,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/37000-37099.xml b/trunk/dist/game/data/stats/items/37000-37099.xml index 8541193d16..0d74c377f4 100644 --- a/trunk/dist/game/data/stats/items/37000-37099.xml +++ b/trunk/dist/game/data/stats/items/37000-37099.xml @@ -594,101 +594,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/37300-37399.xml b/trunk/dist/game/data/stats/items/37300-37399.xml index 4743f54e3f..ce266136f5 100644 --- a/trunk/dist/game/data/stats/items/37300-37399.xml +++ b/trunk/dist/game/data/stats/items/37300-37399.xml @@ -604,6 +604,8 @@ + + diff --git a/trunk/dist/game/data/stats/items/37400-37499.xml b/trunk/dist/game/data/stats/items/37400-37499.xml index 08ffc96c2f..16be7dde1b 100644 --- a/trunk/dist/game/data/stats/items/37400-37499.xml +++ b/trunk/dist/game/data/stats/items/37400-37499.xml @@ -4,177 +4,241 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/37800-37899.xml b/trunk/dist/game/data/stats/items/37800-37899.xml index 1701329299..f71ce9c4ab 100644 --- a/trunk/dist/game/data/stats/items/37800-37899.xml +++ b/trunk/dist/game/data/stats/items/37800-37899.xml @@ -129,30 +129,40 @@ + + + + + + + + + + @@ -177,240 +187,320 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/37900-37999.xml b/trunk/dist/game/data/stats/items/37900-37999.xml index 98a2e7271a..651240eae0 100644 --- a/trunk/dist/game/data/stats/items/37900-37999.xml +++ b/trunk/dist/game/data/stats/items/37900-37999.xml @@ -40,46 +40,64 @@ + + + + + + + + + + + + + + + + + + @@ -122,54 +140,72 @@ + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/38100-38199.xml b/trunk/dist/game/data/stats/items/38100-38199.xml index 171ab2b7c3..12d66a4a0a 100644 --- a/trunk/dist/game/data/stats/items/38100-38199.xml +++ b/trunk/dist/game/data/stats/items/38100-38199.xml @@ -424,72 +424,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -500,71 +526,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/items/38200-38299.xml b/trunk/dist/game/data/stats/items/38200-38299.xml index a5b9f1e297..b01abbe49c 100644 --- a/trunk/dist/game/data/stats/items/38200-38299.xml +++ b/trunk/dist/game/data/stats/items/38200-38299.xml @@ -4,56 +4,78 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/38400-38499.xml b/trunk/dist/game/data/stats/items/38400-38499.xml index a04f3bb28d..25bff3972f 100644 --- a/trunk/dist/game/data/stats/items/38400-38499.xml +++ b/trunk/dist/game/data/stats/items/38400-38499.xml @@ -87,34 +87,46 @@ + + + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/38900-38999.xml b/trunk/dist/game/data/stats/items/38900-38999.xml index 345c6bd722..0a35587973 100644 --- a/trunk/dist/game/data/stats/items/38900-38999.xml +++ b/trunk/dist/game/data/stats/items/38900-38999.xml @@ -328,26 +328,36 @@ + + + + + + + + + + diff --git a/trunk/dist/game/data/stats/items/45400-45499.xml b/trunk/dist/game/data/stats/items/45400-45499.xml index 665c835fba..435e30ec3c 100644 --- a/trunk/dist/game/data/stats/items/45400-45499.xml +++ b/trunk/dist/game/data/stats/items/45400-45499.xml @@ -176,6 +176,8 @@ + + @@ -186,6 +188,8 @@ + + diff --git a/trunk/dist/game/data/xsd/AppearanceStones.xsd b/trunk/dist/game/data/xsd/AppearanceStones.xsd index 9c4f97c30c..185eccace1 100644 --- a/trunk/dist/game/data/xsd/AppearanceStones.xsd +++ b/trunk/dist/game/data/xsd/AppearanceStones.xsd @@ -2,16 +2,16 @@ - - - + + + - + - - - + + + diff --git a/trunk/dist/game/data/xsd/PrimeShop.xsd b/trunk/dist/game/data/xsd/PrimeShop.xsd new file mode 100644 index 0000000000..7a8b063f17 --- /dev/null +++ b/trunk/dist/game/data/xsd/PrimeShop.xsd @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/java/com/l2jserver/Config.java b/trunk/java/com/l2jserver/Config.java index be73d90429..beaf4e3487 100644 --- a/trunk/java/com/l2jserver/Config.java +++ b/trunk/java/com/l2jserver/Config.java @@ -975,34 +975,6 @@ public final class Config public static int KARMA_RATE_DROP_EQUIP; public static int KARMA_RATE_DROP_EQUIP_WEAPON; - // -------------------------------------------------- - // Seven Signs Settings - // -------------------------------------------------- - public static boolean ALT_GAME_CASTLE_DAWN; - public static boolean ALT_GAME_CASTLE_DUSK; - public static boolean ALT_GAME_REQUIRE_CLAN_CASTLE; - public static int ALT_FESTIVAL_MIN_PLAYER; - public static int ALT_MAXIMUM_PLAYER_CONTRIB; - public static long ALT_FESTIVAL_MANAGER_START; - public static long ALT_FESTIVAL_LENGTH; - public static long ALT_FESTIVAL_CYCLE_LENGTH; - public static long ALT_FESTIVAL_FIRST_SPAWN; - public static long ALT_FESTIVAL_FIRST_SWARM; - public static long ALT_FESTIVAL_SECOND_SPAWN; - public static long ALT_FESTIVAL_SECOND_SWARM; - public static long ALT_FESTIVAL_CHEST_SPAWN; - public static double ALT_SIEGE_DAWN_GATES_PDEF_MULT; - public static double ALT_SIEGE_DUSK_GATES_PDEF_MULT; - public static double ALT_SIEGE_DAWN_GATES_MDEF_MULT; - public static double ALT_SIEGE_DUSK_GATES_MDEF_MULT; - public static boolean ALT_STRICT_SEVENSIGNS; - public static boolean ALT_SEVENSIGNS_LAZY_UPDATE; - public static int SSQ_DAWN_TICKET_QUANTITY; - public static int SSQ_DAWN_TICKET_PRICE; - public static int SSQ_DAWN_TICKET_BUNDLE; - public static int SSQ_MANORS_AGREEMENT_ID; - public static int SSQ_JOIN_DAWN_ADENA_FEE; - // -------------------------------------------------- // Server Settings // -------------------------------------------------- @@ -1257,7 +1229,7 @@ public final class Config MAX_CHARACTERS_NUMBER_PER_ACCOUNT = serverSettings.getInt("CharMaxNumber", 7); MAXIMUM_ONLINE_USERS = serverSettings.getInt("MaximumOnlineUsers", 100); - String[] protocols = serverSettings.getString("AllowedProtocolRevisions", "267;268;271;273").split(";"); + String[] protocols = serverSettings.getString("AllowedProtocolRevisions", "603;606;607").split(";"); PROTOCOL_LIST = new ArrayList<>(protocols.length); for (String protocol : protocols) { @@ -1392,32 +1364,6 @@ public final class Config FS_FEE_FOR_CASTLE = Feature.getInt("FortressFeeForCastle", 25000); FS_MAX_OWN_TIME = Feature.getInt("FortressMaximumOwnTime", 168); - ALT_GAME_CASTLE_DAWN = Feature.getBoolean("AltCastleForDawn", true); - ALT_GAME_CASTLE_DUSK = Feature.getBoolean("AltCastleForDusk", true); - ALT_GAME_REQUIRE_CLAN_CASTLE = Feature.getBoolean("AltRequireClanCastle", false); - ALT_FESTIVAL_MIN_PLAYER = Feature.getInt("AltFestivalMinPlayer", 5); - ALT_MAXIMUM_PLAYER_CONTRIB = Feature.getInt("AltMaxPlayerContrib", 1000000); - ALT_FESTIVAL_MANAGER_START = Feature.getLong("AltFestivalManagerStart", 120000); - ALT_FESTIVAL_LENGTH = Feature.getLong("AltFestivalLength", 1080000); - ALT_FESTIVAL_CYCLE_LENGTH = Feature.getLong("AltFestivalCycleLength", 2280000); - ALT_FESTIVAL_FIRST_SPAWN = Feature.getLong("AltFestivalFirstSpawn", 120000); - ALT_FESTIVAL_FIRST_SWARM = Feature.getLong("AltFestivalFirstSwarm", 300000); - ALT_FESTIVAL_SECOND_SPAWN = Feature.getLong("AltFestivalSecondSpawn", 540000); - ALT_FESTIVAL_SECOND_SWARM = Feature.getLong("AltFestivalSecondSwarm", 720000); - ALT_FESTIVAL_CHEST_SPAWN = Feature.getLong("AltFestivalChestSpawn", 900000); - ALT_SIEGE_DAWN_GATES_PDEF_MULT = Feature.getDouble("AltDawnGatesPdefMult", 1.1); - ALT_SIEGE_DUSK_GATES_PDEF_MULT = Feature.getDouble("AltDuskGatesPdefMult", 0.8); - ALT_SIEGE_DAWN_GATES_MDEF_MULT = Feature.getDouble("AltDawnGatesMdefMult", 1.1); - ALT_SIEGE_DUSK_GATES_MDEF_MULT = Feature.getDouble("AltDuskGatesMdefMult", 0.8); - ALT_STRICT_SEVENSIGNS = Feature.getBoolean("StrictSevenSigns", true); - ALT_SEVENSIGNS_LAZY_UPDATE = Feature.getBoolean("AltSevenSignsLazyUpdate", true); - - SSQ_DAWN_TICKET_QUANTITY = Feature.getInt("SevenSignsDawnTicketQuantity", 300); - SSQ_DAWN_TICKET_PRICE = Feature.getInt("SevenSignsDawnTicketPrice", 1000); - SSQ_DAWN_TICKET_BUNDLE = Feature.getInt("SevenSignsDawnTicketBundle", 10); - SSQ_MANORS_AGREEMENT_ID = Feature.getInt("SevenSignsManorsAgreementId", 6388); - SSQ_JOIN_DAWN_ADENA_FEE = Feature.getInt("SevenSignsJoinDawnFee", 50000); - TAKE_FORT_POINTS = Feature.getInt("TakeFortPoints", 200); LOOSE_FORT_POINTS = Feature.getInt("LooseFortPoints", 0); TAKE_CASTLE_POINTS = Feature.getInt("TakeCastlePoints", 1500); @@ -3658,15 +3604,6 @@ public final class Config case "castlezonefameaquirepoints": CASTLE_ZONE_FAME_AQUIRE_POINTS = Integer.parseInt(pValue); break; - case "altcastlefordawn": - ALT_GAME_CASTLE_DAWN = Boolean.parseBoolean(pValue); - break; - case "altcastlefordusk": - ALT_GAME_CASTLE_DUSK = Boolean.parseBoolean(pValue); - break; - case "altrequireclancastle": - ALT_GAME_REQUIRE_CLAN_CASTLE = Boolean.parseBoolean(pValue); - break; case "altfreeteleporting": ALT_GAME_FREE_TELEPORT = Boolean.parseBoolean(pValue); break; diff --git a/trunk/java/com/l2jserver/commons/geodriver/GeoDriver.java b/trunk/java/com/l2jserver/commons/geodriver/GeoDriver.java index 174d683bc0..efde98a4a1 100644 --- a/trunk/java/com/l2jserver/commons/geodriver/GeoDriver.java +++ b/trunk/java/com/l2jserver/commons/geodriver/GeoDriver.java @@ -117,41 +117,21 @@ public final class GeoDriver return getRegion(geoX, geoY).checkNearestNswe(geoX, geoY, worldZ, nswe); } - public boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe, int zDeltaLimit) - { - return getRegion(geoX, geoY).checkNearestNswe(geoX, geoY, worldZ, nswe, zDeltaLimit); - } - public int getNearestZ(int geoX, int geoY, int worldZ) { return getRegion(geoX, geoY).getNearestZ(geoX, geoY, worldZ); } - public int getNearestZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return getRegion(geoX, geoY).getNearestZ(geoX, geoY, worldZ, zDeltaLimit); - } - public int getNextLowerZ(int geoX, int geoY, int worldZ) { return getRegion(geoX, geoY).getNextLowerZ(geoX, geoY, worldZ); } - public int getNextLowerZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return getRegion(geoX, geoY).getNextLowerZ(geoX, geoY, worldZ, zDeltaLimit); - } - public int getNextHigherZ(int geoX, int geoY, int worldZ) { return getRegion(geoX, geoY).getNextHigherZ(geoX, geoY, worldZ); } - public int getNextHigherZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return getRegion(geoX, geoY).getNextHigherZ(geoX, geoY, worldZ, zDeltaLimit); - } - public int getGeoX(int worldX) { if ((worldX < WORLD_MIN_X) || (worldX > WORLD_MAX_X)) diff --git a/trunk/java/com/l2jserver/commons/geodriver/IBlock.java b/trunk/java/com/l2jserver/commons/geodriver/IBlock.java index 8b873872c9..42ce540bdc 100644 --- a/trunk/java/com/l2jserver/commons/geodriver/IBlock.java +++ b/trunk/java/com/l2jserver/commons/geodriver/IBlock.java @@ -36,17 +36,9 @@ public interface IBlock boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe); - boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe, int zDeltaLimit); - int getNearestZ(int geoX, int geoY, int worldZ); - int getNearestZ(int geoX, int geoY, int worldZ, int zDeltaLimit); - int getNextLowerZ(int geoX, int geoY, int worldZ); - int getNextLowerZ(int geoX, int geoY, int worldZ, int zDeltaLimit); - int getNextHigherZ(int geoX, int geoY, int worldZ); - - int getNextHigherZ(int geoX, int geoY, int worldZ, int zDeltaLimit); } diff --git a/trunk/java/com/l2jserver/commons/geodriver/IRegion.java b/trunk/java/com/l2jserver/commons/geodriver/IRegion.java index a80b9fe765..90f552a664 100644 --- a/trunk/java/com/l2jserver/commons/geodriver/IRegion.java +++ b/trunk/java/com/l2jserver/commons/geodriver/IRegion.java @@ -39,19 +39,11 @@ public interface IRegion boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe); - boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe, int zDeltaLimit); - int getNearestZ(int geoX, int geoY, int worldZ); - int getNearestZ(int geoX, int geoY, int worldZ, int zDeltaLimit); - int getNextLowerZ(int geoX, int geoY, int worldZ); - int getNextLowerZ(int geoX, int geoY, int worldZ, int zDeltaLimit); - int getNextHigherZ(int geoX, int geoY, int worldZ); - int getNextHigherZ(int geoX, int geoY, int worldZ, int zDeltaLimit); - boolean hasGeo(); } diff --git a/trunk/java/com/l2jserver/commons/geodriver/blocks/ComplexBlock.java b/trunk/java/com/l2jserver/commons/geodriver/blocks/ComplexBlock.java index 99dcd188d2..c7879bbbcc 100644 --- a/trunk/java/com/l2jserver/commons/geodriver/blocks/ComplexBlock.java +++ b/trunk/java/com/l2jserver/commons/geodriver/blocks/ComplexBlock.java @@ -25,7 +25,7 @@ import com.l2jserver.commons.geodriver.IBlock; /** * @author HorridoJoho */ -public final class ComplexBlock extends AbstractBlock +public final class ComplexBlock implements IBlock { private final short[] _data; @@ -60,13 +60,6 @@ public final class ComplexBlock extends AbstractBlock return (_getCellNSWE(geoX, geoY) & nswe) == nswe; } - @Override - public boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe, int zDeltaLimit) - { - int height = _getCellHeight(geoX, geoY); - return Math.abs(worldZ - height) > zDeltaLimit ? true : (_getCellNSWE(geoX, geoY) & nswe) == nswe; - } - @Override public int getNearestZ(int geoX, int geoY, int worldZ) { diff --git a/trunk/java/com/l2jserver/commons/geodriver/blocks/FlatBlock.java b/trunk/java/com/l2jserver/commons/geodriver/blocks/FlatBlock.java index aabc43a20b..7f829b61e9 100644 --- a/trunk/java/com/l2jserver/commons/geodriver/blocks/FlatBlock.java +++ b/trunk/java/com/l2jserver/commons/geodriver/blocks/FlatBlock.java @@ -20,10 +20,12 @@ package com.l2jserver.commons.geodriver.blocks; import java.nio.ByteBuffer; +import com.l2jserver.commons.geodriver.IBlock; + /** * @author HorridoJoho */ -public class FlatBlock extends AbstractBlock +public class FlatBlock implements IBlock { private final short _height; @@ -38,12 +40,6 @@ public class FlatBlock extends AbstractBlock return true; } - @Override - public boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe, int zDeltaLimit) - { - return true; - } - @Override public int getNearestZ(int geoX, int geoY, int worldZ) { diff --git a/trunk/java/com/l2jserver/commons/geodriver/blocks/MultilayerBlock.java b/trunk/java/com/l2jserver/commons/geodriver/blocks/MultilayerBlock.java index df35d0c5d5..d4b774d1b1 100644 --- a/trunk/java/com/l2jserver/commons/geodriver/blocks/MultilayerBlock.java +++ b/trunk/java/com/l2jserver/commons/geodriver/blocks/MultilayerBlock.java @@ -23,9 +23,9 @@ import java.nio.ByteBuffer; import com.l2jserver.commons.geodriver.IBlock; /** - * @author FBIagent + * @author HorridoJoho */ -public class MultilayerBlock extends AbstractBlock +public class MultilayerBlock implements IBlock { private final byte[] _data; @@ -124,14 +124,6 @@ public class MultilayerBlock extends AbstractBlock return (_getNearestNSWE(geoX, geoY, worldZ) & nswe) == nswe; } - @Override - public boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe, int zDeltaLimit) - { - short layer = _getNearestLayer(geoX, geoY, worldZ); - int height = _extractLayerHeight(layer); - return Math.abs(worldZ - height) > zDeltaLimit ? true : (_extractLayerNswe(layer) & nswe) == nswe; - } - @Override public int getNearestZ(int geoX, int geoY, int worldZ) { diff --git a/trunk/java/com/l2jserver/commons/geodriver/regions/NullRegion.java b/trunk/java/com/l2jserver/commons/geodriver/regions/NullRegion.java index db4302531b..536593dab4 100644 --- a/trunk/java/com/l2jserver/commons/geodriver/regions/NullRegion.java +++ b/trunk/java/com/l2jserver/commons/geodriver/regions/NullRegion.java @@ -33,48 +33,24 @@ public final class NullRegion implements IRegion return true; } - @Override - public boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe, int zDeltaLimit) - { - return true; - } - @Override public int getNearestZ(int geoX, int geoY, int worldZ) { return worldZ; } - @Override - public int getNearestZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return worldZ; - } - @Override public int getNextLowerZ(int geoX, int geoY, int worldZ) { return worldZ; } - @Override - public int getNextLowerZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return worldZ; - } - @Override public int getNextHigherZ(int geoX, int geoY, int worldZ) { return worldZ; } - @Override - public int getNextHigherZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return worldZ; - } - @Override public boolean hasGeo() { diff --git a/trunk/java/com/l2jserver/commons/geodriver/regions/Region.java b/trunk/java/com/l2jserver/commons/geodriver/regions/Region.java index 948e8009f1..a7ca9f1390 100644 --- a/trunk/java/com/l2jserver/commons/geodriver/regions/Region.java +++ b/trunk/java/com/l2jserver/commons/geodriver/regions/Region.java @@ -66,48 +66,24 @@ public final class Region implements IRegion return getBlock(geoX, geoY).checkNearestNswe(geoX, geoY, worldZ, nswe); } - @Override - public boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe, int zDeltaLimit) - { - return getBlock(geoX, geoY).checkNearestNswe(geoX, geoY, worldZ, nswe, zDeltaLimit); - } - @Override public int getNearestZ(int geoX, int geoY, int worldZ) { return getBlock(geoX, geoY).getNearestZ(geoX, geoY, worldZ); } - @Override - public int getNearestZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return getBlock(geoX, geoY).getNearestZ(geoX, geoY, worldZ, zDeltaLimit); - } - @Override public int getNextLowerZ(int geoX, int geoY, int worldZ) { return getBlock(geoX, geoY).getNextLowerZ(geoX, geoY, worldZ); } - @Override - public int getNextLowerZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return getBlock(geoX, geoY).getNextLowerZ(geoX, geoY, worldZ, zDeltaLimit); - } - @Override public int getNextHigherZ(int geoX, int geoY, int worldZ) { return getBlock(geoX, geoY).getNextHigherZ(geoX, geoY, worldZ); } - @Override - public int getNextHigherZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return getBlock(geoX, geoY).getNextHigherZ(geoX, geoY, worldZ, zDeltaLimit); - } - @Override public boolean hasGeo() { diff --git a/trunk/java/com/l2jserver/gameserver/GameServer.java b/trunk/java/com/l2jserver/gameserver/GameServer.java index d6e0d498ff..dc9c885d5e 100644 --- a/trunk/java/com/l2jserver/gameserver/GameServer.java +++ b/trunk/java/com/l2jserver/gameserver/GameServer.java @@ -47,7 +47,7 @@ import com.l2jserver.gameserver.data.sql.impl.SummonSkillsTable; import com.l2jserver.gameserver.data.sql.impl.TeleportLocationTable; import com.l2jserver.gameserver.data.xml.impl.AbilityPointsData; import com.l2jserver.gameserver.data.xml.impl.AdminData; -import com.l2jserver.gameserver.data.xml.impl.AppearanceStonesData; +import com.l2jserver.gameserver.data.xml.impl.AppearanceItemData; import com.l2jserver.gameserver.data.xml.impl.ArmorSetsData; import com.l2jserver.gameserver.data.xml.impl.BeautyShopData; import com.l2jserver.gameserver.data.xml.impl.BuyListData; @@ -75,6 +75,7 @@ import com.l2jserver.gameserver.data.xml.impl.OptionData; import com.l2jserver.gameserver.data.xml.impl.PetDataTable; import com.l2jserver.gameserver.data.xml.impl.PlayerTemplateData; import com.l2jserver.gameserver.data.xml.impl.PlayerXpPercentLostData; +import com.l2jserver.gameserver.data.xml.impl.PrimeShopData; import com.l2jserver.gameserver.data.xml.impl.RecipeData; import com.l2jserver.gameserver.data.xml.impl.SecondaryAuthData; import com.l2jserver.gameserver.data.xml.impl.ShuttleData; @@ -224,7 +225,6 @@ public class GameServer SummonSkillsTable.getInstance(); printSection("Items"); - AppearanceStonesData.getInstance(); ItemTable.getInstance(); EnchantItemGroupsData.getInstance(); EnchantItemData.getInstance(); @@ -242,6 +242,8 @@ public class GameServer FishingRodsData.getInstance(); HennaData.getInstance(); AuctionManager.getInstance(); + PrimeShopData.getInstance(); + AppearanceItemData.getInstance(); printSection("Characters"); ClassListData.getInstance(); diff --git a/trunk/java/com/l2jserver/gameserver/GeoData.java b/trunk/java/com/l2jserver/gameserver/GeoData.java index a6be0b5a88..725a27a827 100644 --- a/trunk/java/com/l2jserver/gameserver/GeoData.java +++ b/trunk/java/com/l2jserver/gameserver/GeoData.java @@ -44,7 +44,7 @@ public class GeoData private static final String FILE_NAME_FORMAT = "%d_%d.l2j"; private static final int ELEVATED_SEE_OVER_DISTANCE = 2; private static final int MAX_SEE_OVER_HEIGHT = 48; - private static final int Z_DELTA_LIMIT = 100; + private static final int SPAWN_Z_DELTA_LIMIT = 100; private final GeoDriver _driver = new GeoDriver(); @@ -103,11 +103,6 @@ public class GeoData return _driver.checkNearestNswe(geoX, geoY, worldZ, nswe); } - public boolean checkNearestNswe(int geoX, int geoY, int worldZ, int nswe, int zDeltaLimit) - { - return _driver.checkNearestNswe(geoX, geoY, worldZ, nswe, zDeltaLimit); - } - public boolean checkNearestNsweAntiCornerCut(int geoX, int geoY, int worldZ, int nswe) { boolean can = true; @@ -138,66 +133,21 @@ public class GeoData return can && checkNearestNswe(geoX, geoY, worldZ, nswe); } - public boolean checkNearestNsweAntiCornerCut(int geoX, int geoY, int worldZ, int nswe, int zDeltaLimit) - { - boolean can = true; - if ((nswe & Cell.NSWE_NORTH_EAST) == Cell.NSWE_NORTH_EAST) - { - // can = canEnterNeighbors(prevX, prevY - 1, prevGeoZ, Direction.EAST) && canEnterNeighbors(prevX + 1, prevY, prevGeoZ, Direction.NORTH); - can = checkNearestNswe(geoX, geoY - 1, worldZ, Cell.NSWE_EAST, zDeltaLimit) && checkNearestNswe(geoX + 1, geoY, worldZ, Cell.NSWE_NORTH, zDeltaLimit); - } - - if (can && ((nswe & Cell.NSWE_NORTH_WEST) == Cell.NSWE_NORTH_WEST)) - { - // can = canEnterNeighbors(prevX, prevY - 1, prevGeoZ, Direction.WEST) && canEnterNeighbors(prevX - 1, prevY, prevGeoZ, Direction.NORTH); - can = checkNearestNswe(geoX, geoY - 1, worldZ, Cell.NSWE_WEST, zDeltaLimit) && checkNearestNswe(geoX, geoY - 1, worldZ, Cell.NSWE_NORTH, zDeltaLimit); - } - - if (can && ((nswe & Cell.NSWE_SOUTH_EAST) == Cell.NSWE_SOUTH_EAST)) - { - // can = canEnterNeighbors(prevX, prevY + 1, prevGeoZ, Direction.EAST) && canEnterNeighbors(prevX + 1, prevY, prevGeoZ, Direction.SOUTH); - can = checkNearestNswe(geoX, geoY + 1, worldZ, Cell.NSWE_EAST, zDeltaLimit) && checkNearestNswe(geoX + 1, geoY, worldZ, Cell.NSWE_SOUTH, zDeltaLimit); - } - - if (can && ((nswe & Cell.NSWE_SOUTH_WEST) == Cell.NSWE_SOUTH_WEST)) - { - // can = canEnterNeighbors(prevX, prevY + 1, prevGeoZ, Direction.WEST) && canEnterNeighbors(prevX - 1, prevY, prevGeoZ, Direction.SOUTH); - can = checkNearestNswe(geoX, geoY + 1, worldZ, Cell.NSWE_WEST, zDeltaLimit) && checkNearestNswe(geoX - 1, geoY, worldZ, Cell.NSWE_SOUTH, zDeltaLimit); - } - - return can && checkNearestNswe(geoX, geoY, worldZ, nswe, zDeltaLimit); - } - public int getNearestZ(int geoX, int geoY, int worldZ) { return _driver.getNearestZ(geoX, geoY, worldZ); } - public int getNearestZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return _driver.getNearestZ(geoX, geoY, worldZ, zDeltaLimit); - } - public int getNextLowerZ(int geoX, int geoY, int worldZ) { return _driver.getNextLowerZ(geoX, geoY, worldZ); } - public int getNextLowerZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return _driver.getNextLowerZ(geoX, geoY, worldZ, zDeltaLimit); - } - public int getNextHigherZ(int geoX, int geoY, int worldZ) { return _driver.getNextHigherZ(geoX, geoY, worldZ); } - public int getNextHigherZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return _driver.getNextHigherZ(geoX, geoY, worldZ, zDeltaLimit); - } - public int getGeoX(int worldX) { return _driver.getGeoX(worldX); @@ -241,7 +191,8 @@ public class GeoData */ public int getSpawnHeight(int x, int y, int z) { - return getNearestZ(getGeoX(x), getGeoY(y), z, Z_DELTA_LIMIT); + int nearestZ = getNearestZ(getGeoX(x), getGeoY(y), z + 100); + return Math.abs(nearestZ - z) <= SPAWN_Z_DELTA_LIMIT ? nearestZ : z; } /** @@ -330,9 +281,9 @@ public class GeoData throw new RuntimeException("Multiple directions!"); } - if (checkNearestNsweAntiCornerCut(prevX, prevY, prevGeoZ, nswe, Z_DELTA_LIMIT)) + if (checkNearestNsweAntiCornerCut(prevX, prevY, prevGeoZ, nswe)) { - return getNearestZ(curX, curY, prevGeoZ, Z_DELTA_LIMIT); + return getNearestZ(curX, curY, prevGeoZ); } return getNextHigherZ(curX, curY, prevGeoZ); } @@ -354,8 +305,8 @@ public class GeoData int tGeoX = getGeoX(tx); int tGeoY = getGeoY(ty); - z = getNearestZ(geoX, geoY, z, Z_DELTA_LIMIT); - tz = getNearestZ(tGeoX, tGeoY, tz, Z_DELTA_LIMIT); + z = getNearestZ(geoX, geoY, z); + tz = getNearestZ(tGeoX, tGeoY, tz); // fastpath if ((geoX == tGeoX) && (geoY == tGeoY)) @@ -399,7 +350,6 @@ public class GeoData int prevZ = pointIter.z(); int prevGeoZ = prevZ; int ptIndex = 0; - while (pointIter.next()) { int curX = pointIter.x(); @@ -492,10 +442,10 @@ public class GeoData { int geoX = getGeoX(x); int geoY = getGeoY(y); - z = getNearestZ(geoX, geoY, z, Z_DELTA_LIMIT); + z = getNearestZ(geoX, geoY, z); int tGeoX = getGeoX(tx); int tGeoY = getGeoY(ty); - tz = getNearestZ(tGeoX, tGeoY, tz, Z_DELTA_LIMIT); + tz = getNearestZ(tGeoX, tGeoY, tz); if (DoorData.getInstance().checkIfDoorsBetween(x, y, z, tx, ty, tz, instanceId, false)) { @@ -513,12 +463,12 @@ public class GeoData { int curX = pointIter.x(); int curY = pointIter.y(); - int curZ = getNearestZ(curX, curY, prevZ, Z_DELTA_LIMIT); + int curZ = getNearestZ(curX, curY, prevZ); if (hasGeoPos(prevX, prevY)) { int nswe = GeoUtils.computeNswe(prevX, prevY, curX, curY); - if (!checkNearestNsweAntiCornerCut(prevX, prevY, prevZ, nswe, Z_DELTA_LIMIT)) + if (!checkNearestNsweAntiCornerCut(prevX, prevY, prevZ, nswe)) { // can't move, return previous location return new Location(getWorldX(prevX), getWorldY(prevY), prevZ); @@ -554,10 +504,10 @@ public class GeoData { int geoX = getGeoX(fromX); int geoY = getGeoY(fromY); - fromZ = getNearestZ(geoX, geoY, fromZ, Z_DELTA_LIMIT); + fromZ = getNearestZ(geoX, geoY, fromZ); int tGeoX = getGeoX(toX); int tGeoY = getGeoY(toY); - toZ = getNearestZ(tGeoX, tGeoY, toZ, Z_DELTA_LIMIT); + toZ = getNearestZ(tGeoX, tGeoY, toZ); if (DoorData.getInstance().checkIfDoorsBetween(fromX, fromY, fromZ, toX, toY, toZ, instanceId, false)) { @@ -575,12 +525,12 @@ public class GeoData { int curX = pointIter.x(); int curY = pointIter.y(); - int curZ = getNearestZ(curX, curY, prevZ, Z_DELTA_LIMIT); + int curZ = getNearestZ(curX, curY, prevZ); if (hasGeoPos(prevX, prevY)) { int nswe = GeoUtils.computeNswe(prevX, prevY, curX, curY); - if (!checkNearestNsweAntiCornerCut(prevX, prevY, prevZ, nswe, Z_DELTA_LIMIT)) + if (!checkNearestNsweAntiCornerCut(prevX, prevY, prevZ, nswe)) { return false; } @@ -604,7 +554,7 @@ public class GeoData { int geoX = getGeoX(x); int geoY = getGeoY(y); - z = getNearestZ(geoX, geoY, z, Z_DELTA_LIMIT); + z = getNearestZ(geoX, geoY, z); int tGeoX = getGeoX(tx); int tGeoY = getGeoY(ty); @@ -617,7 +567,7 @@ public class GeoData { int curX = pointIter.x(); int curY = pointIter.y(); - int curZ = getNearestZ(curX, curY, prevZ, Z_DELTA_LIMIT); + int curZ = getNearestZ(curX, curY, prevZ); prevZ = curZ; } diff --git a/trunk/java/com/l2jserver/gameserver/data/xml/impl/AppearanceStonesData.java b/trunk/java/com/l2jserver/gameserver/data/xml/impl/AppearanceItemData.java similarity index 69% rename from trunk/java/com/l2jserver/gameserver/data/xml/impl/AppearanceStonesData.java rename to trunk/java/com/l2jserver/gameserver/data/xml/impl/AppearanceItemData.java index 4d53257ae7..c94fabaef2 100644 --- a/trunk/java/com/l2jserver/gameserver/data/xml/impl/AppearanceStonesData.java +++ b/trunk/java/com/l2jserver/gameserver/data/xml/impl/AppearanceItemData.java @@ -20,6 +20,7 @@ package com.l2jserver.gameserver.data.xml.impl; import java.util.ArrayList; import java.util.HashMap; +import java.util.Map; import java.util.logging.Level; import org.w3c.dom.Document; @@ -35,17 +36,17 @@ import com.l2jserver.gameserver.model.items.type.CrystalType; /** * @author Erlandys */ -public final class AppearanceStonesData implements IXmlReader +public final class AppearanceItemData implements IXmlReader { - private final HashMap _stones = new HashMap<>(); + private final Map _stones = new HashMap<>(); - protected AppearanceStonesData() + protected AppearanceItemData() { load(); } @Override - public synchronized void load() + public void load() { _stones.clear(); parseDatapackFile("data/AppearanceStones.xml"); @@ -66,11 +67,11 @@ public final class AppearanceStonesData implements IXmlReader final NamedNodeMap attrs = d.getAttributes(); int itemId = parseInteger(attrs, "id"); String type = parseString(attrs, "type"); - String itemType = parseString(attrs, "itemType"); + String targetType = parseString(attrs, "targetType"); String grades[] = parseString(attrs, "grades", "none").split(";"); - long price = parseLong(attrs, "price", 0l); - int targetItem = parseInteger(attrs, "targetItem", 0); - long timeForAppearance = parseLong(attrs, "time", 0l); + long cost = parseLong(attrs, "cost", 0l); + int visualId = parseInteger(attrs, "visualId", 0); + long lifeTime = parseLong(attrs, "lifeTime", 0l); ArrayList gradesIds = new ArrayList<>(); CrystalType cType; for (String gr : grades) @@ -78,33 +79,33 @@ public final class AppearanceStonesData implements IXmlReader cType = CrystalType.valueOf(gr.toUpperCase()); gradesIds.add(cType.getId()); } - type = type.substring(0, 1).toUpperCase() + type.substring(1).toLowerCase(); - itemType = itemType.substring(0, 1).toUpperCase() + itemType.substring(1).toLowerCase(); + type = type.toUpperCase(); + targetType = targetType.toUpperCase(); StoneType sType = StoneType.valueOf(type); - AppearanceItemType iType = AppearanceItemType.valueOf(itemType); - _stones.put(itemId, new AppearanceStone(itemId, sType, iType, gradesIds, price, targetItem, timeForAppearance)); + AppearanceItemType iType = AppearanceItemType.valueOf(targetType); + _stones.put(itemId, new AppearanceStone(itemId, sType, iType, gradesIds, cost, visualId, lifeTime)); } } } } } - public AppearanceStone getStone(int itemId) + public AppearanceStone getStone(int stone) { - if (_stones.containsKey(itemId)) - { - return _stones.get(itemId); - } - return null; + return _stones.get(stone); } - public static final AppearanceStonesData getInstance() + /** + * Gets the single instance of AppearanceItemData. + * @return single instance of AppearanceItemData + */ + public static final AppearanceItemData getInstance() { return SingletonHolder._instance; } private static class SingletonHolder { - protected static final AppearanceStonesData _instance = new AppearanceStonesData(); + protected static final AppearanceItemData _instance = new AppearanceItemData(); } } diff --git a/trunk/java/com/l2jserver/gameserver/data/xml/impl/PrimeShopData.java b/trunk/java/com/l2jserver/gameserver/data/xml/impl/PrimeShopData.java new file mode 100644 index 0000000000..e246ee5d7b --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/data/xml/impl/PrimeShopData.java @@ -0,0 +1,255 @@ +/* + * 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.data.xml.impl; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; + +import com.l2jserver.Config; +import com.l2jserver.gameserver.data.xml.IXmlReader; +import com.l2jserver.gameserver.datatables.ItemTable; +import com.l2jserver.gameserver.model.StatsSet; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.items.L2Item; +import com.l2jserver.gameserver.model.primeshop.PrimeShopGroup; +import com.l2jserver.gameserver.model.primeshop.PrimeShopItem; +import com.l2jserver.gameserver.network.serverpackets.primeshop.ExBRBuyProduct; +import com.l2jserver.gameserver.network.serverpackets.primeshop.ExBRBuyProduct.ExBrProductReplyType; +import com.l2jserver.gameserver.network.serverpackets.primeshop.ExBRGamePoint; +import com.l2jserver.gameserver.network.serverpackets.primeshop.ExBRProductInfo; +import com.l2jserver.gameserver.util.Util; + +/** + * @author Gnacik, UnAfraid + */ +public class PrimeShopData implements IXmlReader +{ + private final Map _primeItems = new LinkedHashMap<>(); + + protected PrimeShopData() + { + load(); + } + + @Override + public void load() + { + _primeItems.clear(); + parseDatapackFile("data/PrimeShop.xml"); + + if (_primeItems.size() > 0) + { + LOGGER.info(getClass().getSimpleName() + ": Loaded " + _primeItems.size() + " items"); + } + else + { + LOGGER.info(getClass().getSimpleName() + ": System is disabled."); + } + } + + @Override + public void parseDocument(Document doc) + { + for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling()) + { + if ("list".equalsIgnoreCase(n.getNodeName())) + { + NamedNodeMap at = n.getAttributes(); + Node attribute = at.getNamedItem("enabled"); + if ((attribute != null) && Boolean.parseBoolean(attribute.getNodeValue())) + { + for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) + { + if ("item".equalsIgnoreCase(d.getNodeName())) + { + NamedNodeMap attrs = d.getAttributes(); + Node att; + StatsSet set = new StatsSet(); + for (int i = 0; i < attrs.getLength(); i++) + { + att = attrs.item(i); + set.set(att.getNodeName(), att.getNodeValue()); + } + + List items = new ArrayList<>(); + for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling()) + { + if ("item".equalsIgnoreCase(b.getNodeName())) + { + attrs = b.getAttributes(); + + final int itemId = parseInteger(attrs, "itemId"); + final int count = parseInteger(attrs, "count"); + + final L2Item item = ItemTable.getInstance().getTemplate(itemId); + if (item == null) + { + LOGGER.severe(getClass().getSimpleName() + ": Item template null for itemId: " + itemId + " brId: " + set.getInt("id")); + return; + } + + items.add(new PrimeShopItem(itemId, count, item.getWeight(), item.isTradeable() ? 1 : 0)); + } + } + + _primeItems.put(set.getInt("id"), new PrimeShopGroup(set, items)); + } + } + } + } + } + } + + public void buyItem(L2PcInstance player, int brId, int count) + { + if (validatePlayer(brId, count, player)) + { + final PrimeShopGroup item = _primeItems.get(brId); + for (PrimeShopItem itm : item.getItems()) + { + player.addItem("PrimeShop", itm.getId(), itm.getCount() * count, player, true); + } + final int points = player.getPrimePoints() - (item.getPrice() * count); + + player.setPrimePoints(points); + + player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.SUCCESS)); + player.sendPacket(new ExBRGamePoint(player)); + } + } + + /** + * @param brId + * @param count + * @param player + * @return + */ + private boolean validatePlayer(int brId, int count, L2PcInstance player) + { + if ((count < 1) && (count > 99)) + { + Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to buy invalid itemcount [" + count + "] from Prime", Config.DEFAULT_PUNISH); + player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVALID_USER_STATE)); + return false; + } + + final PrimeShopGroup item = _primeItems.get(brId); + final long currentTime = System.currentTimeMillis() / 1000; + + if (item == null) + { + player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVALID_PRODUCT)); + Util.handleIllegalPlayerAction(player, "Player " + player.getName() + " tried to buy invalid brId from Prime", Config.DEFAULT_PUNISH); + return false; + } + else if ((item.getMinLevel() > 0) && (item.getMinLevel() > player.getLevel())) + { + player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVALID_USER)); + return false; + } + else if ((item.getMaxLevel() > 0) && (item.getMaxLevel() < player.getLevel())) + { + player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVALID_USER)); + return false; + } + else if ((item.getMinBirthday() > 0) && (item.getMinBirthday() > player.getBirthdays())) + { + player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVALID_USER_STATE)); + return false; + } + else if ((item.getMaxBirthday() > 0) && (item.getMaxBirthday() < player.getBirthdays())) + { + player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVALID_USER_STATE)); + return false; + } + else if ((Calendar.getInstance().get(Calendar.DAY_OF_WEEK) & item.getDaysOfWeek()) == 0) + { + player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.NOT_DAY_OF_WEEK)); + return false; + } + else if ((item.getStartSale() > 1) && (item.getStartSale() > currentTime)) + { + player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.BEFORE_SALE_DATE)); + return false; + } + else if ((item.getEndSale() > 1) && (item.getEndSale() < currentTime)) + { + player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.AFTER_SALE_DATE)); + return false; + } + + final int weight = item.getWeight() * count; + final long slots = item.getCount() * count; + + if (player.getPrimePoints() < (item.getPrice() * count)) + { + player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.LACK_OF_POINT)); + return false; + } + else if (player.getInventory().validateWeight(weight)) + { + if (!player.getInventory().validateCapacity(slots)) + { + player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVENTROY_OVERFLOW)); + return false; + } + } + else + { + player.sendPacket(new ExBRBuyProduct(ExBrProductReplyType.INVENTROY_OVERFLOW)); + return false; + } + + return true; + } + + public void showProductInfo(L2PcInstance player, int brId) + { + final PrimeShopGroup item = _primeItems.get(brId); + + if ((player == null) || (item == null)) + { + return; + } + + player.sendPacket(new ExBRProductInfo(item)); + } + + public Map getPrimeItems() + { + return _primeItems; + } + + public static PrimeShopData getInstance() + { + return SingletonHolder._instance; + } + + private static class SingletonHolder + { + protected static final PrimeShopData _instance = new PrimeShopData(); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/datatables/ItemTable.java b/trunk/java/com/l2jserver/gameserver/datatables/ItemTable.java index 6755b89d88..7045560494 100644 --- a/trunk/java/com/l2jserver/gameserver/datatables/ItemTable.java +++ b/trunk/java/com/l2jserver/gameserver/datatables/ItemTable.java @@ -22,6 +22,7 @@ import static com.l2jserver.gameserver.model.itemcontainer.Inventory.ADENA_ID; import java.sql.Connection; import java.sql.PreparedStatement; +import java.util.Collection; import java.util.Map; import java.util.Set; import java.util.concurrent.ScheduledFuture; @@ -409,11 +410,36 @@ public class ItemTable return _armors.keySet(); } + public Collection getAllArmors() + { + return _armors.values(); + } + public Set getAllWeaponsId() { return _weapons.keySet(); } + public Collection getAllWeapons() + { + return _weapons.values(); + } + + public Set getAllEtcItemsId() + { + return _etcItems.keySet(); + } + + public Collection getAllEtcItems() + { + return _etcItems.values(); + } + + public L2Item[] getAllItems() + { + return _allTemplates; + } + public int getArraySize() { return _allTemplates.length; diff --git a/trunk/java/com/l2jserver/gameserver/instancemanager/GlobalVariablesManager.java b/trunk/java/com/l2jserver/gameserver/instancemanager/GlobalVariablesManager.java index e1ccedb08b..2f06ae244e 100644 --- a/trunk/java/com/l2jserver/gameserver/instancemanager/GlobalVariablesManager.java +++ b/trunk/java/com/l2jserver/gameserver/instancemanager/GlobalVariablesManager.java @@ -112,6 +112,22 @@ public final class GlobalVariablesManager extends AbstractVariables return true; } + @Override + public boolean deleteMe() + { + try (Connection con = L2DatabaseFactory.getInstance().getConnection(); + Statement del = con.createStatement()) + { + del.execute(DELETE_QUERY); + } + catch (Exception e) + { + _log.log(Level.WARNING, getClass().getSimpleName() + ": Couldn't delete global variables to database.", e); + return false; + } + return true; + } + /** * Gets the single instance of {@code GlobalVariablesManager}. * @return single instance of {@code GlobalVariablesManager} diff --git a/trunk/java/com/l2jserver/gameserver/model/ItemInfo.java b/trunk/java/com/l2jserver/gameserver/model/ItemInfo.java index 132277c03a..7de39c26a0 100644 --- a/trunk/java/com/l2jserver/gameserver/model/ItemInfo.java +++ b/trunk/java/com/l2jserver/gameserver/model/ItemInfo.java @@ -76,8 +76,8 @@ public class ItemInfo private int[] _option; - private int _appearanceId; - private long _appearanceTime; + private int _visualId; + private long _visualExpiration; /** * Get all information from L2ItemInstance to generate ItemInfo. @@ -151,8 +151,8 @@ public class ItemInfo _elemDefAttr[i] = item.getElementDefAttr(i); } _option = item.getEnchantOptions(); - _appearanceId = item.getAppearanceId(); - _appearanceTime = item.getAppearanceTime(); + _visualId = item.getVisualId(); + _visualExpiration = item.getAppearanceTime(); } public ItemInfo(L2ItemInstance item, int change) @@ -212,8 +212,8 @@ public class ItemInfo _elemDefAttr[i] = item.getElementDefAttr(i); } _option = item.getEnchantOptions(); - _appearanceId = item.getAppearanceId(); - _appearanceTime = item.getAppearanceTime(); + _visualId = item.getVisualId(); + _visualExpiration = item.getVisualExpiration(); } public ItemInfo(Product item) @@ -303,8 +303,8 @@ public class ItemInfo _elemDefAttr[i] = item.getElementDefAttr(i); } _option = item.getEnchantOptions(); - _appearanceId = item.getAppearanceId(); - _appearanceTime = item.getAppearanceTime(); + _visualId = item.getAppearanceId(); + _visualExpiration = item.getAppearanceTime(); } public int getObjectId() @@ -392,13 +392,13 @@ public class ItemInfo return _option; } - public int getAppearanceId() + public int getVisualId() { - return _appearanceId; + return _visualId; } - public long getAppearanceTime() + public long getVisualExpiration() { - return _appearanceTime; + return _visualExpiration; } } diff --git a/trunk/java/com/l2jserver/gameserver/model/StatsSet.java b/trunk/java/com/l2jserver/gameserver/model/StatsSet.java index b128cd8f0d..cbd2865d6c 100644 --- a/trunk/java/com/l2jserver/gameserver/model/StatsSet.java +++ b/trunk/java/com/l2jserver/gameserver/model/StatsSet.java @@ -18,6 +18,7 @@ */ package com.l2jserver.gameserver.model; +import java.time.Duration; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -30,6 +31,7 @@ import javolution.util.FastMap; import com.l2jserver.gameserver.model.holders.MinionHolder; import com.l2jserver.gameserver.model.holders.SkillHolder; import com.l2jserver.gameserver.model.interfaces.IParserAdvUtils; +import com.l2jserver.util.TimeUtil; /** * This class is meant to hold a set of (key,value) pairs.
@@ -509,6 +511,28 @@ public class StatsSet implements IParserAdvUtils return String.valueOf(val); } + @Override + public Duration getDuration(String key) + { + Object val = _set.get(key); + if (val == null) + { + throw new IllegalArgumentException("String value required, but not specified"); + } + return TimeUtil.parseDuration(String.valueOf(val)); + } + + @Override + public Duration getDuration(String key, Duration defaultValue) + { + Object val = _set.get(key); + if (val == null) + { + return defaultValue; + } + return TimeUtil.parseDuration(String.valueOf(val)); + } + @Override @SuppressWarnings("unchecked") public > T getEnum(String key, Class enumClass) diff --git a/trunk/java/com/l2jserver/gameserver/model/TradeItem.java b/trunk/java/com/l2jserver/gameserver/model/TradeItem.java index d3a3ecda6c..26bb9865af 100644 --- a/trunk/java/com/l2jserver/gameserver/model/TradeItem.java +++ b/trunk/java/com/l2jserver/gameserver/model/TradeItem.java @@ -50,8 +50,8 @@ public class TradeItem private final int _mana; private final boolean _isTimeLimited; private final int _time; - private final int _appearanceId; - private final long _appearanceTime; + private final int _visualId; + private final long _visualExpiration; public TradeItem(L2ItemInstance item, long count, long price) { @@ -76,8 +76,8 @@ public class TradeItem _mana = item.getMana(); _isTimeLimited = item.isTimeLimitedItem(); _time = item.isTimeLimitedItem() ? (int) (item.getRemainingTime() / 1000) : -9999; - _appearanceId = item.getAppearanceId(); - _appearanceTime = item.getAppearanceTime(); + _visualId = item.getVisualId(); + _visualExpiration = item.getAppearanceTime(); } public TradeItem(L2Item item, long count, long price, int enchantLevel, int attackAttribute, int attackAttributeValue, int defenseAttributes[], int appearanceId) @@ -104,8 +104,8 @@ public class TradeItem _mana = -1; _isTimeLimited = false; _time = -9999; - _appearanceId = appearanceId; - _appearanceTime = -1; + _visualId = appearanceId; + _visualExpiration = -1; } public TradeItem(TradeItem item, long count, long price, int enchantLevel, int attackAttribute, int attackAttributeValue, int defenseAttributes[], int appearanceId) @@ -132,8 +132,8 @@ public class TradeItem _mana = item.getMana(); _isTimeLimited = item.isTimeLimitedItem(); _time = item.isTimeLimitedItem() ? (int) (item.getRemainingTime() / 1000) : -9999; - _appearanceId = item.getAppearanceId(); - _appearanceTime = item.getAppearanceTime(); + _visualId = item.getVisualId(); + _visualExpiration = item.getVisualExpiration(); } public L2ItemInstance getItemInstance() @@ -251,14 +251,14 @@ public class TradeItem return _isTimeLimited; } - public int getAppearanceId() + public int getVisualId() { - return _appearanceId; + return _visualId; } - public long getAppearanceTime() + public long getVisualExpiration() { - return _appearanceTime; + return _visualExpiration; } public int getRemainingTime() diff --git a/trunk/java/com/l2jserver/gameserver/model/TradeList.java b/trunk/java/com/l2jserver/gameserver/model/TradeList.java index ec40b69e66..fee46c7c37 100644 --- a/trunk/java/com/l2jserver/gameserver/model/TradeList.java +++ b/trunk/java/com/l2jserver/gameserver/model/TradeList.java @@ -131,7 +131,7 @@ public class TradeList { el[i] = item.getElementDefAttr((byte) i); } - item = new TradeItem(item, item.getCount(), item.getPrice(), item.getEnchant(), item.getAttackElementType(), item.getAttackElementPower(), el, item.getAppearanceId()); + item = new TradeItem(item, item.getCount(), item.getPrice(), item.getEnchant(), item.getAttackElementType(), item.getAttackElementPower(), el, item.getVisualId()); inventory.adjustAvailableItem(item); list.add(item); } 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 77364edcd9..6275be5103 100644 --- a/trunk/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java +++ b/trunk/java/com/l2jserver/gameserver/model/actor/instance/L2PcInstance.java @@ -41,6 +41,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentSkipListMap; import java.util.concurrent.Future; import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.locks.ReentrantLock; import java.util.logging.Level; @@ -766,6 +767,12 @@ public final class L2PcInstance extends L2Playable private int _activeEnchantAttrItemId = ID_NONE; private long _activeEnchantTimestamp = 0; + private int _firstCompoundOID = -1; + private int _secondCompoundOID = -1; + private L2ItemInstance _usingAStone = null; + private L2ItemInstance _appearanceItem = null; + private L2ItemInstance _targetAppearanceItem = null; + protected boolean _inventoryDisable = false; /** Player's cubics. */ private final Map _cubics = new ConcurrentSkipListMap<>(); @@ -13614,6 +13621,13 @@ public final class L2PcInstance extends L2Playable return -1; } + public int getBirthdays() + { + long time = (System.currentTimeMillis() - getCreateDate().getTimeInMillis()) / 1000; + time /= TimeUnit.DAYS.toMillis(365); + return (int) time; + } + /** * list of character friends */ @@ -15078,9 +15092,6 @@ public final class L2PcInstance extends L2Playable _vitalityPoints = points; } - int _firstCompoundOID = -1; - int _secondCompoundOID = -1; - public int getFirstCompoundOID() { return _firstCompoundOID; @@ -15101,8 +15112,6 @@ public final class L2PcInstance extends L2Playable _secondCompoundOID = secondCompoundOID; } - L2ItemInstance _usingAStone = null; - public L2ItemInstance getUsingAppearanceStone() { return _usingAStone; @@ -15113,9 +15122,6 @@ public final class L2PcInstance extends L2Playable _usingAStone = stone; } - L2ItemInstance _appearanceItem = null; - L2ItemInstance _targetAppearanceItem = null; - public L2ItemInstance getAppearanceItem() { return _appearanceItem; @@ -15135,4 +15141,21 @@ public final class L2PcInstance extends L2Playable { _targetAppearanceItem = item; } + + /** + * @return the prime shop points of the player. + */ + public int getPrimePoints() + { + return getAccountVariables().getInt("PrimePoints", 0); + } + + /** + * Sets prime shop for current player. + * @param points + */ + public void setPrimePoints(int points) + { + getAccountVariables().set("PrimePoints", points); + } } diff --git a/trunk/java/com/l2jserver/gameserver/model/entity/AppearanceStone.java b/trunk/java/com/l2jserver/gameserver/model/entity/AppearanceStone.java index ad55927228..043b66574b 100644 --- a/trunk/java/com/l2jserver/gameserver/model/entity/AppearanceStone.java +++ b/trunk/java/com/l2jserver/gameserver/model/entity/AppearanceStone.java @@ -27,20 +27,20 @@ public class AppearanceStone { public enum StoneType { - None, - Normal, - Blessed, - Fixed, - Restore + NONE, + NORMAL, + BLESSED, + FIXED, + RESTORE } public enum AppearanceItemType { - None, - Weapon, - Armor, - Accessory, - All + NONE, + WEAPON, + ARMOR, + ACCESSORY, + ALL } private final int _itemId; diff --git a/trunk/java/com/l2jserver/gameserver/model/entity/Instance.java b/trunk/java/com/l2jserver/gameserver/model/entity/Instance.java index 1dcc98e4fb..2fb30cb11a 100644 --- a/trunk/java/com/l2jserver/gameserver/model/entity/Instance.java +++ b/trunk/java/com/l2jserver/gameserver/model/entity/Instance.java @@ -25,6 +25,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ScheduledFuture; import java.util.logging.Level; @@ -371,6 +372,12 @@ public final class Instance _manualSpawn.clear(); } + public void removeSpawnedNpcs() + { + _npcs.stream().filter(Objects::nonNull).forEach(L2Npc::deleteMe); + _npcs.clear(); + } + public void removeDoors() { for (L2DoorInstance door : _doors.values()) diff --git a/trunk/java/com/l2jserver/gameserver/model/interfaces/IParserAdvUtils.java b/trunk/java/com/l2jserver/gameserver/model/interfaces/IParserAdvUtils.java index 70a801d7ec..a3a3c44aca 100644 --- a/trunk/java/com/l2jserver/gameserver/model/interfaces/IParserAdvUtils.java +++ b/trunk/java/com/l2jserver/gameserver/model/interfaces/IParserAdvUtils.java @@ -18,6 +18,8 @@ */ package com.l2jserver.gameserver.model.interfaces; +import java.time.Duration; + /** * More advanced interface for parsers.
* Allows usage of get methods without fall back value.
@@ -42,6 +44,8 @@ public interface IParserAdvUtils extends IParserUtils public String getString(String key); + public Duration getDuration(String key); + public > T getEnum(String key, Class clazz); } diff --git a/trunk/java/com/l2jserver/gameserver/model/interfaces/IParserUtils.java b/trunk/java/com/l2jserver/gameserver/model/interfaces/IParserUtils.java index dadbae9d5d..6c17bdfa89 100644 --- a/trunk/java/com/l2jserver/gameserver/model/interfaces/IParserUtils.java +++ b/trunk/java/com/l2jserver/gameserver/model/interfaces/IParserUtils.java @@ -18,6 +18,8 @@ */ package com.l2jserver.gameserver.model.interfaces; +import java.time.Duration; + /** * Simple interface for parser, enforces of a fall back value.
* More suitable for developers not sure about their data.
@@ -41,5 +43,7 @@ public interface IParserUtils public String getString(String key, String defaultValue); + public Duration getDuration(String key, Duration defaultValue); + public > T getEnum(String key, Class clazz, T defaultValue); } diff --git a/trunk/java/com/l2jserver/gameserver/model/itemcontainer/Inventory.java b/trunk/java/com/l2jserver/gameserver/model/itemcontainer/Inventory.java index 745d7e7294..fbf89050a3 100644 --- a/trunk/java/com/l2jserver/gameserver/model/itemcontainer/Inventory.java +++ b/trunk/java/com/l2jserver/gameserver/model/itemcontainer/Inventory.java @@ -1106,18 +1106,23 @@ public abstract class Inventory extends ItemContainer return (item != null) ? item.getDisplayId() : 0; } + /** + * Returns the visual id of the item in the paperdoll slot + * @param slot : int designating the slot + * @return int designating the ID of the item + */ + public int getPaperdollItemVisualId(int slot) + { + final L2ItemInstance item = _paperdoll[slot]; + return (item != null) ? item.getVisualId() : 0; + } + public int getPaperdollAugmentationId(int slot) { final L2ItemInstance item = _paperdoll[slot]; return ((item != null) && (item.getAugmentation() != null)) ? item.getAugmentation().getAugmentationId() : 0; } - public int getPaperdollVisualId(int slot) - { - final L2ItemInstance item = _paperdoll[slot]; - return (item != null) ? item.getAppearanceId() : 0; - } - /** * Returns the objectID associated to the item in the paperdoll slot * @param slot : int pointing out the slot diff --git a/trunk/java/com/l2jserver/gameserver/model/items/L2EtcItem.java b/trunk/java/com/l2jserver/gameserver/model/items/L2EtcItem.java index 4e2447b03a..0957e76e6d 100644 --- a/trunk/java/com/l2jserver/gameserver/model/items/L2EtcItem.java +++ b/trunk/java/com/l2jserver/gameserver/model/items/L2EtcItem.java @@ -21,7 +21,7 @@ package com.l2jserver.gameserver.model.items; import java.util.ArrayList; import java.util.List; -import com.l2jserver.gameserver.data.xml.impl.AppearanceStonesData; +import com.l2jserver.gameserver.data.xml.impl.AppearanceItemData; import com.l2jserver.gameserver.model.L2ExtractableProduct; import com.l2jserver.gameserver.model.StatsSet; import com.l2jserver.gameserver.model.entity.AppearanceStone; @@ -123,7 +123,7 @@ public final class L2EtcItem extends L2Item } _isInfinite = set.getBoolean("is_infinite", false); - _appearanceStone = (_handler != null) && _handler.equalsIgnoreCase("ItemAppearance") ? AppearanceStonesData.getInstance().getStone(getId()) : null; + _appearanceStone = (_handler != null) && _handler.equals("Appearance") ? AppearanceItemData.getInstance().getStone(getId()) : null; } /** diff --git a/trunk/java/com/l2jserver/gameserver/model/items/L2WarehouseItem.java b/trunk/java/com/l2jserver/gameserver/model/items/L2WarehouseItem.java index 5c76d240fb..0fdf1dc23d 100644 --- a/trunk/java/com/l2jserver/gameserver/model/items/L2WarehouseItem.java +++ b/trunk/java/com/l2jserver/gameserver/model/items/L2WarehouseItem.java @@ -97,7 +97,7 @@ public class L2WarehouseItem _elemDefAttr[i] = item.getElementDefAttr(i); } _enchantOptions = item.getEnchantOptions(); - _appearanceId = item.getAppearanceId(); + _appearanceId = item.getVisualId(); _appearanceTime = item.getAppearanceTime(); } 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 270227043a..660306bf99 100644 --- a/trunk/java/com/l2jserver/gameserver/model/items/instance/L2ItemInstance.java +++ b/trunk/java/com/l2jserver/gameserver/model/items/instance/L2ItemInstance.java @@ -1676,7 +1676,7 @@ public final class L2ItemInstance extends L2Object ps.setInt(7, getCustomType2()); ps.setInt(8, getMana()); ps.setLong(9, getTime()); - ps.setInt(10, getAppearanceId()); + ps.setInt(10, getVisualId()); ps.setLong(11, getAppearanceTime()); ps.setInt(12, getObjectId()); ps.executeUpdate(); @@ -2262,7 +2262,7 @@ public final class L2ItemInstance extends L2Object } } - public int getAppearanceId() + public int getVisualId() { return _appearanceId; } diff --git a/trunk/java/com/l2jserver/gameserver/model/primeshop/PrimeShopGroup.java b/trunk/java/com/l2jserver/gameserver/model/primeshop/PrimeShopGroup.java new file mode 100644 index 0000000000..7c25e12998 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/model/primeshop/PrimeShopGroup.java @@ -0,0 +1,205 @@ +/* + * 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.primeshop; + +import java.util.List; + +import com.l2jserver.gameserver.model.StatsSet; + +/** + * @author UnAfraid + */ +public class PrimeShopGroup +{ + private final int _brId; + private final int _category; + private final int _paymentType; + private final int _price; + private final int _panelType; + private final int _recommended; + private final int _start; + private final int _end; + private final int _daysOfWeek; + private final int _startHour; + private final int _startMinute; + private final int _stopHour; + private final int _stopMinute; + private final int _stock; + private final int _maxStock; + private final int _salePercent; + private final int _minLevel; + private final int _maxLevel; + private final int _minBirthday; + private final int _maxBirthday; + private final int _restrictionDay; + private final int _availableCount; + private final List _items; + + public PrimeShopGroup(StatsSet set, List items) + { + _brId = set.getInt("id"); + _category = set.getInt("cat", 0); + _paymentType = set.getInt("paymentType", 0); + _price = set.getInt("price"); + _panelType = set.getInt("panelType", 0); + _recommended = set.getInt("recommended", 0); + _start = set.getInt("startSale", 0); + _end = set.getInt("endSale", 0); + _daysOfWeek = set.getInt("daysOfWeek", 127); + _startHour = set.getInt("startHour", 0); + _startMinute = set.getInt("startMinute", 0); + _stopHour = set.getInt("stopHour", 0); + _stopMinute = set.getInt("stopMinute", 0); + _stock = set.getInt("stock", 0); + _maxStock = set.getInt("maxStock", -1); + _salePercent = set.getInt("salePercent", 0); + _minLevel = set.getInt("minLevel", 0); + _maxLevel = set.getInt("maxLevel", 0); + _minBirthday = set.getInt("minBirthday", 0); + _maxBirthday = set.getInt("maxBirthday", 0); + _restrictionDay = set.getInt("restrictionDay", 0); + _availableCount = set.getInt("availableCount", 0); + _items = items; + } + + public int getBrId() + { + return _brId; + } + + public int getCat() + { + return _category; + } + + public int getPaymentType() + { + return _paymentType; + } + + public int getPrice() + { + return _price; + } + + public long getCount() + { + return _items.stream().mapToLong(PrimeShopItem::getCount).sum(); + } + + public int getWeight() + { + return _items.stream().mapToInt(PrimeShopItem::getWeight).sum(); + } + + public int getPanelType() + { + return _panelType; + } + + public int getRecommended() + { + return _recommended; + } + + public int getStartSale() + { + return _start; + } + + public int getEndSale() + { + return _end; + } + + public int getDaysOfWeek() + { + return _daysOfWeek; + } + + public int getStartHour() + { + return _startHour; + } + + public int getStartMinute() + { + return _startMinute; + } + + public int getStopHour() + { + return _stopHour; + } + + public int getStopMinute() + { + return _stopMinute; + } + + public int getStock() + { + return _stock; + } + + public int getTotal() + { + return _maxStock; + } + + public int getSalePercent() + { + return _salePercent; + } + + public int getMinLevel() + { + return _minLevel; + } + + public int getMaxLevel() + { + return _maxLevel; + } + + public int getMinBirthday() + { + return _minBirthday; + } + + public int getMaxBirthday() + { + return _maxBirthday; + } + + public int getRestrictionDay() + { + return _restrictionDay; + } + + public int getAvailableCount() + { + return _availableCount; + } + + public List getItems() + { + return _items; + } +} diff --git a/trunk/java/com/l2jserver/gameserver/model/primeshop/PrimeShopItem.java b/trunk/java/com/l2jserver/gameserver/model/primeshop/PrimeShopItem.java new file mode 100644 index 0000000000..9f0c4d171b --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/model/primeshop/PrimeShopItem.java @@ -0,0 +1,48 @@ +/* + * 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.primeshop; + +import com.l2jserver.gameserver.model.holders.ItemHolder; + +/** + * @author UnAfraid + */ + +public class PrimeShopItem extends ItemHolder +{ + private final int _weight; + private final int _isTradable; + + public PrimeShopItem(int itemId, int count, int weight, int isTradable) + { + super(itemId, count); + _weight = weight; + _isTradable = isTradable; + } + + public int getWeight() + { + return _weight; + } + + public int isTradable() + { + return _isTradable; + } +} diff --git a/trunk/java/com/l2jserver/gameserver/model/variables/AbstractVariables.java b/trunk/java/com/l2jserver/gameserver/model/variables/AbstractVariables.java index ac134d8ea5..6d1e96804e 100644 --- a/trunk/java/com/l2jserver/gameserver/model/variables/AbstractVariables.java +++ b/trunk/java/com/l2jserver/gameserver/model/variables/AbstractVariables.java @@ -23,13 +23,14 @@ import java.util.concurrent.atomic.AtomicBoolean; import javolution.util.FastMap; import com.l2jserver.gameserver.model.StatsSet; +import com.l2jserver.gameserver.model.interfaces.IDeletable; import com.l2jserver.gameserver.model.interfaces.IRestorable; import com.l2jserver.gameserver.model.interfaces.IStorable; /** * @author UnAfraid */ -public abstract class AbstractVariables extends StatsSet implements IRestorable, IStorable +public abstract class AbstractVariables extends StatsSet implements IRestorable, IStorable, IDeletable { private final AtomicBoolean _hasChanges = new AtomicBoolean(false); @@ -84,6 +85,21 @@ public abstract class AbstractVariables extends StatsSet implements IRestorable, super.set(name, value); } + /** + * Put's entry to the variables and marks as changed if required (Useful when restoring to do not save them again). + * @param name + * @param value + * @param markAsChanged + */ + public final void set(String name, String value, boolean markAsChanged) + { + if (markAsChanged) + { + _hasChanges.compareAndSet(false, true); + } + super.set(name, value); + } + /** * Return true if there exists a record for the variable name. * @param name diff --git a/trunk/java/com/l2jserver/gameserver/model/variables/AccountVariables.java b/trunk/java/com/l2jserver/gameserver/model/variables/AccountVariables.java index c15f731a88..500fc5bcde 100644 --- a/trunk/java/com/l2jserver/gameserver/model/variables/AccountVariables.java +++ b/trunk/java/com/l2jserver/gameserver/model/variables/AccountVariables.java @@ -118,4 +118,27 @@ public class AccountVariables extends AbstractVariables } return true; } + + @Override + public boolean deleteMe() + { + try (Connection con = L2DatabaseFactory.getInstance().getConnection()) + { + // Clear previous entries. + try (PreparedStatement st = con.prepareStatement(DELETE_QUERY)) + { + st.setString(1, _accountName); + st.execute(); + } + + // Clear all entries + getSet().clear(); + } + catch (Exception e) + { + _log.log(Level.WARNING, getClass().getSimpleName() + ": Couldn't delete variables for: " + _accountName, e); + return false; + } + return true; + } } diff --git a/trunk/java/com/l2jserver/gameserver/model/variables/NpcVariables.java b/trunk/java/com/l2jserver/gameserver/model/variables/NpcVariables.java index c9f37aa9ff..81f193da6a 100644 --- a/trunk/java/com/l2jserver/gameserver/model/variables/NpcVariables.java +++ b/trunk/java/com/l2jserver/gameserver/model/variables/NpcVariables.java @@ -44,4 +44,10 @@ public class NpcVariables extends AbstractVariables { return true; } + + @Override + public boolean deleteMe() + { + return true; + } } \ No newline at end of file diff --git a/trunk/java/com/l2jserver/gameserver/model/variables/PlayerVariables.java b/trunk/java/com/l2jserver/gameserver/model/variables/PlayerVariables.java index 3759f6fe34..a12869a266 100644 --- a/trunk/java/com/l2jserver/gameserver/model/variables/PlayerVariables.java +++ b/trunk/java/com/l2jserver/gameserver/model/variables/PlayerVariables.java @@ -121,6 +121,29 @@ public class PlayerVariables extends AbstractVariables return true; } + @Override + public boolean deleteMe() + { + try (Connection con = L2DatabaseFactory.getInstance().getConnection()) + { + // Clear previous entries. + try (PreparedStatement st = con.prepareStatement(DELETE_QUERY)) + { + st.setInt(1, _objectId); + st.execute(); + } + + // Clear all entries + getSet().clear(); + } + catch (Exception e) + { + _log.log(Level.WARNING, getClass().getSimpleName() + ": Couldn't delete variables for: " + getPlayer(), e); + return false; + } + return true; + } + public L2PcInstance getPlayer() { return L2World.getInstance().getPlayer(_objectId); diff --git a/trunk/java/com/l2jserver/gameserver/network/L2GameClient.java b/trunk/java/com/l2jserver/gameserver/network/L2GameClient.java index fba96218c8..568baa8b34 100644 --- a/trunk/java/com/l2jserver/gameserver/network/L2GameClient.java +++ b/trunk/java/com/l2jserver/gameserver/network/L2GameClient.java @@ -276,6 +276,7 @@ public final class L2GameClient extends MMOClient> i { return; } + getConnection().sendPacket(gsp); gsp.runImpl(); } diff --git a/trunk/java/com/l2jserver/gameserver/network/L2GamePacketHandler.java b/trunk/java/com/l2jserver/gameserver/network/L2GamePacketHandler.java index 9b67d0f8a5..da49d8e663 100644 --- a/trunk/java/com/l2jserver/gameserver/network/L2GamePacketHandler.java +++ b/trunk/java/com/l2jserver/gameserver/network/L2GamePacketHandler.java @@ -50,6 +50,11 @@ import com.l2jserver.gameserver.network.clientpackets.mentoring.RequestMenteeAdd import com.l2jserver.gameserver.network.clientpackets.mentoring.RequestMenteeWaitingList; import com.l2jserver.gameserver.network.clientpackets.mentoring.RequestMentorCancel; import com.l2jserver.gameserver.network.clientpackets.mentoring.RequestMentorList; +import com.l2jserver.gameserver.network.clientpackets.primeshop.RequestBRBuyProduct; +import com.l2jserver.gameserver.network.clientpackets.primeshop.RequestBRGamePoint; +import com.l2jserver.gameserver.network.clientpackets.primeshop.RequestBRProductInfo; +import com.l2jserver.gameserver.network.clientpackets.primeshop.RequestBRProductList; +import com.l2jserver.gameserver.network.clientpackets.primeshop.RequestBRRecentProductList; import com.l2jserver.gameserver.network.clientpackets.shuttle.CannotMoveAnymoreInShuttle; import com.l2jserver.gameserver.network.clientpackets.shuttle.MoveToLocationInShuttle; import com.l2jserver.gameserver.network.clientpackets.shuttle.RequestShuttleGetOff; @@ -1276,19 +1281,19 @@ public final class L2GamePacketHandler implements IPacketHandler, msg = new RequestExOlympiadMatchListRefresh(); // RequestOlympiadMatchList break; case 0x86: - // msg = new RequestBRGamePoint(); + msg = new RequestBRGamePoint(); break; case 0x87: - // msg = new RequestBRProductList(); + msg = new RequestBRProductList(); break; case 0x88: - // msg = new RequestBRProductInfo(); + msg = new RequestBRProductInfo(); break; case 0x89: - // msg = new RequestBRBuyProduct(); + msg = new RequestBRBuyProduct(); break; case 0x8A: - // msg = new RequestBRRecentProductList(); + msg = new RequestBRRecentProductList(); break; case 0x8B: // @ msg = new RequestBR_MiniGameLoadScores(); diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/Logout.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/Logout.java index fb2c2fabd3..06bc157ff6 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/Logout.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/Logout.java @@ -56,10 +56,6 @@ public final class Logout extends L2GameClientPacket if ((player.getActiveEnchantItemId() != L2PcInstance.ID_NONE) || (player.getActiveEnchantAttrItemId() != L2PcInstance.ID_NONE)) { - if (Config.DEBUG) - { - _log.fine("Player " + player.getName() + " tried to logout while enchanting."); - } player.sendPacket(ActionFailed.STATIC_PACKET); return; } @@ -86,11 +82,6 @@ public final class Logout extends L2GameClientPacket return; } - if (Config.DEBUG) - { - _log.fine("Player " + player.getName() + " tried to logout while fighting."); - } - player.sendPacket(SystemMessageId.YOU_CANNOT_EXIT_THE_GAME_WHILE_IN_COMBAT); player.sendPacket(ActionFailed.STATIC_PACKET); return; diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestGetItemFromPet.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestGetItemFromPet.java index 5f5bf4b6f2..d32c47053c 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestGetItemFromPet.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestGetItemFromPet.java @@ -60,12 +60,12 @@ public final class RequestGetItemFromPet extends L2GameClientPacket return; } - final L2PetInstance pet = (L2PetInstance) player.getPet(); if (player.getActiveEnchantItemId() != L2PcInstance.ID_NONE) { return; } + final L2PetInstance pet = (L2PetInstance) player.getPet(); final L2ItemInstance item = pet.getInventory().getItemByObjectId(_objectId); if (item == null) { diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestJoinParty.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestJoinParty.java index c434f25f47..349c2c963a 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestJoinParty.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/RequestJoinParty.java @@ -18,7 +18,6 @@ */ package com.l2jserver.gameserver.network.clientpackets; -import com.l2jserver.Config; import com.l2jserver.gameserver.enums.PartyDistributionType; import com.l2jserver.gameserver.model.BlockList; import com.l2jserver.gameserver.model.L2Party; @@ -179,23 +178,12 @@ public final class RequestJoinParty extends L2GameClientPacket // in case a leader change has happened, use party's mode target.sendPacket(new AskJoinParty(requestor.getName(), party.getDistributionType())); party.setPendingInvitation(true); - - if (Config.DEBUG) - { - _log.fine("sent out a party invitation to:" + target.getName()); - } - } else { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_ON_ANOTHER_TASK_PLEASE_TRY_AGAIN_LATER); sm.addString(target.getName()); requestor.sendPacket(sm); - - if (Config.DEBUG) - { - _log.warning(requestor.getName() + " already received a party invitation"); - } } } @@ -218,21 +206,10 @@ public final class RequestJoinParty extends L2GameClientPacket requestor.onTransactionRequest(target); target.sendPacket(new AskJoinParty(requestor.getName(), partyDistributionType)); requestor.getParty().setPendingInvitation(true); - - if (Config.DEBUG) - { - _log.fine("sent out a party invitation to:" + target.getName()); - } - } else { requestor.sendPacket(SystemMessageId.WAITING_FOR_ANOTHER_REPLY); - - if (Config.DEBUG) - { - _log.warning(requestor.getName() + " already received a party invitation"); - } } } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/SetPrivateStoreListBuy.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/SetPrivateStoreListBuy.java index 7f9ab87b08..faa693dc2a 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/SetPrivateStoreListBuy.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/SetPrivateStoreListBuy.java @@ -84,7 +84,7 @@ public final class SetPrivateStoreListBuy extends L2GameClientPacket boolean canUse = false; for (L2ItemInstance item : player.getInventory().getItemsByItemId(itemId)) { - if ((enchantLevel == item.getEnchantLevel()) && (attackAttribute == item.getAttackElementType()) && (attackAttributeValue == item.getAttackElementPower()) && (appearanceId == item.getAppearanceId()) && (item.getElementDefAttr((byte) 0) == defenseAttributes[0]) && (item.getElementDefAttr((byte) 1) == defenseAttributes[1]) && (item.getElementDefAttr((byte) 2) == defenseAttributes[2]) && (item.getElementDefAttr((byte) 3) == defenseAttributes[3]) && (item.getElementDefAttr((byte) 4) == defenseAttributes[4]) && (item.getElementDefAttr((byte) 5) == defenseAttributes[5])) + if ((enchantLevel == item.getEnchantLevel()) && (attackAttribute == item.getAttackElementType()) && (attackAttributeValue == item.getAttackElementPower()) && (appearanceId == item.getVisualId()) && (item.getElementDefAttr((byte) 0) == defenseAttributes[0]) && (item.getElementDefAttr((byte) 1) == defenseAttributes[1]) && (item.getElementDefAttr((byte) 2) == defenseAttributes[2]) && (item.getElementDefAttr((byte) 3) == defenseAttributes[3]) && (item.getElementDefAttr((byte) 4) == defenseAttributes[4]) && (item.getElementDefAttr((byte) 5) == defenseAttributes[5])) { canUse = true; break; diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/itemappearance/RequestExTryToPut_Shape_Shifting_TargetItem.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/itemappearance/RequestExTryToPut_Shape_Shifting_TargetItem.java index ae4f9a9315..177f3e5313 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/itemappearance/RequestExTryToPut_Shape_Shifting_TargetItem.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/itemappearance/RequestExTryToPut_Shape_Shifting_TargetItem.java @@ -60,7 +60,7 @@ public final class RequestExTryToPut_Shape_Shifting_TargetItem extends L2GameCli player.sendPacket(new ExPut_Shape_Shifting_Extraction_Item_Result(0)); return; } - final boolean isSameType = ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.Armor) && item.isArmor()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.Weapon) && item.isWeapon()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.Accessory) && item.isArmor()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.All)); + final boolean isSameType = ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.ARMOR) && item.isArmor()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.WEAPON) && item.isWeapon()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.ACCESSORY) && item.isArmor()) || ((stone.getEtcItem().getAppearanceStone().getItemType() == AppearanceItemType.ALL)); if (!isSameType) { player.sendPacket(new ExPut_Shape_Shifting_Extraction_Item_Result(0)); diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/itemappearance/RequestShape_Shifting_Item.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/itemappearance/RequestShape_Shifting_Item.java index 081f11caf6..b394979ea8 100644 --- a/trunk/java/com/l2jserver/gameserver/network/clientpackets/itemappearance/RequestShape_Shifting_Item.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/itemappearance/RequestShape_Shifting_Item.java @@ -49,7 +49,7 @@ public final class RequestShape_Shifting_Item extends L2GameClientPacket final L2ItemInstance stone = player.getUsingAppearanceStone(); final L2ItemInstance item = player.getAppearanceItem(); final L2ItemInstance targetItem = player.getTargetAppearanceItem(); - final boolean needTargetItem = (stone != null) && (stone.getEtcItem().getAppearanceStone() != null) && (stone.getEtcItem().getAppearanceStone().getType().equals(StoneType.Blessed) || stone.getEtcItem().getAppearanceStone().getType().equals(StoneType.Normal)) ? true : false; + final boolean needTargetItem = (stone != null) && (stone.getEtcItem().getAppearanceStone() != null) && (stone.getEtcItem().getAppearanceStone().getType().equals(StoneType.BLESSED) || stone.getEtcItem().getAppearanceStone().getType().equals(StoneType.NORMAL)) ? true : false; player.setUsingAppearanceStone(null); player.setAppearanceItem(null); player.setTargetAppearanceItem(null); @@ -72,14 +72,14 @@ public final class RequestShape_Shifting_Item extends L2GameClientPacket int time = -1; switch (st.getType()) { - case Normal: + case NORMAL: targetItemId = targetItem.getId(); player.destroyItem("AppearanceStone", targetItem, null, true); break; - case Blessed: + case BLESSED: targetItemId = targetItem.getId(); break; - case Fixed: + case FIXED: targetItemId = st.getTargetItem(); time = (int) st.getTimeForAppearance(); break; diff --git a/trunk/java/com/l2jserver/commons/geodriver/blocks/AbstractBlock.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java similarity index 50% rename from trunk/java/com/l2jserver/commons/geodriver/blocks/AbstractBlock.java rename to trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java index 322dd515aa..59ea6cd48c 100644 --- a/trunk/java/com/l2jserver/commons/geodriver/blocks/AbstractBlock.java +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRBuyProduct.java @@ -16,39 +16,40 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package com.l2jserver.commons.geodriver.blocks; +package com.l2jserver.gameserver.network.clientpackets.primeshop; -import com.l2jserver.commons.geodriver.IBlock; +import com.l2jserver.gameserver.data.xml.impl.PrimeShopData; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; /** - * @author HorridoJoho + * @author Gnacik, UnAfraid */ -public abstract class AbstractBlock implements IBlock +public final class RequestBRBuyProduct extends L2GameClientPacket { - private int limitZ(int z, int newZ, int deltaLimit) + private int _brId; + private int _count; + + @Override + protected void readImpl() { - if (Math.abs(z - newZ) > deltaLimit) + _brId = readD(); + _count = readD(); + } + + @Override + protected void runImpl() + { + final L2PcInstance player = getClient().getActiveChar(); + if (player != null) { - return z; + PrimeShopData.getInstance().buyItem(player, _brId, _count); } - return newZ; } @Override - public int getNearestZ(int geoX, int geoY, int worldZ, int zDeltaLimit) + public String getType() { - return limitZ(worldZ, getNearestZ(geoX, geoY, worldZ), zDeltaLimit); - } - - @Override - public int getNextLowerZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return limitZ(worldZ, getNextLowerZ(geoX, geoY, worldZ), zDeltaLimit); - } - - @Override - public int getNextHigherZ(int geoX, int geoY, int worldZ, int zDeltaLimit) - { - return limitZ(worldZ, getNextHigherZ(geoX, geoY, worldZ), zDeltaLimit); + return getClass().getSimpleName(); } } diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRGamePoint.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRGamePoint.java new file mode 100644 index 0000000000..0eeffc3701 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRGamePoint.java @@ -0,0 +1,51 @@ +/* + * 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.primeshop; + +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.primeshop.ExBRGamePoint; + +/** + * @author Gnacik, UnAfraid + */ +public final class RequestBRGamePoint extends L2GameClientPacket +{ + @Override + protected void readImpl() + { + // There is nothing to read. + } + + @Override + protected void runImpl() + { + L2PcInstance player = getClient().getActiveChar(); + if (player != null) + { + player.sendPacket(new ExBRGamePoint(player)); + } + } + + @Override + public String getType() + { + return getClass().getSimpleName(); + } +} \ No newline at end of file diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRProductInfo.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRProductInfo.java new file mode 100644 index 0000000000..359b36e787 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRProductInfo.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.clientpackets.primeshop; + +import com.l2jserver.gameserver.data.xml.impl.PrimeShopData; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; + +/** + * @author Gnacik, UnAfraid + */ +public final class RequestBRProductInfo extends L2GameClientPacket +{ + private int _brId; + + @Override + protected void readImpl() + { + _brId = readD(); + } + + @Override + protected void runImpl() + { + L2PcInstance player = getClient().getActiveChar(); + if (player != null) + { + PrimeShopData.getInstance().showProductInfo(player, _brId); + } + } + + @Override + public String getType() + { + return getClass().getSimpleName(); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRProductList.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRProductList.java new file mode 100644 index 0000000000..d735ad6f68 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRProductList.java @@ -0,0 +1,77 @@ +/* + * 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.primeshop; + +import java.util.logging.Level; + +import com.l2jserver.gameserver.data.xml.impl.PrimeShopData; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; +import com.l2jserver.gameserver.network.serverpackets.primeshop.ExBRProductList; + +/** + * @author Gnacik, UnAfraid + */ +public final class RequestBRProductList extends L2GameClientPacket +{ + private int _type; + + @Override + protected void readImpl() + { + _type = readD(); + } + + @Override + protected void runImpl() + { + final L2PcInstance player = getClient().getActiveChar(); + if (player != null) + { + + switch (_type) + { + case 0: // Home page + { + player.sendPacket(new ExBRProductList(player, 0, PrimeShopData.getInstance().getPrimeItems().values())); + break; + } + case 1: // History + { + break; + } + case 2: // Favorites + { + break; + } + default: + { + _log.log(Level.WARNING, player + " send unhandled product list type: " + _type); + break; + } + } + } + } + + @Override + public String getType() + { + return getClass().getSimpleName(); + } +} \ No newline at end of file diff --git a/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRRecentProductList.java b/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRRecentProductList.java new file mode 100644 index 0000000000..f3395bd072 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/clientpackets/primeshop/RequestBRRecentProductList.java @@ -0,0 +1,46 @@ +/* + * 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.primeshop; + +import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket; + +/** + * @author Gnacik, UnAfraid + */ +public final class RequestBRRecentProductList extends L2GameClientPacket +{ + @Override + protected void readImpl() + { + // Nothing to read + } + + @Override + protected void runImpl() + { + // L2PcInstance player = getClient().getActiveChar(); + // TODO: Implement it. + } + + @Override + public String getType() + { + return getClass().getSimpleName(); + } +} \ No newline at end of file diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/AbstractItemPacket.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/AbstractItemPacket.java index cdffda925b..36ecdfff39 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/AbstractItemPacket.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/AbstractItemPacket.java @@ -71,8 +71,6 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket 0) + if (item.getVisualId() > 0) { mask |= ItemListType.VISUAL_ID.getMask(); } - return mask; } diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/CharInfo.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/CharInfo.java index f923355989..e6d8d292d9 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/CharInfo.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/CharInfo.java @@ -145,15 +145,10 @@ public class CharInfo extends L2GameServerPacket writeC(_armorEnchant); - writeD(0x00); // rhand item visual id - writeD(0x00); // lhand item visual id - writeD(0x00); // lrhand item visual id - writeD(0x00); // gloves item visual id - writeD(0x00); // chest item visual id - writeD(0x00); // legs item visual id - writeD(0x00); // feet item visual id - writeD(0x00); // hair item visual id - writeD(0x00); // hair 2 item visual id + for (int slot : getPaperdollOrderVisualId()) + { + writeD(_activeChar.getInventory().getPaperdollItemVisualId(slot)); + } writeC(_activeChar.getPvpFlag()); writeD(_activeChar.getKarma()); diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/ExUserInfoEquipSlot.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/ExUserInfoEquipSlot.java index 56781395cc..d916a379a9 100644 --- a/trunk/java/com/l2jserver/gameserver/network/serverpackets/ExUserInfoEquipSlot.java +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/ExUserInfoEquipSlot.java @@ -83,7 +83,7 @@ public class ExUserInfoEquipSlot extends AbstractMaskPacket writeD(inventory.getPaperdollObjectId(slot.getSlot())); writeD(inventory.getPaperdollItemId(slot.getSlot())); writeD(inventory.getPaperdollAugmentationId(slot.getSlot())); - writeD(inventory.getPaperdollVisualId(slot.getSlot())); + writeD(inventory.getPaperdollItemVisualId(slot.getSlot())); } } } diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRBuyProduct.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRBuyProduct.java new file mode 100644 index 0000000000..d8227cc0af --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRBuyProduct.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.serverpackets.primeshop; + +import com.l2jserver.gameserver.model.interfaces.IIdentifiable; +import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; + +/** + * @author Gnacik, UnAfraid + */ +public class ExBRBuyProduct extends L2GameServerPacket +{ + public enum ExBrProductReplyType implements IIdentifiable + { + SUCCESS(1), + LACK_OF_POINT(-1), + INVALID_PRODUCT(-2), + USER_CANCEL(-3), + INVENTROY_OVERFLOW(-4), + CLOSED_PRODUCT(-5), + SERVER_ERROR(-6), + BEFORE_SALE_DATE(-7), + AFTER_SALE_DATE(-8), + INVALID_USER(-9), + INVALID_ITEM(-10), + INVALID_USER_STATE(-11), + NOT_DAY_OF_WEEK(-12), + NOT_TIME_OF_DAY(-13), + SOLD_OUT(-14); + private final int _id; + + private ExBrProductReplyType(int id) + { + _id = id; + } + + @Override + public int getId() + { + return _id; + } + } + + private final int _reply; + + public ExBRBuyProduct(final ExBrProductReplyType type) + { + _reply = type.getId(); + } + + @Override + protected final void writeImpl() + { + writeC(0xFE); + writeH(0xD9); + writeD(_reply); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRGamePoint.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRGamePoint.java new file mode 100644 index 0000000000..663b25e89e --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRGamePoint.java @@ -0,0 +1,47 @@ +/* + * 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.primeshop; + +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; + +/** + * @author Gnacik, UnAfraid + */ +public class ExBRGamePoint extends L2GameServerPacket +{ + private final int _charId; + private final int _charPoints; + + public ExBRGamePoint(final L2PcInstance player) + { + _charId = player.getObjectId(); + _charPoints = player.getPrimePoints(); + } + + @Override + protected final void writeImpl() + { + writeC(0xFE); + writeH(0xD6); + writeD(_charId); + writeQ(_charPoints); + writeD(0x00); + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRProductInfo.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRProductInfo.java new file mode 100644 index 0000000000..15a7a729b6 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRProductInfo.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.primeshop; + +import com.l2jserver.gameserver.model.primeshop.PrimeShopGroup; +import com.l2jserver.gameserver.model.primeshop.PrimeShopItem; +import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; + +/** + * @author Gnacik + */ +public class ExBRProductInfo extends L2GameServerPacket +{ + private final PrimeShopGroup _item; + + public ExBRProductInfo(PrimeShopGroup item) + { + _item = item; + } + + @Override + protected final void writeImpl() + { + writeC(0xFE); + writeH(0xD8); + writeD(_item.getBrId()); + writeD(_item.getPrice()); + writeD(_item.getItems().size()); + for (PrimeShopItem item : _item.getItems()) + { + writeD(item.getId()); + writeD((int) item.getCount()); + writeD(item.getWeight()); + writeD(item.isTradable()); + } + } +} diff --git a/trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRProductList.java b/trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRProductList.java new file mode 100644 index 0000000000..08b8431c73 --- /dev/null +++ b/trunk/java/com/l2jserver/gameserver/network/serverpackets/primeshop/ExBRProductList.java @@ -0,0 +1,87 @@ +/* + * 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.primeshop; + +import java.util.Collection; + +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.primeshop.PrimeShopGroup; +import com.l2jserver.gameserver.model.primeshop.PrimeShopItem; +import com.l2jserver.gameserver.network.serverpackets.L2GameServerPacket; + +/** + * @author UnAfraid + */ +public class ExBRProductList extends L2GameServerPacket +{ + private final L2PcInstance _activeChar; + private final int _type; + private final Collection _primeList; + + public ExBRProductList(L2PcInstance activeChar, int type, Collection items) + { + _activeChar = activeChar; + _type = type; + _primeList = items; + } + + @Override + protected final void writeImpl() + { + writeC(0xFE); + writeH(0xD7); + writeQ(_activeChar.getAdena()); // Adena + writeQ(0x00); // Hero coins + writeC(_type); // Type 0 - Home, 1 - History, 2 - Favorites + writeD(_primeList.size()); + for (PrimeShopGroup brItem : _primeList) + { + writeD(brItem.getBrId()); + writeC(brItem.getCat()); + writeC(brItem.getPaymentType()); // Payment Type: 0 - Prime Points, 1 - Adena, 2 - Hero Coins + writeD(brItem.getPrice()); + writeC(brItem.getPanelType()); // Item Panel Type: 0 - None, 1 - Event, 2 - Sale, 3 - New, 4 - Best + writeD(brItem.getRecommended()); // Recommended: (bit flags) 1 - Top, 2 - Left, 4 - Right + writeD(brItem.getStartSale()); + writeD(brItem.getEndSale()); + writeC(brItem.getDaysOfWeek()); + writeC(brItem.getStartHour()); + writeC(brItem.getStartMinute()); + writeC(brItem.getStopHour()); + writeC(brItem.getStopMinute()); + writeD(brItem.getStock()); + writeD(brItem.getTotal()); + writeC(brItem.getSalePercent()); + writeC(brItem.getMinLevel()); + writeC(brItem.getMaxLevel()); + writeD(brItem.getMinBirthday()); + writeD(brItem.getMaxBirthday()); + writeD(brItem.getRestrictionDay()); + writeD(brItem.getAvailableCount()); + writeC(brItem.getItems().size()); + for (PrimeShopItem item : brItem.getItems()) + { + writeD(item.getId()); + writeD((int) item.getCount()); + writeD(item.getWeight()); + writeD(item.isTradable()); + } + } + } +} \ No newline at end of file diff --git a/trunk/java/com/l2jserver/gameserver/util/GeoUtils.java b/trunk/java/com/l2jserver/gameserver/util/GeoUtils.java index 444943315e..c91d5c8f8f 100644 --- a/trunk/java/com/l2jserver/gameserver/util/GeoUtils.java +++ b/trunk/java/com/l2jserver/gameserver/util/GeoUtils.java @@ -95,7 +95,7 @@ public final class GeoUtils private static Color getDirectionColor(int x, int y, int z, int nswe) { - if (GeoData.getInstance().checkNearestNswe(x, y, z, nswe, 100)) + if (GeoData.getInstance().checkNearestNswe(x, y, z, nswe)) { return Color.GREEN; } diff --git a/trunk/java/com/l2jserver/gameserver/util/Util.java b/trunk/java/com/l2jserver/gameserver/util/Util.java index b0b31dc1d6..9c205402a1 100644 --- a/trunk/java/com/l2jserver/gameserver/util/Util.java +++ b/trunk/java/com/l2jserver/gameserver/util/Util.java @@ -28,6 +28,7 @@ import java.util.Collection; import java.util.Date; import java.util.List; import java.util.Locale; +import java.util.StringTokenizer; import java.util.logging.Logger; import javolution.text.TextBuilder; @@ -1032,4 +1033,17 @@ public final class Util } return false; } + + public static int parseNextInt(StringTokenizer st, int defaultVal) + { + try + { + String value = st.nextToken().trim(); + return Integer.parseInt(value); + } + catch (Exception e) + { + return defaultVal; + } + } }