SHOW:
|
|
- or go back to the newest paste.
1 | ### Eclipse Workspace Patch 1.0 | |
2 | #P L2jFrozen_GameServer | |
3 | Index: head-src/com/l2jfrozen/Config.java | |
4 | =================================================================== | |
5 | --- head-src/com/l2jfrozen/Config.java (revision 1004) | |
6 | +++ head-src/com/l2jfrozen/Config.java (working copy) | |
7 | @@ -594,6 +594,9 @@ | |
8 | public static int RESPAWN_RANDOM_MAX_OFFSET; | |
9 | public static int MAX_PVTSTORE_SLOTS_DWARF; | |
10 | public static int MAX_PVTSTORE_SLOTS_OTHER; | |
11 | + public static int MIN_PVP_TO_USE_STORE; | |
12 | + public static int MIN_PK_TO_USE_STORE; | |
13 | + | |
14 | public static boolean PETITIONING_ALLOWED; | |
15 | public static int MAX_PETITIONS_PER_PLAYER; | |
16 | public static int MAX_PETITIONS_PENDING; | |
17 | @@ -785,6 +788,10 @@ | |
18 | MAX_PVTSTORE_SLOTS_DWARF = Integer.parseInt(otherSettings.getProperty("MaxPvtStoreSlotsDwarf", "5")); | |
19 | MAX_PVTSTORE_SLOTS_OTHER = Integer.parseInt(otherSettings.getProperty("MaxPvtStoreSlotsOther", "4")); | |
20 | ||
21 | + /* Minimum PvPs and PKs needed to open a private store */ | |
22 | + MIN_PVP_TO_USE_STORE = Integer.parseInt(otherSettings.getProperty("PvPToUseStore", "0")); | |
23 | + MIN_PK_TO_USE_STORE = Integer.parseInt(otherSettings.getProperty("PkToUseStore", "0")); | |
24 | + | |
25 | STORE_SKILL_COOLTIME = Boolean.parseBoolean(otherSettings.getProperty("StoreSkillCooltime", "true")); | |
26 | ||
27 | PET_RENT_NPC = otherSettings.getProperty("ListPetRentNpc", "30827"); | |
28 | Index: config/head/other.properties | |
29 | =================================================================== | |
30 | --- config/head/other.properties (revision 1004) | |
31 | +++ config/head/other.properties (working copy) | |
32 | @@ -118,6 +118,11 @@ | |
33 | MaxPvtStoreSlotsDwarf = 5 | |
34 | MaxPvtStoreSlotsOther = 4 | |
35 | ||
36 | +# Minimum PvPs and PKs needed to open a private store | |
37 | +# Default: 0 | |
38 | +PvPToUseStore = 0 | |
39 | +PkToUseStore = 0 | |
40 | + | |
41 | # Keep the effects buffs and debuff when you exit the game | |
42 | StoreSkillCooltime = True | |
43 | ||
44 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/SetPrivateStoreListSell.java | |
45 | =================================================================== | |
46 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/SetPrivateStoreListSell.java (revision 1004) | |
47 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/SetPrivateStoreListSell.java (working copy) | |
48 | @@ -75,6 +75,24 @@ | |
49 | L2PcInstance player = getClient().getActiveChar(); | |
50 | if (player == null) | |
51 | return; | |
52 | + | |
53 | + if(Config.MIN_PVP_TO_USE_STORE != 0 || Config.MIN_PK_TO_USE_STORE != 0) | |
54 | + { | |
55 | + if(player.getPvpKills() <= Config.MIN_PVP_TO_USE_STORE) | |
56 | + { | |
57 | + player.sendMessage("You must have at least " + Config.MIN_PVP_TO_USE_STORE + " pvp kills in order to open private store."); | |
58 | + player.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_NONE); | |
59 | + player.broadcastUserInfo(); | |
60 | + return; | |
61 | + } | |
62 | + else if(player.getPkKills() <= Config.MIN_PK_TO_USE_STORE) | |
63 | + { | |
64 | + player.sendMessage("You must have at least " + Config.MIN_PK_TO_USE_STORE + " pk kills in order to open private store."); | |
65 | + player.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_NONE); | |
66 | + player.broadcastUserInfo(); | |
67 | + return; | |
68 | + } | |
69 | + } | |
70 | ||
71 | if (!player.getAccessLevel().allowTransaction()) | |
72 | { | |
73 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/SetPrivateStoreListBuy.java | |
74 | =================================================================== | |
75 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/SetPrivateStoreListBuy.java (revision 1004) | |
76 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/SetPrivateStoreListBuy.java (working copy) | |
77 | @@ -76,6 +76,24 @@ | |
78 | if (player == null) | |
79 | return; | |
80 | ||
81 | + if(Config.MIN_PVP_TO_USE_STORE != 0 || Config.MIN_PK_TO_USE_STORE != 0) | |
82 | + { | |
83 | + if(player.getPvpKills() <= Config.MIN_PVP_TO_USE_STORE) | |
84 | + { | |
85 | + player.sendMessage("You must have at least " + Config.MIN_PVP_TO_USE_STORE + " pvp kills in order to open private store."); | |
86 | + player.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_NONE); | |
87 | + player.broadcastUserInfo(); | |
88 | + return; | |
89 | + } | |
90 | + else if(player.getPkKills() <= Config.MIN_PK_TO_USE_STORE) | |
91 | + { | |
92 | + player.sendMessage("You must have at least " + Config.MIN_PK_TO_USE_STORE + " pk kills in order to open private store."); | |
93 | + player.setPrivateStoreType(L2PcInstance.STORE_PRIVATE_NONE); | |
94 | + player.broadcastUserInfo(); | |
95 | + return; | |
96 | + } | |
97 | + } | |
98 | + | |
99 | if (!player.getAccessLevel().allowTransaction()) | |
100 | { | |
101 | player.sendMessage("Transactions are disable for your Access Level"); |