From acade408ee76f9d884dc618573ae4f42c53dc056 Mon Sep 17 00:00:00 2001 From: Maximilian Unsinn Date: Wed, 7 Apr 2021 20:04:32 +0200 Subject: [PATCH] Initial Release --- mod_npcallmounts/LICENSE.md | 650 ++++++++++ mod_npcallmounts/README.md | 2 + mod_npcallmounts/conf/npc_allmounts.conf.dist | 9 + mod_npcallmounts/sql/npc_allmounts.sql | 28 + mod_npcallmounts/src/npc_allmounts.cpp | 654 ++++++++++ mod_npcenchanter/LICENSE.md | 650 ++++++++++ mod_npcenchanter/README.md | 2 + mod_npcenchanter/conf/npc_enchanter.conf.dist | 9 + mod_npcenchanter/sql/npc_enchanter.sql | 36 + mod_npcenchanter/src/npc_enchanter.cpp | 1109 +++++++++++++++++ 10 files changed, 3149 insertions(+) create mode 100644 mod_npcallmounts/LICENSE.md create mode 100644 mod_npcallmounts/README.md create mode 100644 mod_npcallmounts/conf/npc_allmounts.conf.dist create mode 100644 mod_npcallmounts/sql/npc_allmounts.sql create mode 100644 mod_npcallmounts/src/npc_allmounts.cpp create mode 100644 mod_npcenchanter/LICENSE.md create mode 100644 mod_npcenchanter/README.md create mode 100644 mod_npcenchanter/conf/npc_enchanter.conf.dist create mode 100644 mod_npcenchanter/sql/npc_enchanter.sql create mode 100644 mod_npcenchanter/src/npc_enchanter.cpp diff --git a/mod_npcallmounts/LICENSE.md b/mod_npcallmounts/LICENSE.md new file mode 100644 index 0000000..11e7763 --- /dev/null +++ b/mod_npcallmounts/LICENSE.md @@ -0,0 +1,650 @@ +# GNU Affero General Public License + +_Version 3, 19 November 2007_ +_Copyright © 2007 Free Software Foundation, Inc. [http://fsf.org](http://fsf.org)_ + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +## Preamble + +The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + +Developers that use our General Public Licenses protect your rights +with two steps: **(1)** assert copyright on the software, and **(2)** offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + +A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + +The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + +An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + +The precise terms and conditions for copying, distribution and +modification follow. + +## TERMS AND CONDITIONS + +### 0. Definitions + +“This License” refers to version 3 of the GNU Affero General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this +License. Each licensee is addressed as “you”. “Licensees” and +“recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a “modified version” of the +earlier work or a work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based +on the Program. + +To “propagate” a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” +to the extent that it includes a convenient and prominently visible +feature that **(1)** displays an appropriate copyright notice, and **(2)** +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +### 1. Source Code + +The “source code” for a work means the preferred form of the work +for making modifications to it. “Object code” means any non-source +form of a work. + +A “Standard Interface” means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + +The “System Libraries” of an executable work include anything, other +than the work as a whole, that **(a)** is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and **(b)** serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +“Major Component”, in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + +The Corresponding Source for a work in source code form is that +same work. + +### 2. Basic Permissions + +All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + +### 3. Protecting Users' Legal Rights From Anti-Circumvention Law + +No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + +When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + +### 4. Conveying Verbatim Copies + +You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + +### 5. Conveying Modified Source Versions + +You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + +* **a)** The work must carry prominent notices stating that you modified +it, and giving a relevant date. +* **b)** The work must carry prominent notices stating that it is +released under this License and any conditions added under section 7. +This requirement modifies the requirement in section 4 to +“keep intact all notices”. +* **c)** You must license the entire work, as a whole, under this +License to anyone who comes into possession of a copy. This +License will therefore apply, along with any applicable section 7 +additional terms, to the whole of the work, and all its parts, +regardless of how they are packaged. This License gives no +permission to license the work in any other way, but it does not +invalidate such permission if you have separately received it. +* **d)** If the work has interactive user interfaces, each must display +Appropriate Legal Notices; however, if the Program has interactive +interfaces that do not display Appropriate Legal Notices, your +work need not make them do so. + +A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +“aggregate” if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + +### 6. Conveying Non-Source Forms + +You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + +* **a)** Convey the object code in, or embodied in, a physical product +(including a physical distribution medium), accompanied by the +Corresponding Source fixed on a durable physical medium +customarily used for software interchange. +* **b)** Convey the object code in, or embodied in, a physical product +(including a physical distribution medium), accompanied by a +written offer, valid for at least three years and valid for as +long as you offer spare parts or customer support for that product +model, to give anyone who possesses the object code either **(1)** a +copy of the Corresponding Source for all the software in the +product that is covered by this License, on a durable physical +medium customarily used for software interchange, for a price no +more than your reasonable cost of physically performing this +conveying of source, or **(2)** access to copy the +Corresponding Source from a network server at no charge. +* **c)** Convey individual copies of the object code with a copy of the +written offer to provide the Corresponding Source. This +alternative is allowed only occasionally and noncommercially, and +only if you received the object code with such an offer, in accord +with subsection 6b. +* **d)** Convey the object code by offering access from a designated +place (gratis or for a charge), and offer equivalent access to the +Corresponding Source in the same way through the same place at no +further charge. You need not require recipients to copy the +Corresponding Source along with the object code. If the place to +copy the object code is a network server, the Corresponding Source +may be on a different server (operated by you or a third party) +that supports equivalent copying facilities, provided you maintain +clear directions next to the object code saying where to find the +Corresponding Source. Regardless of what server hosts the +Corresponding Source, you remain obligated to ensure that it is +available for as long as needed to satisfy these requirements. +* **e)** Convey the object code using peer-to-peer transmission, provided +you inform other peers where the object code and Corresponding +Source of the work are being offered to the general public at no +charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + +A “User Product” is either **(1)** a “consumer product”, which means any +tangible personal property which is normally used for personal, family, +or household purposes, or **(2)** anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, “normally used” refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + +If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + +The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + +### 7. Additional Terms + +“Additional permissions” are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + +* **a)** Disclaiming warranty or limiting liability differently from the +terms of sections 15 and 16 of this License; or +* **b)** Requiring preservation of specified reasonable legal notices or +author attributions in that material or in the Appropriate Legal +Notices displayed by works containing it; or +* **c)** Prohibiting misrepresentation of the origin of that material, or +requiring that modified versions of such material be marked in +reasonable ways as different from the original version; or +* **d)** Limiting the use for publicity purposes of names of licensors or +authors of the material; or +* **e)** Declining to grant rights under trademark law for use of some +trade names, trademarks, or service marks; or +* **f)** Requiring indemnification of licensors and authors of that +material by anyone who conveys the material (or modified versions of +it) with contractual assumptions of liability to the recipient, for +any liability that these contractual assumptions directly impose on +those licensors and authors. + +All other non-permissive additional terms are considered “further +restrictions” within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + +### 8. Termination + +You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + +However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated **(a)** +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and **(b)** permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + +### 9. Acceptance Not Required for Having Copies + +You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + +### 10. Automatic Licensing of Downstream Recipients + +Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + +An “entity transaction” is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + +### 11. Patents + +A “contributor” is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, “control” includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + +In the following three paragraphs, a “patent license” is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To “grant” such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + +If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either **(1)** cause the Corresponding Source to be so +available, or **(2)** arrange to deprive yourself of the benefit of the +patent license for this particular work, or **(3)** arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. “Knowingly relying” means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + +A patent license is “discriminatory” if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license **(a)** in connection with copies of the covered work +conveyed by you (or copies made from those copies), or **(b)** primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + +### 12. No Surrender of Others' Freedom + +If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + +### 13. Remote Network Interaction; Use with the GNU General Public License + +Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + +Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + +### 14. Revised Versions of this License + +The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License “or any later version” applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + +Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + +### 15. Disclaimer of Warranty + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +### 16. Limitation of Liability + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + +### 17. Interpretation of Sections 15 and 16 + +If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + +_END OF TERMS AND CONDITIONS_ + +## How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the “copyright” line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a “Source” link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + +You should also get your employer (if you work as a programmer) or school, +if any, to sign a “copyright disclaimer” for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +<>. diff --git a/mod_npcallmounts/README.md b/mod_npcallmounts/README.md new file mode 100644 index 0000000..7337f65 --- /dev/null +++ b/mod_npcallmounts/README.md @@ -0,0 +1,2 @@ +# AzerothCore-Converted-Modules-to-latest-TrinityCore +AzerothCore Converted Modules to latest TrinityCore 3.3.5a WotLK diff --git a/mod_npcallmounts/conf/npc_allmounts.conf.dist b/mod_npcallmounts/conf/npc_allmounts.conf.dist new file mode 100644 index 0000000..406b219 --- /dev/null +++ b/mod_npcallmounts/conf/npc_allmounts.conf.dist @@ -0,0 +1,9 @@ +[worldserver] + +################################################################################################### +# ALLMOUNTS NPC +################################################################################################### + +# Announce the module when the player logs in? + +AllMountsNPC.Announce = 1 \ No newline at end of file diff --git a/mod_npcallmounts/sql/npc_allmounts.sql b/mod_npcallmounts/sql/npc_allmounts.sql new file mode 100644 index 0000000..dfff8b3 --- /dev/null +++ b/mod_npcallmounts/sql/npc_allmounts.sql @@ -0,0 +1,28 @@ +USE world; + +-- ######################################################-- +-- ALL MOUNTS VENDOR - 601014 +-- ######################################################-- +SET +@Entry := 190013, +@Model := 26571, -- Large Black Knight, 21249 (Armored Orc) +@Name := "The Mountain", +@Title := "Mount Trainer", +@Icon := "Speak", +@GossipMenu := 0, +@MinLevel := 80, +@MaxLevel := 80, +@Faction := 35, +@NPCFlag := 1, +@Scale := 1.0, +@Rank := 0, +@Type := 7, +@TypeFlags := 0, +@FlagsExtra := 2, +@AIName := "SmartAI", +@Script := "AllMountsNPC"; + +-- NPC +DELETE FROM creature_template WHERE entry = @Entry; +INSERT INTO creature_template (entry, modelid1, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, faction, npcflag, speed_walk, speed_run, scale, rank, unit_class, unit_flags, type, type_flags, RegenHealth, flags_extra, AiName, ScriptName) VALUES +(@Entry, @Model, @Name, @Title, @Icon, @GossipMenu, @MinLevel, @MaxLevel, @Faction, @NPCFlag, 1, 1.14286, @Scale, @Rank, 1, 2, @Type, @TypeFlags, 1, @FlagsExtra, @AIName, @Script); \ No newline at end of file diff --git a/mod_npcallmounts/src/npc_allmounts.cpp b/mod_npcallmounts/src/npc_allmounts.cpp new file mode 100644 index 0000000..6ec382d --- /dev/null +++ b/mod_npcallmounts/src/npc_allmounts.cpp @@ -0,0 +1,654 @@ +/* + +# All Mounts NPC # + +#### A module for AzerothCore by [StygianTheBest](https://github.com/StygianTheBest/AzerothCore-Content/tree/master/Modules) +#### +#### Converted to latest TrinityCore [3.3.5a] (https://github.com/TrinityCore/TrinityCore/blob/3.3.5/) +#### By +#### TheFrozenThr0ne +#### https://GamersCentral.de (https://github.com/MaDmaX1337/) +------------------------------------------------------------------------------------------------------------------ + +### Description ### +------------------------------------------------------------------------------------------------------------------ +This NPC will teach the player every mount available in the game. + + +### To-Do ### +------------------------------------------------------------------------------------------------------------------ +- Remove all mounts not compatible with 3.3.5a + + +### Data ### +------------------------------------------------------------------------------------------------------------------ +- Type: NPC +- Script: AllMountsNPC +- Config: Yes + - Enable Module Announce +- SQL: Yes + - NPC ID: 601014 + + +### Version ### +------------------------------------------------------------------------------------------------------------------ +- v2017.07.11 - Release +- v2017.08.03 - Added Bengal Tiger + Tiger Riding + + +### Credits ### +------------------------------------------------------------------------------------------------------------------ +- [Blizzard Entertainment](http://blizzard.com) +- [TrinityCore](https://github.com/TrinityCore/TrinityCore/blob/3.3.5/THANKS) +- [SunwellCore](http://www.azerothcore.org/pages/sunwell.pl/) +- [AzerothCore](https://github.com/AzerothCore/azerothcore-wotlk/graphs/contributors) +- [AzerothCore Discord](https://discord.gg/gkt4y2x) +- [EMUDevs](https://youtube.com/user/EmuDevs) +- [AC-Web](http://ac-web.org/) +- [ModCraft.io](http://modcraft.io/) +- [OwnedCore](http://ownedcore.com/) +- [OregonCore](https://wiki.oregon-core.net/) +- [Wowhead.com](http://wowhead.com) +- [AoWoW](https://wotlk.evowow.com/) + + +### License ### +------------------------------------------------------------------------------------------------------------------ +- This code and content is released under the [GNU AGPL v3](https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3). + +*/ +#include "Define.h" +#include "ScriptMgr.h" +#include "SharedDefines.h" +#include "Unit.h" +#include "Pet.h" +#include "Player.h" +#include "ScriptPCH.h" +#include "ScriptedGossip.h" +#include "GossipDef.h" +#include "World.h" +#include "WorldPacket.h" +#include "WorldSession.h" +#include "Chat.h" +#include "Config.h" + +class AllMountsAnnounce : public PlayerScript +{ + +public: + + AllMountsAnnounce() : PlayerScript("AllMountsAnnounce") {} + + void OnLogin(Player* player, bool firstLogin) + { + if (firstLogin) { + // Announce Module + if (sConfigMgr->GetBoolDefault("AllMountsNPC.Announce", true)) + { + ChatHandler(player->GetSession()).SendSysMessage("This server is running the |cff4CFF00AllMountsNPC |rmodule."); + } + } + } +}; + +class AllMountsNPC : public CreatureScript +{ + +public: + + AllMountsNPC() : CreatureScript("AllMountsNPC") { } + + // Passive Emotes + struct NPC_PassiveAI : public ScriptedAI + { + NPC_PassiveAI(Creature* creature) : ScriptedAI(creature) { } + + bool OnGossipHello(Player* player) + { + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Learn All Mounts", GOSSIP_SENDER_MAIN, 1); + SendGossipMenuFor(player, 600025, me); + return true; + } + + bool OnGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) + { + uint32 const sender = player->PlayerTalkClass->GetGossipOptionSender(gossipListId); + uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId); + + + player->LearnSpell(10790, true); // ReinsoftheBengalTiger + player->LearnSpell(828, true); // TigerRiding + player->LearnSpell(72286, true); // Invincible'sReins + player->LearnSpell(20221, true); // Furor'sFabledSteed + player->LearnSpell(48778, true); // AcherusDeathcharger + player->LearnSpell(60025, true); // AlbinoDrake + player->LearnSpell(127180, true); // AlbinoRidingCrane + player->LearnSpell(98204, true); // AmaniBattleBear + player->LearnSpell(96503, true); // AmaniDragonhawk + player->LearnSpell(43688, true); // AmaniWarBear + player->LearnSpell(138424, true); // AmberPrimordialDirehorn + player->LearnSpell(123886, true); // AmberScorpion + player->LearnSpell(16056, true); // AncientFrostsaber + player->LearnSpell(171618, true); // AncientLeatherhide + player->LearnSpell(16081, true); // ArcticWolf + player->LearnSpell(66906, true); // ArgentCharger + player->LearnSpell(63844, true); // ArgentHippogryph + player->LearnSpell(66907, true); // ArgentWarhorse + player->LearnSpell(67466, true); // ArgentWarhorse + player->LearnSpell(139595, true); // ArmoredBloodwing + player->LearnSpell(142478, true); // ArmoredBlueDragonhawk + player->LearnSpell(61230, true); // ArmoredBlueWindRider + player->LearnSpell(60114, true); // ArmoredBrownBear + player->LearnSpell(60116, true); // ArmoredBrownBear + player->LearnSpell(171629, true); // ArmoredFrostboar + player->LearnSpell(171838, true); // ArmoredFrostwolf + player->LearnSpell(171626, true); // ArmoredIrontusk + player->LearnSpell(171630, true); // ArmoredRazorback + player->LearnSpell(96491, true); // ArmoredRazzashiRaptor + player->LearnSpell(142266, true); // ArmoredRedDragonhawk + player->LearnSpell(136400, true); // ArmoredSkyscreamer + player->LearnSpell(61229, true); // ArmoredSnowyGryphon + player->LearnSpell(132117, true); // AshenPandarenPhoenix + player->LearnSpell(40192, true); // AshesofAl'ar + player->LearnSpell(148428, true); // AshhideMushanBeast + player->LearnSpell(127170, true); // AstralCloudSerpent + player->LearnSpell(123992, true); // AzureCloudSerpent + player->LearnSpell(59567, true); // AzureDrake + player->LearnSpell(41514, true); // AzureNetherwingDrake + player->LearnSpell(127174, true); // AzureRidingCrane + player->LearnSpell(118089, true); // AzureWaterStrider + player->LearnSpell(51412, true); // BigBattleBear + player->LearnSpell(58983, true); // BigBlizzardBear + player->LearnSpell(71342, true); // BigLoveRocket + player->LearnSpell(22719, true); // BlackBattlestrider + player->LearnSpell(127286, true); // BlackDragonTurtle + player->LearnSpell(59650, true); // BlackDrake + player->LearnSpell(35022, true); // BlackHawkstrider + player->LearnSpell(16055, true); // BlackNightsaber + player->LearnSpell(138642, true); // BlackPrimalRaptor + player->LearnSpell(59976, true); // BlackProto-Drake + player->LearnSpell(25863, true); // BlackQirajiBattleTank + player->LearnSpell(26655, true); // BlackQirajiBattleTank + player->LearnSpell(26656, true); // BlackQirajiBattleTank + player->LearnSpell(17461, true); // BlackRam + player->LearnSpell(130138, true); // BlackRidingGoat + player->LearnSpell(127209, true); // BlackRidingYak + player->LearnSpell(64977, true); // BlackSkeletalHorse + player->LearnSpell(470, true); // BlackStallion + player->LearnSpell(60118, true); // BlackWarBear + player->LearnSpell(60119, true); // BlackWarBear + player->LearnSpell(48027, true); // BlackWarElekk + player->LearnSpell(22718, true); // BlackWarKodo + player->LearnSpell(59785, true); // BlackWarMammoth + player->LearnSpell(59788, true); // BlackWarMammoth + player->LearnSpell(22720, true); // BlackWarRam + player->LearnSpell(22721, true); // BlackWarRaptor + player->LearnSpell(22717, true); // BlackWarSteed + player->LearnSpell(22723, true); // BlackWarTiger + player->LearnSpell(22724, true); // BlackWarWolf + player->LearnSpell(64658, true); // BlackWolf + player->LearnSpell(171627, true); // BlacksteelBattleboar + player->LearnSpell(107842, true); // BlazingDrake + player->LearnSpell(74856, true); // BlazingHippogryph + player->LearnSpell(127220, true); // BlondeRidingYak + player->LearnSpell(72808, true); // BloodbathedFrostbroodVanquisher + player->LearnSpell(171620, true); // BloodhoofBull + player->LearnSpell(127287, true); // BlueDragonTurtle + player->LearnSpell(61996, true); // BlueDragonhawk + player->LearnSpell(59568, true); // BlueDrake + player->LearnSpell(35020, true); // BlueHawkstrider + player->LearnSpell(10969, true); // BlueMechanostrider + player->LearnSpell(59996, true); // BlueProto-Drake + player->LearnSpell(25953, true); // BlueQirajiBattleTank + player->LearnSpell(39803, true); // BlueRidingNetherRay + player->LearnSpell(129934, true); // BlueShado-PanRidingTiger + player->LearnSpell(17463, true); // BlueSkeletalHorse + player->LearnSpell(64656, true); // BlueSkeletalWarhorse + player->LearnSpell(32244, true); // BlueWindRider + player->LearnSpell(138640, true); // Bone-WhitePrimalRaptor + player->LearnSpell(142641, true); // Brawler'sBurlyMushanBeast + player->LearnSpell(171832, true); // BreezestriderStallion + player->LearnSpell(50869, true); // BrewfestKodo + player->LearnSpell(43899, true); // BrewfestRam + player->LearnSpell(190690, true); // BristlingHellboar + player->LearnSpell(59569, true); // BronzeDrake + player->LearnSpell(127288, true); // BrownDragonTurtle + player->LearnSpell(34406, true); // BrownElekk + player->LearnSpell(458, true); // BrownHorse + player->LearnSpell(18990, true); // BrownKodo + player->LearnSpell(6899, true); // BrownRam + player->LearnSpell(88748, true); // BrownRidingCamel + player->LearnSpell(130086, true); // BrownRidingGoat + player->LearnSpell(127213, true); // BrownRidingYak + player->LearnSpell(17464, true); // BrownSkeletalHorse + player->LearnSpell(6654, true); // BrownWolf + player->LearnSpell(58615, true); // BrutalNetherDrake + player->LearnSpell(124550, true); // CataclysmicGladiator'sTwilightDrake + player->LearnSpell(75614, true); // CelestialSteed + player->LearnSpell(43927, true); // CenarionWarHippogryph + player->LearnSpell(171848, true); // Challenger'sWarYeti + player->LearnSpell(171846, true); // Champion'sTreadblade + player->LearnSpell(6648, true); // ChestnutMare + player->LearnSpell(171847, true); // CindermaneCharger + player->LearnSpell(139448, true); // ClutchofJi-Kun + player->LearnSpell(189364, true); // CoalfistGronnling + player->LearnSpell(41515, true); // CobaltNetherwingDrake + player->LearnSpell(138423, true); // CobaltPrimordialDirehorn + player->LearnSpell(39315, true); // CobaltRidingTalbuk + player->LearnSpell(34896, true); // CobaltWarTalbuk + player->LearnSpell(170347, true); // CoreHound + player->LearnSpell(183117, true); // CorruptedDreadwing + player->LearnSpell(97560, true); // CorruptedFireHawk + player->LearnSpell(102514, true); // CorruptedHippogryph + player->LearnSpell(169952, true); // CreepingCarpet + player->LearnSpell(127156, true); // CrimsonCloudSerpent + player->LearnSpell(73313, true); // CrimsonDeathcharger + player->LearnSpell(129552, true); // CrimsonPandarenPhoenix + player->LearnSpell(140250, true); // CrimsonPrimalDirehorn + player->LearnSpell(123160, true); // CrimsonRidingCrane + player->LearnSpell(127271, true); // CrimsonWaterStrider + player->LearnSpell(68188, true); // Crusader'sBlackWarhorse + player->LearnSpell(68187, true); // Crusader'sWhiteWarhorse + player->LearnSpell(88990, true); // DarkPhoenix + player->LearnSpell(39316, true); // DarkRidingTalbuk + player->LearnSpell(34790, true); // DarkWarTalbuk + player->LearnSpell(103081, true); // DarkmoonDancingBear + player->LearnSpell(63635, true); // DarkspearRaptor + player->LearnSpell(63637, true); // DarnassianNightsaber + player->LearnSpell(64927, true); // DeadlyGladiator'sFrostWyrm + player->LearnSpell(190977, true); // DeathtuskFelboar + player->LearnSpell(193007, true); // Demonsaber + player->LearnSpell(126507, true); // Depleted-KypariumRocket + player->LearnSpell(6653, true); // DireWolf + player->LearnSpell(171634, true); // DomesticatedRazorback + player->LearnSpell(88335, true); // DrakeoftheEastWind + player->LearnSpell(88742, true); // DrakeoftheNorthWind + player->LearnSpell(88744, true); // DrakeoftheSouthWind + player->LearnSpell(88741, true); // DrakeoftheWestWind + player->LearnSpell(155741, true); // DreadRaven + player->LearnSpell(148972, true); // Dreadsteed + player->LearnSpell(171844, true); // DustmaneDirewolf + player->LearnSpell(171625, true); // DustyRockhide + player->LearnSpell(32239, true); // EbonGryphon + player->LearnSpell(194464, true); // EclipseDragonhawk + player->LearnSpell(175700, true); // EmeraldDrake + player->LearnSpell(149801, true); // EmeraldHippogryph + player->LearnSpell(132118, true); // EmeraldPandarenPhoenix + player->LearnSpell(8395, true); // EmeraldRaptor + player->LearnSpell(142878, true); // EnchantedFeyDragon + player->LearnSpell(63639, true); // ExodarElekk + player->LearnSpell(110039, true); // Experiment12-B + player->LearnSpell(113120, true); // Feldrake + player->LearnSpell(97501, true); // FelfireHawk + player->LearnSpell(200175, true); // Felsaber + player->LearnSpell(148970, true); // Felsteed + player->LearnSpell(182912, true); // FelsteelAnnihilator + player->LearnSpell(36702, true); // FieryWarhorse + player->LearnSpell(101542, true); // FlametalonofAlysrazor + player->LearnSpell(97359, true); // FlamewardHippogryph + player->LearnSpell(61451, true); // FlyingCarpet + player->LearnSpell(44153, true); // FlyingMachine + player->LearnSpell(63643, true); // ForsakenWarhorse + player->LearnSpell(84751, true); // FossilizedRaptor + player->LearnSpell(17460, true); // FrostRam + player->LearnSpell(171632, true); // FrostplainsBattleboar + player->LearnSpell(23509, true); // FrostwolfHowler + player->LearnSpell(75596, true); // FrostyFlyingCarpet + player->LearnSpell(65439, true); // FuriousGladiator'sFrostWyrm + player->LearnSpell(171851, true); // GarnNighthowl + player->LearnSpell(171836, true); // GarnSteelmaw + player->LearnSpell(126508, true); // GeosynchronousWorldSpinner + player->LearnSpell(136505, true); // GhastlyCharger + player->LearnSpell(171635, true); // GiantColdsnout + player->LearnSpell(63638, true); // GnomereganMechanostrider + player->LearnSpell(89520, true); // GoblinMiniHotrod + player->LearnSpell(87090, true); // GoblinTrike + player->LearnSpell(87091, true); // GoblinTurbo-Trike + player->LearnSpell(123993, true); // GoldenCloudSerpent + player->LearnSpell(32235, true); // GoldenGryphon + player->LearnSpell(90621, true); // GoldenKing + player->LearnSpell(140249, true); // GoldenPrimalDirehorn + player->LearnSpell(127176, true); // GoldenRidingCrane + player->LearnSpell(127278, true); // GoldenWaterStrider + player->LearnSpell(171436, true); // GorestriderGronnling + player->LearnSpell(135416, true); // GrandArmoredGryphon + player->LearnSpell(135418, true); // GrandArmoredWyvern + player->LearnSpell(61465, true); // GrandBlackWarMammoth + player->LearnSpell(61467, true); // GrandBlackWarMammoth + player->LearnSpell(122708, true); // GrandExpeditionYak + player->LearnSpell(136163, true); // GrandGryphon + player->LearnSpell(61470, true); // GrandIceMammoth + player->LearnSpell(61469, true); // GrandIceMammoth + player->LearnSpell(136164, true); // GrandWyvern + player->LearnSpell(35710, true); // GrayElekk + player->LearnSpell(18989, true); // GrayKodo + player->LearnSpell(6777, true); // GrayRam + player->LearnSpell(127295, true); // GreatBlackDragonTurtle + player->LearnSpell(127302, true); // GreatBlueDragonTurtle + player->LearnSpell(35713, true); // GreatBlueElekk + player->LearnSpell(49379, true); // GreatBrewfestKodo + player->LearnSpell(127308, true); // GreatBrownDragonTurtle + player->LearnSpell(23249, true); // GreatBrownKodo + player->LearnSpell(65641, true); // GreatGoldenKodo + player->LearnSpell(23248, true); // GreatGrayKodo + player->LearnSpell(127293, true); // GreatGreenDragonTurtle + player->LearnSpell(35712, true); // GreatGreenElekk + player->LearnSpell(171636, true); // GreatGreytusk + player->LearnSpell(127310, true); // GreatPurpleDragonTurtle + player->LearnSpell(35714, true); // GreatPurpleElekk + player->LearnSpell(120822, true); // GreatRedDragonTurtle + player->LearnSpell(65637, true); // GreatRedElekk + player->LearnSpell(23247, true); // GreatWhiteKodo + player->LearnSpell(120395, true); // GreenDragonTurtle + player->LearnSpell(18991, true); // GreenKodo + player->LearnSpell(17453, true); // GreenMechanostrider + player->LearnSpell(138643, true); // GreenPrimalRaptor + player->LearnSpell(61294, true); // GreenProto-Drake + player->LearnSpell(26056, true); // GreenQirajiBattleTank + player->LearnSpell(39798, true); // GreenRidingNetherRay + player->LearnSpell(129932, true); // GreenShado-PanRidingTiger + player->LearnSpell(17465, true); // GreenSkeletalWarhorse + player->LearnSpell(32245, true); // GreenWindRider + player->LearnSpell(88750, true); // GreyRidingCamel + player->LearnSpell(127216, true); // GreyRidingYak + player->LearnSpell(148619, true); // GrievousGladiator'sCloudSerpent + player->LearnSpell(163025, true); // GrinningReaver + player->LearnSpell(189999, true); // GroveWarden + player->LearnSpell(48025, true); // HeadlessHorseman'sMount + player->LearnSpell(110051, true); // HeartoftheAspects + player->LearnSpell(142073, true); // Hearthsteed + player->LearnSpell(127169, true); // HeavenlyAzureCloudSerpent + player->LearnSpell(127161, true); // HeavenlyCrimsonCloudSerpent + player->LearnSpell(127164, true); // HeavenlyGoldenCloudSerpent + player->LearnSpell(127165, true); // HeavenlyJadeCloudSerpent + player->LearnSpell(127158, true); // HeavenlyOnyxCloudSerpent + player->LearnSpell(59799, true); // IceMammoth + player->LearnSpell(59797, true); // IceMammoth + player->LearnSpell(72807, true); // IceboundFrostbroodVanquisher + player->LearnSpell(17459, true); // IcyBlueMechanostriderModA + player->LearnSpell(189998, true); // IllidariFelstalker + player->LearnSpell(124659, true); // ImperialQuilen + player->LearnSpell(186305, true); // InfernalDirewolf + player->LearnSpell(201098, true); // InfiniteTimereaver + player->LearnSpell(153489, true); // IronSkyreaver + player->LearnSpell(63956, true); // IronboundProto-Drake + player->LearnSpell(142910, true); // IronboundWraithcharger + player->LearnSpell(63636, true); // IronforgeRam + player->LearnSpell(171621, true); // IronhoofDestroyer + player->LearnSpell(171839, true); // IronsideWarwolf + player->LearnSpell(17450, true); // IvoryRaptor + player->LearnSpell(113199, true); // JadeCloudSerpent + player->LearnSpell(133023, true); // JadePandarenKite + player->LearnSpell(121837, true); // JadePanther + player->LearnSpell(138426, true); // JadePrimordialDirehorn + player->LearnSpell(127274, true); // JadeWaterStrider + player->LearnSpell(120043, true); // JeweledOnyxPanther + player->LearnSpell(127178, true); // JungleRidingCrane + player->LearnSpell(93644, true); // Kor'kronAnnihilator + player->LearnSpell(148417, true); // Kor'kronJuggernaut + player->LearnSpell(148396, true); // Kor'kronWarWolf + player->LearnSpell(107845, true); // Life-Binder'sHandmaiden + player->LearnSpell(65917, true); // MagicRooster + player->LearnSpell(61309, true); // MagnificentFlyingCarpet + player->LearnSpell(139407, true); // MalevolentGladiator'sCloudSerpent + player->LearnSpell(55531, true); // Mechano-Hog + player->LearnSpell(60424, true); // Mekgineer'sChopper + player->LearnSpell(44744, true); // MercilessNetherDrake + player->LearnSpell(63796, true); // Mimiron'sHead + player->LearnSpell(191314, true); // MinionofGrumpus + player->LearnSpell(171825, true); // MosshideRiverwallow + player->LearnSpell(93623, true); // MottledDrake + player->LearnSpell(171622, true); // MottledMeadowstomper + player->LearnSpell(16084, true); // MottledRedRaptor + player->LearnSpell(171850, true); // MountTemplate49 + player->LearnSpell(171827, true); // MountTemplate50 + player->LearnSpell(171840, true); // MountTemplate51 + player->LearnSpell(103195, true); // MountainHorse + player->LearnSpell(171826, true); // MudbackRiverbeast + player->LearnSpell(180545, true); // MysticRunesaber + player->LearnSpell(121820, true); // ObsidianNightwing + player->LearnSpell(66846, true); // OchreSkeletalWarhorse + player->LearnSpell(127154, true); // OnyxCloudSerpent + player->LearnSpell(41513, true); // OnyxNetherwingDrake + player->LearnSpell(69395, true); // OnyxianDrake + player->LearnSpell(127272, true); // OrangeWaterStrider + player->LearnSpell(63640, true); // OrgrimmarWolf + player->LearnSpell(171833, true); // PaleThorngrazer + player->LearnSpell(16082, true); // Palomino + player->LearnSpell(118737, true); // PandarenKite + player->LearnSpell(130985, true); // PandarenKite + player->LearnSpell(32345, true); // PeepthePhoenixMount + player->LearnSpell(88718, true); // PhosphorescentStoneDrake + player->LearnSpell(472, true); // Pinto + player->LearnSpell(60021, true); // PlaguedProto-Drake + player->LearnSpell(193695, true); // PrestigiousWarSteed + player->LearnSpell(204166, true); // PrestigiousWarWolf + player->LearnSpell(148620, true); // PridefulGladiator'sCloudSerpent + player->LearnSpell(186828, true); // PrimalGladiator'sFelbloodGronnling + player->LearnSpell(97493, true); // PurebloodFireHawk + player->LearnSpell(127289, true); // PurpleDragonTurtle + player->LearnSpell(35711, true); // PurpleElekk + player->LearnSpell(35018, true); // PurpleHawkstrider + player->LearnSpell(41516, true); // PurpleNetherwingDrake + player->LearnSpell(39801, true); // PurpleRidingNetherRay + player->LearnSpell(23246, true); // PurpleSkeletalWarhorse + player->LearnSpell(66090, true); // Quel'doreiSteed + player->LearnSpell(41252, true); // RavenLord + player->LearnSpell(127290, true); // RedDragonTurtle + player->LearnSpell(61997, true); // RedDragonhawk + player->LearnSpell(59570, true); // RedDrake + player->LearnSpell(130092, true); // RedFlyingCloud + player->LearnSpell(34795, true); // RedHawkstrider + player->LearnSpell(10873, true); // RedMechanostrider + player->LearnSpell(138641, true); // RedPrimalRaptor + player->LearnSpell(59961, true); // RedProto-Drake + player->LearnSpell(26054, true); // RedQirajiBattleTank + player->LearnSpell(39800, true); // RedRidingNetherRay + player->LearnSpell(129935, true); // RedShado-PanRidingTiger + player->LearnSpell(17462, true); // RedSkeletalHorse + player->LearnSpell(22722, true); // RedSkeletalWarhorse + player->LearnSpell(16080, true); // RedWolf + player->LearnSpell(127177, true); // RegalRidingCrane + player->LearnSpell(67336, true); // RelentlessGladiator'sFrostWyrm + player->LearnSpell(30174, true); // RidingTurtle + player->LearnSpell(17481, true); // Rivendare'sDeathcharger + player->LearnSpell(171628, true); // RocktuskBattleboar + player->LearnSpell(121838, true); // RubyPanther + player->LearnSpell(63963, true); // RustedProto-Drake + player->LearnSpell(101821, true); // RuthlessGladiator'sTwilightDrake + player->LearnSpell(93326, true); // SandstoneDrake + player->LearnSpell(121836, true); // SapphirePanther + player->LearnSpell(171824, true); // SapphireRiverbeast + player->LearnSpell(97581, true); // SavageRaptor + player->LearnSpell(64731, true); // SeaTurtle + player->LearnSpell(171624, true); // ShadowhidePearltusk + player->LearnSpell(171829, true); // ShadowmaneCharger + player->LearnSpell(66087, true); // SilverCovenantHippogryph + player->LearnSpell(39802, true); // SilverRidingNetherRay + player->LearnSpell(39317, true); // SilverRidingTalbuk + player->LearnSpell(34898, true); // SilverWarTalbuk + player->LearnSpell(63642, true); // SilvermoonHawkstrider + player->LearnSpell(134359, true); // SkyGolem + player->LearnSpell(138425, true); // SlatePrimordialDirehorn + player->LearnSpell(171843, true); // SmokyDirewolf + player->LearnSpell(32240, true); // SnowyGryphon + player->LearnSpell(191633, true); // SoaringSkyterror + player->LearnSpell(171828, true); // SolarSpirehawk + player->LearnSpell(130965, true); // SonofGalleon + player->LearnSpell(148392, true); // SpawnofGalakras + player->LearnSpell(136471, true); // SpawnofHorridon + player->LearnSpell(107516, true); // SpectralGryphon + player->LearnSpell(92231, true); // SpectralSteed + player->LearnSpell(42776, true); // SpectralTiger + player->LearnSpell(107517, true); // SpectralWindRider + player->LearnSpell(92232, true); // SpectralWolf + player->LearnSpell(196681, true); // SpiritofEche'ro + player->LearnSpell(10789, true); // SpottedFrostsaber + player->LearnSpell(147595, true); // Stormcrow + player->LearnSpell(23510, true); // StormpikeBattleCharger + player->LearnSpell(63232, true); // StormwindSteed + player->LearnSpell(66847, true); // StripedDawnsaber + player->LearnSpell(8394, true); // StripedFrostsaber + player->LearnSpell(10793, true); // StripedNightsaber + player->LearnSpell(98718, true); // SubduedSeahorse + player->LearnSpell(179245, true); // SummonChauffeur + player->LearnSpell(179244, true); // SummonChauffeur + player->LearnSpell(171849, true); // SunhideGronnling + player->LearnSpell(66088, true); // SunreaverDragonhawk + player->LearnSpell(66091, true); // SunreaverHawkstrider + player->LearnSpell(121839, true); // SunstonePanther + player->LearnSpell(68057, true); // SwiftAllianceSteed + player->LearnSpell(32242, true); // SwiftBlueGryphon + player->LearnSpell(23241, true); // SwiftBlueRaptor + player->LearnSpell(171830, true); // SwiftBreezestrider + player->LearnSpell(43900, true); // SwiftBrewfestRam + player->LearnSpell(23238, true); // SwiftBrownRam + player->LearnSpell(23229, true); // SwiftBrownSteed + player->LearnSpell(23250, true); // SwiftBrownWolf + player->LearnSpell(65646, true); // SwiftBurgundyWolf + player->LearnSpell(102346, true); // SwiftForestStrider + player->LearnSpell(23221, true); // SwiftFrostsaber + player->LearnSpell(171842, true); // SwiftFrostwolf + player->LearnSpell(23239, true); // SwiftGrayRam + player->LearnSpell(65640, true); // SwiftGraySteed + player->LearnSpell(23252, true); // SwiftGrayWolf + player->LearnSpell(32290, true); // SwiftGreenGryphon + player->LearnSpell(35025, true); // SwiftGreenHawkstrider + player->LearnSpell(23225, true); // SwiftGreenMechanostrider + player->LearnSpell(32295, true); // SwiftGreenWindRider + player->LearnSpell(68056, true); // SwiftHordeWolf + player->LearnSpell(102350, true); // SwiftLovebird + player->LearnSpell(23219, true); // SwiftMistsaber + player->LearnSpell(65638, true); // SwiftMoonsaber + player->LearnSpell(103196, true); // SwiftMountainHorse + player->LearnSpell(37015, true); // SwiftNetherDrake + player->LearnSpell(23242, true); // SwiftOliveRaptor + player->LearnSpell(23243, true); // SwiftOrangeRaptor + player->LearnSpell(23227, true); // SwiftPalomino + player->LearnSpell(33660, true); // SwiftPinkHawkstrider + player->LearnSpell(32292, true); // SwiftPurpleGryphon + player->LearnSpell(35027, true); // SwiftPurpleHawkstrider + player->LearnSpell(65644, true); // SwiftPurpleRaptor + player->LearnSpell(32297, true); // SwiftPurpleWindRider + player->LearnSpell(24242, true); // SwiftRazzashiRaptor + player->LearnSpell(32289, true); // SwiftRedGryphon + player->LearnSpell(65639, true); // SwiftRedHawkstrider + player->LearnSpell(32246, true); // SwiftRedWindRider + player->LearnSpell(101573, true); // SwiftShorestrider + player->LearnSpell(55164, true); // SwiftSpectralGryphon + player->LearnSpell(194046, true); // SwiftSpectralRylak + player->LearnSpell(42777, true); // SwiftSpectralTiger + player->LearnSpell(102349, true); // SwiftSpringstrider + player->LearnSpell(23338, true); // SwiftStormsaber + player->LearnSpell(23251, true); // SwiftTimberWolf + player->LearnSpell(65643, true); // SwiftVioletRam + player->LearnSpell(35028, true); // SwiftWarstrider + player->LearnSpell(46628, true); // SwiftWhiteHawkstrider + player->LearnSpell(23223, true); // SwiftWhiteMechanostrider + player->LearnSpell(23240, true); // SwiftWhiteRam + player->LearnSpell(23228, true); // SwiftWhiteSteed + player->LearnSpell(134573, true); // SwiftWindsteed + player->LearnSpell(23222, true); // SwiftYellowMechanostrider + player->LearnSpell(32296, true); // SwiftYellowWindRider + player->LearnSpell(49322, true); // SwiftZhevra + player->LearnSpell(96499, true); // SwiftZulianPanther + player->LearnSpell(24252, true); // SwiftZulianTiger + player->LearnSpell(88749, true); // TanRidingCamel + player->LearnSpell(39318, true); // TanRidingTalbuk + player->LearnSpell(34899, true); // TanWarTalbuk + player->LearnSpell(32243, true); // TawnyWindRider + player->LearnSpell(18992, true); // TealKodo + player->LearnSpell(63641, true); // ThunderBluffKodo + player->LearnSpell(129918, true); // ThunderingAugustCloudSerpent + player->LearnSpell(139442, true); // ThunderingCobaltCloudSerpent + player->LearnSpell(124408, true); // ThunderingJadeCloudSerpent + player->LearnSpell(148476, true); // ThunderingOnyxCloudSerpent + player->LearnSpell(132036, true); // ThunderingRubyCloudSerpent + player->LearnSpell(580, true); // TimberWolf + player->LearnSpell(60002, true); // Time-LostProto-Drake + player->LearnSpell(171617, true); // TrainedIcehoof + player->LearnSpell(171623, true); // TrainedMeadowstomper + player->LearnSpell(171638, true); // TrainedRiverwallow + player->LearnSpell(171637, true); // TrainedRocktusk + player->LearnSpell(171831, true); // TrainedSilverpelt + player->LearnSpell(171841, true); // TrainedSnarler + player->LearnSpell(61425, true); // Traveler'sTundraMammoth + player->LearnSpell(61447, true); // Traveler'sTundraMammoth + player->LearnSpell(171619, true); // TundraIcehoof + player->LearnSpell(44151, true); // Turbo-ChargedFlyingMachine + player->LearnSpell(65642, true); // Turbostrider + player->LearnSpell(10796, true); // TurquoiseRaptor + player->LearnSpell(59571, true); // TwilightDrake + player->LearnSpell(107844, true); // TwilightHarbinger + player->LearnSpell(107203, true); // Tyrael'sCharger + player->LearnSpell(148618, true); // TyrannicalGladiator'sCloudSerpent + player->LearnSpell(92155, true); // UltramarineQirajiBattleTank + player->LearnSpell(17454, true); // UnpaintedMechanostrider + player->LearnSpell(75207, true); // Vashj'irSeahorse + player->LearnSpell(49193, true); // VengefulNetherDrake + player->LearnSpell(64659, true); // VenomhideRavasaur + player->LearnSpell(41517, true); // VeridianNetherwingDrake + player->LearnSpell(101282, true); // ViciousGladiator'sTwilightDrake + player->LearnSpell(146622, true); // ViciousSkeletalWarhorse + player->LearnSpell(185052, true); // ViciousWarKodo + player->LearnSpell(183889, true); // ViciousWarMechanostrider + player->LearnSpell(171834, true); // ViciousWarRam + player->LearnSpell(171835, true); // ViciousWarRaptor + player->LearnSpell(100332, true); // ViciousWarSteed + player->LearnSpell(100333, true); // ViciousWarWolf + player->LearnSpell(146615, true); // ViciousWarsaber + player->LearnSpell(41518, true); // VioletNetherwingDrake + player->LearnSpell(132119, true); // VioletPandarenPhoenix + player->LearnSpell(60024, true); // VioletProto-Drake + player->LearnSpell(10799, true); // VioletRaptor + player->LearnSpell(88746, true); // VitreousStoneDrake + player->LearnSpell(179478, true); // VoidtalonoftheDarkStar + player->LearnSpell(88331, true); // VolcanicStoneDrake + player->LearnSpell(163024, true); // WarforgedNightmare + player->LearnSpell(171845, true); // Warlord'sDeathwheel + player->LearnSpell(189044, true); // WarmongeringGladiator'sFelbloodGronnling + player->LearnSpell(171837, true); // WarsongDirefang + player->LearnSpell(64657, true); // WhiteKodo + player->LearnSpell(15779, true); // WhiteMechanostriderModB + player->LearnSpell(54753, true); // WhitePolarBear + player->LearnSpell(6898, true); // WhiteRam + player->LearnSpell(102488, true); // WhiteRidingCamel + player->LearnSpell(130137, true); // WhiteRidingGoat + player->LearnSpell(39319, true); // WhiteRidingTalbuk + player->LearnSpell(123182, true); // WhiteRidingYak + player->LearnSpell(65645, true); // WhiteSkeletalWarhorse + player->LearnSpell(16083, true); // WhiteStallion + player->LearnSpell(34897, true); // WhiteWarTalbuk + player->LearnSpell(189043, true); // WildGladiator'sFelbloodGronnling + player->LearnSpell(171633, true); // WildGoretusk + player->LearnSpell(98727, true); // WingedGuardian + player->LearnSpell(54729, true); // WingedSteedoftheEbonBlade + player->LearnSpell(17229, true); // WinterspringFrostsaber + player->LearnSpell(171616, true); // WitherhideCliffstomper + player->LearnSpell(59791, true); // WoolyMammoth + player->LearnSpell(59793, true); // WoolyMammoth + player->LearnSpell(74918, true); // WoolyWhiteRhino + player->LearnSpell(71810, true); // WrathfulGladiator'sFrostWyrm + player->LearnSpell(46197, true); // X-51Nether-Rocket + player->LearnSpell(46199, true); // X-51Nether-RocketX-TREME + player->LearnSpell(75973, true); // X-53TouringRocket + player->LearnSpell(26055, true); // YellowQirajiBattleTank + + // Goodbye + CloseGossipMenuFor(player); + return true; + } + }; + + // CREATURE AI + CreatureAI* GetAI(Creature* creature) const override + { + return new NPC_PassiveAI(creature); + } +}; + +void AddAllMountsNPCScripts() +{ + new AllMountsAnnounce(); + new AllMountsNPC(); +} diff --git a/mod_npcenchanter/LICENSE.md b/mod_npcenchanter/LICENSE.md new file mode 100644 index 0000000..11e7763 --- /dev/null +++ b/mod_npcenchanter/LICENSE.md @@ -0,0 +1,650 @@ +# GNU Affero General Public License + +_Version 3, 19 November 2007_ +_Copyright © 2007 Free Software Foundation, Inc. [http://fsf.org](http://fsf.org)_ + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +## Preamble + +The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + +Developers that use our General Public Licenses protect your rights +with two steps: **(1)** assert copyright on the software, and **(2)** offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + +A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + +The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + +An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + +The precise terms and conditions for copying, distribution and +modification follow. + +## TERMS AND CONDITIONS + +### 0. Definitions + +“This License” refers to version 3 of the GNU Affero General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this +License. Each licensee is addressed as “you”. “Licensees” and +“recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a “modified version” of the +earlier work or a work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based +on the Program. + +To “propagate” a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” +to the extent that it includes a convenient and prominently visible +feature that **(1)** displays an appropriate copyright notice, and **(2)** +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +### 1. Source Code + +The “source code” for a work means the preferred form of the work +for making modifications to it. “Object code” means any non-source +form of a work. + +A “Standard Interface” means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + +The “System Libraries” of an executable work include anything, other +than the work as a whole, that **(a)** is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and **(b)** serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +“Major Component”, in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + +The Corresponding Source for a work in source code form is that +same work. + +### 2. Basic Permissions + +All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + +### 3. Protecting Users' Legal Rights From Anti-Circumvention Law + +No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + +When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + +### 4. Conveying Verbatim Copies + +You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + +### 5. Conveying Modified Source Versions + +You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + +* **a)** The work must carry prominent notices stating that you modified +it, and giving a relevant date. +* **b)** The work must carry prominent notices stating that it is +released under this License and any conditions added under section 7. +This requirement modifies the requirement in section 4 to +“keep intact all notices”. +* **c)** You must license the entire work, as a whole, under this +License to anyone who comes into possession of a copy. This +License will therefore apply, along with any applicable section 7 +additional terms, to the whole of the work, and all its parts, +regardless of how they are packaged. This License gives no +permission to license the work in any other way, but it does not +invalidate such permission if you have separately received it. +* **d)** If the work has interactive user interfaces, each must display +Appropriate Legal Notices; however, if the Program has interactive +interfaces that do not display Appropriate Legal Notices, your +work need not make them do so. + +A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +“aggregate” if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + +### 6. Conveying Non-Source Forms + +You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + +* **a)** Convey the object code in, or embodied in, a physical product +(including a physical distribution medium), accompanied by the +Corresponding Source fixed on a durable physical medium +customarily used for software interchange. +* **b)** Convey the object code in, or embodied in, a physical product +(including a physical distribution medium), accompanied by a +written offer, valid for at least three years and valid for as +long as you offer spare parts or customer support for that product +model, to give anyone who possesses the object code either **(1)** a +copy of the Corresponding Source for all the software in the +product that is covered by this License, on a durable physical +medium customarily used for software interchange, for a price no +more than your reasonable cost of physically performing this +conveying of source, or **(2)** access to copy the +Corresponding Source from a network server at no charge. +* **c)** Convey individual copies of the object code with a copy of the +written offer to provide the Corresponding Source. This +alternative is allowed only occasionally and noncommercially, and +only if you received the object code with such an offer, in accord +with subsection 6b. +* **d)** Convey the object code by offering access from a designated +place (gratis or for a charge), and offer equivalent access to the +Corresponding Source in the same way through the same place at no +further charge. You need not require recipients to copy the +Corresponding Source along with the object code. If the place to +copy the object code is a network server, the Corresponding Source +may be on a different server (operated by you or a third party) +that supports equivalent copying facilities, provided you maintain +clear directions next to the object code saying where to find the +Corresponding Source. Regardless of what server hosts the +Corresponding Source, you remain obligated to ensure that it is +available for as long as needed to satisfy these requirements. +* **e)** Convey the object code using peer-to-peer transmission, provided +you inform other peers where the object code and Corresponding +Source of the work are being offered to the general public at no +charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + +A “User Product” is either **(1)** a “consumer product”, which means any +tangible personal property which is normally used for personal, family, +or household purposes, or **(2)** anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, “normally used” refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + +If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + +The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + +### 7. Additional Terms + +“Additional permissions” are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + +* **a)** Disclaiming warranty or limiting liability differently from the +terms of sections 15 and 16 of this License; or +* **b)** Requiring preservation of specified reasonable legal notices or +author attributions in that material or in the Appropriate Legal +Notices displayed by works containing it; or +* **c)** Prohibiting misrepresentation of the origin of that material, or +requiring that modified versions of such material be marked in +reasonable ways as different from the original version; or +* **d)** Limiting the use for publicity purposes of names of licensors or +authors of the material; or +* **e)** Declining to grant rights under trademark law for use of some +trade names, trademarks, or service marks; or +* **f)** Requiring indemnification of licensors and authors of that +material by anyone who conveys the material (or modified versions of +it) with contractual assumptions of liability to the recipient, for +any liability that these contractual assumptions directly impose on +those licensors and authors. + +All other non-permissive additional terms are considered “further +restrictions” within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + +### 8. Termination + +You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + +However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated **(a)** +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and **(b)** permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + +### 9. Acceptance Not Required for Having Copies + +You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + +### 10. Automatic Licensing of Downstream Recipients + +Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + +An “entity transaction” is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + +### 11. Patents + +A “contributor” is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, “control” includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + +In the following three paragraphs, a “patent license” is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To “grant” such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + +If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either **(1)** cause the Corresponding Source to be so +available, or **(2)** arrange to deprive yourself of the benefit of the +patent license for this particular work, or **(3)** arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. “Knowingly relying” means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + +A patent license is “discriminatory” if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license **(a)** in connection with copies of the covered work +conveyed by you (or copies made from those copies), or **(b)** primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + +### 12. No Surrender of Others' Freedom + +If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + +### 13. Remote Network Interaction; Use with the GNU General Public License + +Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + +Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + +### 14. Revised Versions of this License + +The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License “or any later version” applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + +Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + +### 15. Disclaimer of Warranty + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +### 16. Limitation of Liability + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + +### 17. Interpretation of Sections 15 and 16 + +If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + +_END OF TERMS AND CONDITIONS_ + +## How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the “copyright” line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a “Source” link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + +You should also get your employer (if you work as a programmer) or school, +if any, to sign a “copyright disclaimer” for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +<>. diff --git a/mod_npcenchanter/README.md b/mod_npcenchanter/README.md new file mode 100644 index 0000000..7337f65 --- /dev/null +++ b/mod_npcenchanter/README.md @@ -0,0 +1,2 @@ +# AzerothCore-Converted-Modules-to-latest-TrinityCore +AzerothCore Converted Modules to latest TrinityCore 3.3.5a WotLK diff --git a/mod_npcenchanter/conf/npc_enchanter.conf.dist b/mod_npcenchanter/conf/npc_enchanter.conf.dist new file mode 100644 index 0000000..999dbc3 --- /dev/null +++ b/mod_npcenchanter/conf/npc_enchanter.conf.dist @@ -0,0 +1,9 @@ +[worldserver] + +################################################################################################### +# ENCHANTER NPC +################################################################################################### + +# Announce the module when the player logs in? + +EnchanterNPC.Announce = 1 \ No newline at end of file diff --git a/mod_npcenchanter/sql/npc_enchanter.sql b/mod_npcenchanter/sql/npc_enchanter.sql new file mode 100644 index 0000000..41fe6f6 --- /dev/null +++ b/mod_npcenchanter/sql/npc_enchanter.sql @@ -0,0 +1,36 @@ +USE world; + +-- ######################################################-- +-- ENCHANTER - 601015 +-- ######################################################-- +SET +@Entry := 190012, +@Model := 9353, -- Undead Necromancer +@Name := "Beauregard Boneglitter", +@Title := "Enchantments", +@Icon := "Speak", +@GossipMenu := 0, +@MinLevel := 80, +@MaxLevel := 80, +@Faction := 35, +@NPCFlag := 1, +@Scale := 1.0, +@Rank := 0, +@Type := 7, +@TypeFlags := 0, +@FlagsExtra := 2, +@AIName := "SmartAI", +@Script := "npc_enchantment"; + +-- NPC +DELETE FROM creature_template WHERE entry = @Entry; +INSERT INTO creature_template (entry, modelid1, name, subname, IconName, gossip_menu_id, minlevel, maxlevel, faction, npcflag, speed_walk, speed_run, scale, rank, unit_class, unit_flags, type, type_flags, RegenHealth, flags_extra, AiName, ScriptName) VALUES +(@Entry, @Model, @Name, @Title, @Icon, @GossipMenu, @MinLevel, @MaxLevel, @Faction, @NPCFlag, 1, 1.14286, @Scale, @Rank, 1, 2, @Type, @TypeFlags, 1, @FlagsExtra, @AIName, @Script); + +-- NPC EQUIPPED +DELETE FROM `creature_equip_template` WHERE `CreatureID`=@Entry AND `ID`=1; +INSERT INTO `creature_equip_template` VALUES (@Entry, 1, 11343, 0, 0, 18019); -- Black/Purple Staff, None + +-- NPC TEXT +DELETE FROM `npc_text` WHERE `ID`=@Entry; +INSERT INTO `npc_text` (`ID`, `text0_0`) VALUES (@Entry, 'Good day $N. Beauregard Boneglitter at your service. I offer a vast array of gear enchantments for the aspiring adventurer.'); \ No newline at end of file diff --git a/mod_npcenchanter/src/npc_enchanter.cpp b/mod_npcenchanter/src/npc_enchanter.cpp new file mode 100644 index 0000000..97a8add --- /dev/null +++ b/mod_npcenchanter/src/npc_enchanter.cpp @@ -0,0 +1,1109 @@ +/* + +# Enchanter NPC # + +#### A module for AzerothCore by [StygianTheBest](https://github.com/StygianTheBest/AzerothCore-Content/tree/master/Modules) +#### +#### Converted to latest TrinityCore [3.3.5a] (https://github.com/TrinityCore/TrinityCore/blob/3.3.5/) +#### By +#### TheFrozenThr0ne +#### https://GamersCentral.de (https://github.com/MaDmaX1337/) +------------------------------------------------------------------------------------------------------------------ + + +### Description ### +------------------------------------------------------------------------------------------------------------------ +Creates an NPC that enchants the player's gear + + +### Data ### +------------------------------------------------------------------------------------------------------------------ +- Type: NPC +- Script: npc_enchantment +- Config: Yes + - Enable Module Announce +- SQL: Yes + - NPC ID: 601015 + + +### Version ### +------------------------------------------------------------------------------------------------------------------ +- v2017-08-08 - Release + + +### Credits ### +------------------------------------------------------------------------------------------------------------------ +- [LordPsyan](https://bitbucket.org/lordpsyan/lordpsyan-patches) +- [Blizzard Entertainment](http://blizzard.com) +- [TrinityCore](https://github.com/TrinityCore/TrinityCore/blob/3.3.5/THANKS) +- [SunwellCore](http://www.azerothcore.org/pages/sunwell.pl/) +- [AzerothCore](https://github.com/AzerothCore/azerothcore-wotlk/graphs/contributors) +- [AzerothCore Discord](https://discord.gg/gkt4y2x) +- [EMUDevs](https://youtube.com/user/EmuDevs) +- [AC-Web](http://ac-web.org/) +- [ModCraft.io](http://modcraft.io/) +- [OwnedCore](http://ownedcore.com/) +- [OregonCore](https://wiki.oregon-core.net/) +- [Wowhead.com](http://wowhead.com) +- [AoWoW](https://wotlk.evowow.com/) + + +### License ### +------------------------------------------------------------------------------------------------------------------ +- This code and content is released under the [GNU AGPL v3](https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3). + +*/ + +#include "ScriptMgr.h" +#include "Configuration/Config.h" +#include "Cell.h" +#include "CellImpl.h" +#include "GameEventMgr.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "Unit.h" +#include "GameObject.h" +#include "ScriptedCreature.h" +#include "ScriptedGossip.h" +#include "InstanceScript.h" +#include "CombatAI.h" +#include "PassiveAI.h" +#include "Chat.h" +#include "Item.h" +#include "DBCStructure.h" +#include "DBCStores.h" +#include "ObjectMgr.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" +#include "ScriptPCH.h" + + +enum Enchants +{ + ENCHANT_WEP_BERSERKING = 3789, + ENCHANT_WEP_BLADE_WARD = 3869, + ENCHANT_WEP_BLOOD_DRAINING = 3870, + ENCHANT_WEP_ACCURACY = 3788, + ENCHANT_WEP_AGILITY_1H = 1103, + ENCHANT_WEP_SPIRIT = 3844, + ENCHANT_WEP_BATTLEMASTER = 2675, + ENCHANT_WEP_BLACK_MAGIC = 3790, + ENCHANT_WEP_ICEBREAKER = 3239, + ENCHANT_WEP_LIFEWARD = 3241, + ENCHANT_WEP_MIGHTY_SPELL_POWER = 3834, // One-hand + ENCHANT_WEP_EXECUTIONER = 3225, + ENCHANT_WEP_POTENCY = 3833, + ENCHANT_WEP_TITANGUARD = 3851, + ENCHANT_2WEP_MASSACRE = 3827, + ENCHANT_2WEP_SCOURGEBANE = 3247, + ENCHANT_2WEP_GIANT_SLAYER = 3251, + ENCHANT_2WEP_GREATER_SPELL_POWER = 3854, + ENCHANT_2WEP_AGILITY = 2670, + ENCHANT_2WEP_MONGOOSE = 2673, + + ENCHANT_SHIELD_DEFENSE = 1952, + ENCHANT_SHIELD_INTELLECT = 1128, + ENCHANT_SHIELD_RESILIENCE = 3229, + ENCHANT_SHIELD_BLOCK = 2655, + ENCHANT_SHIELD_STAMINA = 1071, + ENCHANT_SHIELD_TOUGHSHIELD = 2653, + ENCHANT_SHIELD_TITANIUM_PLATING = 3849, + + ENCHANT_HEAD_BLISSFUL_MENDING = 3819, + ENCHANT_HEAD_BURNING_MYSTERIES = 3820, + ENCHANT_HEAD_DOMINANCE = 3796, + ENCHANT_HEAD_SAVAGE_GLADIATOR = 3842, + ENCHANT_HEAD_STALWART_PROTECTOR = 3818, + ENCHANT_HEAD_TORMENT = 3817, + ENCHANT_HEAD_TRIUMPH = 3795, + ENCHANT_HEAD_ECLIPSED_MOON = 3815, + ENCHANT_HEAD_FLAME_SOUL = 3816, + ENCHANT_HEAD_FLEEING_SHADOW = 3814, + ENCHANT_HEAD_FROSTY_SOUL = 3812, + ENCHANT_HEAD_TOXIC_WARDING = 3813, + + ENCHANT_SHOULDER_MASTERS_AXE = 3835, + ENCHANT_SHOULDER_MASTERS_CRAG = 3836, + ENCHANT_SHOULDER_MASTERS_PINNACLE = 3837, + ENCHANT_SHOULDER_MASTERS_STORM = 3838, + ENCHANT_SHOULDER_GREATER_AXE = 3808, + ENCHANT_SHOULDER_GREATER_CRAG = 3809, + ENCHANT_SHOULDER_GREATER_GLADIATOR = 3852, + ENCHANT_SHOULDER_GREATER_PINNACLE = 3811, + ENCHANT_SHOULDER_GREATER_STORM = 3810, + ENCHANT_SHOULDER_DOMINANCE = 3794, + ENCHANT_SHOULDER_TRIUMPH = 3793, + + ENCHANT_CLOAK_DARKGLOW_EMBROIDERY = 3728, + ENCHANT_CLOAK_SWORDGUARD_EMBROIDERY = 3730, + ENCHANT_CLOAK_LIGHTWEAVE_EMBROIDERY = 3722, + ENCHANT_CLOAK_SPRINGY_ARACHNOWEAVE = 3859, + ENCHANT_CLOAK_WISDOM = 3296, + ENCHANT_CLOAK_TITANWEAVE = 1951, + ENCHANT_CLOAK_SPELL_PIERCING = 3243, + ENCHANT_CLOAK_SHADOW_ARMOR = 3256, + ENCHANT_CLOAK_MIGHTY_ARMOR = 3294, + ENCHANT_CLOAK_MAJOR_AGILITY = 1099, + ENCHANT_CLOAK_GREATER_SPEED = 3831, + + ENCHANT_LEG_EARTHEN = 3853, + ENCHANT_LEG_FROSTHIDE = 3822, + ENCHANT_LEG_ICESCALE = 3823, + ENCHANT_LEG_BRILLIANT_SPELLTHREAD = 3719, + ENCHANT_LEG_SAPPHIRE_SPELLTHREAD = 3721, + ENCHANT_LEG_DRAGONSCALE = 3331, + ENCHANT_LEG_WYRMSCALE = 3332, + + ENCHANT_GLOVES_GREATER_BLASTING = 3249, + ENCHANT_GLOVES_ARMSMAN = 3253, + ENCHANT_GLOVES_CRUSHER = 1603, + ENCHANT_GLOVES_AGILITY = 3222, + ENCHANT_GLOVES_PRECISION = 3234, + ENCHANT_GLOVES_EXPERTISE = 3231, + + ENCHANT_BRACERS_MAJOR_STAMINA = 3850, + ENCHANT_BRACERS_SUPERIOR_SP = 2332, + ENCHANT_BRACERS_GREATER_ASSUALT = 3845, + ENCHANT_BRACERS_MAJOR_SPIRT = 1147, + ENCHANT_BRACERS_EXPERTISE = 3231, + ENCHANT_BRACERS_GREATER_STATS = 2661, + ENCHANT_BRACERS_INTELLECT = 1119, + ENCHANT_BRACERS_FURL_ARCANE = 3763, + ENCHANT_BRACERS_FURL_FIRE = 3759, + ENCHANT_BRACERS_FURL_FROST = 3760, + ENCHANT_BRACERS_FURL_NATURE = 3762, + ENCHANT_BRACERS_FURL_SHADOW = 3761, + ENCHANT_BRACERS_FURL_ATTACK = 3756, + ENCHANT_BRACERS_FURL_STAMINA = 3757, + ENCHANT_BRACERS_FURL_SPELLPOWER = 3758, + + ENCHANT_CHEST_POWERFUL_STATS = 3832, + ENCHANT_CHEST_SUPER_HEALTH = 3297, + ENCHANT_CHEST_GREATER_MAINA_REST = 2381, + ENCHANT_CHEST_EXCEPTIONAL_RESIL = 3245, + ENCHANT_CHEST_GREATER_DEFENSE = 1953, + + ENCHANT_BOOTS_GREATER_ASSULT = 1597, + ENCHANT_BOOTS_TUSKARS_VITLIATY = 3232, + ENCHANT_BOOTS_SUPERIOR_AGILITY = 983, + ENCHANT_BOOTS_GREATER_SPIRIT = 1147, + ENCHANT_BOOTS_GREATER_VITALITY = 3244, + ENCHANT_BOOTS_ICEWALKER = 3826, + ENCHANT_BOOTS_GREATER_FORTITUDE = 1075, + ENCHANT_BOOTS_NITRO_BOOTS = 3606, + ENCHANT_BOOTS_PYRO_ROCKET = 3603, + ENCHANT_BOOTS_HYPERSPEED = 3604, + ENCHANT_BOOTS_ARMOR_WEBBING = 3860, + + ENCHANT_RING_ASSULT = 3839, + ENCHANT_RING_GREATER_SP = 3840, + ENCHANT_RING_STAMINA = 3791, +}; + +void Enchant(Player* player, Item* item, uint32 enchantid) +{ + if (!item) + { + player->GetSession()->SendNotification("You must first equip the item you are trying to enchant in order to enchant it!"); + return; + } + + if (!enchantid) + { + player->GetSession()->SendNotification("Something went wrong in the code. It has been logged for developers and will be looked into, sorry for the inconvenience."); + return; + } + + item->ClearEnchantment(PERM_ENCHANTMENT_SLOT); + item->SetEnchantment(PERM_ENCHANTMENT_SLOT, enchantid, 0, 0); + player->GetSession()->SendNotification("|cff0000FF%s |cffFF0000succesfully enchanted!", item->GetTemplate()->Name1.c_str()); +} + +class EnchanterAnnounce : public PlayerScript +{ + +public: + + EnchanterAnnounce() : PlayerScript("EnchanterAnnounce") {} + + void OnLogin(Player* player, bool firstLogin) + { + if (firstLogin) { + // Announce Module + if (sConfigMgr->GetBoolDefault("EnchanterNPC.Announce", true)) + { + ChatHandler(player->GetSession()).SendSysMessage("This server is running the |cff4CFF00EnchanterNPC |rmodule."); + } + } + } +}; + + +class npc_enchantment : public CreatureScript +{ + +public: + + npc_enchantment() : CreatureScript("npc_enchantment") { } + + // Passive Emotes + struct NPC_PassiveAI : public ScriptedAI + { + NPC_PassiveAI(Creature* creature) : ScriptedAI(creature) { } + + bool OnGossipHello(Player* player) + { + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Welcome to the enchanting NPC!]", GOSSIP_SENDER_MAIN, 0); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Weapon]", GOSSIP_SENDER_MAIN, 1); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant 2H Weapon]", GOSSIP_SENDER_MAIN, 2); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Shield]", GOSSIP_SENDER_MAIN, 3); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Head]", GOSSIP_SENDER_MAIN, 4); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Shoulders]", GOSSIP_SENDER_MAIN, 5); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Cloak]", GOSSIP_SENDER_MAIN, 6); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Chest]", GOSSIP_SENDER_MAIN, 7); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Bracers]", GOSSIP_SENDER_MAIN, 8); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Gloves]", GOSSIP_SENDER_MAIN, 9); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Legs]", GOSSIP_SENDER_MAIN, 10); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Feet]", GOSSIP_SENDER_MAIN, 11); + + if (player->HasSkill(SKILL_ENCHANTING) && player->GetSkillValue(SKILL_ENCHANTING) == 450) + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Rings]", GOSSIP_SENDER_MAIN, 12); + SendGossipMenuFor(player, 601015, me); + return true; + } + + bool OnGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) + { + uint32 const sender = player->PlayerTalkClass->GetGossipOptionSender(gossipListId); + uint32 const action = player->PlayerTalkClass->GetGossipOptionAction(gossipListId); + Item* item; + player->PlayerTalkClass->ClearMenus(); + + switch (action) + { + case 0: //Welcome message on click + player->GetSession()->SendAreaTriggerMessage("|cffFF0000Hello there, I will be enchanting your gear!"); + + { + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Welcome to the enchanting NPC!]", GOSSIP_SENDER_MAIN, 0); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Weapon]", GOSSIP_SENDER_MAIN, 1); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant 2H Weapon]", GOSSIP_SENDER_MAIN, 2); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Shield]", GOSSIP_SENDER_MAIN, 3); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Head]", GOSSIP_SENDER_MAIN, 4); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Shoulders]", GOSSIP_SENDER_MAIN, 5); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Cloak]", GOSSIP_SENDER_MAIN, 6); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Chest]", GOSSIP_SENDER_MAIN, 7); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Bracers]", GOSSIP_SENDER_MAIN, 8); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Gloves]", GOSSIP_SENDER_MAIN, 9); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Legs]", GOSSIP_SENDER_MAIN, 10); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Feet]", GOSSIP_SENDER_MAIN, 11); + + if (player->HasSkill(SKILL_ENCHANTING) && player->GetSkillValue(SKILL_ENCHANTING) == 450) + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Rings]", GOSSIP_SENDER_MAIN, 12); + + SendGossipMenuFor(player, 100001, me); + + return true; + break; + } + + + case 1: // Enchant Weapon + if (player->HasSkill(SKILL_ENCHANTING) && player->GetSkillValue(SKILL_ENCHANTING) == 450) + { + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Blade Ward", GOSSIP_SENDER_MAIN, 102); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Blood Draining", GOSSIP_SENDER_MAIN, 103); + } + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Exceptional Agility", GOSSIP_SENDER_MAIN, 100); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Exceptional Spirit", GOSSIP_SENDER_MAIN, 101); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Accuracy", GOSSIP_SENDER_MAIN, 104); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Black Magic", GOSSIP_SENDER_MAIN, 105); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Berserking", GOSSIP_SENDER_MAIN, 106); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Battlemaster", GOSSIP_SENDER_MAIN, 107); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Icebreaker", GOSSIP_SENDER_MAIN, 108); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Lifeward", GOSSIP_SENDER_MAIN, 109); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Titanguard", GOSSIP_SENDER_MAIN, 110); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Superior Potency", GOSSIP_SENDER_MAIN, 111); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Mighty Spellpower", GOSSIP_SENDER_MAIN, 112); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Mongoose", GOSSIP_SENDER_MAIN, 113); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Executioner", GOSSIP_SENDER_MAIN, 114); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<-Back", GOSSIP_SENDER_MAIN, 300); + SendGossipMenuFor(player, 100002, me); + return true; + break; + + case 2: // Enchant 2H Weapon + item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND); + if (!item) + { + me->Whisper("This enchant needs a 2H weapon equipped.", LANG_UNIVERSAL, player); + CloseGossipMenuFor(player); + return false; + } + if (item->GetTemplate()->InventoryType == INVTYPE_2HWEAPON) + { + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Berserking", GOSSIP_SENDER_MAIN, 104); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Mongoose", GOSSIP_SENDER_MAIN, 113); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Executioner", GOSSIP_SENDER_MAIN, 114); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Spellpower", GOSSIP_SENDER_MAIN, 115); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Major Agility", GOSSIP_SENDER_MAIN, 116); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Massacre", GOSSIP_SENDER_MAIN, 117); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<-Back", GOSSIP_SENDER_MAIN, 300); + } + else + { + me->Whisper("This enchant needs a 2H weapon equipped.", LANG_UNIVERSAL, player); + CloseGossipMenuFor(player); + } + SendGossipMenuFor(player, 100003, me); + return true; + break; + + case 3: // Enchant Shield + item = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND); + if (!item) + { + me->Whisper("This enchant needs a shield equipped.", LANG_UNIVERSAL, player); + CloseGossipMenuFor(player); + return false; + } + if (item->GetTemplate()->InventoryType == INVTYPE_SHIELD) + { + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Defense", GOSSIP_SENDER_MAIN, 118); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Intellect", GOSSIP_SENDER_MAIN, 119); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Resilience", GOSSIP_SENDER_MAIN, 120); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Titanium Plating", GOSSIP_SENDER_MAIN, 121); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Major Stamina", GOSSIP_SENDER_MAIN, 122); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Tough Shield", GOSSIP_SENDER_MAIN, 123); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<-Back", GOSSIP_SENDER_MAIN, 300); + } + else + { + me->Whisper("This enchant needs a shield equipped.", LANG_UNIVERSAL, player); + CloseGossipMenuFor(player); + + } + SendGossipMenuFor(player, 100004, me); + return true; + break; + + case 4: // Enchant Head + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Arcanum of Blissful Mending", GOSSIP_SENDER_MAIN, 124); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Arcanum of Burning Mysteries", GOSSIP_SENDER_MAIN, 125); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Arcanum of Dominance", GOSSIP_SENDER_MAIN, 126); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Arcanum of The Savage Gladiator", GOSSIP_SENDER_MAIN, 127); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Arcanum of The Stalwart Protector", GOSSIP_SENDER_MAIN, 128); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Arcanum of Torment", GOSSIP_SENDER_MAIN, 129); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Arcanum of Triumph", GOSSIP_SENDER_MAIN, 130); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Arcanum of Eclipsed Moon", GOSSIP_SENDER_MAIN, 131); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Arcanum of the Flame's Soul", GOSSIP_SENDER_MAIN, 132); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Arcanum of the Fleeing Shadow", GOSSIP_SENDER_MAIN, 133); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Arcanum of the Frosty Soul", GOSSIP_SENDER_MAIN, 134); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Arcanum of Toxic Warding", GOSSIP_SENDER_MAIN, 135); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<-Back", GOSSIP_SENDER_MAIN, 300); + SendGossipMenuFor(player, 100005, me); + return true; + break; + + case 5: // Enchant Shoulders + if (player->HasSkill(SKILL_INSCRIPTION) && player->GetSkillValue(SKILL_INSCRIPTION) == 450) + { + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Master's Inscription of the Axe", GOSSIP_SENDER_MAIN, 136); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Master's Inscription of the Crag", GOSSIP_SENDER_MAIN, 137); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Master's Inscription of the Pinnacle", GOSSIP_SENDER_MAIN, 138); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Master's Inscription of the Storm", GOSSIP_SENDER_MAIN, 139); + } + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Inscription of the Axe", GOSSIP_SENDER_MAIN, 140); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Inscription of the Crag", GOSSIP_SENDER_MAIN, 141); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Inscription of the Pinnacle", GOSSIP_SENDER_MAIN, 142); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Inscription of the Gladiator", GOSSIP_SENDER_MAIN, 143); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Inscription of the Storm", GOSSIP_SENDER_MAIN, 144); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Inscription of Dominance", GOSSIP_SENDER_MAIN, 145); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Inscription of Triumph", GOSSIP_SENDER_MAIN, 146); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<-Back", GOSSIP_SENDER_MAIN, 300); + SendGossipMenuFor(player, 100006, me); + return true; + break; + + case 6: // Enchant Cloak + if (player->HasSkill(SKILL_TAILORING) && player->GetSkillValue(SKILL_TAILORING) == 450) + { + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Darkglow Embroidery", GOSSIP_SENDER_MAIN, 149); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Lightweave Embroidery", GOSSIP_SENDER_MAIN, 150); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Swordguard Embroidery", GOSSIP_SENDER_MAIN, 151); + } + if (player->HasSkill(SKILL_ENGINEERING) && player->GetSkillValue(SKILL_ENGINEERING) == 450) + { + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Springy Arachnoweave", GOSSIP_SENDER_MAIN, 147); + } + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Shadow Armor", GOSSIP_SENDER_MAIN, 148); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Wisdom", GOSSIP_SENDER_MAIN, 152); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Titanweave", GOSSIP_SENDER_MAIN, 153); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Spell Piercing", GOSSIP_SENDER_MAIN, 154); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Mighty Armor", GOSSIP_SENDER_MAIN, 155); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Major Agility", GOSSIP_SENDER_MAIN, 156); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Speed", GOSSIP_SENDER_MAIN, 157); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<-Back", GOSSIP_SENDER_MAIN, 300); + SendGossipMenuFor(player, 100007, me); + return true; + break; + + case 7: //Enchant chest + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Powerful Stats", GOSSIP_SENDER_MAIN, 158); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Super Health", GOSSIP_SENDER_MAIN, 159); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Mana Restoration", GOSSIP_SENDER_MAIN, 160); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Exceptional Resilience", GOSSIP_SENDER_MAIN, 161); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Defense", GOSSIP_SENDER_MAIN, 162); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<-Back", GOSSIP_SENDER_MAIN, 300); + SendGossipMenuFor(player, 100008, me); + return true; + break; + + case 8: //Enchant Bracers + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Major Stamina", GOSSIP_SENDER_MAIN, 163); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Superior Spell Power", GOSSIP_SENDER_MAIN, 164); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Assult", GOSSIP_SENDER_MAIN, 165); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Major Spirit", GOSSIP_SENDER_MAIN, 166); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Expertise", GOSSIP_SENDER_MAIN, 167); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Stats", GOSSIP_SENDER_MAIN, 168); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Exceptional Intellect", GOSSIP_SENDER_MAIN, 169); + if (player->HasSkill(SKILL_LEATHERWORKING) && player->GetSkillValue(SKILL_LEATHERWORKING) == 450) + { + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Fur Lining - Arcane Resist", GOSSIP_SENDER_MAIN, 170); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Fur Lining - Fire Resist", GOSSIP_SENDER_MAIN, 171); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Fur Lining - Frost Resist", GOSSIP_SENDER_MAIN, 172); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Fur Lining - Nature Resist", GOSSIP_SENDER_MAIN, 173); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Fur Lining - Shadow Resist", GOSSIP_SENDER_MAIN, 174); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Fur Lining - Attack power", GOSSIP_SENDER_MAIN, 175); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Fur Lining - Stamina", GOSSIP_SENDER_MAIN, 176); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Fur Lining - Spellpower", GOSSIP_SENDER_MAIN, 177); + } + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<-Back", GOSSIP_SENDER_MAIN, 300); + SendGossipMenuFor(player, 100009, me); + return true; + break; + + case 9: //Enchant Gloves + if (player->HasSkill(SKILL_ENGINEERING) && player->GetSkillValue(SKILL_ENGINEERING) == 450) + { + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Blasting", GOSSIP_SENDER_MAIN, 178); + } + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Armsman", GOSSIP_SENDER_MAIN, 179); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Crusher", GOSSIP_SENDER_MAIN, 180); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Agility", GOSSIP_SENDER_MAIN, 181); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Precision", GOSSIP_SENDER_MAIN, 182); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Expertise", GOSSIP_SENDER_MAIN, 183); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<-Back", GOSSIP_SENDER_MAIN, 300); + SendGossipMenuFor(player, 100010, me); + return true; + break; + + case 10: //Enchant legs + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Earthen Leg Armor", GOSSIP_SENDER_MAIN, 184); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Frosthide Leg Armor", GOSSIP_SENDER_MAIN, 185); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Icescale Leg Armor", GOSSIP_SENDER_MAIN, 186); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Brilliant Spellthread", GOSSIP_SENDER_MAIN, 187); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Sapphire Spellthread", GOSSIP_SENDER_MAIN, 188); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Dragonscale Leg Armor", GOSSIP_SENDER_MAIN, 189); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Wyrmscale Leg Armor", GOSSIP_SENDER_MAIN, 190); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<-Back", GOSSIP_SENDER_MAIN, 300); + SendGossipMenuFor(player, 100011, me); + return true; + break; + + case 11: //Enchant feet + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Assult", GOSSIP_SENDER_MAIN, 191); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Tuskars Vitliaty", GOSSIP_SENDER_MAIN, 192); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Superior Agility", GOSSIP_SENDER_MAIN, 193); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Spirit", GOSSIP_SENDER_MAIN, 194); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Vitality", GOSSIP_SENDER_MAIN, 195); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Icewalker", GOSSIP_SENDER_MAIN, 196); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Fortitude", GOSSIP_SENDER_MAIN, 197); + if (player->HasSkill(SKILL_ENGINEERING) && player->GetSkillValue(SKILL_ENGINEERING) == 450) + { + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Nitro Boots", GOSSIP_SENDER_MAIN, 198); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Hand-Mounted Pyro Rocket", GOSSIP_SENDER_MAIN, 199); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Hyperspeed Accedlerators", GOSSIP_SENDER_MAIN, 200); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Reticulated Armor Webbing", GOSSIP_SENDER_MAIN, 201); + } + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<-Back", GOSSIP_SENDER_MAIN, 300); + SendGossipMenuFor(player, 100012, me); + return true; + break; + + case 12: //Enchant rings + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Assult", GOSSIP_SENDER_MAIN, 202); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Greater Spell Power", GOSSIP_SENDER_MAIN, 203); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "Stamina", GOSSIP_SENDER_MAIN, 204); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "<-Back", GOSSIP_SENDER_MAIN, 300); + SendGossipMenuFor(player, 100013, me); + return true; + break; + + case 100: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_AGILITY_1H); + CloseGossipMenuFor(player); + break; + + case 101: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_SPIRIT); + CloseGossipMenuFor(player); + break; + + case 102: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_BLADE_WARD); + CloseGossipMenuFor(player); + break; + + case 103: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_BLOOD_DRAINING); + CloseGossipMenuFor(player); + break; + + case 104: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_BERSERKING); + CloseGossipMenuFor(player); + break; + + case 105: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_ACCURACY); + CloseGossipMenuFor(player); + break; + + case 106: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_BLACK_MAGIC); + CloseGossipMenuFor(player); + break; + + case 107: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_BATTLEMASTER); + CloseGossipMenuFor(player); + break; + + case 108: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_ICEBREAKER); + CloseGossipMenuFor(player); + break; + + case 109: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_LIFEWARD); + CloseGossipMenuFor(player); + break; + + case 110: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_TITANGUARD); + CloseGossipMenuFor(player); + break; + + case 111: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_POTENCY); + CloseGossipMenuFor(player); + break; + + case 112: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_MIGHTY_SPELL_POWER); + CloseGossipMenuFor(player); + break; + + case 113: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_2WEP_MONGOOSE); + CloseGossipMenuFor(player); + break; + + case 114: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_WEP_EXECUTIONER); + CloseGossipMenuFor(player); + break; + + case 115: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_2WEP_GREATER_SPELL_POWER); + CloseGossipMenuFor(player); + break; + + case 116: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_2WEP_AGILITY); + CloseGossipMenuFor(player); + break; + + case 117: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND), ENCHANT_2WEP_MASSACRE); + CloseGossipMenuFor(player); + break; + + case 118: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_SHIELD_DEFENSE); + CloseGossipMenuFor(player); + break; + + case 119: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_SHIELD_INTELLECT); + CloseGossipMenuFor(player); + break; + + case 120: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_SHIELD_RESILIENCE); + CloseGossipMenuFor(player); + break; + + case 121: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_SHIELD_TITANIUM_PLATING); + CloseGossipMenuFor(player); + break; + + case 122: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_SHIELD_STAMINA); + CloseGossipMenuFor(player); + break; + + case 123: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND), ENCHANT_SHIELD_TOUGHSHIELD); + CloseGossipMenuFor(player); + break; + + case 124: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HEAD), ENCHANT_HEAD_BLISSFUL_MENDING); + CloseGossipMenuFor(player); + break; + + case 125: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HEAD), ENCHANT_HEAD_BURNING_MYSTERIES); + CloseGossipMenuFor(player); + break; + + case 126: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HEAD), ENCHANT_HEAD_DOMINANCE); + CloseGossipMenuFor(player); + break; + + case 127: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HEAD), ENCHANT_HEAD_SAVAGE_GLADIATOR); + CloseGossipMenuFor(player); + break; + + case 128: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HEAD), ENCHANT_HEAD_STALWART_PROTECTOR); + CloseGossipMenuFor(player); + break; + + case 129: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HEAD), ENCHANT_HEAD_TORMENT); + CloseGossipMenuFor(player); + break; + + case 130: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HEAD), ENCHANT_HEAD_TRIUMPH); + CloseGossipMenuFor(player); + break; + + case 131: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HEAD), ENCHANT_HEAD_ECLIPSED_MOON); + CloseGossipMenuFor(player); + break; + + case 132: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HEAD), ENCHANT_HEAD_FLAME_SOUL); + CloseGossipMenuFor(player); + break; + + case 133: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HEAD), ENCHANT_HEAD_FLEEING_SHADOW); + CloseGossipMenuFor(player); + break; + + case 134: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HEAD), ENCHANT_HEAD_FROSTY_SOUL); + CloseGossipMenuFor(player); + break; + + case 135: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HEAD), ENCHANT_HEAD_TOXIC_WARDING); + CloseGossipMenuFor(player); + break; + + case 136: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_SHOULDERS), ENCHANT_SHOULDER_MASTERS_AXE); + CloseGossipMenuFor(player); + break; + + case 137: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_SHOULDERS), ENCHANT_SHOULDER_MASTERS_CRAG); + CloseGossipMenuFor(player); + break; + + case 138: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_SHOULDERS), ENCHANT_SHOULDER_MASTERS_PINNACLE); + CloseGossipMenuFor(player); + break; + + case 139: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_SHOULDERS), ENCHANT_SHOULDER_MASTERS_STORM); + CloseGossipMenuFor(player); + break; + + case 140: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_SHOULDERS), ENCHANT_SHOULDER_GREATER_AXE); + CloseGossipMenuFor(player); + break; + + case 141: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_SHOULDERS), ENCHANT_SHOULDER_GREATER_CRAG); + CloseGossipMenuFor(player); + break; + + case 142: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_SHOULDERS), ENCHANT_SHOULDER_GREATER_GLADIATOR); + CloseGossipMenuFor(player); + break; + + case 143: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_SHOULDERS), ENCHANT_SHOULDER_GREATER_PINNACLE); + CloseGossipMenuFor(player); + break; + + case 144: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_SHOULDERS), ENCHANT_SHOULDER_GREATER_STORM); + CloseGossipMenuFor(player); + break; + + case 145: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_SHOULDERS), ENCHANT_SHOULDER_DOMINANCE); + CloseGossipMenuFor(player); + break; + + case 146: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_SHOULDERS), ENCHANT_SHOULDER_TRIUMPH); + CloseGossipMenuFor(player); + break; + + case 147: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_SPRINGY_ARACHNOWEAVE); + CloseGossipMenuFor(player); + break; + + case 148: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_SHADOW_ARMOR); + CloseGossipMenuFor(player); + break; + + case 149: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_DARKGLOW_EMBROIDERY); + CloseGossipMenuFor(player); + break; + + case 150: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_LIGHTWEAVE_EMBROIDERY); + CloseGossipMenuFor(player); + break; + + case 151: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_SWORDGUARD_EMBROIDERY); + CloseGossipMenuFor(player); + break; + + case 152: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_WISDOM); + CloseGossipMenuFor(player); + break; + + case 153: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_TITANWEAVE); + CloseGossipMenuFor(player); + break; + + case 154: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_SPELL_PIERCING); + CloseGossipMenuFor(player); + break; + + case 155: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_MIGHTY_ARMOR); + CloseGossipMenuFor(player); + break; + + case 156: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_MAJOR_AGILITY); + CloseGossipMenuFor(player); + break; + + case 157: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_BACK), ENCHANT_CLOAK_GREATER_SPEED); + CloseGossipMenuFor(player); + break; + + case 158: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_CHEST), ENCHANT_CHEST_POWERFUL_STATS); + CloseGossipMenuFor(player); + break; + + case 159: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_CHEST), ENCHANT_CHEST_SUPER_HEALTH); + CloseGossipMenuFor(player); + break; + + case 160: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_CHEST), ENCHANT_CHEST_GREATER_MAINA_REST); + CloseGossipMenuFor(player); + break; + + case 161: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_CHEST), ENCHANT_CHEST_EXCEPTIONAL_RESIL); + CloseGossipMenuFor(player); + break; + + case 162: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_CHEST), ENCHANT_CHEST_GREATER_DEFENSE); + CloseGossipMenuFor(player); + break; + + case 163: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_MAJOR_STAMINA); + CloseGossipMenuFor(player); + break; + + case 164: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_SUPERIOR_SP); + CloseGossipMenuFor(player); + break; + + case 165: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_GREATER_ASSUALT); + CloseGossipMenuFor(player); + break; + + case 166: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_MAJOR_SPIRT); + CloseGossipMenuFor(player); + break; + + case 167: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_EXPERTISE); + CloseGossipMenuFor(player); + break; + + case 168: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_GREATER_STATS); + CloseGossipMenuFor(player); + break; + + case 169: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_INTELLECT); + CloseGossipMenuFor(player); + break; + + case 170: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_FURL_ARCANE); + CloseGossipMenuFor(player); + break; + + case 171: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_FURL_FIRE); + CloseGossipMenuFor(player); + break; + + case 172: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_FURL_FROST); + CloseGossipMenuFor(player); + break; + + case 173: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_FURL_NATURE); + CloseGossipMenuFor(player); + break; + + case 174: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_FURL_SHADOW); + CloseGossipMenuFor(player); + break; + + case 175: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_FURL_ATTACK); + CloseGossipMenuFor(player); + break; + + case 176: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_FURL_STAMINA); + CloseGossipMenuFor(player); + break; + + case 177: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_WRISTS), ENCHANT_BRACERS_FURL_SPELLPOWER); + CloseGossipMenuFor(player); + break; + + case 178: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_GREATER_BLASTING); + CloseGossipMenuFor(player); + break; + + case 179: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_ARMSMAN); + CloseGossipMenuFor(player); + break; + + case 180: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_CRUSHER); + CloseGossipMenuFor(player); + break; + + case 181: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_AGILITY); + CloseGossipMenuFor(player); + break; + + case 182: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_PRECISION); + CloseGossipMenuFor(player); + break; + + case 183: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_HANDS), ENCHANT_GLOVES_EXPERTISE); + CloseGossipMenuFor(player); + break; + + case 184: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_LEGS), ENCHANT_LEG_EARTHEN); + CloseGossipMenuFor(player); + break; + + case 185: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_LEGS), ENCHANT_LEG_FROSTHIDE); + CloseGossipMenuFor(player); + break; + + case 186: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_LEGS), ENCHANT_LEG_ICESCALE); + CloseGossipMenuFor(player); + break; + + case 187: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_LEGS), ENCHANT_LEG_BRILLIANT_SPELLTHREAD); + CloseGossipMenuFor(player); + break; + + case 188: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_LEGS), ENCHANT_LEG_SAPPHIRE_SPELLTHREAD); + CloseGossipMenuFor(player); + break; + + case 189: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_LEGS), ENCHANT_LEG_DRAGONSCALE); + CloseGossipMenuFor(player); + break; + + case 190: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_LEGS), ENCHANT_LEG_WYRMSCALE); + CloseGossipMenuFor(player); + break; + + case 191: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_GREATER_ASSULT); + CloseGossipMenuFor(player); + break; + + case 192: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_TUSKARS_VITLIATY); + CloseGossipMenuFor(player); + break; + + case 193: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_SUPERIOR_AGILITY); + CloseGossipMenuFor(player); + break; + + case 194: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_GREATER_SPIRIT); + CloseGossipMenuFor(player); + break; + + case 195: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_GREATER_VITALITY); + CloseGossipMenuFor(player); + break; + + case 196: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_ICEWALKER); + CloseGossipMenuFor(player); + break; + + case 197: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_GREATER_FORTITUDE); + CloseGossipMenuFor(player); + break; + + case 198: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_NITRO_BOOTS); + CloseGossipMenuFor(player); + break; + + case 199: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_PYRO_ROCKET); + CloseGossipMenuFor(player); + break; + + case 200: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_HYPERSPEED); + CloseGossipMenuFor(player); + break; + + case 201: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FEET), ENCHANT_BOOTS_ARMOR_WEBBING); + CloseGossipMenuFor(player); + break; + + case 202: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FINGER1), ENCHANT_RING_ASSULT); + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FINGER2), ENCHANT_RING_ASSULT); + CloseGossipMenuFor(player); + break; + + case 203: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FINGER1), ENCHANT_RING_GREATER_SP); + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FINGER2), ENCHANT_RING_GREATER_SP); + CloseGossipMenuFor(player); + break; + + case 204: + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FINGER1), ENCHANT_RING_STAMINA); + Enchant(player, player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_FINGER2), ENCHANT_RING_STAMINA); + CloseGossipMenuFor(player); + break; + + case 300: + { + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Welcome to the enchanting NPC!]", GOSSIP_SENDER_MAIN, 0); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Weapon]", GOSSIP_SENDER_MAIN, 1); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant 2H Weapon]", GOSSIP_SENDER_MAIN, 2); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Shield]", GOSSIP_SENDER_MAIN, 3); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Head]", GOSSIP_SENDER_MAIN, 4); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Shoulders]", GOSSIP_SENDER_MAIN, 5); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Cloak]", GOSSIP_SENDER_MAIN, 6); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Chest]", GOSSIP_SENDER_MAIN, 7); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Bracers]", GOSSIP_SENDER_MAIN, 8); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Gloves]", GOSSIP_SENDER_MAIN, 9); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Legs]", GOSSIP_SENDER_MAIN, 10); + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Feet]", GOSSIP_SENDER_MAIN, 11); + + if (player->HasSkill(SKILL_ENCHANTING) && player->GetSkillValue(SKILL_ENCHANTING) == 450) + AddGossipItemFor(player, GOSSIP_ICON_CHAT, "[Enchant Rings]", GOSSIP_SENDER_MAIN, 12); + + SendGossipMenuFor(player, 100001, me); + return true; + break; + } + } + return true; + } + }; + + // CREATURE AI + CreatureAI* GetAI(Creature* creature) const override + { + return new NPC_PassiveAI(creature); + } +}; + +void AddNPCEnchanterScripts() +{ + new EnchanterAnnounce(); + new npc_enchantment(); +}