Quellcode durchsuchen

BETA: Misc fixes:
* Converting line delimiters to Windows CRLF (default)
* Reported by: jurchiks
* Updating GPL license in one file.
* Reported by: fissban

Zoey76 vor 11 Jahren
Ursprung
Commit
2f4906d44a

+ 327 - 327
L2J_Server_BETA/dist/doc/3rdPartyLicenses/Subnet.html

@@ -1,328 +1,328 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
-  <o:Revision>2</o:Revision>
-  <o:TotalTime>3</o:TotalTime>
-  <o:Created>2004-03-05T23:03:00Z</o:Created>
-  <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
-  <o:Pages>4</o:Pages>
-  <o:Words>1626</o:Words>
-  <o:Characters>9270</o:Characters>
-   <o:Lines>77</o:Lines>
-  <o:Paragraphs>18</o:Paragraphs>
-  <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
-  <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
-  <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
-	{font-family:Tahoma;
-	panose-1:2 11 6 4 3 5 4 4 2 4;
-	mso-font-charset:0;
-	mso-generic-font-family:swiss;
-	mso-font-pitch:variable;
-	mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
-	{mso-style-parent:"";
-	margin:0in;
-	margin-bottom:.0001pt;
-	mso-pagination:widow-orphan;
-	font-size:12.0pt;
-	font-family:"Times New Roman";
-	mso-fareast-font-family:"Times New Roman";}
-p
-	{margin-right:0in;
-	mso-margin-top-alt:auto;
-	mso-margin-bottom-alt:auto;
-	margin-left:0in;
-	mso-pagination:widow-orphan;
-	font-size:12.0pt;
-	font-family:"Times New Roman";
-	mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
-	{mso-style-name:"Balloon Text";
-	margin:0in;
-	margin-bottom:.0001pt;
-	mso-pagination:widow-orphan;
-	font-size:8.0pt;
-	font-family:Tahoma;
-	mso-fareast-font-family:"Times New Roman";}
-@page Section1
-	{size:8.5in 11.0in;
-	margin:1.0in 1.25in 1.0in 1.25in;
-	mso-header-margin:.5in;
-	mso-footer-margin:.5in;
-	mso-paper-source:0;}
-div.Section1
-	{page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
+<meta name=ProgId content=Word.Document>
+<meta name=Generator content="Microsoft Word 9">
+<meta name=Originator content="Microsoft Word 9">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<!--[if gte mso 9]><xml>
+ <o:DocumentProperties>
+  <o:Revision>2</o:Revision>
+  <o:TotalTime>3</o:TotalTime>
+  <o:Created>2004-03-05T23:03:00Z</o:Created>
+  <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
+  <o:Pages>4</o:Pages>
+  <o:Words>1626</o:Words>
+  <o:Characters>9270</o:Characters>
+   <o:Lines>77</o:Lines>
+  <o:Paragraphs>18</o:Paragraphs>
+  <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
+  <o:Version>9.4402</o:Version>
+ </o:DocumentProperties>
+</xml><![endif]--><!--[if gte mso 9]><xml>
+ <w:WordDocument>
+  <w:TrackRevisions/>
+ </w:WordDocument>
+</xml><![endif]-->
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+	{font-family:Tahoma;
+	panose-1:2 11 6 4 3 5 4 4 2 4;
+	mso-font-charset:0;
+	mso-generic-font-family:swiss;
+	mso-font-pitch:variable;
+	mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+	{mso-style-parent:"";
+	margin:0in;
+	margin-bottom:.0001pt;
+	mso-pagination:widow-orphan;
+	font-size:12.0pt;
+	font-family:"Times New Roman";
+	mso-fareast-font-family:"Times New Roman";}
+p
+	{margin-right:0in;
+	mso-margin-top-alt:auto;
+	mso-margin-bottom-alt:auto;
+	margin-left:0in;
+	mso-pagination:widow-orphan;
+	font-size:12.0pt;
+	font-family:"Times New Roman";
+	mso-fareast-font-family:"Times New Roman";}
+p.BalloonText, li.BalloonText, div.BalloonText
+	{mso-style-name:"Balloon Text";
+	margin:0in;
+	margin-bottom:.0001pt;
+	mso-pagination:widow-orphan;
+	font-size:8.0pt;
+	font-family:Tahoma;
+	mso-fareast-font-family:"Times New Roman";}
+@page Section1
+	{size:8.5in 11.0in;
+	margin:1.0in 1.25in 1.0in 1.25in;
+	mso-header-margin:.5in;
+	mso-footer-margin:.5in;
+	mso-paper-source:0;}
+div.Section1
+	{page:Section1;}
+-->
+</style>
+</head>
+
+<body lang=EN-US style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
+
+</div>
+
+</body>
+
 </html>

+ 15 - 15
L2J_Server_BETA/java/com/l2jserver/gameserver/ai/L2AttackableAI.java

@@ -540,21 +540,21 @@ public class L2AttackableAI extends L2CharacterAI implements Runnable
 			{
 				if (((L2MonsterInstance) npc).hasMinions())
 				{
-					((L2MonsterInstance) npc).getMinionList().deleteReusedMinions();
-				}
-			}
-		}
-		
-		// Check if the actor is a L2GuardInstance
-		if ((npc instanceof L2GuardInstance) && !npc.isWalker())
-		{
-			// Order to the L2GuardInstance to return to its home location because there's no target to attack
-			((L2GuardInstance) npc).returnHome();
-		}
-		
-		// If this is a festival monster, then it remains in the same location.
-		if (npc instanceof L2FestivalMonsterInstance)
-		{
+					((L2MonsterInstance) npc).getMinionList().deleteReusedMinions();
+				}
+			}
+		}
+		
+		// Check if the actor is a L2GuardInstance
+		if ((npc instanceof L2GuardInstance) && !npc.isWalker())
+		{
+			// Order to the L2GuardInstance to return to its home location because there's no target to attack
+			((L2GuardInstance) npc).returnHome();
+		}
+		
+		// If this is a festival monster, then it remains in the same location.
+		if (npc instanceof L2FestivalMonsterInstance)
+		{
 			return;
 		}
 		

+ 183 - 183
L2J_Server_BETA/java/com/l2jserver/gameserver/datatables/BuyListData.java

@@ -1,183 +1,183 @@
-/*
- * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.datatables;
-
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.Statement;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Level;
-
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-
-import com.l2jserver.Config;
-import com.l2jserver.L2DatabaseFactory;
-import com.l2jserver.gameserver.engines.DocumentParser;
-import com.l2jserver.gameserver.model.buylist.L2BuyList;
-import com.l2jserver.gameserver.model.buylist.Product;
-import com.l2jserver.gameserver.model.items.L2Item;
-import com.l2jserver.util.file.filter.NumericNameFilter;
-
-/**
- * @author Nos
- */
-public final class BuyListData extends DocumentParser
-{
-	private final Map<Integer, L2BuyList> _buyLists = new HashMap<>();
-	
-	protected BuyListData()
-	{
-		setCurrentFileFilter(new NumericNameFilter());
-		load();
-	}
-	
-	@Override
-	public synchronized void load()
-	{
-		_buyLists.clear();
-		parseDirectory("data/buylists");
-		if (Config.CUSTOM_BUYLIST_LOAD)
-		{
-			parseDirectory("data/buylists/custom");
-		}
-		
-		_log.info(getClass().getSimpleName() + ": Loaded " + _buyLists.size() + " BuyLists.");
-		
-		try (Connection con = L2DatabaseFactory.getInstance().getConnection();
-			Statement statement = con.createStatement();
-			ResultSet rs = statement.executeQuery("SELECT * FROM `buylists`"))
-		{
-			while (rs.next())
-			{
-				int buyListId = rs.getInt("buylist_id");
-				int itemId = rs.getInt("item_id");
-				long count = rs.getLong("count");
-				long nextRestockTime = rs.getLong("next_restock_time");
-				final L2BuyList buyList = getBuyList(buyListId);
-				if (buyList == null)
-				{
-					_log.warning("BuyList found in database but not loaded from xml! BuyListId: " + buyListId);
-					continue;
-				}
-				final Product product = buyList.getProductByItemId(itemId);
-				if (product == null)
-				{
-					_log.warning("ItemId found in database but not loaded from xml! BuyListId: " + buyListId + " ItemId: " + itemId);
-					continue;
-				}
-				if (count < product.getMaxCount())
-				{
-					product.setCount(count);
-					product.restartRestockTask(nextRestockTime);
-				}
-			}
-		}
-		catch (Exception e)
-		{
-			_log.log(Level.WARNING, "Failed to load buyList data from database.", e);
-		}
-	}
-	
-	@Override
-	protected void parseDocument()
-	{
-		try
-		{
-			final int buyListId = Integer.parseInt(getCurrentFile().getName().replaceAll(".xml", ""));
-			
-			for (Node node = getCurrentDocument().getFirstChild(); node != null; node = node.getNextSibling())
-			{
-				if ("list".equalsIgnoreCase(node.getNodeName()))
-				{
-					final L2BuyList buyList = new L2BuyList(buyListId);
-					for (Node list_node = node.getFirstChild(); list_node != null; list_node = list_node.getNextSibling())
-					{
-						if ("item".equalsIgnoreCase(list_node.getNodeName()))
-						{
-							int itemId = -1;
-							long price = -1;
-							long restockDelay = -1;
-							long count = -1;
-							NamedNodeMap attrs = list_node.getAttributes();
-							Node attr = attrs.getNamedItem("id");
-							itemId = Integer.parseInt(attr.getNodeValue());
-							attr = attrs.getNamedItem("price");
-							if (attr != null)
-							{
-								price = Long.parseLong(attr.getNodeValue());
-							}
-							attr = attrs.getNamedItem("restock_delay");
-							if (attr != null)
-							{
-								restockDelay = Long.parseLong(attr.getNodeValue());
-							}
-							attr = attrs.getNamedItem("count");
-							if (attr != null)
-							{
-								count = Long.parseLong(attr.getNodeValue());
-							}
-							final L2Item item = ItemTable.getInstance().getTemplate(itemId);
-							if (item != null)
-							{
-								buyList.addProduct(new Product(buyList.getListId(), item, price, restockDelay, count));
-							}
-							else
-							{
-								_log.warning("Item not found. BuyList:" + buyList.getListId() + " ItemID:" + itemId + " File:" + getCurrentFile().getName());
-							}
-						}
-						else if ("npcs".equalsIgnoreCase(list_node.getNodeName()))
-						{
-							for (Node npcs_node = list_node.getFirstChild(); npcs_node != null; npcs_node = npcs_node.getNextSibling())
-							{
-								if ("npc".equalsIgnoreCase(npcs_node.getNodeName()))
-								{
-									int npcId = Integer.parseInt(npcs_node.getTextContent());
-									buyList.addAllowedNpc(npcId);
-								}
-							}
-						}
-					}
-					_buyLists.put(buyList.getListId(), buyList);
-				}
-			}
-		}
-		catch (Exception e)
-		{
-			_log.log(Level.WARNING, "Failed to load buyList data from xml File:" + getCurrentFile().getName(), e);
-		}
-	}
-	
-	public L2BuyList getBuyList(int listId)
-	{
-		return _buyLists.get(listId);
-	}
-	
-	public static BuyListData getInstance()
-	{
-		return SingletonHolder._instance;
-	}
-	
-	private static class SingletonHolder
-	{
-		protected final static BuyListData _instance = new BuyListData();
-	}
-}
+/*
+ * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.datatables;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.logging.Level;
+
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+
+import com.l2jserver.Config;
+import com.l2jserver.L2DatabaseFactory;
+import com.l2jserver.gameserver.engines.DocumentParser;
+import com.l2jserver.gameserver.model.buylist.L2BuyList;
+import com.l2jserver.gameserver.model.buylist.Product;
+import com.l2jserver.gameserver.model.items.L2Item;
+import com.l2jserver.util.file.filter.NumericNameFilter;
+
+/**
+ * @author Nos
+ */
+public final class BuyListData extends DocumentParser
+{
+	private final Map<Integer, L2BuyList> _buyLists = new HashMap<>();
+	
+	protected BuyListData()
+	{
+		setCurrentFileFilter(new NumericNameFilter());
+		load();
+	}
+	
+	@Override
+	public synchronized void load()
+	{
+		_buyLists.clear();
+		parseDirectory("data/buylists");
+		if (Config.CUSTOM_BUYLIST_LOAD)
+		{
+			parseDirectory("data/buylists/custom");
+		}
+		
+		_log.info(getClass().getSimpleName() + ": Loaded " + _buyLists.size() + " BuyLists.");
+		
+		try (Connection con = L2DatabaseFactory.getInstance().getConnection();
+			Statement statement = con.createStatement();
+			ResultSet rs = statement.executeQuery("SELECT * FROM `buylists`"))
+		{
+			while (rs.next())
+			{
+				int buyListId = rs.getInt("buylist_id");
+				int itemId = rs.getInt("item_id");
+				long count = rs.getLong("count");
+				long nextRestockTime = rs.getLong("next_restock_time");
+				final L2BuyList buyList = getBuyList(buyListId);
+				if (buyList == null)
+				{
+					_log.warning("BuyList found in database but not loaded from xml! BuyListId: " + buyListId);
+					continue;
+				}
+				final Product product = buyList.getProductByItemId(itemId);
+				if (product == null)
+				{
+					_log.warning("ItemId found in database but not loaded from xml! BuyListId: " + buyListId + " ItemId: " + itemId);
+					continue;
+				}
+				if (count < product.getMaxCount())
+				{
+					product.setCount(count);
+					product.restartRestockTask(nextRestockTime);
+				}
+			}
+		}
+		catch (Exception e)
+		{
+			_log.log(Level.WARNING, "Failed to load buyList data from database.", e);
+		}
+	}
+	
+	@Override
+	protected void parseDocument()
+	{
+		try
+		{
+			final int buyListId = Integer.parseInt(getCurrentFile().getName().replaceAll(".xml", ""));
+			
+			for (Node node = getCurrentDocument().getFirstChild(); node != null; node = node.getNextSibling())
+			{
+				if ("list".equalsIgnoreCase(node.getNodeName()))
+				{
+					final L2BuyList buyList = new L2BuyList(buyListId);
+					for (Node list_node = node.getFirstChild(); list_node != null; list_node = list_node.getNextSibling())
+					{
+						if ("item".equalsIgnoreCase(list_node.getNodeName()))
+						{
+							int itemId = -1;
+							long price = -1;
+							long restockDelay = -1;
+							long count = -1;
+							NamedNodeMap attrs = list_node.getAttributes();
+							Node attr = attrs.getNamedItem("id");
+							itemId = Integer.parseInt(attr.getNodeValue());
+							attr = attrs.getNamedItem("price");
+							if (attr != null)
+							{
+								price = Long.parseLong(attr.getNodeValue());
+							}
+							attr = attrs.getNamedItem("restock_delay");
+							if (attr != null)
+							{
+								restockDelay = Long.parseLong(attr.getNodeValue());
+							}
+							attr = attrs.getNamedItem("count");
+							if (attr != null)
+							{
+								count = Long.parseLong(attr.getNodeValue());
+							}
+							final L2Item item = ItemTable.getInstance().getTemplate(itemId);
+							if (item != null)
+							{
+								buyList.addProduct(new Product(buyList.getListId(), item, price, restockDelay, count));
+							}
+							else
+							{
+								_log.warning("Item not found. BuyList:" + buyList.getListId() + " ItemID:" + itemId + " File:" + getCurrentFile().getName());
+							}
+						}
+						else if ("npcs".equalsIgnoreCase(list_node.getNodeName()))
+						{
+							for (Node npcs_node = list_node.getFirstChild(); npcs_node != null; npcs_node = npcs_node.getNextSibling())
+							{
+								if ("npc".equalsIgnoreCase(npcs_node.getNodeName()))
+								{
+									int npcId = Integer.parseInt(npcs_node.getTextContent());
+									buyList.addAllowedNpc(npcId);
+								}
+							}
+						}
+					}
+					_buyLists.put(buyList.getListId(), buyList);
+				}
+			}
+		}
+		catch (Exception e)
+		{
+			_log.log(Level.WARNING, "Failed to load buyList data from xml File:" + getCurrentFile().getName(), e);
+		}
+	}
+	
+	public L2BuyList getBuyList(int listId)
+	{
+		return _buyLists.get(listId);
+	}
+	
+	public static BuyListData getInstance()
+	{
+		return SingletonHolder._instance;
+	}
+	
+	private static class SingletonHolder
+	{
+		protected final static BuyListData _instance = new BuyListData();
+	}
+}

+ 38 - 38
L2J_Server_BETA/java/com/l2jserver/gameserver/handler/IPunishmentHandler.java

@@ -1,38 +1,38 @@
-/*
- * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.handler;
-
-import java.util.logging.Logger;
-
-import com.l2jserver.gameserver.model.punishment.PunishmentTask;
-import com.l2jserver.gameserver.model.punishment.PunishmentType;
-
-/**
- * @author UnAfraid
- */
-public interface IPunishmentHandler
-{
-	static final Logger _log = Logger.getLogger(IPunishmentHandler.class.getName());
-	
-	public void onStart(PunishmentTask task);
-	
-	public void onEnd(PunishmentTask task);
-	
-	public PunishmentType getType();
-}
+/*
+ * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.handler;
+
+import java.util.logging.Logger;
+
+import com.l2jserver.gameserver.model.punishment.PunishmentTask;
+import com.l2jserver.gameserver.model.punishment.PunishmentType;
+
+/**
+ * @author UnAfraid
+ */
+public interface IPunishmentHandler
+{
+	static final Logger _log = Logger.getLogger(IPunishmentHandler.class.getName());
+	
+	public void onStart(PunishmentTask task);
+	
+	public void onEnd(PunishmentTask task);
+	
+	public PunishmentType getType();
+}

+ 72 - 72
L2J_Server_BETA/java/com/l2jserver/gameserver/handler/PunishmentHandler.java

@@ -1,72 +1,72 @@
-/*
- * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.handler;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import com.l2jserver.gameserver.model.punishment.PunishmentType;
-
-/**
- * This class manages handlers of punishments.
- * @author UnAfraid
- */
-public class PunishmentHandler implements IHandler<IPunishmentHandler, PunishmentType>
-{
-	private final Map<PunishmentType, IPunishmentHandler> _handlers = new HashMap<>();
-	
-	protected PunishmentHandler()
-	{
-		
-	}
-	
-	@Override
-	public void registerHandler(IPunishmentHandler handler)
-	{
-		_handlers.put(handler.getType(), handler);
-	}
-	
-	@Override
-	public synchronized void removeHandler(IPunishmentHandler handler)
-	{
-		_handlers.remove(handler.getType());
-	}
-	
-	@Override
-	public IPunishmentHandler getHandler(PunishmentType val)
-	{
-		return _handlers.get(val);
-	}
-	
-	@Override
-	public int size()
-	{
-		return _handlers.size();
-	}
-	
-	public static PunishmentHandler getInstance()
-	{
-		return SingletonHolder._instance;
-	}
-	
-	private static class SingletonHolder
-	{
-		protected static final PunishmentHandler _instance = new PunishmentHandler();
-	}
-}
+/*
+ * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.handler;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import com.l2jserver.gameserver.model.punishment.PunishmentType;
+
+/**
+ * This class manages handlers of punishments.
+ * @author UnAfraid
+ */
+public class PunishmentHandler implements IHandler<IPunishmentHandler, PunishmentType>
+{
+	private final Map<PunishmentType, IPunishmentHandler> _handlers = new HashMap<>();
+	
+	protected PunishmentHandler()
+	{
+		
+	}
+	
+	@Override
+	public void registerHandler(IPunishmentHandler handler)
+	{
+		_handlers.put(handler.getType(), handler);
+	}
+	
+	@Override
+	public synchronized void removeHandler(IPunishmentHandler handler)
+	{
+		_handlers.remove(handler.getType());
+	}
+	
+	@Override
+	public IPunishmentHandler getHandler(PunishmentType val)
+	{
+		return _handlers.get(val);
+	}
+	
+	@Override
+	public int size()
+	{
+		return _handlers.size();
+	}
+	
+	public static PunishmentHandler getInstance()
+	{
+		return SingletonHolder._instance;
+	}
+	
+	private static class SingletonHolder
+	{
+		protected static final PunishmentHandler _instance = new PunishmentHandler();
+	}
+}

+ 136 - 136
L2J_Server_BETA/java/com/l2jserver/gameserver/instancemanager/PunishmentManager.java

@@ -1,136 +1,136 @@
-/*
- * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.instancemanager;
-
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.Statement;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.l2jserver.L2DatabaseFactory;
-import com.l2jserver.gameserver.model.holders.PunishmentHolder;
-import com.l2jserver.gameserver.model.punishment.PunishmentAffect;
-import com.l2jserver.gameserver.model.punishment.PunishmentTask;
-import com.l2jserver.gameserver.model.punishment.PunishmentType;
-
-/**
- * @author UnAfraid
- */
-public class PunishmentManager
-{
-	private static final Logger _log = Logger.getLogger(PunishmentManager.class.getName());
-	
-	private final Map<PunishmentAffect, PunishmentHolder> _tasks = new ConcurrentHashMap<>();
-	
-	protected PunishmentManager()
-	{
-		load();
-	}
-	
-	private void load()
-	{
-		// Initiate task holders.
-		for (PunishmentAffect affect : PunishmentAffect.values())
-		{
-			_tasks.put(affect, new PunishmentHolder());
-		}
-		
-		int initiated = 0;
-		int expired = 0;
-		
-		// Load punishments.
-		try (Connection con = L2DatabaseFactory.getInstance().getConnection();
-			Statement st = con.createStatement();
-			ResultSet rset = st.executeQuery("SELECT * FROM punishments"))
-		{
-			while (rset.next())
-			{
-				final int id = rset.getInt("id");
-				final String key = rset.getString("key");
-				final PunishmentAffect affect = PunishmentAffect.getByName(rset.getString("affect"));
-				final PunishmentType type = PunishmentType.getByName(rset.getString("type"));
-				final long expirationTime = rset.getLong("expiration");
-				final String reason = rset.getString("reason");
-				final String punishedBy = rset.getString("punishedBy");
-				if ((type != null) && (affect != null))
-				{
-					if ((expirationTime > 0) && (System.currentTimeMillis() > expirationTime)) // expired task.
-					{
-						expired++;
-					}
-					else
-					{
-						initiated++;
-						_tasks.get(affect).addPunishment(new PunishmentTask(id, key, affect, type, expirationTime, reason, punishedBy, true));
-					}
-				}
-			}
-		}
-		catch (Exception e)
-		{
-			_log.log(Level.WARNING, getClass().getSimpleName() + ": Error while loading punishments: ", e);
-		}
-		
-		_log.log(Level.INFO, getClass().getSimpleName() + ": Loaded " + initiated + " active and " + expired + " expired punishments.");
-	}
-	
-	public void startPunishment(PunishmentTask task)
-	{
-		_tasks.get(task.getAffect()).addPunishment(task);
-	}
-	
-	public void stopPunishment(Object key, PunishmentAffect affect, PunishmentType type)
-	{
-		final PunishmentTask task = getPunishment(key, affect, type);
-		if (task != null)
-		{
-			_tasks.get(affect).stopPunishment(task);
-		}
-	}
-	
-	public boolean hasPunishment(Object key, PunishmentAffect affect, PunishmentType type)
-	{
-		final PunishmentHolder holder = _tasks.get(affect);
-		return holder.hasPunishment(String.valueOf(key), type);
-	}
-	
-	public long getPunishmentExpiration(Object key, PunishmentAffect affect, PunishmentType type)
-	{
-		final PunishmentTask p = getPunishment(key, affect, type);
-		return p != null ? p.getExpirationTime() : 0;
-	}
-	
-	private PunishmentTask getPunishment(Object key, PunishmentAffect affect, PunishmentType type)
-	{
-		return _tasks.get(affect).getPunishment(String.valueOf(key), type);
-	}
-	
-	public static final PunishmentManager getInstance()
-	{
-		return SingletonHolder._instance;
-	}
-	
-	private static class SingletonHolder
-	{
-		protected static final PunishmentManager _instance = new PunishmentManager();
-	}
-}
+/*
+ * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.instancemanager;
+
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import com.l2jserver.L2DatabaseFactory;
+import com.l2jserver.gameserver.model.holders.PunishmentHolder;
+import com.l2jserver.gameserver.model.punishment.PunishmentAffect;
+import com.l2jserver.gameserver.model.punishment.PunishmentTask;
+import com.l2jserver.gameserver.model.punishment.PunishmentType;
+
+/**
+ * @author UnAfraid
+ */
+public class PunishmentManager
+{
+	private static final Logger _log = Logger.getLogger(PunishmentManager.class.getName());
+	
+	private final Map<PunishmentAffect, PunishmentHolder> _tasks = new ConcurrentHashMap<>();
+	
+	protected PunishmentManager()
+	{
+		load();
+	}
+	
+	private void load()
+	{
+		// Initiate task holders.
+		for (PunishmentAffect affect : PunishmentAffect.values())
+		{
+			_tasks.put(affect, new PunishmentHolder());
+		}
+		
+		int initiated = 0;
+		int expired = 0;
+		
+		// Load punishments.
+		try (Connection con = L2DatabaseFactory.getInstance().getConnection();
+			Statement st = con.createStatement();
+			ResultSet rset = st.executeQuery("SELECT * FROM punishments"))
+		{
+			while (rset.next())
+			{
+				final int id = rset.getInt("id");
+				final String key = rset.getString("key");
+				final PunishmentAffect affect = PunishmentAffect.getByName(rset.getString("affect"));
+				final PunishmentType type = PunishmentType.getByName(rset.getString("type"));
+				final long expirationTime = rset.getLong("expiration");
+				final String reason = rset.getString("reason");
+				final String punishedBy = rset.getString("punishedBy");
+				if ((type != null) && (affect != null))
+				{
+					if ((expirationTime > 0) && (System.currentTimeMillis() > expirationTime)) // expired task.
+					{
+						expired++;
+					}
+					else
+					{
+						initiated++;
+						_tasks.get(affect).addPunishment(new PunishmentTask(id, key, affect, type, expirationTime, reason, punishedBy, true));
+					}
+				}
+			}
+		}
+		catch (Exception e)
+		{
+			_log.log(Level.WARNING, getClass().getSimpleName() + ": Error while loading punishments: ", e);
+		}
+		
+		_log.log(Level.INFO, getClass().getSimpleName() + ": Loaded " + initiated + " active and " + expired + " expired punishments.");
+	}
+	
+	public void startPunishment(PunishmentTask task)
+	{
+		_tasks.get(task.getAffect()).addPunishment(task);
+	}
+	
+	public void stopPunishment(Object key, PunishmentAffect affect, PunishmentType type)
+	{
+		final PunishmentTask task = getPunishment(key, affect, type);
+		if (task != null)
+		{
+			_tasks.get(affect).stopPunishment(task);
+		}
+	}
+	
+	public boolean hasPunishment(Object key, PunishmentAffect affect, PunishmentType type)
+	{
+		final PunishmentHolder holder = _tasks.get(affect);
+		return holder.hasPunishment(String.valueOf(key), type);
+	}
+	
+	public long getPunishmentExpiration(Object key, PunishmentAffect affect, PunishmentType type)
+	{
+		final PunishmentTask p = getPunishment(key, affect, type);
+		return p != null ? p.getExpirationTime() : 0;
+	}
+	
+	private PunishmentTask getPunishment(Object key, PunishmentAffect affect, PunishmentType type)
+	{
+		return _tasks.get(affect).getPunishment(String.valueOf(key), type);
+	}
+	
+	public static final PunishmentManager getInstance()
+	{
+		return SingletonHolder._instance;
+	}
+	
+	private static class SingletonHolder
+	{
+		protected static final PunishmentManager _instance = new PunishmentManager();
+	}
+}

+ 15 - 12
L2J_Server_BETA/java/com/l2jserver/gameserver/model/L2Augmentation.java

@@ -1,18 +1,21 @@
 /*
- * 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.
+ * Copyright (C) 2004-2013 L2J Server
  * 
- * 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.
+ * This file is part of L2J Server.
  * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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 <http://www.gnu.org/licenses/>.
  */
-
 package com.l2jserver.gameserver.model;
 
 import java.util.ArrayList;
@@ -25,7 +28,7 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.model.options.Options;
 
 /**
- * Used to store an augmentation and its boni
+ * Used to store an augmentation and its bonuses.
  * @author durgus, UnAfraid
  */
 public final class L2Augmentation

+ 83 - 83
L2J_Server_BETA/java/com/l2jserver/gameserver/model/PcCondOverride.java

@@ -1,83 +1,83 @@
-/*
- * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.model;
-
-/**
- * @author UnAfraid
- */
-public enum PcCondOverride
-{
-	MAX_STATS_VALUE(0, "Overrides maximum states conditions"),
-	ITEM_CONDITIONS(1, "Overrides item usage conditions"),
-	SKILL_CONDITIONS(2, "Overrides skill usage conditions"),
-	ZONE_CONDITIONS(3, "Overrides zone conditions"),
-	CASTLE_CONDITIONS(4, "Overrides castle conditions"),
-	FORTRESS_CONDITIONS(5, "Overrides fortress conditions"),
-	CLANHALL_CONDITIONS(6, "Overrides clan hall conditions"),
-	FLOOD_CONDITIONS(7, "Overrides floods conditions"),
-	CHAT_CONDITIONS(8, "Overrides chat conditions"),
-	INSTANCE_CONDITIONS(9, "Overrides instance conditions"),
-	QUEST_CONDITIONS(10, "Overrides quest conditions"),
-	DEATH_PENALTY(11, "Overrides death penalty conditions"),
-	DESTROY_ALL_ITEMS(12, "Overrides item destroy conditions"),
-	SEE_ALL_PLAYERS(13, "Overrides the conditions to see hidden players"),
-	TARGET_ALL(14, "Overrides target conditions"),
-	DROP_ALL_ITEMS(15, "Overrides item drop conditions");
-	
-	private final int _mask;
-	private final String _descr;
-	
-	private PcCondOverride(int id, String descr)
-	{
-		_mask = 1 << id;
-		_descr = descr;
-	}
-	
-	public int getMask()
-	{
-		return _mask;
-	}
-	
-	public String getDescription()
-	{
-		return _descr;
-	}
-	
-	public static PcCondOverride getCondOverride(int ordinal)
-	{
-		try
-		{
-			return values()[ordinal];
-		}
-		catch (Exception e)
-		{
-			return null;
-		}
-	}
-	
-	public static long getAllExceptionsMask()
-	{
-		long result = 0L;
-		for (PcCondOverride ex : values())
-		{
-			result |= ex.getMask();
-		}
-		return result;
-	}
-}
+/*
+ * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model;
+
+/**
+ * @author UnAfraid
+ */
+public enum PcCondOverride
+{
+	MAX_STATS_VALUE(0, "Overrides maximum states conditions"),
+	ITEM_CONDITIONS(1, "Overrides item usage conditions"),
+	SKILL_CONDITIONS(2, "Overrides skill usage conditions"),
+	ZONE_CONDITIONS(3, "Overrides zone conditions"),
+	CASTLE_CONDITIONS(4, "Overrides castle conditions"),
+	FORTRESS_CONDITIONS(5, "Overrides fortress conditions"),
+	CLANHALL_CONDITIONS(6, "Overrides clan hall conditions"),
+	FLOOD_CONDITIONS(7, "Overrides floods conditions"),
+	CHAT_CONDITIONS(8, "Overrides chat conditions"),
+	INSTANCE_CONDITIONS(9, "Overrides instance conditions"),
+	QUEST_CONDITIONS(10, "Overrides quest conditions"),
+	DEATH_PENALTY(11, "Overrides death penalty conditions"),
+	DESTROY_ALL_ITEMS(12, "Overrides item destroy conditions"),
+	SEE_ALL_PLAYERS(13, "Overrides the conditions to see hidden players"),
+	TARGET_ALL(14, "Overrides target conditions"),
+	DROP_ALL_ITEMS(15, "Overrides item drop conditions");
+	
+	private final int _mask;
+	private final String _descr;
+	
+	private PcCondOverride(int id, String descr)
+	{
+		_mask = 1 << id;
+		_descr = descr;
+	}
+	
+	public int getMask()
+	{
+		return _mask;
+	}
+	
+	public String getDescription()
+	{
+		return _descr;
+	}
+	
+	public static PcCondOverride getCondOverride(int ordinal)
+	{
+		try
+		{
+			return values()[ordinal];
+		}
+		catch (Exception e)
+		{
+			return null;
+		}
+	}
+	
+	public static long getAllExceptionsMask()
+	{
+		long result = 0L;
+		for (PcCondOverride ex : values())
+		{
+			result |= ex.getMask();
+		}
+		return result;
+	}
+}

+ 46 - 46
L2J_Server_BETA/java/com/l2jserver/gameserver/model/actor/tasks/player/TeleportTask.java

@@ -1,46 +1,46 @@
-/*
- * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.model.actor.tasks.player;
-
-import com.l2jserver.gameserver.model.Location;
-import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
-
-/**
- * @author UnAfraid
- */
-public class TeleportTask implements Runnable
-{
-	private final L2PcInstance _activeChar;
-	private final Location _loc;
-	
-	public TeleportTask(L2PcInstance player, Location loc)
-	{
-		_activeChar = player;
-		_loc = loc;
-	}
-	
-	@Override
-	public void run()
-	{
-		if ((_activeChar != null) && _activeChar.isOnline())
-		{
-			_activeChar.teleToLocation(_loc, true);
-		}
-	}
-}
+/*
+ * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model.actor.tasks.player;
+
+import com.l2jserver.gameserver.model.Location;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+
+/**
+ * @author UnAfraid
+ */
+public class TeleportTask implements Runnable
+{
+	private final L2PcInstance _activeChar;
+	private final Location _loc;
+	
+	public TeleportTask(L2PcInstance player, Location loc)
+	{
+		_activeChar = player;
+		_loc = loc;
+	}
+	
+	@Override
+	public void run()
+	{
+		if ((_activeChar != null) && _activeChar.isOnline())
+		{
+			_activeChar.teleToLocation(_loc, true);
+		}
+	}
+}

+ 78 - 78
L2J_Server_BETA/java/com/l2jserver/gameserver/model/buylist/L2BuyList.java

@@ -1,78 +1,78 @@
-/*
- * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.model.buylist;
-
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author Nos
- */
-public final class L2BuyList
-{
-	private final int _listId;
-	private final Map<Integer, Product> _products = new LinkedHashMap<>();
-	private Set<Integer> _allowedNpcs = null;
-	
-	public L2BuyList(int listId)
-	{
-		_listId = listId;
-	}
-	
-	public int getListId()
-	{
-		return _listId;
-	}
-	
-	public Collection<Product> getProducts()
-	{
-		return _products.values();
-	}
-	
-	public Product getProductByItemId(int itemId)
-	{
-		return _products.get(itemId);
-	}
-	
-	public void addProduct(Product product)
-	{
-		_products.put(product.getItemId(), product);
-	}
-	
-	public void addAllowedNpc(int npcId)
-	{
-		if (_allowedNpcs == null)
-		{
-			_allowedNpcs = new HashSet<>();
-		}
-		_allowedNpcs.add(npcId);
-	}
-	
-	public boolean isNpcAllowed(int npcId)
-	{
-		if (_allowedNpcs == null)
-		{
-			return false;
-		}
-		return _allowedNpcs.contains(npcId);
-	}
-}
+/*
+ * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model.buylist;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Nos
+ */
+public final class L2BuyList
+{
+	private final int _listId;
+	private final Map<Integer, Product> _products = new LinkedHashMap<>();
+	private Set<Integer> _allowedNpcs = null;
+	
+	public L2BuyList(int listId)
+	{
+		_listId = listId;
+	}
+	
+	public int getListId()
+	{
+		return _listId;
+	}
+	
+	public Collection<Product> getProducts()
+	{
+		return _products.values();
+	}
+	
+	public Product getProductByItemId(int itemId)
+	{
+		return _products.get(itemId);
+	}
+	
+	public void addProduct(Product product)
+	{
+		_products.put(product.getItemId(), product);
+	}
+	
+	public void addAllowedNpc(int npcId)
+	{
+		if (_allowedNpcs == null)
+		{
+			_allowedNpcs = new HashSet<>();
+		}
+		_allowedNpcs.add(npcId);
+	}
+	
+	public boolean isNpcAllowed(int npcId)
+	{
+		if (_allowedNpcs == null)
+		{
+			return false;
+		}
+		return _allowedNpcs.contains(npcId);
+	}
+}

+ 189 - 189
L2J_Server_BETA/java/com/l2jserver/gameserver/model/buylist/Product.java

@@ -1,189 +1,189 @@
-/*
- * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.model.buylist;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.l2jserver.L2DatabaseFactory;
-import com.l2jserver.gameserver.ThreadPoolManager;
-import com.l2jserver.gameserver.model.items.L2Item;
-
-/**
- * @author Nos
- */
-public final class Product
-{
-	private final static Logger _log = Logger.getLogger(Product.class.getName());
-	
-	private final int _buyListId;
-	private final L2Item _item;
-	private final long _price;
-	private final long _restockDelay;
-	private final long _maxCount;
-	private AtomicLong _count = null;
-	private ScheduledFuture<?> _restockTask = null;
-	
-	public Product(int buyListId, L2Item item, long price, long restockDelay, long maxCount)
-	{
-		_buyListId = buyListId;
-		_item = item;
-		_price = price;
-		_restockDelay = restockDelay * 60000;
-		_maxCount = maxCount;
-		if (hasLimitedStock())
-		{
-			_count = new AtomicLong(maxCount);
-		}
-	}
-	
-	public int getBuyListId()
-	{
-		return _buyListId;
-	}
-	
-	public L2Item getItem()
-	{
-		return _item;
-	}
-	
-	public int getItemId()
-	{
-		return getItem().getItemId();
-	}
-	
-	public long getPrice()
-	{
-		if (_price < 0)
-		{
-			return getItem().getReferencePrice();
-		}
-		return _price;
-	}
-	
-	public long getRestockDelay()
-	{
-		return _restockDelay;
-	}
-	
-	public long getMaxCount()
-	{
-		return _maxCount;
-	}
-	
-	public long getCount()
-	{
-		if (_count == null)
-		{
-			return 0;
-		}
-		long count = _count.get();
-		return count > 0 ? count : 0;
-	}
-	
-	public void setCount(long currentCount)
-	{
-		if (_count == null)
-		{
-			_count = new AtomicLong();
-		}
-		_count.set(currentCount);
-	}
-	
-	public boolean decreaseCount(long val)
-	{
-		if (_count == null)
-		{
-			return false;
-		}
-		if ((_restockTask == null) || _restockTask.isDone())
-		{
-			_restockTask = ThreadPoolManager.getInstance().scheduleGeneral(new RestockTask(), getRestockDelay());
-		}
-		boolean result = _count.addAndGet(-val) >= 0;
-		save();
-		return result;
-	}
-	
-	public boolean hasLimitedStock()
-	{
-		return getMaxCount() > -1;
-	}
-	
-	public void restartRestockTask(long nextRestockTime)
-	{
-		long remainTime = nextRestockTime - System.currentTimeMillis();
-		if (remainTime > 0)
-		{
-			_restockTask = ThreadPoolManager.getInstance().scheduleGeneral(new RestockTask(), remainTime);
-		}
-		else
-		{
-			restock();
-		}
-	}
-	
-	public void restock()
-	{
-		setCount(getMaxCount());
-		save();
-	}
-	
-	protected final class RestockTask implements Runnable
-	{
-		@Override
-		public void run()
-		{
-			restock();
-		}
-	}
-	
-	private void save()
-	{
-		try (Connection con = L2DatabaseFactory.getInstance().getConnection();
-			PreparedStatement statement = con.prepareStatement("INSERT INTO `buylists`(`buylist_id`, `item_id`, `count`, `next_restock_time`) VALUES(?, ?, ?, ?) ON DUPLICATE KEY UPDATE `count` = ?, `next_restock_time` = ?"))
-		{
-			statement.setInt(1, getBuyListId());
-			statement.setInt(2, getItemId());
-			statement.setLong(3, getCount());
-			statement.setLong(5, getCount());
-			if ((_restockTask != null) && (_restockTask.getDelay(TimeUnit.MILLISECONDS) > 0))
-			{
-				long nextRestockTime = System.currentTimeMillis() + _restockTask.getDelay(TimeUnit.MILLISECONDS);
-				statement.setLong(4, nextRestockTime);
-				statement.setLong(6, nextRestockTime);
-			}
-			else
-			{
-				statement.setLong(4, 0);
-				statement.setLong(6, 0);
-			}
-			statement.executeUpdate();
-		}
-		catch (Exception e)
-		{
-			_log.log(Level.WARNING, "Failed to save Product buylist_id:" + getBuyListId() + " item_id:" + getItemId(), e);
-		}
-	}
-}
+/*
+ * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model.buylist;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import com.l2jserver.L2DatabaseFactory;
+import com.l2jserver.gameserver.ThreadPoolManager;
+import com.l2jserver.gameserver.model.items.L2Item;
+
+/**
+ * @author Nos
+ */
+public final class Product
+{
+	private final static Logger _log = Logger.getLogger(Product.class.getName());
+	
+	private final int _buyListId;
+	private final L2Item _item;
+	private final long _price;
+	private final long _restockDelay;
+	private final long _maxCount;
+	private AtomicLong _count = null;
+	private ScheduledFuture<?> _restockTask = null;
+	
+	public Product(int buyListId, L2Item item, long price, long restockDelay, long maxCount)
+	{
+		_buyListId = buyListId;
+		_item = item;
+		_price = price;
+		_restockDelay = restockDelay * 60000;
+		_maxCount = maxCount;
+		if (hasLimitedStock())
+		{
+			_count = new AtomicLong(maxCount);
+		}
+	}
+	
+	public int getBuyListId()
+	{
+		return _buyListId;
+	}
+	
+	public L2Item getItem()
+	{
+		return _item;
+	}
+	
+	public int getItemId()
+	{
+		return getItem().getItemId();
+	}
+	
+	public long getPrice()
+	{
+		if (_price < 0)
+		{
+			return getItem().getReferencePrice();
+		}
+		return _price;
+	}
+	
+	public long getRestockDelay()
+	{
+		return _restockDelay;
+	}
+	
+	public long getMaxCount()
+	{
+		return _maxCount;
+	}
+	
+	public long getCount()
+	{
+		if (_count == null)
+		{
+			return 0;
+		}
+		long count = _count.get();
+		return count > 0 ? count : 0;
+	}
+	
+	public void setCount(long currentCount)
+	{
+		if (_count == null)
+		{
+			_count = new AtomicLong();
+		}
+		_count.set(currentCount);
+	}
+	
+	public boolean decreaseCount(long val)
+	{
+		if (_count == null)
+		{
+			return false;
+		}
+		if ((_restockTask == null) || _restockTask.isDone())
+		{
+			_restockTask = ThreadPoolManager.getInstance().scheduleGeneral(new RestockTask(), getRestockDelay());
+		}
+		boolean result = _count.addAndGet(-val) >= 0;
+		save();
+		return result;
+	}
+	
+	public boolean hasLimitedStock()
+	{
+		return getMaxCount() > -1;
+	}
+	
+	public void restartRestockTask(long nextRestockTime)
+	{
+		long remainTime = nextRestockTime - System.currentTimeMillis();
+		if (remainTime > 0)
+		{
+			_restockTask = ThreadPoolManager.getInstance().scheduleGeneral(new RestockTask(), remainTime);
+		}
+		else
+		{
+			restock();
+		}
+	}
+	
+	public void restock()
+	{
+		setCount(getMaxCount());
+		save();
+	}
+	
+	protected final class RestockTask implements Runnable
+	{
+		@Override
+		public void run()
+		{
+			restock();
+		}
+	}
+	
+	private void save()
+	{
+		try (Connection con = L2DatabaseFactory.getInstance().getConnection();
+			PreparedStatement statement = con.prepareStatement("INSERT INTO `buylists`(`buylist_id`, `item_id`, `count`, `next_restock_time`) VALUES(?, ?, ?, ?) ON DUPLICATE KEY UPDATE `count` = ?, `next_restock_time` = ?"))
+		{
+			statement.setInt(1, getBuyListId());
+			statement.setInt(2, getItemId());
+			statement.setLong(3, getCount());
+			statement.setLong(5, getCount());
+			if ((_restockTask != null) && (_restockTask.getDelay(TimeUnit.MILLISECONDS) > 0))
+			{
+				long nextRestockTime = System.currentTimeMillis() + _restockTask.getDelay(TimeUnit.MILLISECONDS);
+				statement.setLong(4, nextRestockTime);
+				statement.setLong(6, nextRestockTime);
+			}
+			else
+			{
+				statement.setLong(4, 0);
+				statement.setLong(6, 0);
+			}
+			statement.executeUpdate();
+		}
+		catch (Exception e)
+		{
+			_log.log(Level.WARNING, "Failed to save Product buylist_id:" + getBuyListId() + " item_id:" + getItemId(), e);
+		}
+	}
+}

+ 93 - 93
L2J_Server_BETA/java/com/l2jserver/gameserver/model/holders/PunishmentHolder.java

@@ -1,93 +1,93 @@
-/*
- * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.model.holders;
-
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import com.l2jserver.gameserver.model.punishment.PunishmentTask;
-import com.l2jserver.gameserver.model.punishment.PunishmentType;
-
-/**
- * @author UnAfraid
- */
-public class PunishmentHolder
-{
-	private final Map<String, Map<PunishmentType, PunishmentTask>> _holder = new ConcurrentHashMap<>();
-	
-	/**
-	 * Stores the punishment task in the Map.
-	 * @param task
-	 */
-	public void addPunishment(PunishmentTask task)
-	{
-		if (!task.isExpired())
-		{
-			String key = String.valueOf(task.getKey());
-			if (!_holder.containsKey(key))
-			{
-				_holder.put(key, new ConcurrentHashMap<PunishmentType, PunishmentTask>());
-			}
-			_holder.get(key).put(task.getType(), task);
-		}
-	}
-	
-	/**
-	 * Removes previously stopped task from the Map.
-	 * @param task
-	 */
-	public void stopPunishment(PunishmentTask task)
-	{
-		String key = String.valueOf(task.getKey());
-		if (_holder.containsKey(key))
-		{
-			task.stopPunishment();
-			final Map<PunishmentType, PunishmentTask> punishments = _holder.get(key);
-			punishments.remove(task.getType());
-			if (punishments.isEmpty())
-			{
-				_holder.remove(key);
-			}
-		}
-	}
-	
-	/**
-	 * @param key
-	 * @param type
-	 * @return {@code true} if Map contains the current key and type, {@code false} otherwise.
-	 */
-	public boolean hasPunishment(String key, PunishmentType type)
-	{
-		return getPunishment(key, type) != null;
-	}
-	
-	/**
-	 * @param key
-	 * @param type
-	 * @return {@link PunishmentTask} by specified key and type if exists, null otherwise.
-	 */
-	public PunishmentTask getPunishment(String key, PunishmentType type)
-	{
-		if (_holder.containsKey(key))
-		{
-			return _holder.get(key).get(type);
-		}
-		return null;
-	}
-}
+/*
+ * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model.holders;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import com.l2jserver.gameserver.model.punishment.PunishmentTask;
+import com.l2jserver.gameserver.model.punishment.PunishmentType;
+
+/**
+ * @author UnAfraid
+ */
+public class PunishmentHolder
+{
+	private final Map<String, Map<PunishmentType, PunishmentTask>> _holder = new ConcurrentHashMap<>();
+	
+	/**
+	 * Stores the punishment task in the Map.
+	 * @param task
+	 */
+	public void addPunishment(PunishmentTask task)
+	{
+		if (!task.isExpired())
+		{
+			String key = String.valueOf(task.getKey());
+			if (!_holder.containsKey(key))
+			{
+				_holder.put(key, new ConcurrentHashMap<PunishmentType, PunishmentTask>());
+			}
+			_holder.get(key).put(task.getType(), task);
+		}
+	}
+	
+	/**
+	 * Removes previously stopped task from the Map.
+	 * @param task
+	 */
+	public void stopPunishment(PunishmentTask task)
+	{
+		String key = String.valueOf(task.getKey());
+		if (_holder.containsKey(key))
+		{
+			task.stopPunishment();
+			final Map<PunishmentType, PunishmentTask> punishments = _holder.get(key);
+			punishments.remove(task.getType());
+			if (punishments.isEmpty())
+			{
+				_holder.remove(key);
+			}
+		}
+	}
+	
+	/**
+	 * @param key
+	 * @param type
+	 * @return {@code true} if Map contains the current key and type, {@code false} otherwise.
+	 */
+	public boolean hasPunishment(String key, PunishmentType type)
+	{
+		return getPunishment(key, type) != null;
+	}
+	
+	/**
+	 * @param key
+	 * @param type
+	 * @return {@link PunishmentTask} by specified key and type if exists, null otherwise.
+	 */
+	public PunishmentTask getPunishment(String key, PunishmentType type)
+	{
+		if (_holder.containsKey(key))
+		{
+			return _holder.get(key).get(type);
+		}
+		return null;
+	}
+}

+ 42 - 42
L2J_Server_BETA/java/com/l2jserver/gameserver/model/punishment/PunishmentAffect.java

@@ -1,42 +1,42 @@
-/*
- * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.model.punishment;
-
-/**
- * @author UnAfraid
- */
-public enum PunishmentAffect
-{
-	ACCOUNT,
-	CHARACTER,
-	IP;
-	// HWID; Not implemented yet.
-	
-	public static PunishmentAffect getByName(String name)
-	{
-		for (PunishmentAffect type : values())
-		{
-			if (type.name().equalsIgnoreCase(name))
-			{
-				return type;
-			}
-		}
-		return null;
-	}
-}
+/*
+ * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model.punishment;
+
+/**
+ * @author UnAfraid
+ */
+public enum PunishmentAffect
+{
+	ACCOUNT,
+	CHARACTER,
+	IP;
+	// HWID; Not implemented yet.
+	
+	public static PunishmentAffect getByName(String name)
+	{
+		for (PunishmentAffect type : values())
+		{
+			if (type.name().equalsIgnoreCase(name))
+			{
+				return type;
+			}
+		}
+		return null;
+	}
+}

+ 254 - 254
L2J_Server_BETA/java/com/l2jserver/gameserver/model/punishment/PunishmentTask.java

@@ -1,254 +1,254 @@
-/*
- * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.model.punishment;
-
-import java.sql.Connection;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.concurrent.ScheduledFuture;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import com.l2jserver.L2DatabaseFactory;
-import com.l2jserver.gameserver.ThreadPoolManager;
-import com.l2jserver.gameserver.handler.IPunishmentHandler;
-import com.l2jserver.gameserver.handler.PunishmentHandler;
-import com.l2jserver.gameserver.instancemanager.PunishmentManager;
-
-/**
- * @author UnAfraid
- */
-public class PunishmentTask implements Runnable
-{
-	protected static final Logger _log = Logger.getLogger(PunishmentTask.class.getName());
-	
-	private static final String INSERT_QUERY = "INSERT INTO punishments (`key`, `affect`, `type`, `expiration`, `reason`, `punishedBy`) VALUES (?, ?, ?, ?, ?, ?)";
-	private static final String UPDATE_QUERY = "UPDATE punishments SET expiration = ? WHERE id = ?";
-	
-	private int _id;
-	private final String _key;
-	private final PunishmentAffect _affect;
-	private final PunishmentType _type;
-	private final long _expirationTime;
-	private final String _reason;
-	private final String _punishedBy;
-	private boolean _isStored;
-	private ScheduledFuture<?> _task = null;
-	
-	public PunishmentTask(Object key, PunishmentAffect affect, PunishmentType type, long expirationTime, String reason, String punishedBy)
-	{
-		this(0, key, affect, type, expirationTime, reason, punishedBy, false);
-	}
-	
-	public PunishmentTask(int id, Object key, PunishmentAffect affect, PunishmentType type, long expirationTime, String reason, String punishedBy, boolean isStored)
-	{
-		_id = id;
-		_key = String.valueOf(key);
-		_affect = affect;
-		_type = type;
-		_expirationTime = expirationTime;
-		_reason = reason;
-		_punishedBy = punishedBy;
-		_isStored = isStored;
-		
-		startPunishment();
-	}
-	
-	/**
-	 * @return affection value charId, account, ip, etc..
-	 */
-	public Object getKey()
-	{
-		return _key;
-	}
-	
-	/**
-	 * @return {@link PunishmentAffect} affection type, account, character, ip, etc..
-	 */
-	public PunishmentAffect getAffect()
-	{
-		return _affect;
-	}
-	
-	/**
-	 * @return {@link PunishmentType} type of current punishment.
-	 */
-	public PunishmentType getType()
-	{
-		return _type;
-	}
-	
-	/**
-	 * @return milliseconds to the end of the current punishment, -1 for infinity.
-	 */
-	public final long getExpirationTime()
-	{
-		return _expirationTime;
-	}
-	
-	/**
-	 * @return the reason for this punishment.
-	 */
-	public String getReason()
-	{
-		return _reason;
-	}
-	
-	/**
-	 * @return name of the punishment issuer.
-	 */
-	public String getPunishedBy()
-	{
-		return _punishedBy;
-	}
-	
-	/**
-	 * @return {@code true} if current punishment task is stored in database, {@code false} otherwise.
-	 */
-	public boolean isStored()
-	{
-		return _isStored;
-	}
-	
-	/**
-	 * @return {@code true} if current punishment task has expired, {@code false} otherwise.
-	 */
-	public final boolean isExpired()
-	{
-		return (_expirationTime > 0) && (System.currentTimeMillis() > _expirationTime);
-	}
-	
-	/**
-	 * Activates the punishment task.
-	 */
-	private void startPunishment()
-	{
-		if (isExpired())
-		{
-			return;
-		}
-		
-		onStart();
-		if (_expirationTime > 0) // Has expiration?
-		{
-			_task = ThreadPoolManager.getInstance().scheduleGeneral(this, (_expirationTime - System.currentTimeMillis()));
-		}
-	}
-	
-	/**
-	 * Stops the punishment task.
-	 */
-	public final void stopPunishment()
-	{
-		abortTask();
-		onEnd();
-	}
-	
-	/**
-	 * Aborts the scheduled task.
-	 */
-	private void abortTask()
-	{
-		if (_task != null)
-		{
-			if (!_task.isCancelled() && !_task.isDone())
-			{
-				_task.cancel(false);
-			}
-			_task = null;
-		}
-	}
-	
-	/**
-	 * Store and activate punishment upon start.
-	 */
-	private void onStart()
-	{
-		if (!_isStored)
-		{
-			try (Connection con = L2DatabaseFactory.getInstance().getConnection();
-				PreparedStatement st = con.prepareStatement(INSERT_QUERY, Statement.RETURN_GENERATED_KEYS))
-			{
-				st.setString(1, _key);
-				st.setString(2, _affect.name());
-				st.setString(3, _type.name());
-				st.setLong(4, _expirationTime);
-				st.setString(5, _reason);
-				st.setString(6, _punishedBy);
-				st.execute();
-				try (ResultSet rset = st.getGeneratedKeys())
-				{
-					if (rset.next())
-					{
-						_id = rset.getInt(1);
-					}
-				}
-				_isStored = true;
-			}
-			catch (SQLException e)
-			{
-				_log.log(Level.WARNING, getClass().getSimpleName() + ": Couldn't store punishment task for: " + _affect + " " + _key, e);
-			}
-		}
-		
-		final IPunishmentHandler handler = PunishmentHandler.getInstance().getHandler(_type);
-		if (handler != null)
-		{
-			handler.onStart(this);
-		}
-	}
-	
-	/**
-	 * Remove and deactivate punishment when it ends.
-	 */
-	private void onEnd()
-	{
-		if (_isStored)
-		{
-			try (Connection con = L2DatabaseFactory.getInstance().getConnection();
-				PreparedStatement st = con.prepareStatement(UPDATE_QUERY))
-			{
-				st.setLong(1, System.currentTimeMillis());
-				st.setLong(2, _id);
-				st.execute();
-			}
-			catch (SQLException e)
-			{
-				_log.log(Level.WARNING, getClass().getSimpleName() + ": Couldn't update punishment task for: " + _affect + " " + _key + " id: " + _id, e);
-			}
-		}
-		
-		final IPunishmentHandler handler = PunishmentHandler.getInstance().getHandler(_type);
-		if (handler != null)
-		{
-			handler.onEnd(this);
-		}
-	}
-	
-	/**
-	 * Runs when punishment task ends in order to stop and remove it.
-	 */
-	@Override
-	public final void run()
-	{
-		PunishmentManager.getInstance().stopPunishment(_key, _affect, _type);
-	}
-}
+/*
+ * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model.punishment;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.concurrent.ScheduledFuture;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import com.l2jserver.L2DatabaseFactory;
+import com.l2jserver.gameserver.ThreadPoolManager;
+import com.l2jserver.gameserver.handler.IPunishmentHandler;
+import com.l2jserver.gameserver.handler.PunishmentHandler;
+import com.l2jserver.gameserver.instancemanager.PunishmentManager;
+
+/**
+ * @author UnAfraid
+ */
+public class PunishmentTask implements Runnable
+{
+	protected static final Logger _log = Logger.getLogger(PunishmentTask.class.getName());
+	
+	private static final String INSERT_QUERY = "INSERT INTO punishments (`key`, `affect`, `type`, `expiration`, `reason`, `punishedBy`) VALUES (?, ?, ?, ?, ?, ?)";
+	private static final String UPDATE_QUERY = "UPDATE punishments SET expiration = ? WHERE id = ?";
+	
+	private int _id;
+	private final String _key;
+	private final PunishmentAffect _affect;
+	private final PunishmentType _type;
+	private final long _expirationTime;
+	private final String _reason;
+	private final String _punishedBy;
+	private boolean _isStored;
+	private ScheduledFuture<?> _task = null;
+	
+	public PunishmentTask(Object key, PunishmentAffect affect, PunishmentType type, long expirationTime, String reason, String punishedBy)
+	{
+		this(0, key, affect, type, expirationTime, reason, punishedBy, false);
+	}
+	
+	public PunishmentTask(int id, Object key, PunishmentAffect affect, PunishmentType type, long expirationTime, String reason, String punishedBy, boolean isStored)
+	{
+		_id = id;
+		_key = String.valueOf(key);
+		_affect = affect;
+		_type = type;
+		_expirationTime = expirationTime;
+		_reason = reason;
+		_punishedBy = punishedBy;
+		_isStored = isStored;
+		
+		startPunishment();
+	}
+	
+	/**
+	 * @return affection value charId, account, ip, etc..
+	 */
+	public Object getKey()
+	{
+		return _key;
+	}
+	
+	/**
+	 * @return {@link PunishmentAffect} affection type, account, character, ip, etc..
+	 */
+	public PunishmentAffect getAffect()
+	{
+		return _affect;
+	}
+	
+	/**
+	 * @return {@link PunishmentType} type of current punishment.
+	 */
+	public PunishmentType getType()
+	{
+		return _type;
+	}
+	
+	/**
+	 * @return milliseconds to the end of the current punishment, -1 for infinity.
+	 */
+	public final long getExpirationTime()
+	{
+		return _expirationTime;
+	}
+	
+	/**
+	 * @return the reason for this punishment.
+	 */
+	public String getReason()
+	{
+		return _reason;
+	}
+	
+	/**
+	 * @return name of the punishment issuer.
+	 */
+	public String getPunishedBy()
+	{
+		return _punishedBy;
+	}
+	
+	/**
+	 * @return {@code true} if current punishment task is stored in database, {@code false} otherwise.
+	 */
+	public boolean isStored()
+	{
+		return _isStored;
+	}
+	
+	/**
+	 * @return {@code true} if current punishment task has expired, {@code false} otherwise.
+	 */
+	public final boolean isExpired()
+	{
+		return (_expirationTime > 0) && (System.currentTimeMillis() > _expirationTime);
+	}
+	
+	/**
+	 * Activates the punishment task.
+	 */
+	private void startPunishment()
+	{
+		if (isExpired())
+		{
+			return;
+		}
+		
+		onStart();
+		if (_expirationTime > 0) // Has expiration?
+		{
+			_task = ThreadPoolManager.getInstance().scheduleGeneral(this, (_expirationTime - System.currentTimeMillis()));
+		}
+	}
+	
+	/**
+	 * Stops the punishment task.
+	 */
+	public final void stopPunishment()
+	{
+		abortTask();
+		onEnd();
+	}
+	
+	/**
+	 * Aborts the scheduled task.
+	 */
+	private void abortTask()
+	{
+		if (_task != null)
+		{
+			if (!_task.isCancelled() && !_task.isDone())
+			{
+				_task.cancel(false);
+			}
+			_task = null;
+		}
+	}
+	
+	/**
+	 * Store and activate punishment upon start.
+	 */
+	private void onStart()
+	{
+		if (!_isStored)
+		{
+			try (Connection con = L2DatabaseFactory.getInstance().getConnection();
+				PreparedStatement st = con.prepareStatement(INSERT_QUERY, Statement.RETURN_GENERATED_KEYS))
+			{
+				st.setString(1, _key);
+				st.setString(2, _affect.name());
+				st.setString(3, _type.name());
+				st.setLong(4, _expirationTime);
+				st.setString(5, _reason);
+				st.setString(6, _punishedBy);
+				st.execute();
+				try (ResultSet rset = st.getGeneratedKeys())
+				{
+					if (rset.next())
+					{
+						_id = rset.getInt(1);
+					}
+				}
+				_isStored = true;
+			}
+			catch (SQLException e)
+			{
+				_log.log(Level.WARNING, getClass().getSimpleName() + ": Couldn't store punishment task for: " + _affect + " " + _key, e);
+			}
+		}
+		
+		final IPunishmentHandler handler = PunishmentHandler.getInstance().getHandler(_type);
+		if (handler != null)
+		{
+			handler.onStart(this);
+		}
+	}
+	
+	/**
+	 * Remove and deactivate punishment when it ends.
+	 */
+	private void onEnd()
+	{
+		if (_isStored)
+		{
+			try (Connection con = L2DatabaseFactory.getInstance().getConnection();
+				PreparedStatement st = con.prepareStatement(UPDATE_QUERY))
+			{
+				st.setLong(1, System.currentTimeMillis());
+				st.setLong(2, _id);
+				st.execute();
+			}
+			catch (SQLException e)
+			{
+				_log.log(Level.WARNING, getClass().getSimpleName() + ": Couldn't update punishment task for: " + _affect + " " + _key + " id: " + _id, e);
+			}
+		}
+		
+		final IPunishmentHandler handler = PunishmentHandler.getInstance().getHandler(_type);
+		if (handler != null)
+		{
+			handler.onEnd(this);
+		}
+	}
+	
+	/**
+	 * Runs when punishment task ends in order to stop and remove it.
+	 */
+	@Override
+	public final void run()
+	{
+		PunishmentManager.getInstance().stopPunishment(_key, _affect, _type);
+	}
+}

+ 41 - 41
L2J_Server_BETA/java/com/l2jserver/gameserver/model/punishment/PunishmentType.java

@@ -1,41 +1,41 @@
-/*
- * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
- */
-package com.l2jserver.gameserver.model.punishment;
-
-/**
- * @author UnAfraid
- */
-public enum PunishmentType
-{
-	BAN,
-	CHAT_BAN,
-	JAIL;
-	
-	public static PunishmentType getByName(String name)
-	{
-		for (PunishmentType type : values())
-		{
-			if (type.name().equalsIgnoreCase(name))
-			{
-				return type;
-			}
-		}
-		return null;
-	}
-}
+/*
+ * Copyright (C) 2004-2013 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 <http://www.gnu.org/licenses/>.
+ */
+package com.l2jserver.gameserver.model.punishment;
+
+/**
+ * @author UnAfraid
+ */
+public enum PunishmentType
+{
+	BAN,
+	CHAT_BAN,
+	JAIL;
+	
+	public static PunishmentType getByName(String name)
+	{
+		for (PunishmentType type : values())
+		{
+			if (type.name().equalsIgnoreCase(name))
+			{
+				return type;
+			}
+		}
+		return null;
+	}
+}