SHOW:
|
|
- or go back to the newest paste.
1 | ### Eclipse Workspace Patch 1.0 | |
2 | #P L2jFrozen_DataPack | |
3 | Index: sql/characters.sql | |
4 | =================================================================== | |
5 | --- sql/characters.sql (revision 986) | |
6 | +++ sql/characters.sql (working copy) | |
7 | @@ -88,3 +88,6 @@ | |
8 | PRIMARY KEY (obj_Id), | |
9 | KEY `clanid` (`clanid`) | |
10 | ) ; | |
11 | + | |
12 | +ALTER TABLE `characters` ADD `pin` int(4) DEFAULT NULL; | |
13 | +ALTER TABLE `characters` ADD `pinsubmited` int(1) DEFAULT 1; | |
14 | \ No newline at end of file | |
15 | #P L2jFrozen_GameServer | |
16 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/Say2.java | |
17 | =================================================================== | |
18 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/Say2.java (revision 986) | |
19 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/Say2.java (working copy) | |
20 | @@ -143,6 +143,12 @@ | |
21 | activeChar.sendMessage("You may not chat while a chat ban is in effect."); | |
22 | return; | |
23 | } | |
24 | + | |
25 | + if (activeChar.isSubmitingPin()) | |
26 | + { | |
27 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
28 | + return; | |
29 | + } | |
30 | ||
31 | if(activeChar.isInJail() && Config.JAIL_DISABLE_CHAT) | |
32 | { | |
33 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/SendWareHouseDepositList.java | |
34 | =================================================================== | |
35 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/SendWareHouseDepositList.java (revision 986) | |
36 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/SendWareHouseDepositList.java (working copy) | |
37 | @@ -92,6 +92,12 @@ | |
38 | ||
39 | if(manager == null || !player.isInsideRadius(manager, L2NpcInstance.INTERACTION_DISTANCE, false, false)) | |
40 | return; | |
41 | + | |
42 | + if (player.isSubmitingPin()) | |
43 | + { | |
44 | + player.sendMessage("Unable to do any action while PIN is not submitted"); | |
45 | + return; | |
46 | + } | |
47 | ||
48 | if (!getClient().getFloodProtectors().getTransaction().tryPerformAction("deposit")) | |
49 | { | |
50 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestPrivateStoreSell.java | |
51 | =================================================================== | |
52 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestPrivateStoreSell.java (revision 986) | |
53 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestPrivateStoreSell.java (working copy) | |
54 | @@ -114,6 +114,12 @@ | |
55 | return; | |
56 | } | |
57 | ||
58 | + if (player.isSubmitingPin()) | |
59 | + { | |
60 | + player.sendMessage("Unable to do any action while PIN is not submitted"); | |
61 | + return; | |
62 | + } | |
63 | + | |
64 | L2Object object = L2World.getInstance().findObject(_storePlayerId); | |
65 | if (object == null || !(object instanceof L2PcInstance)) | |
66 | return; | |
67 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestFriendDel.java | |
68 | =================================================================== | |
69 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestFriendDel.java (revision 986) | |
70 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestFriendDel.java (working copy) | |
71 | @@ -75,6 +75,12 @@ | |
72 | return; | |
73 | } | |
74 | ||
75 | + if (activeChar.isSubmitingPin()) | |
76 | + { | |
77 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
78 | + return; | |
79 | + } | |
80 | + | |
81 | try | |
82 | { | |
83 | L2PcInstance friend = L2World.getInstance().getPlayer(_name); | |
84 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestDropItem.java | |
85 | =================================================================== | |
86 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestDropItem.java (revision 986) | |
87 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestDropItem.java (working copy) | |
88 | @@ -74,6 +74,12 @@ | |
89 | return; | |
90 | } | |
91 | ||
92 | + if (activeChar.isSubmitingPin()) | |
93 | + { | |
94 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
95 | + return; | |
96 | + } | |
97 | + | |
98 | // Flood protect drop to avoid packet lag | |
99 | if (!getClient().getFloodProtectors().getDropItem().tryPerformAction("drop item")) | |
100 | return; | |
101 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestStartPledgeWar.java | |
102 | =================================================================== | |
103 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestStartPledgeWar.java (revision 986) | |
104 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestStartPledgeWar.java (working copy) | |
105 | @@ -60,6 +60,12 @@ | |
106 | player.sendPacket(ActionFailed.STATIC_PACKET); | |
107 | return; | |
108 | } | |
109 | + | |
110 | + if (player.isSubmitingPin()) | |
111 | + { | |
112 | + player.sendMessage("Unable to do any action while PIN is not submitted"); | |
113 | + return; | |
114 | + } | |
115 | ||
116 | L2Clan clan = ClanTable.getInstance().getClanByName(_pledgeName); | |
117 | if(clan == null) | |
118 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestDismissAlly.java | |
119 | =================================================================== | |
120 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestDismissAlly.java (revision 986) | |
121 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestDismissAlly.java (working copy) | |
122 | @@ -37,6 +37,12 @@ | |
123 | ||
124 | if(activeChar == null) | |
125 | return; | |
126 | + | |
127 | + if (activeChar.isSubmitingPin()) | |
128 | + { | |
129 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
130 | + return; | |
131 | + } | |
132 | ||
133 | if(!activeChar.isClanLeader()) | |
134 | { | |
135 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java | |
136 | =================================================================== | |
137 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (revision 986) | |
138 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (working copy) | |
139 | @@ -23,6 +23,8 @@ | |
140 | import java.util.regex.Pattern; | |
141 | import java.util.regex.PatternSyntaxException; | |
142 | ||
143 | +import javolution.text.TextBuilder; | |
144 | + | |
145 | import com.l2jfrozen.Config; | |
146 | import com.l2jfrozen.crypt.nProtect; | |
147 | import com.l2jfrozen.crypt.nProtect.RestrictionType; | |
148 | @@ -295,6 +297,45 @@ | |
149 | if (Config.CHECK_SKILLS_ON_ENTER && !Config.ALT_GAME_SKILL_LEARN) | |
150 | if (!activeChar.isAio()) | |
151 | activeChar.checkAllowedSkills(); | |
152 | + | |
153 | + if(!activeChar.getPincheck()) | |
154 | + { | |
155 | + TextBuilder tb = new TextBuilder(); | |
156 | + NpcHtmlMessage html = new NpcHtmlMessage(1); | |
157 | + | |
158 | + tb.append("<html><head><title>Character Pin Panel</title></head>"); | |
159 | + tb.append("<body>"); | |
160 | + tb.append("<center>"); | |
161 | + tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">"); | |
162 | + tb.append("<tr>"); | |
163 | + tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>"); | |
164 | + tb.append("<td valign=\"top\"><font color=\"FF6600\">Pin Panel</font>"); | |
165 | + tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this interface to enable pin secirity.</td></tr></table></center>"); | |
166 | + tb.append("<center>"); | |
167 | + tb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center><br>"); | |
168 | + tb.append("</center>"); | |
169 | + tb.append("<table width=\"350\" cellpadding=\"5\" bgcolor=\"000000\">"); | |
170 | + tb.append("<tr>"); | |
171 | + tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"Icon.etc_old_key_i02\" width=\"32\" height=\"32\"></td>"); | |
172 | + tb.append("<td valign=\"top\">Please enter your PIN:<edit var=\"dapin\" width=80 height=15>"); | |
173 | + tb.append("<br1>info or something (can delete)</td>"); | |
174 | + tb.append("</tr>"); | |
175 | + tb.append("</table>"); | |
176 | + tb.append("<br>"); | |
177 | + tb.append("<center>"); | |
178 | + tb.append("<button value=\"Submit\" action=\"bypass -h enterpin $dapin\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\">"); | |
179 | + tb.append("</center>"); | |
180 | + tb.append("<center>"); | |
181 | + tb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center>"); | |
182 | + tb.append("<font color=\"FF6600\">By Elfocrash</font>"); | |
183 | + tb.append("</center>"); | |
184 | + tb.append("</body></html>"); | |
185 | + | |
186 | + html.setHtml(tb.toString()); | |
187 | + activeChar.sendPacket(html); | |
188 | + activeChar.setIsSubmitingPin(true); | |
189 | + activeChar.setIsImobilised(true); | |
190 | + } | |
191 | ||
192 | PetitionManager.getInstance().checkPetitionMessages(activeChar); | |
193 | ||
194 | Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java | |
195 | =================================================================== | |
196 | --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 986) | |
197 | +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy) | |
198 | @@ -457,7 +457,7 @@ | |
199 | ||
200 | /** SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,good,evil,gve_kills FROM characters WHERE obj_id=?. */ | |
201 | //private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon, in_jail, jail_timer, newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,pc_point,banchat_time,name_color,title_color,first_log,aio,aio_end FROM characters WHERE obj_id=?"; | |
202 | - private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon,punish_level,punish_timer,"+/* in_jail, jail_timer,*/ "newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,pc_point"+/*,banchat_time*/",name_color,title_color,first_log,aio,aio_end FROM characters WHERE obj_id=?"; | |
203 | + private static final String RESTORE_CHARACTER = "SELECT account_name, obj_Id, char_name, level, maxHp, curHp, maxCp, curCp, maxMp, curMp, acc, crit, evasion, mAtk, mDef, mSpd, pAtk, pDef, pSpd, runSpd, walkSpd, str, con, dex, _int, men, wit, face, hairStyle, hairColor, sex, heading, x, y, z, movement_multiplier, attack_speed_multiplier, colRad, colHeight, exp, expBeforeDeath, sp, karma, pvpkills, pkkills, clanid, maxload, race, classid, deletetime, cancraft, title, rec_have, rec_left, accesslevel, online, char_slot, lastAccess, clan_privs, wantspeace, base_class, onlinetime, isin7sdungeon,punish_level,punish_timer,"+/* in_jail, jail_timer,*/ "newbie, nobless, power_grade, subpledge, last_recom_date, lvl_joined_academy, apprentice, sponsor, varka_ketra_ally,clan_join_expiry_time,clan_create_expiry_time,death_penalty_level,pc_point"+/*,banchat_time*/",name_color,title_color,first_log,aio,aio_end,pinsubmited,pin FROM characters WHERE obj_id=?"; | |
204 | ||
205 | /** The Constant STATUS_DATA_GET. */ | |
206 | private static final String STATUS_DATA_GET = "SELECT hero, noble, donator, hero_end_date FROM characters_custom_data WHERE obj_Id = ?"; | |
207 | @@ -10180,6 +10180,8 @@ | |
208 | ||
209 | player.setHeading(rset.getInt("heading")); | |
210 | ||
211 | + player.setPincheck(rset.getInt("pinsubmited")); | |
212 | + player.setPin(rset.getInt("pin")); | |
213 | player.setKarma(rset.getInt("karma")); | |
214 | player.setPvpKills(rset.getInt("pvpkills")); | |
215 | player.setPkKills(rset.getInt("pkkills")); | |
216 | @@ -20222,4 +20224,69 @@ | |
217 | } | |
218 | sendSkillList(); | |
219 | } | |
220 | + | |
221 | + public boolean _pincheck; | |
222 | + public int _pin; | |
223 | + | |
224 | + public void setPincheck(boolean pincheck) | |
225 | + { | |
226 | + _pincheck = pincheck; | |
227 | + } | |
228 | + | |
229 | + public void setPincheck(int pincheck) | |
230 | + { | |
231 | + _pincheck = false; | |
232 | + if(pincheck == 1) | |
233 | + { | |
234 | + _pincheck = true; | |
235 | + } | |
236 | + } | |
237 | + | |
238 | + public boolean getPincheck() | |
239 | + { | |
240 | + return _pincheck; | |
241 | + } | |
242 | + | |
243 | + public void setPin(int pin) | |
244 | + { | |
245 | + _pin = pin; | |
246 | + } | |
247 | + | |
248 | + public int getPin() | |
249 | + { | |
250 | + return _pin; | |
251 | + } | |
252 | + | |
253 | + public void updatePincheck() | |
254 | + { | |
255 | + Connection con = null; | |
256 | + try | |
257 | + { | |
258 | + con = L2DatabaseFactory.getInstance().getConnection(); | |
259 | + PreparedStatement statement = con.prepareStatement("UPDATE characters SET pinsubmited=? WHERE obj_id=?"); | |
260 | + | |
261 | + int _pin; | |
262 | + if(getPincheck()) | |
263 | + { | |
264 | + _pin = 1; | |
265 | + } | |
266 | + else | |
267 | + { | |
268 | + _pin = 0; | |
269 | + } | |
270 | + statement.setInt(1, _pin); | |
271 | + statement.setInt(2, getObjectId()); | |
272 | + statement.execute(); | |
273 | + statement.close(); | |
274 | + } | |
275 | + catch(Exception e) | |
276 | + { | |
277 | + e.printStackTrace(); | |
278 | + _log.warning("could not set char first login:" + e); | |
279 | + } | |
280 | + finally | |
281 | + { | |
282 | + L2DatabaseFactory.close(con); | |
283 | + } | |
284 | + } | |
285 | } | |
286 | \ No newline at end of file | |
287 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestStopPledgeWar.java | |
288 | =================================================================== | |
289 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestStopPledgeWar.java (revision 986) | |
290 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestStopPledgeWar.java (working copy) | |
291 | @@ -45,6 +45,12 @@ | |
292 | L2Clan playerClan = player.getClan(); | |
293 | if(playerClan == null) | |
294 | return; | |
295 | + | |
296 | + if (player.isSubmitingPin()) | |
297 | + { | |
298 | + player.sendMessage("Unable to do any action while PIN is not submitted"); | |
299 | + return; | |
300 | + } | |
301 | ||
302 | L2Clan clan = ClanTable.getInstance().getClanByName(_pledgeName); | |
303 | if(clan == null) | |
304 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestSetAllyCrest.java | |
305 | =================================================================== | |
306 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestSetAllyCrest.java (revision 986) | |
307 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestSetAllyCrest.java (working copy) | |
308 | @@ -69,6 +69,12 @@ | |
309 | activeChar.sendMessage("The crest file size was too big (max 192 bytes)."); | |
310 | return; | |
311 | } | |
312 | + | |
313 | + if (activeChar.isSubmitingPin()) | |
314 | + { | |
315 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
316 | + return; | |
317 | + } | |
318 | ||
319 | if(activeChar.getAllyId() != 0) | |
320 | { | |
321 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestEnchantItem.java | |
322 | =================================================================== | |
323 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestEnchantItem.java (revision 986) | |
324 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestEnchantItem.java (working copy) | |
325 | @@ -96,6 +96,12 @@ | |
326 | activeChar.sendMessage("Your trade canceled"); | |
327 | return; | |
328 | } | |
329 | + | |
330 | + if (activeChar.isSubmitingPin()) | |
331 | + { | |
332 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
333 | + return; | |
334 | + } | |
335 | ||
336 | // Fix enchant transactions | |
337 | if(activeChar.isProcessingTransaction()) | |
338 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestDestroyItem.java | |
339 | =================================================================== | |
340 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestDestroyItem.java (revision 986) | |
341 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestDestroyItem.java (working copy) | |
342 | @@ -58,8 +58,13 @@ | |
343 | L2PcInstance activeChar = getClient().getActiveChar(); | |
344 | if(activeChar == null) | |
345 | return; | |
346 | - | |
347 | ||
348 | + if (activeChar.isSubmitingPin()) | |
349 | + { | |
350 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
351 | + return; | |
352 | + } | |
353 | + | |
354 | if(_count <= 0) | |
355 | { | |
356 | if(_count < 0) | |
357 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java | |
358 | =================================================================== | |
359 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java (revision 986) | |
360 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java (working copy) | |
361 | @@ -62,6 +62,12 @@ | |
362 | player.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_INCORRECT)); | |
363 | return; | |
364 | } | |
365 | + | |
366 | + if (player.isSubmitingPin() || ((L2PcInstance) target).isSubmitingPin()) | |
367 | + { | |
368 | + player.sendMessage("Unable to do any action while PIN is not submitted"); | |
369 | + return; | |
370 | + } | |
371 | ||
372 | L2PcInstance partner = (L2PcInstance) target; | |
373 | ||
374 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestUnEquipItem.java | |
375 | =================================================================== | |
376 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestUnEquipItem.java (revision 986) | |
377 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestUnEquipItem.java (working copy) | |
378 | @@ -63,6 +63,12 @@ | |
379 | activeChar.sendMessage("You can't unequip a CTF flag."); | |
380 | return; | |
381 | } | |
382 | + | |
383 | + if (activeChar.isSubmitingPin()) | |
384 | + { | |
385 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
386 | + return; | |
387 | + } | |
388 | ||
389 | L2ItemInstance item = activeChar.getInventory().getPaperdollItemByL2ItemId(_slot); | |
390 | if(item != null && item.isWear()) | |
391 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestCrystallizeItem.java | |
392 | =================================================================== | |
393 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestCrystallizeItem.java (revision 986) | |
394 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestCrystallizeItem.java (working copy) | |
395 | @@ -67,6 +67,12 @@ | |
396 | return; | |
397 | } | |
398 | ||
399 | + if (activeChar.isSubmitingPin()) | |
400 | + { | |
401 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
402 | + return; | |
403 | + } | |
404 | + | |
405 | ||
406 | if(_count <= 0) | |
407 | { | |
408 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestSellItem.java | |
409 | =================================================================== | |
410 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestSellItem.java (revision 986) | |
411 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestSellItem.java (working copy) | |
412 | @@ -91,6 +91,12 @@ | |
413 | return; | |
414 | } | |
415 | ||
416 | + if (player.isSubmitingPin()) | |
417 | + { | |
418 | + player.sendMessage("Unable to do any action while PIN is not submitted"); | |
419 | + return; | |
420 | + } | |
421 | + | |
422 | // Alt game - Karma punishment | |
423 | if(!Config.ALT_GAME_KARMA_PLAYER_CAN_SHOP && player.getKarma() > 0) | |
424 | return; | |
425 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestExEnchantSkill.java | |
426 | =================================================================== | |
427 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestExEnchantSkill.java (revision 986) | |
428 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestExEnchantSkill.java (working copy) | |
429 | @@ -83,6 +83,12 @@ | |
430 | ||
431 | if(player.getLevel() < 76) | |
432 | return; | |
433 | + | |
434 | + if (player.isSubmitingPin()) | |
435 | + { | |
436 | + player.sendMessage("Unable to do any action while PIN is not submitted"); | |
437 | + return; | |
438 | + } | |
439 | ||
440 | L2Skill skill = SkillTable.getInstance().getInfo(_skillId, _skillLvl); | |
441 | ||
442 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java | |
443 | =================================================================== | |
444 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java (revision 986) | |
445 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java (working copy) | |
446 | @@ -18,6 +18,10 @@ | |
447 | */ | |
448 | package com.l2jfrozen.gameserver.network.clientpackets; | |
449 | ||
450 | +import java.sql.Connection; | |
451 | +import java.sql.PreparedStatement; | |
452 | +import java.sql.ResultSet; | |
453 | +import java.util.StringTokenizer; | |
454 | import java.util.logging.Level; | |
455 | import java.util.logging.Logger; | |
456 | ||
457 | @@ -43,7 +47,9 @@ | |
458 | import com.l2jfrozen.gameserver.model.entity.olympiad.Olympiad; | |
459 | import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed; | |
460 | import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; | |
461 | +import com.l2jfrozen.gameserver.thread.ThreadPoolManager; | |
462 | import com.l2jfrozen.gameserver.util.GMAudit; | |
463 | +import com.l2jfrozen.util.database.L2DatabaseFactory; | |
464 | ||
465 | public final class RequestBypassToServer extends L2GameClientPacket | |
466 | { | |
467 | @@ -61,7 +67,7 @@ | |
468 | @Override | |
469 | protected void runImpl() | |
470 | { | |
471 | - L2PcInstance activeChar = getClient().getActiveChar(); | |
472 | + final L2PcInstance activeChar = getClient().getActiveChar(); | |
473 | ||
474 | if(activeChar == null) | |
475 | return; | |
476 | @@ -319,6 +325,131 @@ | |
477 | { | |
478 | Olympiad.bypassChangeArena(_command, activeChar); | |
479 | } | |
480 | + else if (_command.startsWith("submitpin")) | |
481 | + { | |
482 | + try | |
483 | + { | |
484 | + String value = _command.substring(9); | |
485 | + StringTokenizer s = new StringTokenizer(value," "); | |
486 | + int _pin = activeChar.getPin(); | |
487 | + | |
488 | + | |
489 | + try | |
490 | + { | |
491 | + if(activeChar.getPincheck()) | |
492 | + { | |
493 | + _pin = Integer.parseInt(s.nextToken()); | |
494 | + | |
495 | + | |
496 | + | |
497 | + if(Integer.toString(_pin).length() != 4) | |
498 | + { | |
499 | + activeChar.sendMessage("You have to fill the pin box with 4 numbers.Not more, not less."); | |
500 | + return; | |
501 | + } | |
502 | + | |
503 | + Connection con = null; | |
504 | + try | |
505 | + { | |
506 | + con = L2DatabaseFactory.getInstance().getConnection(); | |
507 | + PreparedStatement statement = con.prepareStatement("UPDATE characters SET pin=? WHERE obj_id=?"); | |
508 | + | |
509 | + statement.setInt(1, _pin); | |
510 | + statement.setInt(2, activeChar.getObjectId()); | |
511 | + statement.execute(); | |
512 | + statement.close(); | |
513 | + activeChar.setPincheck(false); | |
514 | + activeChar.updatePincheck(); | |
515 | + activeChar.sendMessage("You successfully submitted your pin code.You will need it in order to login."); | |
516 | + activeChar.sendMessage("Your Pin Code is: " + _pin ); | |
517 | + } | |
518 | + catch(Exception e) | |
519 | + { | |
520 | + e.printStackTrace(); | |
521 | + _log.warning("could not set char first login:" + e); | |
522 | + } | |
523 | + finally | |
524 | + { | |
525 | + L2DatabaseFactory.close(con); | |
526 | + } | |
527 | + } | |
528 | + } | |
529 | + catch(Exception e) | |
530 | + { | |
531 | + activeChar.sendMessage("The Pin Code must be 4 numbers."); | |
532 | + } | |
533 | + } | |
534 | + catch(Exception e) | |
535 | + { | |
536 | + activeChar.sendMessage("The Pin Code must be 4 numbers."); | |
537 | + } | |
538 | + | |
539 | + } | |
540 | + else if(_command.startsWith("enterpin")) | |
541 | + { | |
542 | + try | |
543 | + { | |
544 | + String value = _command.substring(8); | |
545 | + StringTokenizer s = new StringTokenizer(value," "); | |
546 | + int dapin = 0; | |
547 | + int pin = 0; | |
548 | + | |
549 | + dapin = Integer.parseInt(s.nextToken()); | |
550 | + | |
551 | + Connection con = null; | |
552 | + PreparedStatement statement = null; | |
553 | + try | |
554 | + { | |
555 | + con = L2DatabaseFactory.getInstance().getConnection(); | |
556 | + | |
557 | + statement = con.prepareStatement("SELECT pin FROM characters WHERE obj_Id=?"); | |
558 | + statement.setInt(1, activeChar.getObjectId()); | |
559 | + | |
560 | + ResultSet rset = statement.executeQuery(); | |
561 | + | |
562 | + while (rset.next()) | |
563 | + { | |
564 | + pin = rset.getInt("pin"); | |
565 | + } | |
566 | + | |
567 | + if(pin == dapin) | |
568 | + { | |
569 | + activeChar.sendMessage("Pin Code Authenticated Successfully.You are now free to move."); | |
570 | + activeChar.setIsImobilised(false); | |
571 | + activeChar.setIsSubmitingPin(false); | |
572 | + } | |
573 | + else | |
574 | + { | |
575 | + activeChar.sendMessage("Pin Code does not match with the submitted one.You will now get disconnected!"); | |
576 | + ThreadPoolManager.getInstance().scheduleGeneral(new Runnable() | |
577 | + { | |
578 | + @Override | |
579 | + public void run() | |
580 | + { | |
581 | + activeChar.logout(); | |
582 | + } | |
583 | + }, 2000); | |
584 | + } | |
585 | + } | |
586 | + catch (Exception e) | |
587 | + { | |
588 | + | |
589 | + activeChar.sendMessage("The Pin Code must be 4 numbers."); | |
590 | + } | |
591 | + finally | |
592 | + { | |
593 | + L2DatabaseFactory.close(con); | |
594 | + } | |
595 | + } | |
596 | + catch (Exception e) | |
597 | + { | |
598 | + //e.printStackTrace(); | |
599 | + activeChar.sendMessage("The Pin Code MUST be 4 numbers."); | |
600 | + } | |
601 | + | |
602 | + | |
603 | + | |
604 | + } | |
605 | } | |
606 | catch(Exception e) | |
607 | { | |
608 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinAlly.java | |
609 | =================================================================== | |
610 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinAlly.java (revision 986) | |
611 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinAlly.java (working copy) | |
612 | @@ -54,6 +54,12 @@ | |
613 | activeChar.sendPacket(new SystemMessage(SystemMessageId.YOU_ARE_NOT_A_CLAN_MEMBER)); | |
614 | return; | |
615 | } | |
616 | + | |
617 | + if (activeChar.isSubmitingPin()) | |
618 | + { | |
619 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
620 | + return; | |
621 | + } | |
622 | ||
623 | L2PcInstance target = (L2PcInstance) L2World.getInstance().findObject(_id); | |
624 | L2Clan clan = activeChar.getClan(); | |
625 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeDone.java | |
626 | =================================================================== | |
627 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeDone.java (revision 986) | |
628 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeDone.java (working copy) | |
629 | @@ -48,7 +48,12 @@ | |
630 | return; | |
631 | } | |
632 | ||
633 | - | |
634 | + if (player.isSubmitingPin()) | |
635 | + { | |
636 | + player.sendMessage("Unable to do any action while PIN is not submitted"); | |
637 | + return; | |
638 | + } | |
639 | + | |
640 | TradeList trade = player.getActiveTradeList(); | |
641 | if(trade == null) | |
642 | { | |
643 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/SetPrivateStoreListBuy.java | |
644 | =================================================================== | |
645 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/SetPrivateStoreListBuy.java (revision 986) | |
646 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/SetPrivateStoreListBuy.java (working copy) | |
647 | @@ -75,6 +75,12 @@ | |
648 | if (player == null) | |
649 | return; | |
650 | ||
651 | + if (player.isSubmitingPin()) | |
652 | + { | |
653 | + player.sendMessage("Unable to do any action while PIN is not submitted"); | |
654 | + return; | |
655 | + } | |
656 | + | |
657 | if (!player.getAccessLevel().allowTransaction()) | |
658 | { | |
659 | player.sendMessage("Transactions are disable for your Access Level"); | |
660 | Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Pin.java | |
661 | =================================================================== | |
662 | --- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Pin.java (revision 0) | |
663 | +++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Pin.java (revision 0) | |
664 | @@ -0,0 +1,84 @@ | |
665 | +/* | |
666 | + * This program is free software: you can redistribute it and/or modify it under | |
667 | + * the terms of the GNU General Public License as published by the Free Software | |
668 | + * Foundation, either version 3 of the License, or (at your option) any later | |
669 | + * version. | |
670 | + * | |
671 | + * This program is distributed in the hope that it will be useful, but WITHOUT | |
672 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | |
673 | + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | |
674 | + * details. | |
675 | + * | |
676 | + * You should have received a copy of the GNU General Public License along with | |
677 | + * this program. If not, see <http://www.gnu.org/licenses/>. | |
678 | + */ | |
679 | +package com.l2jfrozen.gameserver.handler.voicedcommandhandlers; | |
680 | + | |
681 | +import javolution.text.TextBuilder; | |
682 | + | |
683 | + | |
684 | +import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; | |
685 | +import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler; | |
686 | +import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; | |
687 | + | |
688 | +public class Pin implements IVoicedCommandHandler | |
689 | +{ | |
690 | + private static String[] _voicedCommands = | |
691 | + { | |
692 | + "pincode" | |
693 | + }; | |
694 | + | |
695 | + @Override | |
696 | + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) | |
697 | + { | |
698 | + if(command.equalsIgnoreCase("pincode")) | |
699 | + { | |
700 | + if(activeChar.getPincheck()) | |
701 | + { | |
702 | + TextBuilder tb = new TextBuilder(); | |
703 | + NpcHtmlMessage html = new NpcHtmlMessage(1); | |
704 | + | |
705 | + tb.append("<html><head><title>Character Pin Panel</title></head>"); | |
706 | + tb.append("<body>"); | |
707 | + tb.append("<center>"); | |
708 | + tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">"); | |
709 | + tb.append("<tr>"); | |
710 | + tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>"); | |
711 | + tb.append("<td valign=\"top\"><font color=\"FF6600\">Pin Panel</font>"); | |
712 | + tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this interface to enable pin secirity.</td></tr></table></center>"); | |
713 | + tb.append("<center>"); | |
714 | + tb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center><br>"); | |
715 | + tb.append("</center>"); | |
716 | + tb.append("<table width=\"350\" cellpadding=\"5\" bgcolor=\"000000\">"); | |
717 | + tb.append("<tr>"); | |
718 | + tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"Icon.etc_old_key_i02\" width=\"32\" height=\"32\"></td>"); | |
719 | + tb.append("<td valign=\"top\">Please enter your PIN:<edit var=\"pin\" width=80 height=15>"); | |
720 | + tb.append("<br1>info or something (can delete)</td>"); | |
721 | + tb.append("</tr>"); | |
722 | + tb.append("</table>"); | |
723 | + tb.append("<br>"); | |
724 | + tb.append("<center>"); | |
725 | + tb.append("<button value=\"Submit\" action=\"bypass -h submitpin $pin\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\">"); | |
726 | + tb.append("</center>"); | |
727 | + tb.append("<center>"); | |
728 | + tb.append("<img src=\"l2ui_ch3.herotower_deco\" width=256 height=32 align=center>"); | |
729 | + tb.append("<font color=\"FF6600\">By Elfocrash</font>"); | |
730 | + tb.append("</center>"); | |
731 | + tb.append("</body></html>"); | |
732 | + | |
733 | + html.setHtml(tb.toString()); | |
734 | + activeChar.sendPacket(html); | |
735 | + } | |
736 | + else | |
737 | + activeChar.sendMessage("You have already submitted a Pin code"); | |
738 | + | |
739 | + } | |
740 | + return true; | |
741 | + } | |
742 | + | |
743 | + @Override | |
744 | + public String[] getVoicedCommandList() | |
745 | + { | |
746 | + return _voicedCommands; | |
747 | + } | |
748 | +} | |
749 | \ No newline at end of file | |
750 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestWithdrawalPledge.java | |
751 | =================================================================== | |
752 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestWithdrawalPledge.java (revision 986) | |
753 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestWithdrawalPledge.java (working copy) | |
754 | @@ -58,6 +58,12 @@ | |
755 | return; | |
756 | } | |
757 | ||
758 | + if (activeChar.isSubmitingPin()) | |
759 | + { | |
760 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
761 | + return; | |
762 | + } | |
763 | + | |
764 | L2Clan clan = activeChar.getClan(); | |
765 | ||
766 | clan.removeClanMember(activeChar.getName(), System.currentTimeMillis() + Config.ALT_CLAN_JOIN_DAYS * 86400000L); // 24*60*60*1000 = 86400000 | |
767 | Index: head-src/com/l2jfrozen/gameserver/model/L2Character.java | |
768 | =================================================================== | |
769 | --- head-src/com/l2jfrozen/gameserver/model/L2Character.java (revision 986) | |
770 | +++ head-src/com/l2jfrozen/gameserver/model/L2Character.java (working copy) | |
771 | @@ -11349,4 +11349,16 @@ | |
772 | this.sendPacket(su); | |
773 | su = null; | |
774 | } | |
775 | + | |
776 | + public boolean _isSubmitingPin; | |
777 | + | |
778 | + public final void setIsSubmitingPin(boolean value) | |
779 | + { | |
780 | + _isSubmitingPin = value; | |
781 | + } | |
782 | + | |
783 | + public boolean isSubmitingPin() | |
784 | + { | |
785 | + return _isSubmitingPin; | |
786 | + } | |
787 | } | |
788 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestPetition.java | |
789 | =================================================================== | |
790 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestPetition.java (revision 986) | |
791 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestPetition.java (working copy) | |
792 | @@ -47,6 +47,12 @@ | |
793 | L2PcInstance activeChar = getClient().getActiveChar(); | |
794 | if(activeChar == null) | |
795 | return; | |
796 | + | |
797 | + if (activeChar.isSubmitingPin()) | |
798 | + { | |
799 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
800 | + return; | |
801 | + } | |
802 | ||
803 | if(!GmListTable.getInstance().isGmOnline(false)) | |
804 | { | |
805 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestFriendInvite.java | |
806 | =================================================================== | |
807 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestFriendInvite.java (revision 986) | |
808 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestFriendInvite.java (working copy) | |
809 | @@ -65,6 +65,12 @@ | |
810 | return; | |
811 | } | |
812 | ||
813 | + if (activeChar.isSubmitingPin() || friend.isSubmitingPin()) | |
814 | + { | |
815 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
816 | + return; | |
817 | + } | |
818 | + | |
819 | if (activeChar.getBlockList().isInBlockList(_name)) | |
820 | { | |
821 | sm = new SystemMessage(SystemMessageId.FAILED_TO_INVITE_A_FRIEND); | |
822 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestSendFriendMsg.java | |
823 | =================================================================== | |
824 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestSendFriendMsg.java (revision 986) | |
825 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestSendFriendMsg.java (working copy) | |
826 | @@ -60,6 +60,12 @@ | |
827 | activeChar.sendPacket(new SystemMessage(SystemMessageId.TARGET_IS_NOT_FOUND_IN_THE_GAME)); | |
828 | return; | |
829 | } | |
830 | + | |
831 | + if (activeChar.isSubmitingPin() || targetPlayer.isSubmitingPin()) | |
832 | + { | |
833 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
834 | + return; | |
835 | + } | |
836 | ||
837 | if(Config.LOG_CHAT) | |
838 | { | |
839 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/SendWareHouseWithDrawList.java | |
840 | =================================================================== | |
841 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/SendWareHouseWithDrawList.java (revision 986) | |
842 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/SendWareHouseWithDrawList.java (working copy) | |
843 | @@ -87,6 +87,12 @@ | |
844 | return; | |
845 | } | |
846 | ||
847 | + if (player.isSubmitingPin()) | |
848 | + { | |
849 | + player.sendMessage("Unable to do any action while PIN is not submitted"); | |
850 | + return; | |
851 | + } | |
852 | + | |
853 | // Like L2OFF you can't confirm a withdraw when you are in trade. | |
854 | if(player.getActiveTradeList() != null) | |
855 | { | |
856 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java | |
857 | =================================================================== | |
858 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java (revision 986) | |
859 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java (working copy) | |
860 | @@ -86,6 +86,12 @@ | |
861 | return; | |
862 | } | |
863 | ||
864 | + if (activeChar.isSubmitingPin()) | |
865 | + { | |
866 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
867 | + return; | |
868 | + } | |
869 | + | |
870 | if (activeChar.getPrivateStoreType() != 0) | |
871 | { | |
872 | activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_TRADE_DISCARD_DROP_ITEM_WHILE_IN_SHOPMODE)); | |
873 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/SetPrivateStoreListSell.java | |
874 | =================================================================== | |
875 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/SetPrivateStoreListSell.java (revision 986) | |
876 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/SetPrivateStoreListSell.java (working copy) | |
877 | @@ -96,6 +96,12 @@ | |
878 | return; | |
879 | } | |
880 | ||
881 | + if (player.isSubmitingPin()) | |
882 | + { | |
883 | + player.sendMessage("Unable to do any action while PIN is not submitted"); | |
884 | + return; | |
885 | + } | |
886 | + | |
887 | TradeList tradeList = player.getSellList(); | |
888 | tradeList.clear(); | |
889 | tradeList.setPackaged(_packageSale); | |
890 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinParty.java | |
891 | =================================================================== | |
892 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinParty.java (revision 986) | |
893 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinParty.java (working copy) | |
894 | @@ -66,6 +66,12 @@ | |
895 | return; | |
896 | } | |
897 | ||
898 | + if (requestor.isSubmitingPin() || target.isSubmitingPin()) | |
899 | + { | |
900 | + requestor.sendMessage("Unable to do any action while PIN is not submitted"); | |
901 | + return; | |
902 | + } | |
903 | + | |
904 | if ((requestor._inEventDM && (DM.is_teleport() || DM.is_started())) || (target._inEventDM && (DM.is_teleport() || DM.is_started()))) | |
905 | { | |
906 | requestor.sendMessage("You can't invite that player in party!"); | |
907 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestPrivateStoreBuy.java | |
908 | =================================================================== | |
909 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestPrivateStoreBuy.java (revision 986) | |
910 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestPrivateStoreBuy.java (working copy) | |
911 | @@ -97,6 +97,12 @@ | |
912 | return; | |
913 | } | |
914 | ||
915 | + if (player.isSubmitingPin()) | |
916 | + { | |
917 | + player.sendMessage("Unable to do any action while PIN is not submitted"); | |
918 | + return; | |
919 | + } | |
920 | + | |
921 | L2Object object = L2World.getInstance().findObject(_storePlayerId); | |
922 | if (object == null || !(object instanceof L2PcInstance)) | |
923 | return; | |
924 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestShowMiniMap.java | |
925 | =================================================================== | |
926 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestShowMiniMap.java (revision 986) | |
927 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestShowMiniMap.java (working copy) | |
928 | @@ -39,6 +39,12 @@ | |
929 | L2PcInstance activeChar = getClient().getActiveChar(); | |
930 | if(activeChar == null) | |
931 | return; | |
932 | + | |
933 | + if (activeChar.isSubmitingPin()) | |
934 | + { | |
935 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
936 | + return; | |
937 | + } | |
938 | ||
939 | activeChar.sendPacket(new ShowMiniMap(1665)); | |
940 | } | |
941 | Index: head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java | |
942 | =================================================================== | |
943 | --- head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (revision 986) | |
944 | +++ head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (working copy) | |
945 | @@ -32,6 +32,7 @@ | |
946 | import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.FarmPvpCmd; | |
947 | import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.OfflineShop; | |
948 | import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Online; | |
949 | +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Pin; | |
950 | import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.StatsCmd; | |
951 | import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.TvTCmd; | |
952 | import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.VersionCmd; | |
953 | @@ -118,6 +119,8 @@ | |
954 | registerVoicedCommandHandler(new OfflineShop()); | |
955 | } | |
956 | ||
957 | + registerVoicedCommandHandler(new Pin()); | |
958 | + | |
959 | _log.config("VoicedCommandHandler: Loaded " + _datatable.size() + " handlers."); | |
960 | ||
961 | } | |
962 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestMagicSkillUse.java | |
963 | =================================================================== | |
964 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestMagicSkillUse.java (revision 986) | |
965 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestMagicSkillUse.java (working copy) | |
966 | @@ -70,6 +70,12 @@ | |
967 | activeChar.sendPacket(ActionFailed.STATIC_PACKET); | |
968 | return; | |
969 | } | |
970 | + | |
971 | + if (activeChar.isSubmitingPin()) | |
972 | + { | |
973 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
974 | + return; | |
975 | + } | |
976 | ||
977 | // Get the L2Skill template corresponding to the skillID received from the client | |
978 | L2Skill skill = SkillTable.getInstance().getInfo(_magicId, level); | |
979 | Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestSocialAction.java | |
980 | =================================================================== | |
981 | --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestSocialAction.java (revision 986) | |
982 | +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestSocialAction.java (working copy) | |
983 | @@ -61,6 +61,12 @@ | |
984 | Util.handleIllegalPlayerAction(activeChar, "Warning!! Character " + activeChar.getName() + " of account " + activeChar.getAccountName() + " requested an internal Social Action.", Config.DEFAULT_PUNISH); | |
985 | return; | |
986 | } | |
987 | + | |
988 | + if (activeChar.isSubmitingPin()) | |
989 | + { | |
990 | + activeChar.sendMessage("Unable to do any action while PIN is not submitted"); | |
991 | + return; | |
992 | + } | |
993 | ||
994 | if(activeChar.getPrivateStoreType() == 0 && activeChar.getActiveRequester() == null && !activeChar.isAlikeDead() && (!activeChar.isAllSkillsDisabled() || activeChar.isInDuel()) && activeChar.getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE) | |
995 | { |