1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-24 05:37:45 +00:00

Initial commit of the sapphire server

This commit is contained in:
Mordred Admin 2017-08-08 13:53:47 +02:00
commit e691d0504a
227 changed files with 40373 additions and 0 deletions

22
CMakeLists.txt Normal file
View file

@ -0,0 +1,22 @@
cmake_minimum_required(VERSION 2.6)
project (Sapphire)
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(PROJECT_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
# boost stuff
if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
set(Boost_COMPILER "-vc140")
endif()
set(SAPPHIRE_BOOST_VER 1.60.0)
set(SAPPHIRE_BOOST_FOLDER_NAME boost_1_60_0)
include_directories("${PROJECT_INCLUDE_DIR}")
include_directories("${PROJECT_SOURCE_DIR}")
add_subdirectory("src/servers")
add_subdirectory("src/libraries/sapphire/datReader")

37
CMakeSettings.json Normal file
View file

@ -0,0 +1,37 @@
{
// See https://go.microsoft.com//fwlink//?linkid=834763 for more information about this file.
"configurations": [
{
"name": "x86-Debug",
"generator": "Visual Studio 14 2015",
"configurationType" : "Debug",
"buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-m -v:minimal"
},
{
"name": "x86-Release",
"generator": "Visual Studio 14 2015",
"configurationType": "Release",
"buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-m -v:minimal"
},
{
"name": "x64-Debug",
"generator": "Visual Studio 14 2015 Win64",
"configurationType" : "Debug",
"buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-m -v:minimal"
},
{
"name": "x64-Release",
"generator": "Visual Studio 14 2015 Win64",
"configurationType": "Release",
"buildRoot": "${env.LOCALAPPDATA}\\CMakeBuild\\${workspaceHash}\\build\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "-m -v:minimal"
}
]
}

662
LICENSE.md Normal file
View file

@ -0,0 +1,662 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <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.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 <http://www.gnu.org/licenses/>.
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
<http://www.gnu.org/licenses/>.

43
README.md Normal file
View file

@ -0,0 +1,43 @@
# Sapphire - FINAL FANTASY XIV Server Emulator
[![Discord Server](https://img.shields.io/badge/discord-Sapphire-7289DA.svg)](https://discord.gg/KfrZCkx)
![FFXIV Sapphire](http://i.imgur.com/I4bj1tR.png)
Sapphire is a FINAL FANTASY XIV 4.0+ Server Emulator currently in development.
## Features
* Fully working base world servers, including character creation, chat, player interaction, etc.
* Basic action/battle system
* Teleports, discovery
* NPCs, enemies
* Support for most Quest types(instanced content planned, to be added later)
* Content scripting via ChaiScript
* Retail GM commands working
## Dependencies + Compiling
Sapphire requires the following software:
| *Name* | *Windows* | *Linux* |
| ------ | --------- | ------- |
| CMake 2.6+ and C++14 capable compiler | [Visual Studio 2017](https://www.visualstudio.com/) | Your favorite C++14 capable compiler |
| Boost 1.63.0 | [Win32 precompiled binaries](https://sourceforge.net/projects/boost/files/boost-binaries/1.63.0/boost_1_63_0-msvc-14.0-32.exe/download) | Boost libraries from your distribution's package manager |
| MySQL Server 5.7 | [Official Site](https://dev.mysql.com/downloads/mysql/) | MySQL server from your distribution's package manager |
| C# Compiler(used for various tools) | [Visual Studio 2017](https://www.visualstudio.com/) \| [Mono](http://www.mono-project.com/) | [Mono](http://www.mono-project.com/) from your distribution's package manager |
**Windows**
Set the environment variables ``BOOST_ROOT_DIR`` and ``BOOST_LIB_DIR`` to ``[boost main folder]`` and ``[boost main folder]/lib32-msvc-14.0`` respectively **or** copy your boost installation into the project's ``src/lib`` folder.
* In *Visual Studio 2017*: Open the project via ``File`` > ``Open`` > ``Folder`` and wait, till CMake automatically finishes cache generation. Right click any CMakeLists.txt and select build to build a application.
To configure debug startup parameters, select ``Debug and Launch settings``, the application you want to set up parameters for, and add a ``args`` json array containing your launch parameters in ``configurations``.
If Visual Studio fails to generate a CMake Cache or does not show options to build, make sure that the newest version of it is installed and all environment variables are set correctly. Keep in mind that generating a cache can take a while on some machines.
* In *Visual Studio 2015*: Generate a Visual Studio project via CMake: ``cmake -G "Visual Studio 14 2015"`` and open it as a normal solution in Visual Studio.
**Linux**
Generate a cache with CMake and use your favorite C++14 capable compiler to compile those wonderful lines of code into binaries with ``make``.
Sapphire is **not** currently configured to compile in 64bit. Make sure that all libraries have their ``:i386`` versions installed.
## Links
* [Sapphire on YouTube](https://www.youtube.com/channel/UCJKYuovoGsq7PxSAfrNJKbw)
Final Fantasy XIV © 2010-2017 SQUARE ENIX CO., LTD. All Rights Reserved. We are not affiliated with SQUARE ENIX CO., LTD. in any way.

View file

@ -0,0 +1,27 @@
<Settings>
<General>
<!-- Port the lobby server accepts client connections on -->
<ListenPort>54994</ListenPort>
<AuthPort>54998</AuthPort>
<!-- Ip the lobby server listens on -->
<ListenIp>127.0.0.1</ListenIp>
<!-- Path of FFXIV dat files -->
<DataPath>C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack\\ffxiv</DataPath>
<!-- IP of the world server -->
<ZoneIp>127.0.0.1</ZoneIp>
<!-- Port the world server listens for clients -->
<ZonePort>54992</ZonePort>
<!-- Address to connect to the rest server -->
<RestHost>127.0.0.1:8080</RestHost>
<!-- Secret for server authentication -->
<ServerSecret>default</ServerSecret>
<!-- Connection settings for the mysql db -->
<Mysql>
<Host>127.0.0.1</Host>
<Port>3306</Port>
<Username>root</Username>
<Pass></Pass>
<Database>sapphire</Database>
</Mysql>
</General>
</Settings>

View file

@ -0,0 +1,26 @@
<Settings>
<General>
<!-- Port the lobby server accepts client connections on -->
<ListenPort>54994</ListenPort>
<AuthPort>54998</AuthPort>
<!-- Ip the lobby server listens on -->
<ListenIp>127.0.0.1</ListenIp>
<!-- Path of FFXIV dat files -->
<DataPath>C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack\\ffxiv</DataPath>
<!-- IP of the lobby server -->
<LobbyHost>127.0.0.1</LobbyHost>
<!-- IP of the frontier server -->
<FrontierHost>127.0.0.1</FrontierHost>
<!-- Secret used for server auth -->
<ServerSecret>default</ServerSecret>
<!-- Web server port -->
<HttpPort>8080</HttpPort>
<Mysql>
<Host>127.0.0.1</Host>
<Port>3306</Port>
<Username>root</Username>
<Pass></Pass>
<Database>sapphire</Database>
</Mysql>
</General>
</Settings>

View file

@ -0,0 +1,22 @@
<Settings>
<General>
<!-- ID of this server -->
<ServerId>100</ServerId>
<!-- Port the zone server accepts game conenctions on -->
<ListenPort>54992</ListenPort>
<!-- Ip the zone server conenctions on -->
<ListenIp>127.0.0.1</ListenIp>
<!-- Path of FFXIV dat files -->
<DataPath>C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack\\ffxiv</DataPath>
<!-- Connection settings for the mysql db -->
<Mysql>
<Host>127.0.0.1</Host>
<Port>3306</Port>
<Username>root</Username>
<Pass></Pass>
<Database>sapphire</Database>
</Mysql>
</General>
</Settings>

BIN
bin/libmysql.dll Normal file

Binary file not shown.

View file

@ -0,0 +1,61 @@
// This is an automatically generated chai script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, change its extension to .chai
// Quest Script: SubFst004_00027
// Quest Name: Preserving the Past
// Quest ID: 65563
// Start NPC: 1000194
// End NPC: 1000789
class CmnDefCutSceneReplayDef
{
// Basic quest information
var quest_name
var quest_id
// These are the quest vars / flags used in this quest
// GetQuestUI8AL
// GetQuestUI8BH
// Available Scenes in this quest, not necessarly all are used
attr onScene00000;
// Quest rewards
var RewardExpFactor;
var RewardItem;
var RewardItemCount;
// Entities found in the script data of the quest
// some of these may be useful
var ACTOR0;
var ACTOR1;
var ACTOR2;
var ITEM0;
def CmnDefCutSceneReplayDef()
{
}
def Scene00000( player, eventId, flags, unk, unk1 )
{
player.eventPlay(eventId, 0, 0x2000, unk, 1,
fun( player, eventId, subEvent, param1, param2, param3 )
{
player.eventFinish(eventId, 1);
} );
}
};
def CmnDefCutSceneReplay_START(player, actorId, eventId)
{
var quest = CmnDefCutSceneReplay();
var actor = mapActor( actorId );
player.eventStart( actorId, eventId, 1, 0, 0 );
CmnDefCutSceneReplay.Scene00000( player, eventId, 0, 0, 0 );
}

View file

@ -0,0 +1,57 @@
//Aethernet - Aetheryte
class AethernetDef
{
def AethernetDef()
{
this.AetheryteBaseId = 0x50000;
this.AETHERYTE_MENU_AETHERNET = 1;
this.AETHERYTE_MENU_HOUSING = 2;
this.AETHERYTE_MENU_HOME_POINT = 3;
this.AETHERYTE_MENU_FAVORITE_POINT = 4;
this.AETHERYTE_MENU_FAVORITE_POINT_SECURITY_TOKEN = 5;
}
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( player.isAetheryteRegistered( eventId & 0xFFFF ) )
{
player.eventPlay( eventId, 2, NONE,
fun ( player, eventId, param1, param2, param3 )
{
var aetherId = eventId & 0xFFFF;
if ( param1 == 256 ) // aethernet
{
//player.setTeleporting( true );
player.teleport( param2, 2 );
}
} );
}
else
{
var ACTION_ATTUNE = 0x13;
player.eventActionStart( eventId,
ACTION_ATTUNE,
// callback function for finished casting
fun ( player, eventId, additional )
{
var aetherId = eventId & 0xFFFF;
player.aetheryteRegister( aetherId );
player.eventPlay( eventId, 3, 0, 0, 0);
},
// callback for interrupted action.
fun ( player, eventId, additional ){},
0);
player.unlock();
}
}
}
GLOBAL Aethernet = AethernetDef();

View file

@ -0,0 +1,71 @@
//Aethernet - Aetheryte
class AetheryteDef
{
def AetheryteDef()
{
this.AetheryteBaseId = 0x50000;
this.AETHERYTE_MENU_AETHERNET = 1;
this.AETHERYTE_MENU_HOUSING = 2;
this.AETHERYTE_MENU_HOME_POINT = 3;
this.AETHERYTE_MENU_FAVORITE_POINT = 4;
this.AETHERYTE_MENU_FAVORITE_POINT_SECURITY_TOKEN = 5;
}
def onTalk( eventId, player, actorId )
{
if( player.isAetheryteRegistered( eventId & 0xFFFF ) )
{
player.eventPlay( eventId, 0, 1,
fun ( player, eventId, param1, param2, param3 )
{
var aetherId = eventId & 0xFFFF;
if ( param1 == 256 ) // set homepoint
{
player.setHomepoint( aetherId );
player.questMessage( eventId, 2, 0xEA, 0, 0);
}
else if ( param1 == 512 && param2 == 4 ) // aethernet
{
player.setTeleporting( true );
player.teleport( param3, 2 );
}
} );
}
else
{
var ACTION_ATTUNE = 0x13;
player.eventActionStart(eventId,
ACTION_ATTUNE,
// callback function for finished casting
fun ( player, eventId, additional )
{
var aetherId = eventId & 0xFFFF;
player.aetheryteRegister(aetherId);
// check if teleport is already unlocked
if( player.isActionLearned( 4 ) )
{
player.questMessage( eventId, 0, 2, 0, 0);
}
else
{
player.questMessage( eventId, 0, 1, 1, 0);
player.learnAction( 4 );
}
},
// callback for interrupted action.
fun ( player, eventId, additional )
{
},
0);
player.unlock();
}
}
}
GLOBAL Aetheryte = AetheryteDef();

226
bin/scripts/chai/global.inc Normal file
View file

@ -0,0 +1,226 @@
/////////////////////////////////////////////////////////////////////
// Quest sequence
/////////////////////////////////////////////////////////////////////
GLOBAL SEQ_COMPLETE = 0xFF
/////////////////////////////////////////////////////////////////////
// SCENE_FLAGS
/////////////////////////////////////////////////////////////////////
GLOBAL SET_EOBJ_BASE = 0xF8400EF3
GLOBAL SET_INVIS_BASE = 0xF8400FFF
GLOBAL SET_BASE = 0xF8400EFB
GLOBAL INVIS_COMPANION = 0x80000000
GLOBAL INVIS_ALLIANCE_BUDDY = 0x40000000
GLOBAL INVIS_ALLIANCE_PC = 0x20000000
GLOBAL INVIS_AOE = 0x08000000
GLOBAL DISABLE_CANCEL_EMOTE = 0x04000000
GLOBAL LOCK_HOTBAR = 0x02000000
GLOBAL LOCK_HUD = 0x01000000
GLOBAL ROLLBACK_HIDE_UI = 0x00800000
GLOBAL DISABLE_STEALTH = 0x00400000
GLOBAL HIDE_FESTIVAL = 0x00200000
GLOBAL DISABLE_SKIP = 0x00080000
GLOBAL SILENT_ENTER_TERRI_ALL = 0x00038000
GLOBAL SILENT_ENTER_TERRI_SE = 0x00020000
GLOBAL SILENT_ENTER_TERRI_BGM = 0x00010000
GLOBAL SILENT_ENTER_TERRI_ENV = 0x00008000
GLOBAL INVINCIBLE = 0x00004000
GLOBAL HIDE_HOTBAR = 0x00002000
GLOBAL AUTO_LOC_CAMERA = 0x00001000
GLOBAL INVIS_ALL = 0xF80003FC
GLOBAL HIDE_UI = 0x00000800
GLOBAL CONDITION_CUTSCENE = 0x00000400
GLOBAL INVIS_TREASURE = 0x00000200
GLOBAL INVIS_AETHERYTE = 0x00000100
GLOBAL INVIS_GATHERING_POINT = 0x00000080
GLOBAL INVIS_PARTY_BUDDY = 0x10000000
GLOBAL INVIS_PARTY_PC = 0x00000040
GLOBAL INVIS_OTHER_PC = 0x00000020
GLOBAL INVIS_BNPC = 0x00000010
GLOBAL INVIS_EOBJ = 0x00000008
GLOBAL INVIS_ENPC = 0x00000004
GLOBAL FADE_OUT = 0x00000002
GLOBAL NO_DEFAULT_CAMERA = 0x00000001
GLOBAL NONE = 0x00000000
/////////////////////////////////////////////////////////////////////
// Event Types
/////////////////////////////////////////////////////////////////////
GLOBAL EVENT_TALK = 1
GLOBAL EVENT_EMOTE = 2
GLOBAL EVENT_DISTANCE_BELOW = 3
GLOBAL EVENT_DISTANCE_OVER = 4
GLOBAL EVENT_BATTLE_REWARD = 5
GLOBAL EVENT_CRAFT = 6
GLOBAL EVENT_NEST = 7
GLOBAL EVENT_EVENT_ITEM = 8
GLOBAL EVENT_DROP = 9
GLOBAL EVENT_WITHIN_RANGE = 10
GLOBAL EVENT_OUTSIDE_RANGE = 11
GLOBAL EVENT_GAME_START = 12
GLOBAL EVENT_GAME_PROGRESS = 13
GLOBAL EVENT_ENTER_TERRITORY = 15
GLOBAL EVENT_GAME_COME_BACK = 17
GLOBAL EVENT_ACTION_RESULT = 18
GLOBAL EVENT_MATERIA_CRAFT = 19
GLOBAL EVENT_FISHING = 20
GLOBAL EVENT_UI = 21
GLOBAL EVENT_HOUSING = 22
GLOBAL EVENT_SAY = 23
GLOBAL EVENT_TABLE_GAME = 24
/////////////////////////////////////////////////////////////////////
// Event finish states
/////////////////////////////////////////////////////////////////////
GLOBAL UNLOCK = 1
GLOBAL KEEPLOCK = 0
/////////////////////////////////////////////////////////////////////
// Possible Event Types
/////////////////////////////////////////////////////////////////////
GLOBAL ACTOR_EVENT_ON_CREATE = 1
GLOBAL ACTOR_EVENT_ON_SPAWN = 2
GLOBAL ACTOR_EVENT_ON_DESPAWN = 3
GLOBAL ACTOR_EVENT_ON_AI_TICK = 4
GLOBAL ACTOR_EVENT_ON_TALK_DEFAULT = 5
GLOBAL MOB_EVENT_ON_DEATH = 1
GLOBAL REGION_EVENT_ON_CREATE= 1
GLOBAL REGION_EVENT_ON_ENTER = 2
GLOBAL REGION_EVENT_ON_LEAVE = 3
GLOBAL PLAYER_EVENT_ON_FIRST_ENTER_WORLD = 1
GLOBAL PLAYER_EVENT_ON_ENTER_WORLD = 2
GLOBAL PLAYER_EVENT_ON_DEATH = 3
GLOBAL PLAYER_EVENT_ON_LOGIN = 4
GLOBAL PLAYER_EVENT_ON_LOGOUT = 5
// End Event Types
GLOBAL SLOT_MAINH = 0
GLOBAL SLOT_OFFH = 1
GLOBAL SLOT_HEAD = 2
GLOBAL SLOT_BODY = 3
GLOBAL SLOT_GLOVES = 4
GLOBAL SLOT_WAIST = 5
GLOBAL SLOT_LEGS = 6
GLOBAL SLOT_FEET = 7
GLOBAL GENDER_MALE = 0
GLOBAL GENDER_FEMALE = 1
GLOBAL ACTION_EVENT_START = 1
GLOBAL ACTION_EVENT_RETURN = 2
GLOBAL ACTION_EVENT_TRADE_RETURN = 3
GLOBAL ACTION_ERANGE_EVENT_START = 4
GLOBAL ACTION_EVENT_EMOTE = 5
GLOBAL ACTION_RETURN = 0x26
GLOBAL ACTION_TELEPORT = 0x29
GLOBAL EVENTACTION_ATTUNE = 0x13
GLOBAL CLASS_GLA = 1
GLOBAL CLASS_PUG = 2
GLOBAL CLASS_MRD = 3
GLOBAL CLASS_LNC = 4
GLOBAL CLASS_ARC = 5
GLOBAL CLASS_CON = 6
GLOBAL CLASS_THM = 7
GLOBAL CLASS_CRP = 8
GLOBAL CLASS_BSM = 9
GLOBAL CLASS_ARM = 10
GLOBAL CLASS_GLD = 11
GLOBAL CLASS_TAN = 12
GLOBAL CLASS_WVR = 13
GLOBAL CLASS_ALC = 14
GLOBAL CLASS_CUL = 15
GLOBAL CLASS_MIN = 16
GLOBAL CLASS_BOT = 17
GLOBAL CLASS_FSH = 18
GLOBAL CLASS_PLD = 19
GLOBAL CLASS_MNK = 20
GLOBAL CLASS_WAR = 21
GLOBAL CLASS_DRG = 22
GLOBAL CLASS_BRD = 23
GLOBAL CLASS_WHM = 24
GLOBAL CLASS_BLM = 25
GLOBAL CLASS_ACN = 26
GLOBAL CLASS_SMN = 27
GLOBAL CLASS_SCH = 28
GLOBAL CLASS_ROG = 29
GLOBAL CLASS_NIN = 30
GLOBAL CLASS_MCH = 31
GLOBAL CLASS_DRK = 32
GLOBAL CLASS_AST = 33
///////////////////////////////////////////////////////////////
// Inventory Enums
///////////////////////////////////////////////////////////////
GLOBAL INVENTORY_BAG0 = 0
GLOBAL INVENTORY_BAG1 = 1
GLOBAL INVENTORY_BAG2 = 2
GLOBAL INVENTORY_BAG3 = 3
GLOBAL INVENTORY_GEARSET0 = 1000
GLOBAL INVENTORY_GEARSET1 = 1001
GLOBAL INVENTORY_CURRENCY = 2000
GLOBAL INVENTORY_CRYSTAL = 2001
//GLOBAL INVENTORY_UNKNOWN_0 = 2003
GLOBAL INVENTORY_KEYITEM = 2004
GLOBAL INVENTORY_DAMAGEDGEAR = 2007
//GLOBAL INVENTORY_UNKNOWN_1 = 2008
GLOBAL INVENTORY_ARMORYOFF = 3200
GLOBAL INVENTORY_ARMORYHEAD = 3201
GLOBAL INVENTORY_ARMORYBODY = 3202
GLOBAL INVENTORY_ARMORYHAND = 3203
GLOBAL INVENTORY_ARMORYWAIST = 3204
GLOBAL INVENTORY_ARMORYLEGS = 3205
GLOBAL INVENTORY_ARMORYFEET = 3206
GLOBAL INVENTORY_ARMOTYNECK = 3207
GLOBAL INVENTORY_ARMORYEAR = 3208
GLOBAL INVENTORY_ARMORYWRIST = 3209
GLOBAL INVENTORY_ARMORYRING = 3300
GLOBAL INVENTORY_ARMORYSOULCRYSTAL = 3400
GLOBAL INVENTORY_ARMORYMAIN = 3500
GLOBAL INVENTORY_RETAINERBAG0 = 10000
GLOBAL INVENTORY_RETAINERBAG1 = 10001
GLOBAL INVENTORY_RETAINERBAG2 = 10002
GLOBAL INVENTORY_RETAINERBAG3 = 10003
GLOBAL INVENTORY_RETAINERBAG4 = 10004
GLOBAL INVENTORY_RETAINERBAG5 = 10005
GLOBAL INVENTORY_RETAINERBAG6 = 10006
GLOBAL INVENTORY_RETAINEREQUIPPEDGEAR = 11000
GLOBAL INVENTORY_RETAINERGIL = 12000
GLOBAL INVENTORY_RETAINERCRYSTAL = 12001
GLOBAL INVENTORY_RETAINERMARKET = 12002
GLOBAL INVENTORY_FREECOMPANYBAG0 = 20000
GLOBAL INVENTORY_FREECOMPANYBAG1 = 20001
GLOBAL INVENTORY_FREECOMPANYBAG2 = 20002
GLOBAL INVENTORY_FREECOMPANYGIL = 22000
GLOBAL INVENTORY_FREECOMPANYCRYSTAL = 22001
////////////////////////////////////////////////////////////
// Currency types
////////////////////////////////////////////////////////////
GLOBAL CURRENCY_GIL = 0X01
GLOBAL CURRENCY_STORMSEAL = 0X02
GLOBAL CURRENCY_SERPENTSEAL = 0X03
GLOBAL CURRENCY_FLAMESEAL = 0X04
GLOBAL CURRENCY_TOMESTONEPHILO = 0X05
GLOBAL CURRENCY_TOMESTONEMYTHO = 0X06
GLOBAL CURRENCY_WOLFMARK = 0X07
GLOBAL CURRENCY_TOMESTONESOLD = 0X08
GLOBAL CURRENCY_ALLIEDSEAL = 0X09
GLOBAL CURRENCY_TOMESTONEPOET = 0X0A
GLOBAL CURRENCY_MGP = 0X0B
GLOBAL CURRENCY_TOMESTONELAW = 0X0C
GLOBAL CURRENCY_TOMESTONEESO = 0X0D
GLOBAL CURRENCY_TOMESTONELORE = 0X0E

View file

@ -0,0 +1,97 @@
// Opening Script: OpeningGridania
// Quest Name: OpeningGridania
// Quest ID: 1245186
class OpeningGridaniaDef
{
def OpeningGridaniaDef()
{
this.id = 1245186;
this.name = "OpeningGridania";
this.ERANGE_HOWTO_ANN_AND_QUEST = 2117539;
this.ERANGE_HOWTO_QUEST_REWARD = 2366417;
this.ERANGE_SEQ_1_CLOSED_1 = 2351918;
this.POS_SEQ_1_CLOSED_RETURN_1 = 2351921;
this.ERANGE_SEQ_1_CLOSED_2 = 2351919;
this.POS_SEQ_1_CLOSED_RETURN_2 = 2351921;
this.ERANGE_ALWAYS_CLOSED_1 = 2280846;
this.POS_ALWAYS_CLOSED_RETURN_1 = 2320804;
this.ENPC_ALWAYS_CLOSED_1 = 2367988;
this.ERANGE_ALWAYS_CLOSED_3 = 2280851;
this.POS_ALWAYS_CLOSED_RETURN_3 = 2320811;
this.ENPC_ALWAYS_CLOSED_3 = 2563491;
this.BGM_MUSIC_ZONE_FST_TWN = 1003;
this.NCUT_FST_1 = 3;
this.NCUT_FST_2 = 53;
this.NCUT_FST_3 = 226;
this.ENPC_QUEST_OFFER = 1985150;
this.NCUT_LIGHT_ALL = 2;
this.NCUT_LIGHT_FST_1 = 147;
this.NCUT_LIGHT_FST_2 = 146;
}
def Scene00000( player )
{
player.eventPlay( this.id, 0, 0x2001, 0, 1,
fun( player, eventId, param1, param2, param3 )
{
player.setFirstLogin( false );
OpeningGridania.Scene00001( player );
} );
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, 0x2001, 1, 0x32 );
}
def Scene00020( player )
{
player.eventPlay( this.id, 20, 0x2001, 0, 1 );
}
def Scene00030( player )
{
player.eventPlay( this.id, 30, 0x2001, 0, 0 );
}
def Scene00040( player )
{
player.eventPlay( this.id, 40, 1, 2, 1,
fun( player, eventId, param1, param2, param3 )
{
if( player.hasQuest( ManFst001.id ) )
{
// update the instance boundaries
OpeningGridania.Scene00030( player );
}
} );
}
////////////////////////////// EVENT HANDLERS //////////////////////////////////
def onEnterTerritory( eventId, player, param1, param2)
{
if( player.isFirstLogin() == true )
{
this.Scene00000( player );
}
else
{
this.Scene00040( player );
}
}
def onWithinRange( eventId, player, param1, x, y, z)
{
if( this.ERANGE_ALWAYS_CLOSED_3 == param1 )
{
this.Scene00020( player );
}
}
};
GLOBAL OpeningGridania = OpeningGridaniaDef();

View file

@ -0,0 +1,108 @@
// Opening Script: OpeningLimsaLominsa
// Quest Name: OpeningLimsaLominsa
// Quest ID: 1245185
class OpeningLimsaLominsaDef
{
def OpeningLimsaLominsaDef()
{
this.id = 1245185;
this.name = "OpeningLimsaLominsa";
this.ERANGE_HOWTO_ANN_AND_QUEST = 4101831
this.ERANGE_HOWTO_QUEST_REWARD = 4102066
this.ERANGE_SEQ_1_CLOSED_1 = 4101785
this.POS_SEQ_1_CLOSED_RETURN_1 = 4101797
this.ERANGE_ALWAYS_CLOSED_1 = 4101744
this.POS_ALWAYS_CLOSED_RETURN_1 = 4101761
this.ENPC_ALWAYS_CLOSED_1 = 4102038
this.ERANGE_ALWAYS_CLOSED_2 = 4101746
this.POS_ALWAYS_CLOSED_RETURN_2 = 4101763
this.ENPC_ALWAYS_CLOSED_2 = 4102036
this.ERANGE_ALWAYS_CLOSED_3 = 4101967
this.POS_ALWAYS_CLOSED_RETURN_3 = 4101982
this.ENPC_ALWAYS_CLOSED_3 = 4102033
this.ERANGE_ALWAYS_CLOSED_4 = 4101970
this.POS_ALWAYS_CLOSED_RETURN_4 = 4101984
this.ENPC_ALWAYS_CLOSED_4 = 4102031
this.ERANGE_ALWAYS_CLOSED_5 = 4101973
this.POS_ALWAYS_CLOSED_RETURN_5 = 4101985
this.ENPC_ALWAYS_CLOSED_5 = 4102007
this.ERANGE_ALWAYS_CLOSED_6 = 4101979
this.POS_ALWAYS_CLOSED_RETURN_6 = 4101988
this.ENPC_ALWAYS_CLOSED_6 = 2367400
this.BGM_MUSIC_ZONE_SEA_TWN = 1020
this.NCUT_SEA_1 = 200
this.NCUT_SEA_2 = 132
this.NCUT_SEA_3 = 201
this.ENPC_QUEST_OFFER = 4102039
this.NCUT_LIGHT_ALL = 2
this.NCUT_LIGHT_SEA_1 = 147
this.NCUT_LIGHT_SEA_2 = 138
}
def Scene00000( player )
{
player.eventPlay( this.id, 0, 0x04AC05, 0, 1,
fun( player, eventId, param1, param2, param3 )
{
player.setFirstLogin( false );
OpeningLimsaLominsa.Scene00001( player );
} );
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, 0x2001, 1, 0x32 );
}
def Scene00020( player )
{
player.eventPlay( this.id, 20, 0x2001, 0, 1 );
}
def Scene00030( player )
{
player.eventPlay( this.id, 30, 0x2001, 0, 0 );
}
def Scene00040( player )
{
player.eventPlay( this.id, 40, 1, 2, 1,
fun( player, eventId, param1, param2, param3 )
{
player.eventFinish( eventId, UNLOCK );
if( player.hasQuest( ManSea001.id ) )
{
// update the instance boundaries
OpeningLimsaLominsa.Scene00030( player );
}
} );
}
////////////////////////////// EVENT HANDLERS //////////////////////////////////
def onEnterTerritory( eventId, player, param1, param2)
{
// if( player.isFirstLogin() == true )
// {
this.Scene00000( player );
// }
//else
// {
// this.Scene00040( player );
// }
}
def onWithinRange( eventId, player, param1, x, y, z)
{
if( this.ERANGE_SEQ_1_CLOSED_1 == param1 )
{
this.Scene00020( player );
}
}
};
GLOBAL OpeningLimsaLominsa = OpeningLimsaLominsaDef();

View file

@ -0,0 +1,98 @@
// Opening Script: OpeningUldah
// Quest Name: OpeningUldah
// Quest ID: 1245187
class OpeningUldahDef
{
def OpeningUldahDef()
{
this.id = 1245187;
this.name = "OpeningUldah";
this.ERANGE_HOWTO_ANN_AND_QUEST = 4101650;
this.ERANGE_HOWTO_QUEST_REWARD = 4102883;
this.ERANGE_SEQ_1_CLOSED_1 = 4101587;
this.POS_SEQ_1_CLOSED_RETURN_1 = 4101691;
this.ERANGE_ALWAYS_CLOSED_1 = 4101537;
this.POS_ALWAYS_CLOSED_RETURN_1 = 4101685;
this.ENPC_ALWAYS_CLOSED_1 = 4101796;
this.ERANGE_ALWAYS_CLOSED_2 = 4101525;
this.POS_ALWAYS_CLOSED_RETURN_2 = 4101680;
this.ENPC_ALWAYS_CLOSED_2 = 4101789;
this.ERANGE_ALWAYS_CLOSED_3 = 4101535;
this.POS_ALWAYS_CLOSED_RETURN_3 = 4101681;
this.ENPC_ALWAYS_CLOSED_3 = 4101787;
this.BGM_MUSIC_ZONE_WIL_TWN = 1035;
this.NCUT_WIL_1 = 186;
this.NCUT_WIL_2 = 139;
this.NCUT_WIL_3 = 187;
this.ENPC_QUEST_OFFER = 3969639;
this.NCUT_LIGHT_ALL = 2;
this.NCUT_LIGHT_WIL_1 = 147;
this.NCUT_LIGHT_WIL_2 = 145;
}
def Scene00000( player )
{
player.eventPlay( this.id, 0, 0x2001, 0, 1,
fun( player, eventId, param1, param2, param3 )
{
player.setFirstLogin( false );
OpeningUldah.Scene00001( player );
} );
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, 0x2001, 1, 0x32 );
}
def Scene00020( player )
{
player.eventPlay( this.id, 20, 0x2001, 0, 1 );
}
def Scene00030( player )
{
player.eventPlay( this.id, 30, 0x2001, 0, 0 );
}
def Scene00040( player )
{
player.eventPlay( this.id, 40, 1, 2, 1,
fun( player, eventId, param1, param2, param3 )
{
if( player.hasQuest( ManWil001.id ) )
{
// update the instance boundaries
OpeningUldah.Scene00030( player );
}
} );
}
////////////////////////////// EVENT HANDLERS //////////////////////////////////
def onEnterTerritory( eventId, player, param1, param2)
{
if( player.isFirstLogin() == true )
{
this.Scene00000( player );
}
else
{
this.Scene00040( player );
}
}
def onOutsideRange( eventId, player, param1, x, y, z)
{
if( this.ERANGE_SEQ_1_CLOSED_1 == param1 )
{
this.Scene00020( player );
}
}
};
GLOBAL OpeningUldah = OpeningUldahDef();

View file

@ -0,0 +1,11 @@
def onFirstEnterWorld(player)
{
var name = player.getName();
var race = player.getRace();
var gender = player.getGender();
//var class = player.getClass();
return name;
}

View file

@ -0,0 +1,124 @@
// Quest Script: ManFst001_00039
// Quest Name: Coming to Gridania
// Quest ID: 65575
// Start NPC: 1001148
// End NPC: 1001140
class ManFst001Def
{
//////////////////////////////////////////////////////////////////////
// default ctor
def ManFst001Def()
{
// Basic quest information
this.name = "Coming to Gridania";
this.id = 65575;
// These are the quest vars / flags used in this quest
// GetQuestUI8AL
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 50;
this.RewardGil = 103;
// Entities found in the script data of the quest
// some of these may be useful
this.ACTOR0 = 1001148;
this.ACTOR1 = 1001140;
this.CUT_EVENT = 29;
this.EOBJECT0 = 2001659;
this.EOBJECT1 = 2001660;
this.EOBJECT7 = 2616477;
this.EVENT_ACTION_SEARCH = 1;
this.HOWTO_QUEST_ACCEPT = 12;
this.HOWTO_QUEST_ANNOUNCE = 2;
this.HOWTO_REWARD = 11;
this.HOWTO_TODO = 3;
this.OPENING_EVENT_HANDLER = 1245186;
this.SEQ_2_ACTOR1 = 2;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, 0x2000/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
ManFst001.Scene00001( player );
}
});
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, 0xF8482EFB/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
ManFst001.Scene00002( player );
});
}
def Scene00002( player )
{
player.eventPlay( this.id, 2, NONE, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
player.questUpdate( ManFst001.id, ManFst001.SEQ_FINISH );// add quest to player.
// this is an external event, so we do need to start it here
//player.eventStart( player.getId(), ManFst001.OPENING_EVENT_HANDLER, 7, 0, 0 ); // update the instance boundaries, call to the opening event
player.eventPlay( ManFst001.OPENING_EVENT_HANDLER, 0x1E, 0x2001, 0, 0 );
});
}
def Scene00004( player )
{
player.eventPlay( this.id, 4, 0x2c02, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
ManFst001.Scene00005( player );
});
}
def Scene00005( player )
{
player.eventPlay( this.id, 5, 0x20/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // clicked finish button
{
player.gainExp( 50 );
player.addCurrency( 1, ManFst001.RewardGil );
player.questFinish( ManFst001.id );
}
});
}
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( actor == this.ACTOR0 )
{
this.Scene00000( player );
}
else if( actor == this.ACTOR1 )
{
this.Scene00004( player );
}
// Script content to be added here....
}
};
GLOBAL ManFst001 = ManFst001Def();

View file

@ -0,0 +1,261 @@
// Quest Script: ManFst002_00124
// Quest Name: Close to Home
// Quest ID: 65660
// Start NPC: 1001140
// End NPC: 1000100
class ManFst002Def
{
//////////////////////////////////////////////////////////////////////
// default ctor
def ManFst002Def()
{
// Basic quest information
this.name = "Close to Home";
this.id = 65621;
// These are the quest vars / flags used in this quest
// GetQuestBitFlag8
// GetQuestUI8AL -- attube to Aetheryte
// GetQuestUI8BH -- visit class guild
// GetQuestUI8BL -- Listen to Parsement in the market check mark
// GetQuestUI8CH -- recieve Key item
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_1 = 1;
this.SEQ_FINISH = 255;
//this.SEQ_OFFER = ?;
// Quest rewards
this.RewardExpFactor = 100;
this.RewardGil = 107;
// Entities found in the script data of the quest
// some of these may be useful
this.ACTOR0 = 1001140;
this.ACTOR1 = 2;
this.ACTOR2 = 1000251;
this.ACTOR20 = 1000159;
this.ACTOR3 = 1000768;
this.ACTOR4 = 1000100;
this.BIND_ACTOR0 = 6229224;
this.HOW_TO_DESION = 13;
this.HOW_TO_MAP_AND_NAVI = 4;
this.ITEM0 = 2000074;
this.LOC_ACTOR0 = 1003159;
this.LOC_MARKER_01 = 2153091;
this.LOC_MARKER_02 = 2153104;
this.LOC_MARKER_03 = 2153111;
this.LOC_MARKER_04 = 2154539;
this.LOC_MARKER_05 = 2154540;
this.LOC_MARKER_06 = 2154541;
this.LOC_MARKER_07 = 2210446;
this.LOC_MARKER_08 = 2210454;
this.LOC_MARKER_09 = 2210461;
this.LOC_MOTION0 = 799;
this.POPRANGE0 = 2280858;
this.REWARD_DESION = 1;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_0_ACTOR0_LQ = 50;
this.SEQ_1_ACTOR0 = 4;
this.SEQ_1_ACTOR1 = 1;
this.SEQ_1_ACTOR1_WAIT = 51;
this.SEQ_1_ACTOR2 = 2;
this.SEQ_1_ACTOR3 = 3;
this.SEQ_1_ACTOR3_NPCTRADENO = 99;
this.SEQ_1_ACTOR3_NPCTRADEOK = 100;
this.SEQ_2_ACTOR4 = 5;
this.TERRITORYTYPE0 = 132;
this.UNLOCK_DESION = 14;
}
def checkQuestCompletion( player, varIdx )
{
if (varIdx == 3)
{
player.questMessage(this.id, 1, 0, 0, 0 );
}
else if (varIdx == 2)
{
player.questMessage(this.id, 2, 0, 0, 0 );
}
else
{
player.questMessage(this.id, 0, 0, 0, 0 );
}
var QUEST_VAR_ATTUNE = player.getQuestUI8AL( this.id );
var QUEST_VAR_CLASS = player.getQuestUI8BH( this.id );
var QUEST_VAR_TRADE = player.getQuestUI8BL( this.id );
if ( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 )
{
player.questUpdate( this.id, this.SEQ_FINISH );
}
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, 0x2000/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
ManFst002.Scene00050( player );
}
});
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, 0x0EFB/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
player.setQuestUI8AL( ManFst002.id, 1 );
ManFst002.checkQuestCompletion( player, 0 );
});
}
def Scene00002( player )
{
player.eventPlay( this.id, 2, 0, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
player.setQuestUI8BH( ManFst002.id, 1 );
ManFst002.checkQuestCompletion( player, 3 );
});
}
def Scene00003( player )
{
player.eventPlay( this.id, 3, NONE/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
if ( param2 == 1 )
{
ManFst002.Scene00100( player );
}
else
{
ManFst002.Scene00099( player );
}
});
}
def Scene00004( player )
{
player.eventPlay( this.id, 4, 0, 0, 0 );
}
def Scene00005( player )
{
player.eventPlay( this.id, 5, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // finish quest
{
if( player.giveQuestRewards( ManFst002.id, 0 ) )
{
player.questFinish( ManFst002.id );
}
}
});
}
def Scene00050( player )
{
player.eventPlay( this.id, 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
// accepting quest "close to home"
player.questUpdate( ManFst002.id, 1 );
player.setQuestUI8CH( ManFst002.id, 1 ); // receive key item
// event is done, need to teleport to real zone.
player.setZone( 132 );
//player.setZone(183); back to starting griania for debug purpose
});
}
def Scene00051( player )
{
player.eventPlay( this.id, 51, 0, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
ManFst002.Scene00001( player );
});
}
def Scene00099( player )
{
player.eventPlay( this.id, 99, 0, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
ManFst002.Scene00004( player );
});
}
def Scene00100( player )
{
player.eventPlay( this.id, 100, 0x0EFB, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
player.setQuestUI8CH( ManFst002.id, 0 ); // remove key item, since we have just traded it
player.setQuestUI8BL( ManFst002.id, 1 );
ManFst002.checkQuestCompletion(player, 2 );
});
}
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( actor == this.ACTOR0 )
{
this.Scene00000( player );
}
else if( actor == this.ACTOR1 )
{
// starting the eventaction 0x13 ( attuning )
player.eventActionStart( 0x050002, 0x13,
fun( player, eventId, additional )
{
player.questMessage( 0x050002, 0, 1, 0, 0 );
player.aetheryteRegister( 2 );
player.learnAction( 1 );
ManFst002.Scene00051( player );
},
fun( player, eventId, additional )
{
player.eventFinish( 0x050002, 0 );
player.eventFinish( additional, 0 );
},
0x050002 );
}
else if( actor == this.ACTOR2 )
{
this.Scene00002( player );
}
else if( actor == this.ACTOR3 )
{
this.Scene00003( player );
}
else if( actor == this.ACTOR4 )
{
this.Scene00005( player );
}
}
};
GLOBAL ManFst002 = ManFst002Def();

View file

@ -0,0 +1,259 @@
// This is an automatically generated chai script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, change its extension to .chai
// and move it to the correct folder in bin/scripts/chai/quest
// Quest Script: ManFst003_00123
// Quest Name: Close to Home
// Quest ID: 65659
// Start NPC: 1001140
// End NPC: 1000100
class ManFst003Def
{
def ManFst003Def()
{
// Basic quest information
this.name = "Close to Home";
this.id = 65659;
// Quest vars / flags used
// GetQuestBitFlag8
// GetQuestUI8AL
// GetQuestUI8BH
// GetQuestUI8BL
// GetQuestUI8CH
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_1 = 1;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 100;
this.RewardGil = 107;
// Entities found in the script data of the quest
this.ACTOR0 = 1001140;
this.ACTOR1 = 2;
this.ACTOR2 = 1000197;
this.ACTOR20 = 1000159;
this.ACTOR3 = 1000768;
this.ACTOR4 = 1000100;
this.BIND_ACTOR0 = 6229224;
this.ITEM0 = 2000119;
this.LOC_ACTOR0 = 1003159;
this.LOC_MARKER_01 = 2153091;
this.LOC_MARKER_02 = 2153104;
this.LOC_MARKER_03 = 2153111;
this.LOC_MARKER_04 = 2154539;
this.LOC_MARKER_05 = 2154540;
this.LOC_MARKER_06 = 2154541;
this.LOC_MARKER_07 = 2210446;
this.LOC_MARKER_08 = 2210454;
this.LOC_MARKER_09 = 2210461;
this.LOC_MOTION0 = 799;
this.POPRANGE0 = 2280858;
this.REWARD_DESION = 1;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_0_ACTOR0_LQ = 50;
this.SEQ_1_ACTOR0 = 4;
this.SEQ_1_ACTOR1 = 1;
this.SEQ_1_ACTOR1_WAIT = 51;
this.SEQ_1_ACTOR2 = 2;
this.SEQ_1_ACTOR3 = 3;
this.SEQ_1_ACTOR3_NPCTRADENO = 99;
this.SEQ_1_ACTOR3_NPCTRADEOK = 100;
this.SEQ_2_ACTOR4 = 5;
this.TERRITORYTYPE0 = 132;
this.UNLOCK_DESION = 14;
}
def checkQuestCompletion( player, varIdx )
{
print( varIdx );
if (varIdx == 3)
{
player.questMessage(this.id, 1, 0, 0, 0 );
}
else if (varIdx == 2)
{
player.questMessage(this.id, 2, 0, 0, 0 );
}
else
{
player.questMessage(this.id, 0, 0, 0, 0 );
}
var QUEST_VAR_ATTUNE = player.getQuestUI8AL( this.id );
var QUEST_VAR_CLASS = player.getQuestUI8BH( this.id );
var QUEST_VAR_TRADE = player.getQuestUI8BL( this.id );
if ( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 )
{
player.questUpdate( this.id, this.SEQ_FINISH );
}
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, 0x2000/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
ManFst003.Scene00050( player );
}
});
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, 0x0EFB/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
player.setQuestUI8AL( ManFst004.id, 1 );
ManFst003.checkQuestCompletion( player, 1 );
});
}
def Scene00002( player )
{
player.eventPlay( this.id, 2, 0, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
player.setQuestUI8BH( ManFst004.id, 1 );
ManFst003.checkQuestCompletion( player, 3 );
});
}
def Scene00003( player )
{
player.eventPlay( this.id, 3, NONE/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
if ( param2 == 1 )
{
ManFst003.Scene00100( player );
}
else
{
ManFst003.Scene00099( player );
}
});
}
def Scene00004( player )
{
player.eventPlay( this.id, 4, 0, 0, 0 );
}
def Scene00005( player )
{
player.eventPlay( this.id, 5, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // finish quest
{
if( player.giveQuestRewards( ManFst003.id, 0 ) )
{
player.questFinish( ManFst003.id );
}
}
});
}
def Scene00050( player )
{
player.eventPlay( this.id, 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
// accepting quest "close to home"
player.questUpdate( ManFst003.id, 1 );
player.setQuestUI8CH( ManFst003.id, 1 ); // receive key item
// event is done, need to teleport to real zone.
player.setZone( 132 );
//player.setZone(183); back to starting griania for debug purpose
});
}
def Scene00051( player )
{
player.eventPlay( this.id, 51, 0, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
ManFst003.Scene00001( player );
});
}
def Scene00099( player )
{
player.eventPlay( this.id, 99, 0, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
ManFst003.Scene00004( player );
});
}
def Scene00100( player )
{
player.eventPlay( this.id, 100, 0x0EFB, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
player.setQuestUI8CH( ManFst004.id, 0 ); // remove key item, since we have just traded it
player.setQuestUI8BL( ManFst004.id, 1 );
ManFst003.checkQuestCompletion(player, 2 );
});
}
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( actor == this.ACTOR0 )
{
this.Scene00000( player );
}
else if( actor == this.ACTOR1 )
{
// starting the Aetheryte eventaction
// player.eventStart( actorId, 0x050002, 7, 0, 0);
// starting the eventaction 0x13 ( attuning )
player.eventActionStart( 0x050002, 0x13,
fun( player, eventId, additional )
{
player.questMessage( 0x050002, 0, 1, 0, 0 );
player.aetheryteRegister( 2 );
player.learnAction( 1 );
ManFst003.Scene00051( player );
},
fun( player, eventId, additional ) {},
eventId );
}
else if( actor == this.ACTOR2 )
{
this.Scene00002( player );
}
else if( actor == this.ACTOR3 )
{
this.Scene00003( player );
}
else if( actor == this.ACTOR4 )
{
this.Scene00005( player );
}
}
};
GLOBAL ManFst003 = ManFst003Def();

View file

@ -0,0 +1,246 @@
// This is an automatically generated chai script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, change its extension to .chai
// Quest Script: ManFst003_00123
// Quest Name: Close to Home
// Quest ID: 65659
// Start NPC: 1001140
// End NPC: 1000100
class ManFst003
{
var name;
var id;
var SEQ_0;
var SEQ_1;
var SEQ_FINISH;
var SEQ_OFFER;
var RewardExpFactor;
var RewardGil;
var ACTOR0;
var SEQ_0_ACTOR0;
var ITEM0;
var ACTOR1;
var SEQ_1_ACTOR1;
var ACTOR2;
var SEQ_1_ACTOR2;
var ACTOR3;
var SEQ_1_ACTOR3;
var SEQ_1_ACTOR3_NPCTRADEOK;
var SEQ_1_ACTOR3_NPCTRADENO;
var SEQ_1_ACTOR0;
var ACTOR4;
var SEQ_2_ACTOR4;
var TERRITORYTYPE0;
var POPRANGE0;
var LOC_MARKER_01;
var LOC_MARKER_02;
var LOC_MARKER_03;
var LOC_MARKER_04;
var LOC_MARKER_05;
var LOC_MARKER_06;
var LOC_MARKER_07;
var LOC_MARKER_08;
var LOC_MARKER_09;
var SEQ_0_ACTOR0_LQ;
var UNLOCK_DESION;
var REWARD_DESION;
var HOW_TO_MAP_AND_NAVI;
var HOW_TO_DESION;
var ACTOR20;
var SEQ_1_ACTOR1_WAIT;
var LOC_ACTOR0;
var BIND_ACTOR0;
var LOC_MOTION0;
//////////////////////////////////////////////////////////////////////
// default ctor
def ManFst003()
{
// Basic quest information
this.name = "Close to Home";
this.id = 65659;
// These are the quest vars / flags used in this quest
// GetQuestBitFlag8
// GetQuestUI8AL
// GetQuestUI8BH
// GetQuestUI8BL
// GetQuestUI8CH
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_1 = 1;
this.SEQ_FINISH = 255;
//this.SEQ_OFFER = ?;
// Quest rewards
this.RewardExpFactor = 100;
this.RewardGil = 107;
// Entities found in the script data of the quest
// some of these may be useful
this.ACTOR0 = 1001140;
this.ACTOR1 = 2;
this.ACTOR2 = 1000197;
this.ACTOR20 = 1000159;
this.ACTOR3 = 1000768;
this.ACTOR4 = 1000100;
this.BIND_ACTOR0 = 6229224;
this.HOW_TO_DESION = 13;
this.HOW_TO_MAP_AND_NAVI = 4;
this.ITEM0 = 2000119;
this.LOC_ACTOR0 = 1003159;
this.LOC_MARKER_01 = 2153091;
this.LOC_MARKER_02 = 2153104;
this.LOC_MARKER_03 = 2153111;
this.LOC_MARKER_04 = 2154539;
this.LOC_MARKER_05 = 2154540;
this.LOC_MARKER_06 = 2154541;
this.LOC_MARKER_07 = 2210446;
this.LOC_MARKER_08 = 2210454;
this.LOC_MARKER_09 = 2210461;
this.LOC_MOTION0 = 799;
this.POPRANGE0 = 2280858;
this.REWARD_DESION = 1;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_0_ACTOR0_LQ = 50;
this.SEQ_1_ACTOR0 = 4;
this.SEQ_1_ACTOR1 = 1;
this.SEQ_1_ACTOR1_WAIT = 51;
this.SEQ_1_ACTOR2 = 2;
this.SEQ_1_ACTOR3 = 3;
this.SEQ_1_ACTOR3_NPCTRADENO = 99;
this.SEQ_1_ACTOR3_NPCTRADEOK = 100;
this.SEQ_2_ACTOR4 = 5;
this.TERRITORYTYPE0 = 132;
this.UNLOCK_DESION = 14;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player, eventId )
{
player.eventPlay( eventId, 0, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest = ManFst003();
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00001( player, eventId )
{
player.eventPlay( eventId, 1, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest = ManFst003();
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00002( player, eventId )
{
player.eventPlay( eventId, 2, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest = ManFst003();
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00003( player, eventId )
{
player.eventPlay( eventId, 3, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest = ManFst003();
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00004( player, eventId )
{
player.eventPlay( eventId, 4, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest = ManFst003();
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00005( player, eventId )
{
player.eventPlay( eventId, 5, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest = ManFst003();
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00050( player, eventId )
{
player.eventPlay( eventId, 50, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest = ManFst003();
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00051( player, eventId )
{
player.eventPlay( eventId, 51, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest = ManFst003();
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00099( player, eventId )
{
player.eventPlay( eventId, 99, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest = ManFst003();
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00100( player, eventId )
{
player.eventPlay( eventId, 100, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest = ManFst003();
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
};
//////////////////////////////////////////////////////////////////////
// Entry function for this quest
def ManFst003_START(player, actorId, eventId)
{
var quest = ManFst003();
var actor = mapActor( actorId );
// Script content to be added here....
}

View file

@ -0,0 +1,258 @@
// Quest Script: ManFst004_00124
// Quest Name: Close to Home
// Quest ID: 65660
// Start NPC: 1001140
// End NPC: 1000100
class ManFst004Def
{
//////////////////////////////////////////////////////////////////////
// default ctor
def ManFst004Def()
{
// Basic quest information
this.name = "Close to Home";
this.id = 65660;
// These are the quest vars / flags used in this quest
// GetQuestBitFlag8
// GetQuestUI8AL -- attube to Aetheryte
// GetQuestUI8BH -- visit class guild
// GetQuestUI8BL -- Listen to Parsement in the market check mark
// GetQuestUI8CH -- recieve Key item
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_1 = 1;
this.SEQ_FINISH = 255;
//this.SEQ_OFFER = ?;
// Quest rewards
this.RewardExpFactor = 100;
this.RewardGil = 107;
// Entities found in the script data of the quest
// some of these may be useful
this.ACTOR0 = 1001140;
this.ACTOR1 = 2;
this.ACTOR2 = 1000323;
this.ACTOR20 = 1000159;
this.ACTOR3 = 1000768;
this.ACTOR4 = 1000100;
this.BIND_ACTOR0 = 6229224;
this.ITEM0 = 2000120;
this.LOC_ACTOR0 = 1003159;
this.LOC_MARKER_01 = 2153091;
this.LOC_MARKER_02 = 2153104;
this.LOC_MARKER_03 = 2153111;
this.LOC_MARKER_04 = 2154539;
this.LOC_MARKER_05 = 2154540;
this.LOC_MARKER_06 = 2154541;
this.LOC_MARKER_07 = 2210446;
this.LOC_MARKER_08 = 2210454;
this.LOC_MARKER_09 = 2210461;
this.LOC_MOTION0 = 799;
this.POPRANGE0 = 2280858;
this.REWARD_DESION = 1;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_0_ACTOR0_LQ = 50;
this.SEQ_1_ACTOR0 = 4;
this.SEQ_1_ACTOR1 = 1;
this.SEQ_1_ACTOR1_WAIT = 51;
this.SEQ_1_ACTOR2 = 2;
this.SEQ_1_ACTOR3 = 3;
this.SEQ_1_ACTOR3_NPCTRADENO = 99;
this.SEQ_1_ACTOR3_NPCTRADEOK = 100;
this.SEQ_2_ACTOR4 = 5;
this.TERRITORYTYPE0 = 132;
this.UNLOCK_DESION = 14;
}
def checkQuestCompletion( player, varIdx )
{
if (varIdx == 3)
{
player.questMessage(this.id, 1, 0, 0, 0 );
}
else if (varIdx == 2)
{
player.questMessage(this.id, 2, 0, 0, 0 );
}
else
{
player.questMessage(this.id, 0, 0, 0, 0 );
}
var QUEST_VAR_ATTUNE = player.getQuestUI8AL( this.id );
var QUEST_VAR_CLASS = player.getQuestUI8BH( this.id );
var QUEST_VAR_TRADE = player.getQuestUI8BL( this.id );
if ( QUEST_VAR_ATTUNE == 1 && QUEST_VAR_CLASS == 1 && QUEST_VAR_TRADE == 1 )
{
player.questUpdate( this.id, this.SEQ_FINISH );
}
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, 0x2000/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
ManFst004.Scene00050( player );
}
});
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, 0x0EFB/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
player.setQuestUI8AL( ManFst004.id, 1 );
ManFst004.checkQuestCompletion( player, 0 );
});
}
def Scene00002( player )
{
player.eventPlay( this.id, 2, 0, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
player.setQuestUI8BH( ManFst004.id, 1 );
ManFst004.checkQuestCompletion( player, 3 );
});
}
def Scene00003( player )
{
player.eventPlay( this.id, 3, NONE/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
if ( param2 == 1 )
{
ManFst004.Scene00100( player );
}
else
{
ManFst004.Scene00099( player );
}
});
}
def Scene00004( player )
{
player.eventPlay( this.id, 4, 0, 0, 0 );
}
def Scene00005( player )
{
player.eventPlay( this.id, 5, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // finish quest
{
if( player.giveQuestRewards( ManFst004.id, 0 ) )
{
player.questFinish( ManFst004.id );
}
}
});
}
def Scene00050( player )
{
player.eventPlay( this.id, 50, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
// accepting quest "close to home"
player.questUpdate( ManFst004.id, 1 );
player.setQuestUI8CH( ManFst004.id, 1 ); // receive key item
// event is done, need to teleport to real zone.
player.setZone( 132 );
//player.setZone(183); back to starting griania for debug purpose
});
}
def Scene00051( player )
{
player.eventPlay( this.id, 51, 0, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
ManFst004.Scene00001( player );
});
}
def Scene00099( player )
{
player.eventPlay( this.id, 99, 0, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
ManFst004.Scene00004( player );
});
}
def Scene00100( player )
{
player.eventPlay( this.id, 100, 0x0EFB, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
player.setQuestUI8CH( ManFst004.id, 0 ); // remove key item, since we have just traded it
player.setQuestUI8BL( ManFst004.id, 1 );
ManFst004.checkQuestCompletion(player, 2 );
});
}
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( actor == this.ACTOR0 )
{
this.Scene00000( player );
}
else if( actor == this.ACTOR1 )
{
// starting the Aetheryte eventaction
// player.eventStart( actorId, 0x050002, 7, 0, 0);
// starting the eventaction 0x13 ( attuning )
player.eventActionStart( 0x050002, 0x13,
fun( player, eventId, additional )
{
player.questMessage( 0x050002, 0, 1, 0, 0 );
player.aetheryteRegister( 2 );
player.learnAction( 1 );
ManFst004.Scene00051( player );
},
fun( player, eventId, additional ) {},
eventId );
}
else if( actor == this.ACTOR2 )
{
this.Scene00002( player );
}
else if( actor == this.ACTOR3 )
{
this.Scene00003( player );
}
else if( actor == this.ACTOR4 )
{
this.Scene00005( player );
}
}
};
GLOBAL ManFst004 = ManFst004Def();

View file

@ -0,0 +1,201 @@
// This is an automatically generated chai script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, change its extension to .chai
// and move it to the correct folder in bin/scripts/chai/quest
// Quest Script: ManSea001_00107
// Quest Name: Coming to Limsa Lominsa
// Quest ID: 65643
// Start NPC: 1001028
// End NPC: 1002697
class ManSea001Def
{
def ManSea001Def()
{
// Basic quest information
this.name = "Coming to Limsa Lominsa";
this.id = 65643;
// Quest vars / flags used
// GetQuestBitFlag8
// GetQuestUI8AL
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_1 = 1;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 50;
this.RewardGil = 103;
// Entities found in the script data of the quest
this.ACTOR0 = 1001028;
this.ACTOR1 = 1002732;
this.ACTOR2 = 1002697;
this.CUT_EVENT = 202;
this.EOBJECT0 = 2001679;
this.EOBJECT1 = 2001680;
this.EVENT_ACTION_SEARCH = 1;
this.LOC_ACTOR0 = 1002732;
this.LOC_POS_ACTOR0 = 4107186;
this.OPENING_EVENT_HANDLER = 1245185;
this.POPRANGE0 = 4127803;
this.TERRITORYTYPE0 = 181;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, HIDE_HOTBAR, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 )
{
ManSea001.Scene00001( player );
}
});
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, HIDE_HOTBAR, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
ManSea001.Scene00002( player );
});
}
def Scene00002( player )
{
player.eventPlay( this.id, 2, HIDE_HOTBAR, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
ManSea001.Scene00003( player );
});
}
def Scene00003( player )
{
player.eventPlay( this.id, 3, NONE, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
player.questUpdate( ManSea001.id, 0x01 ); // add quest to player.
// update the instance boundaries, call to the opening event
//player.eventPlay( ManSea001.OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR, 1, 0);
});
}
def Scene00004( player )
{
player.eventPlay( this.id, 4, NONE, 0, 0 );
}
def Scene00005( player )
{
player.eventPlay( this.id, 5, HIDE_HOTBAR, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
ManSea001.Scene00006( player );
});
}
def Scene00006( player )
{
player.eventPlay( this.id, 6, NONE, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 )
{
player.questUpdate( ManSea001.id, ManSea001.SEQ_FINISH );
player.prepareZoning( player.getZoneId(), true );
player.changePos( 9, 40, 14, 2 );
}
});
}
def Scene00007( player )
{
player.eventPlay( this.id, 7, NONE, 0, 0 );
}
def Scene00008( player )
{
player.eventPlay( this.id, 8, NONE, 0, 0 );
}
def Scene00009( player )
{
player.eventPlay( this.id, 9, NONE, 0, 0 );
}
def Scene00010( player )
{
player.eventPlay( this.id, 10, NONE, 0, 0 );
}
def Scene00011( player )
{
player.eventPlay( this.id, 11, NONE, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
ManSea001.Scene00012( player );
});
}
def Scene00012( player )
{
player.eventPlay( this.id, 12, NONE, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 )
{
if( player.giveQuestRewards( ManSea001.id, 0 ) )
{
player.questFinish( ManSea001.id );
}
}
});
}
def Scene00013( player )
{
player.eventPlay( this.id, 13, NONE, 0, 0 );
}
//////////////////////////////////////////////////////////////////////
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
switch( actor )
{
case( this.ACTOR0 )
{
this.Scene00000( player );
break;
}
case( this.ACTOR1 )
{
this.Scene00005( player );
break;
}
case( this.ACTOR2 )
{
this.Scene00011( player );
break;
}
default
{
}
}
}
};
GLOBAL ManSea001 = ManSea001Def();

View file

@ -0,0 +1,167 @@
// This is an automatically generated chai script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, change its extension to .chai
// and move it to the correct folder in bin/scripts/chai/quest
// Quest Script: ManWil001_00594
// Quest Name: Coming to Ul'dah
// Quest ID: 66130
// Start NPC: 1003987
// End NPC: 1003988
class ManWil001Def
{
//////////////////////////////////////////////////////////////////////
// default ctor
def ManWil001Def()
{
// Basic quest information
this.name = "Coming to Ul'dah";
this.id = 66130;
// Quest vars / flags used
// GetQuestUI8AL
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 50;
this.RewardGil = 103;
// Entities found in the script data of the quest
this.ACTOR0 = 1003987;
this.ACTOR1 = 1003988;
this.ACTOR20 = 1001285;
this.CUT_EVENT = 188;
this.EOBJECT0 = 2001681;
this.EOBJECT1 = 2001682;
this.EOBJECT2 = 2001683;
this.EOBJECT3 = 2001706;
this.EVENT_ACTION_SEARCH = 1;
this.OPENING_EVENT_HANDLER = 1245187;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, 0, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
ManWil001.Scene00001( player );
}
});
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, 0, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
ManWil001.Scene00002( player );
});
}
def Scene00002( player )
{
player.eventPlay( this.id, 2, 0, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
player.questUpdate( ManWil001.id, ManWil001Obj.SEQ_FINISH );// add quest to player.
player.eventPlay( ManWil001.OPENING_EVENT_HANDLER, 0x1E, 0x2001, 0, 0 );
});
}
def Scene00003( player )
{
player.eventPlay( this.id, 3, 0, 0, 0 );
}
def Scene00004( player )
{
player.eventPlay( this.id, 4, 0, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
ManWil001.Scene00005( player );
});
}
def Scene00005( player )
{
player.eventPlay( this.id, 5, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // clicked finish button
{
player.gainExp( 50 );
player.addCurrency( 1, ManWil001.RewardGil );
player.questFinish( ManWil001.id );
}
});
}
def Scene00006( player )
{
player.eventPlay( this.id, 6, 0, 0, 0 );
}
def Scene00007( player )
{
player.eventPlay( this.id, 7, 0, 0, 0 );
}
def Scene00008( player )
{
player.eventPlay( this.id, 8, 0, 0, 0 );
}
def Scene00009( player )
{
player.eventPlay( this.id, 9, 0, 0, 0 );
}
def Scene00010( player )
{
player.eventPlay( this.id, 10, 0, 0, 0 );
}
def Scene00011( player )
{
player.eventPlay( this.id, 11, 0, 0, 0 );
}
def Scene00012( player )
{
player.eventPlay( this.id, 12, 0, 0, 0 );
}
def Scene00013( player )
{
player.eventPlay( this.id, 13, 0, 0, 0 );
}
//////////////////////////////////////////////////////////////////////
// Entry function for this quest
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( actor == this.ACTOR0 )
{
this.Scene00000( player );
}
else if( actor == this.ACTOR1 )
{
this.Scene00004( player );
}
}
};
GLOBAL ManWil001 = ManWil001Def();

View file

@ -0,0 +1,214 @@
// This is an automatically generated chai script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, change its extension to .chai
// and move it to the correct folder in bin/scripts/chai/quest
// Quest Script: ManWil001_00594
// Quest Name: Coming to Ul'dah
// Quest ID: 66130
// Start NPC: 1003987
// End NPC: 1003988
class ManWil001
{
//////////////////////////////////////////////////////////////////////
// default ctor
def ManWil001()
{
// Basic quest information
this.name = "Coming to Ul'dah";
this.id = 66130;
// Quest vars / flags used
// GetQuestUI8AL
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 50;
this.RewardGil = 103;
// Entities found in the script data of the quest
this.ACTOR0 = 1003987;
this.ACTOR1 = 1003988;
this.ACTOR20 = 1001285;
this.CUT_EVENT = 188;
this.EOBJECT0 = 2001681;
this.EOBJECT1 = 2001682;
this.EOBJECT2 = 2001683;
this.EOBJECT3 = 2001706;
this.EVENT_ACTION_SEARCH = 1;
this.OPENING_EVENT_HANDLER = 1245187;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00002( player )
{
player.eventPlay( this.id, 2, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00003( player )
{
player.eventPlay( this.id, 3, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00004( player )
{
player.eventPlay( this.id, 4, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00005( player )
{
player.eventPlay( this.id, 5, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00006( player )
{
player.eventPlay( this.id, 6, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00007( player )
{
player.eventPlay( this.id, 7, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00008( player )
{
player.eventPlay( this.id, 8, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00009( player )
{
player.eventPlay( this.id, 9, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00010( player )
{
player.eventPlay( this.id, 10, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00011( player )
{
player.eventPlay( this.id, 11, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00012( player )
{
player.eventPlay( this.id, 12, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
def Scene00013( player )
{
player.eventPlay( this.id, 13, 0/*flags*/, 0/*unk*/, 0/*unk*/,
fun( player, eventId, subEvent, param1, param2, param3 )
{
var quest := ManWil001Obj;
// Callback area for this scene, called when the scene finishes
// Add logic here!!!
});
}
//////////////////////////////////////////////////////////////////////
// Entry function for this quest
def eventHandlerNpc( player, actorId, eventId )
{
var actor = mapActor( actorId );
// Script content to be added here....
}
};
GLOBAL ManWil001Obj = ManWil001();

View file

@ -0,0 +1,176 @@
// This is an automatically generated chai script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, change its extension to .chai
// and move it to the correct folder in bin/scripts/chai/quest
// Quest Script: SubFst000_00020
// Quest Name: Incense and Sensibility
// Quest ID: 65556
// Start NPC: 1000786
// End NPC: 1000705
class SubFst000Def
{
def SubFst000Def()
{
// Basic quest information
this.name = "Incense and Sensibility";
this.id = 65556;
// Quest vars / flags used
// GetQuestBitFlag8
// GetQuestUI8AL
// GetQuestUI8BH
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_1 = 1;
this.SEQ_2 = 2;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 50;
this.RewardItemOptional = [4551, 4555];
this.RewardItemOptionalCount = [3, 3];
// Entities found in the script data of the quest
this.ACTOR0 = 1000786;
this.ACTOR1 = 1000705;
this.EOBJECT0 = 2000070;
this.EOBJECT1 = 2000071;
this.ITEM0 = 2000101;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_1_ACTOR1 = 1;
this.SEQ_2_EOBJECT0 = 2;
this.SEQ_2_EOBJECT0_USEITEMNO = 99;
this.SEQ_2_EOBJECT0_USEITEMOK = 100;
this.SEQ_2_EOBJECT1 = 3;
this.SEQ_2_EOBJECT1_USEITEMNO = 97;
this.SEQ_2_EOBJECT1_USEITEMOK = 98;
this.SEQ_3_ACTOR1 = 4;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, NONE, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 )
{
player.questUpdate( SubFst000.id, 1 );
}
});
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, NONE, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
player.setQuestUI8BH( SubFst000.id, 2 );
player.questUpdate( SubFst000.id, SubFst000.SEQ_2 );// add quest to player.
});
}
def Scene00002( player )
{
player.eventPlay( this.id, 2, NONE, 0, 0 );
}
def Scene00003( player )
{
player.eventPlay( this.id, 3, NONE, 0, 0 );
}
def Scene00004( player )
{
player.eventPlay( this.id, 4, NONE, 0, 0 );
}
def Scene00097( player )
{
player.eventPlay( this.id, 97, NONE, 0, 0 );
}
def Scene00098( player )
{
player.eventPlay( this.id, 98, NONE, 0, 0 );
}
def Scene00099( player )
{
player.eventPlay( this.id, 99, NONE, 0, 0 );
}
def Scene00100( player )
{
player.eventPlay( this.id, 100, NONE, 0, 0 );
}
//////////////////////////////////////////////////////////////////////
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
switch( actor )
{
case( this.ACTOR0 )
{
this.Scene00000( player );
break;
}
case( this.ACTOR1 )
{
this.Scene00001( player );
break;
}
default
{
}
}
}
def onEventItem( eventId, player, eventItemId, castTime, targetId )
{
if( eventItemId == this.ITEM0 )
{
player.eventItemActionStart( this.id, eventItemId,
// callback function for finished action
fun ( player, eventId, additional )
{
var actor = mapActor( additional );
var censers = player.getQuestUI8AL( eventId );
player.questMessage( eventId, 1, 2, censers + 1, 2 );
if ( censers == 2 )
{
player.questUpdate( eventId, SubFst000.SEQ_FINISH );
}
else if( actor == SubFst000.EOBJECT0 )
{
player.setQuestUI8AL(eventId, 4 );
}
else if( actor == SubFst000.EOBJECT1 )
{
player.setQuestUI8AL(eventId, 8 );
}
SubFst000.Scene00100( player );
player.setQuestUI8AL( eventId, 0, censers + 1 );
},
// callback for interrupted action.
fun ( player, eventId, additional ) {},
targetId );
}
}
};
GLOBAL SubFst000 = SubFst000Def();

View file

@ -0,0 +1,125 @@
// This is an automatically generated chai script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, change its extension to .chai
// and move it to the correct folder in bin/scripts/chai/quest
// Quest Script: SubFst001_00024
// Quest Name: Coarse Correspondence
// Quest ID: 65560
// Start NPC: 1000206
// End NPC: 1000233
class SubFst001Def
{
def SubFst001Def()
{
// Basic quest information
this.name = "Coarse Correspondence";
this.id = 65560;
// Quest vars / flags used
// GetQuestUI8AL
// GetQuestUI8BH
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 50;
this.RewardGil = 103;
// Entities found in the script data of the quest
this.ACTOR0 = 1000206;
this.ACTOR1 = 1000233;
this.ITEM0 = 2000079;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_1_ACTOR1 = 1;
this.SEQ_1_ACTOR1_NPCTRADENO = 99;
this.SEQ_1_ACTOR1_NPCTRADEOK = 100;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( SubFst001.id, 0, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 )
{
player.setQuestUI8AL( SubFst001.id, 1 );
player.setQuestUI8BH( SubFst001.id, 1 );
player.questUpdate( SubFst001.id, SubFst001.SEQ_FINISH );
}
} );
}
def Scene00001( player )
{
player.eventPlay( SubFst001.id, 1, NONE,
fun( player, eventId, param1, param2, param3 )
{
} );
}
def Scene00099( player )
{
player.eventPlay( SubFst001.id, 99, NONE,
fun( player, eventId, param1, param2, param3 )
{
} );
}
def Scene00100( player )
{
player.eventPlay( SubFst001.id, 100, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 )
{
if( player.giveQuestRewards( SubFst001.id, 0 ) )
{
player.questFinish( SubFst001.id );
}
}
} );
}
//////////////////////////////////////////////////////////////////////
// Event Handlers
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( actor == SubFst001.ACTOR0 )
{
if( !player.hasQuest( SubFst001.id ) )
{
SubFst001.Scene00000( player );
}
else
{
SubFst001.Scene00001( player );
}
}
else if( actor == SubFst001.ACTOR1 )
{
if( !player.hasQuest( SubFst001.id ) )
{
// todo: what should this event do?
SubFst001.Scene00099( player );
}
else
{
SubFst001.Scene00100( player );
}
}
}
};
GLOBAL SubFst001 = SubFst001Def();

View file

@ -0,0 +1,107 @@
// This is an automatically generated chai script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, change its extension to .chai
// and move it to the correct folder in bin/scripts/chai/quest
// Quest Script: SubFst002_00025
// Quest Name: Quarrels with Squirrels
// Quest ID: 65561
// Start NPC: 1000263
// End NPC: 1000263
class SubFst002Def
{
def SubFst002Def()
{
// Basic quest information
this.name = "Quarrels with Squirrels";
this.id = 65561;
// Quest vars / flags used
// GetQuestUI8AL
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_1 = 1;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 100;
this.RewardItemOptional = [3762, 3764, 5823];
this.RewardItemOptionalCount = [1, 1, 3];
// Entities found in the script data of the quest
this.ACTOR0 = 1000263;
this.ENEMY0 = 37;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_2_ACTOR0 = 1;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
player.questUpdate( SubFst002.id, SubFst002.SEQ_1 );
}
} );
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // finish quest
{
if( player.giveQuestRewards( SubFst002.id, 0 ) )
{
player.questFinish( SubFst002.id );
}
}
} );
}
//////////////////////////////////////////////////////////////////////
// Event Handlers
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( !player.hasQuest( SubFst002.id ) )
{
SubFst002.Scene00000( player );
}
if( actor == SubFst002.ACTOR0 && player.questGetSeq( SubFst002.id ) == SubFst002.SEQ_FINISH )
{
SubFst002.Scene00001( player );
}
}
def onBnpcKill_37( player )
{
var currentKC = player.getQuestUI8AL(SubFst002.id);
currentKC = currentKC + 1;
player.questMessage( SubFst002.id, 0, 2, currentKC, 6 );
if( currentKC >= 6 )
{
player.questUpdate( SubFst002.id, SubFst002.SEQ_FINISH );
}
else
{
player.setQuestUI8AL( SubFst002.id, currentKC );
}
}
};
GLOBAL SubFst002 = SubFst002Def();

View file

@ -0,0 +1,114 @@
// This is an automatically generated chai script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, change its extension to .chai
// and move it to the correct folder in bin/scripts/chai/quest
// Quest Script: SubFst003_00026
// Quest Name: Once Bitten, Twice Shy
// Quest ID: 65562
// Start NPC: 1000297
// End NPC: 1000315
class SubFst003Def
{
def SubFst003Def()
{
// Basic quest information
this.name = "Once Bitten, Twice Shy";
this.id = 65562;
// Quest vars / flags used
// GetQuestUI8AL
// GetQuestUI8BH
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 50;
this.RewardGil = 118;
// Entities found in the script data of the quest
this.ACTOR0 = 1000297;
this.ACTOR1 = 1000315;
this.ITEM0 = 2000028;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_1_ACTOR1 = 1;
this.SEQ_1_ACTOR1_NPCTRADENO = 99;
this.SEQ_1_ACTOR1_NPCTRADEOK = 100;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
player.questUpdate( SubFst003.id, SubFst003.SEQ_FINISH );
player.setQuestUI8AL( SubFst003.id, 1 );
player.setQuestUI8BH( SubFst003.id, 1 );
}
} );
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // gave back items
{
SubFst003.Scene00100( player );
}
} );
}
def Scene00099( player )
{
player.eventPlay( this.id, 99, NONE,
fun( player, eventId, param1, param2, param3 )
{
} );
}
def Scene00100( player )
{
player.eventPlay( this.id, 100, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // finish quest
{
if( player.giveQuestRewards( SubFst003.id, 0 ) )
{
player.questFinish( SubFst003.id );
}
}
} );
}
//////////////////////////////////////////////////////////////////////
// Event Handlers
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( !player.hasQuest( SubFst003.id ) )
{
SubFst003.Scene00000( player );
}
if( actor == SubFst003.ACTOR1 && player.questGetSeq( SubFst003.id ) == SubFst003.SEQ_FINISH )
{
SubFst003.Scene00001( player );
}
}
};
GLOBAL SubFst003 = SubFst003Def();

View file

@ -0,0 +1,150 @@
// Quest Script: SubFst004_00027
// Quest Name: Preserving the Past
// Quest ID: 65563
// Start NPC: 1000194
// End NPC: 1000789
class SubFst004Def
{
def SubFst004Def()
{
// Basic quest information
this.name = "Preserving the Past";
this.id = 65563;
// Quest vars / flags used
// GetQuestUI8AL
// GetQuestUI8BH
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_1 = 1;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 50;
this.RewardItem = [5594];
this.RewardItemCount = [10];
// Entities found in the script data of the quest
this.ACTOR0 = 1000194;
this.ACTOR1 = 1000686;
this.ACTOR2 = 1000789;
this.ITEM0 = 2000024;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_1_ACTOR1 = 1;
this.SEQ_2_ACTOR2 = 2;
this.SEQ_2_ACTOR2_NPCTRADENO = 99;
this.SEQ_2_ACTOR2_NPCTRADEOK = 100;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
player.questUpdate( SubFst004.id, SubFst004.SEQ_1 );
}
} );
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, NONE,
fun( player, eventId, param1, param2, param3 )
{
player.setQuestUI8AL( SubFst004.id, 1 );
player.setQuestUI8BH( SubFst004.id, 1 );
//player.questMessage( SubFst004.id, 0, 2, 1, 1 );
player.questMessage( SubFst004.id, 0, 1, 21002, 0 );
player.questUpdate( SubFst004.id, SubFst004.SEQ_FINISH );
} );
}
def Scene00002( player )
{
player.eventPlay( this.id, 2, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 )
{
SubFst004.Scene00100( player );
}
} );
}
def Scene00099( player )
{
player.eventPlay( this.id, 99, NONE,
fun( player, eventId, param1, param2, param3 )
{} );
}
def Scene00100( player )
{
player.eventPlay( this.id, 100, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 )
{
if( player.giveQuestRewards( SubFst004.id, 0 ) )
{
player.questFinish( SubFst004.id );
}
}
} );
}
//////////////////////////////////////////////////////////////////////
// Event Handlers
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( actor == SubFst004.ACTOR0 )
{
if( !player.hasQuest( SubFst004.id ) )
{
SubFst004.Scene00000( player );
}
else
{
SubFst004.Scene00001( player );
}
}
else if( actor == SubFst004.ACTOR1 )
{
if( !player.hasQuest( SubFst004.id ) )
{
// todo: what should this event do?
SubFst004.Scene00099( player );
}
else
{
SubFst004.Scene00001( player );
}
}
else if( actor == SubFst004.ACTOR2 )
{
if( !player.hasQuest( SubFst004.id ) )
{
// todo: what should this event do?
SubFst004.Scene00099( player );
}
else
{
SubFst004.Scene00002( player );
}
}
}
};
GLOBAL SubFst004 = SubFst004Def();

View file

@ -0,0 +1,133 @@
// This is an automatically generated chai script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, change its extension to .chai
// and move it to the correct folder in bin/scripts/chai/quest
// Quest Script: SubFst007_00031
// Quest Name: Essential Oil
// Quest ID: 65567
// Start NPC: 1000705
// End NPC: 1000705
class SubFst007Def
{
def SubFst007Def()
{
// Basic quest information
this.name = "Essential Oil";
this.id = 65567;
// Quest vars / flags used
// GetQuestUI8AL
// GetQuestUI8BH
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_1 = 1;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 100;
this.RewardItemOptional = [3530, 3531, 5823];
this.RewardItemOptionalCount = [1, 1, 3];
// Entities found in the script data of the quest
this.ACTOR0 = 1000705;
this.ENEMY0 = 49;
this.ITEM0 = 2000098;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_2_ACTOR0 = 1;
this.SEQ_2_ACTOR0_NPCTRADENO = 99;
this.SEQ_2_ACTOR0_NPCTRADEOK = 100;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
player.questUpdate( SubFst007.id, SubFst007.SEQ_1 );
}
} );
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // gave back items
{
SubFst007.Scene00100( player );
}
} );
}
def Scene00099( player ) //unused
{
player.eventPlay( this.id, 99, NONE,
fun( player, eventId, param1, param2, param3 )
{} );
}
def Scene00100( player )
{
player.eventPlay( this.id, 100, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // finish quest
{
if( player.giveQuestRewards( SubFst007.id, 0 ) )
{
player.questFinish( SubFst007.id );
}
}
} );
}
//////////////////////////////////////////////////////////////////////
// Event Handlers
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( !player.hasQuest( SubFst007.id ) )
{
SubFst007.Scene00000( player );
}
if( player.questGetSeq( SubFst007.id ) == SubFst007.SEQ_FINISH )
{
SubFst007.Scene00001( player );
}
}
def onBnpcKill_49( player )
{
var currentKC = player.getQuestUI8AL(SubFst007.id);
currentKC = currentKC + 1;
player.questMessage( SubFst007.id, 0, 2, currentKC, 6 );
player.tryAddItem( 2000098, 1 );
if( currentKC >= 6 )
{
player.questUpdate( SubFst007.id, SubFst007.SEQ_FINISH );
player.setQuestUI8BH( SubFst007.id, currentKC );
}
else
{
player.setQuestUI8AL( SubFst007.id, currentKC );
player.setQuestUI8BH( SubFst007.id, currentKC );
}
}
};
GLOBAL SubFst007 = SubFst007Def();

View file

@ -0,0 +1,82 @@
// Quest Script: SubFst010_00001
// Quest Name: A Good Adventurer Is Hard to Find
// Quest ID: 65537
// Start NPC: 1000146
// End NPC: 1000195
class SubFst010Def
{
def SubFst010Def()
{
// Basic quest information
this.name = "A Good Adventurer Is Hard to Find";
this.id = 65537;
// Quest vars / flags used
// GetQuestUI8AL
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 50;
this.RewardItem = [4551];
this.RewardItemCount = [2];
// Entities found in the script data of the quest
this.ACTOR0 = 1000146;
this.ACTOR1 = 1000195;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_1_ACTOR1 = 1;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, NONE,
fun( player, eventid, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
player.questUpdate( SubFst010.id, SubFst010.SEQ_FINISH );
}
});
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, NONE,
fun( player, eventid, param1, param2, param3 )
{
if( param2 == 1 ) // finish quest
{
if( player.giveQuestRewards( SubFst010.id, 0 ) )
{
player.questFinish( SubFst010.id );
}
}
});
}
//////////////////////////////////////////////////////////////////////
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( actor == this.ACTOR0 )
{
this.Scene00000( player );
}
else if( actor == this.ACTOR1 )
{
this.Scene00001( player );
}
}
};
GLOBAL SubFst010 = SubFst010Def();

View file

@ -0,0 +1,100 @@
// Quest Script: SubFst011_00037
// Quest Name: Population Control
// Quest ID: 65573
// Start NPC: 1000195
// End NPC: 1000195
class SubFst011Def
{
def SubFst011Def()
{
// Basic quest information
this.name = "Population Control";
this.id = 65573;
// Quest vars / flags used
// GetQuestUI8AL
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_1 = 1;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 100;
this.RewardItemOptional = [2653, 2655, 5823];
this.RewardItemOptionalCount = [1, 1, 3];
// Entities found in the script data of the quest
this.ACTOR0 = 1000195;
this.ENEMY0 = 47;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_2_ACTOR0 = 1;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, NONE,
fun( player, eventid, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
player.questUpdate( SubFst011.id, SubFst011.SEQ_1 );
}
});
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, NONE,
fun( player, eventid, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
if( player.giveQuestRewards( SubFst011.id, 0 ) )
{
player.questFinish( SubFst011.id );
}
}
});
}
//////////////////////////////////////////////////////////////////////
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( player.hasQuest(SubFst011.id) )
{
this.Scene00001( player );
}
else
{
this.Scene00000( player );
}
}
def onBnpcKill_47( player )
{
var currentKC = player.getQuestUI8AL(SubFst011.id);
currentKC = currentKC + 1;
player.questMessage( SubFst011.id, 0, 2, currentKC, 6 );
if( currentKC >= 6 )
{
player.questUpdate( SubFst011.id, SubFst011.SEQ_FINISH );
}
else
{
player.setQuestUI8AL( SubFst011.id, currentKC );
}
}
};
GLOBAL SubFst011 = SubFst011Def();

View file

@ -0,0 +1,235 @@
// Quest Script: SubFst013_00040
// Quest Name: For Friendship
// Quest ID: 65576
// Start NPC: 1000162
// End NPC: 1000162
class SubFst013Def
{
def SubFst013Def()
{
// Basic quest information
this.name = "For Friendship";
this.id = 65576;
// Quest vars / flags used
// GetQuestUI8AL
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_1 = 1;
this.SEQ_2 = 2;
this.SEQ_3 = 3;
this.SEQ_4 = 4;
this.SEQ_5 = 5;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 50;
this.RewardGil = 111;
// Entities found in the script data of the quest
this.ACTOR0 = 1000162;
this.ACTOR1 = 1000161;
this.FIRST_QUEST = 65575;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_1_ACTOR1 = 1;
this.SEQ_1_ACTOR1_EMOTENO = 99;
this.SEQ_1_ACTOR1_EMOTEOK = 100;
this.SEQ_2_ACTOR0 = 2;
this.SEQ_3_ACTOR1 = 3;
this.SEQ_3_ACTOR1_EMOTENO = 97;
this.SEQ_3_ACTOR1_EMOTEOK = 98;
this.SEQ_4_ACTOR0 = 4;
this.SEQ_5_ACTOR1 = 5;
this.SEQ_5_ACTOR1_EMOTENO = 95;
this.SEQ_5_ACTOR1_EMOTEOK = 96;
this.SEQ_6_ACTOR0 = 6;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
player.questUpdate( SubFst013.id, SubFst013.SEQ_1 );
}
} );
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, NONE,
fun( player, eventId, param1, param2, param3 )
{} );
}
def Scene00002( player )
{
player.eventPlay( this.id, 2, NONE,
fun( player, eventId, param1, param2, param3 )
{
player.questUpdate( SubFst013.id, SubFst013.SEQ_3 );
} );
}
def Scene00003( player ) //unused
{
player.eventPlay( this.id, 3, NONE,
fun( player, eventId, param1, param2, param3 )
{} );
}
def Scene00004( player )
{
player.eventPlay( this.id, 4, NONE,
fun( player, eventId, param1, param2, param3 )
{
player.questUpdate( SubFst013.id, SubFst013.SEQ_5 );
} );
}
def Scene00005( player ) //unused
{
player.eventPlay( this.id, 5, NONE,
fun( player, eventId, param1, param2, param3 )
{} );
}
def Scene00006( player )
{
player.eventPlay( this.id, 6, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // finish quest
{
if( player.giveQuestRewards( SubFst013.id, 0 ) )
{
player.questFinish( SubFst013.id );
}
}
} );
}
def Scene00095( player ) //unused
{
player.eventPlay( this.id, 95, NONE,
fun( player, eventId, param1, param2, param3 )
{} );
}
def Scene00096( player )
{
player.eventPlay( this.id, 96, NONE,
fun( player, eventId, param1, param2, param3 )
{
player.questUpdate( SubFst013.id, SubFst013.SEQ_FINISH );
player.questMessage( SubFst013.id, 4, 2, 0, 0 );
} );
}
def Scene00097( player ) //unused
{
player.eventPlay( this.id, 97, NONE,
fun( player, eventId, param1, param2, param3 )
{} );
}
def Scene00098( player )
{
player.eventPlay( this.id, 98, NONE,
fun( player, eventId, param1, param2, param3 )
{
player.questUpdate( SubFst013.id, SubFst013.SEQ_4 );
player.questMessage( SubFst013.id, 2, 2, 0, 0 );
} );
}
def Scene00099( player ) //unused
{
player.eventPlay( this.id, 99, NONE,
fun( player, eventId, param1, param2, param3 )
{} );
}
def Scene00100( player )
{
player.eventPlay( this.id, 100, NONE,
fun( player, eventId, param1, param2, param3 )
{
player.questUpdate( SubFst013.id, SubFst013.SEQ_2 );
player.questMessage( SubFst013.id, 0, 2, 0, 0 );
} );
}
//////////////////////////////////////////////////////////////////////
// Event Handlers
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( !player.hasQuest( SubFst013.id ) )
{
SubFst013.Scene00000( player );
return;
}
if( actor == SubFst013.ACTOR1 ) //talk to girl without emotes
{
SubFst013.Scene00001( player );
return;
}
if( actor == SubFst013.ACTOR0 && player.questGetSeq( SubFst013.id ) == SubFst013.SEQ_2 )
{
SubFst013.Scene00002( player );
return;
}
if( actor == SubFst013.ACTOR0 && player.questGetSeq( SubFst013.id ) == SubFst013.SEQ_4 )
{
SubFst013.Scene00004( player );
return;
}
if( actor == SubFst013.ACTOR0 && player.questGetSeq( SubFst013.id ) == SubFst013.SEQ_FINISH )
{
SubFst013.Scene00006( player );
return;
}
}
def onEmote( eventId, player, actorId, emoteId )
{
var actor = mapActor( actorId );
print( emoteId );
if( actor == SubFst013.ACTOR1 && emoteId == 5 && player.questGetSeq( SubFst013.id ) == SubFst013.SEQ_1 )
{
SubFst013.Scene00100( player );
return;
}
if( actor == SubFst013.ACTOR1 && emoteId == 18 && player.questGetSeq( SubFst013.id ) == SubFst013.SEQ_3 )
{
SubFst013.Scene00098( player );
return;
}
if( actor == SubFst013.ACTOR1 && emoteId == 11 && player.questGetSeq( SubFst013.id ) == SubFst013.SEQ_5 )
{
SubFst013.Scene00096( player );
return;
}
}
};
GLOBAL SubFst013 = SubFst013Def();

View file

@ -0,0 +1,261 @@
// This is an automatically generated chai script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, change its extension to .chai
// and move it to the correct folder in bin/scripts/chai/quest
// Quest Script: SubFst015_00042
// Quest Name: Sylphic Gratitude
// Quest ID: 65578
// Start NPC: 1000286
// End NPC: 1000286
class SubFst015Def
{
def SubFst015Def()
{
// Basic quest information
this.name = "Sylphic Gratitude";
this.id = 65578;
// Quest vars / flags used
// GetQuestBitFlag8
// GetQuestUI8AL
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_1 = 1;
this.SEQ_FINISH = 255;
//this.SEQ_OFFER = ?;
// Quest rewards
this.RewardExpFactor = 50;
this.RewardGil = 110;
// Entities found in the script data of the quest
this.ACTOR0 = 1000286;
this.EOBJECT0 = 2000020;
this.EOBJECT1 = 2000021;
this.EOBJECT2 = 2000022;
this.EOBJECT3 = 2000023;
this.EOBJECT4 = 2000024;
this.EOBJECT5 = 2000025;
this.EVENT_ACTION_SEARCH = 1;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, NONE, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 )
{
player.questUpdate( SubFst015.id, 1 );
}
});
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, NONE, 0, 0 );
}
def Scene00002( player )
{
player.eventPlay( this.id, 2, NONE, 0, 0 );
}
def Scene00003( player )
{
player.eventPlay( this.id, 3, NONE, 0, 0 );
}
def Scene00004( player )
{
player.eventPlay( this.id, 4, NONE, 0, 0 );
}
def Scene00005( player )
{
player.eventPlay( this.id, 5, NONE, 0, 0 );
}
def Scene00006( player )
{
player.eventPlay( this.id, 6, NONE, 0, 0 );
}
def Scene00007( player )
{
player.eventPlay( this.id, 7, NONE, 0, 0,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 )
{
if( player.giveQuestRewards( SubFst015.id, 0 ) )
{
player.questFinish( SubFst015.id );
}
}
});
}
def Scene00089( player )
{
player.eventPlay( this.id, 89, NONE, 0, 0 );
}
def Scene00090( player )
{
player.eventPlay( this.id, 90, NONE, 0, 0 );
}
def Scene00091( player )
{
player.eventPlay( this.id, 91, NONE, 0, 0 );
}
def Scene00092( player )
{
player.eventPlay( this.id, 92, NONE, 0, 0 );
}
def Scene00093( player )
{
player.eventPlay( this.id, 93, NONE, 0, 0 );
}
def Scene00094( player )
{
player.eventPlay( this.id, 94, NONE, 0, 0 );
}
def Scene00095( player )
{
player.eventPlay( this.id, 95, NONE, 0, 0 );
}
def Scene00096( player )
{
player.eventPlay( this.id, 96, NONE, 0, 0 );
}
def Scene00097( player )
{
player.eventPlay( this.id, 97, NONE, 0, 0 );
}
def Scene00098( player )
{
player.eventPlay( this.id, 98, NONE, 0, 0 );
}
def Scene00099( player )
{
player.eventPlay( this.id, 99, NONE, 0, 0 );
}
def Scene00100( player )
{
player.eventPlay( this.id, 100, NONE, 0, 0 );
}
//////////////////////////////////////////////////////////////////////
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
switch( actor )
{
case( this.ACTOR0 )
{
if( player.hasQuest( this.id ) )
{
this.Scene00007( player );
}
else
{
this.Scene00000( player );
}
break;
}
case ( this.EOBJECT0 ) {}
case ( this.EOBJECT1 ) {}
case ( this.EOBJECT2 ) {}
case ( this.EOBJECT3 ) {}
case ( this.EOBJECT4 ) {}
case ( this.EOBJECT5 )
{
player.eventActionStart( this.id, 0x0F,
fun( player, eventId, additional )
{
var actor = mapActor( additional );
var currVegetal = player.getQuestUI8AL( eventId );
var despawn1 = player.getQuestUI8FL( eventId );
var despawn2 = player.getQuestUI8FH( eventId );
if( SubFst015.EOBJECT3 == actor )
{
despawn2 = despawn2 | 1;
player.setQuestUI8FH( eventId, despawn2 );
}
else if( SubFst015.EOBJECT2 == actor )
{
despawn2 = despawn2 | 2;
player.setQuestUI8FH( eventId, despawn2 );
}
else if( SubFst015.EOBJECT1 == actor )
{
despawn2 = despawn2 | 4;
player.setQuestUI8FH( eventId, despawn2 );
}
else if( SubFst015.EOBJECT0 == actor )
{
despawn2 = despawn2 | 8;
player.setQuestUI8FH( eventId, despawn2 );
}
else if( SubFst015.EOBJECT5 == actor )
{
despawn2 = despawn1 | 4;
player.setQuestUI8FL( eventId, despawn2 );
}
else if( SubFst015.EOBJECT4 == actor )
{
despawn2 = despawn1 | 8;
player.setQuestUI8FL( eventId, despawn2 );
}
player.questMessage( eventId, 0, 2, currVegetal + 1, 6 );
if ( currVegetal + 1 == 6 )
{
player.questUpdate( eventId, SubFst015.SEQ_FINISH );
}
else
{
player.setQuestUI8AL( eventId, currVegetal + 1 );
}
SubFst015.Scene00096( player );
},
fun( player, eventId, additional )
{
},
actorId );
player.unlock();
break;
}
default
{
}
}
}
};
GLOBAL SubFst015 = SubFst015Def();

View file

@ -0,0 +1,89 @@
// This is an automatically generated chai script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, change its extension to .chai
// and move it to the correct folder in bin/scripts/chai/quest
// Quest Script: SubFst019_00049
// Quest Name: I Am Millicent, Hear Me Roar
// Quest ID: 65585
// Start NPC: 1000788
// End NPC: 1000429
class SubFst019Def
{
def SubFst019Def()
{
// Basic quest information
this.name = "I Am Millicent, Hear Me Roar";
this.id = 65585;
// Quest vars / flags used
// GetQuestUI8AL
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
this.SEQ_0 = 0;
this.SEQ_FINISH = 255;
// Quest rewards
this.RewardExpFactor = 50;
this.RewardItem = [4551];
this.RewardItemCount = [5];
// Entities found in the script data of the quest
this.ACTOR0 = 1000788;
this.ACTOR1 = 1000429;
this.SEQ_0_ACTOR0 = 0;
this.SEQ_1_ACTOR1 = 1;
}
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
def Scene00000( player )
{
player.eventPlay( this.id, 0, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // accept quest
{
player.questUpdate( SubFst019.id, SubFst019.SEQ_FINISH );
}
} );
}
def Scene00001( player )
{
player.eventPlay( this.id, 1, NONE,
fun( player, eventId, param1, param2, param3 )
{
if( param2 == 1 ) // finish quest
{
if( player.giveQuestRewards( SubFst019.id, 0 ) )
{
player.questFinish( SubFst019.id );
}
}
} );
}
//////////////////////////////////////////////////////////////////////
// Event Handlers
def onTalk( eventId, player, actorId )
{
var actor = mapActor( actorId );
if( !player.hasQuest( SubFst019.id ) )
{
SubFst019.Scene00000( player );
}
if( actor == SubFst019.ACTOR1 && player.questGetSeq( SubFst019.id ) == SubFst019.SEQ_FINISH )
{
SubFst019.Scene00001( player );
}
}
};
GLOBAL SubFst019 = SubFst019Def();

73
bin/web/createUser.html Normal file
View file

@ -0,0 +1,73 @@
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FFXIV 1.0 Login</title>
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/global.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
<script>
function doLogin(){
var url = "sapphire-api/lobby/createAccount";
var params = "{\"username\":\"" + document.getElementsByName('username')[0].value + "\",\"pass\":\"" + document.getElementsByName('password')[0].value + "\"}";
var xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
try{
var response = readBody(xhr);
var parsed = JSON.parse(response);
window.external.Boot(parsed.sId, parsed.lobbyHost, parsed.frontierHost);
}catch(err){
document.getElementById("errorMessage").innerHTML = "Login failed.";
}
}
}
xhr.send(params);
}
function readBody(xhr) {
var data;
if (!xhr.responseType || xhr.responseType === "text") {
data = xhr.responseText;
} else if (xhr.responseType === "document") {
data = xhr.responseXML;
} else {
data = xhr.response;
}
return data;
}
</script>
</head>
<body oncontextmenu="return false;">
<div style="width: 80%; height: 300px; margin-left: auto; margin-right: auto; margin-top: 20%">
<div class="contentContainer" >
<img style="width: 100%;" src="./sapphire_logo.png" />
</div>
<div class="contentContainer">
<div class="info">
<br />
<table class="infoForm">
<tr>
<td>Username:</td>
<td><input type="text" name="username" /></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password" /></td>
</tr>
<tr>
<td colspan="2">
<input id="submitButton" type="button" value="Create User" onclick="doLogin();" />
</td>
</tr>
</table>
<p class="errorMessage" id="errorMessage"></p>
</div>
</div>
</div>
</body>
</html>

158
bin/web/css/global.css Normal file
View file

@ -0,0 +1,158 @@
body
{
font-family: Verdana;
font-size: 10pt;
line-height: 14pt;
height: 100%;
}
div.contentContainer {
width: 50%;
float: left;
}
div.info
{
width: 320px;
height: 100%;
margin-left: auto;
margin-right: auto;
text-align: center;
padding: 20px;
background-color: lightgrey;
}
div.infoFooter
{
width: 400px;
margin-left: auto;
margin-right: auto;
text-align: right;
padding: 5px;
}
div.edit
{
width: 50%;
min-width: 600px;
margin-top: 20px;
margin-left: auto;
margin-right: auto;
text-align: center;
padding: 20px;
background-color: lightgrey;
}
div.inner
{
position: relative;
max-width: 1250px;
margin: 0px auto;
}
h1
{
line-height: 23px;
font-size: 23px;
padding: 5px 0px;
}
h2
{
line-height: 17px;
font-size: 14px;
font-weight: bold;
padding: 5px;
}
h3
{
line-height: 14px;
font-size: 12px;
font-weight: bold;
padding: 5px;
}
header.top
{
padding: 20px 0px;
background: none repeat scroll 0% 0% lavender;
position: relative;
z-index: 999;
}
table.center
{
margin-left: auto;
margin-right: auto;
}
table.infoForm
{
width: 100%;
}
table.editForm
{
width: 100%;
}
table.editForm input
{
width: 100%;
}
table.editForm select
{
width: 100%;
}
td
{
padding: 3px;
}
th
{
padding: 3px;
text-decoration: underline;
}
p
{
padding: 2px;
}
p.errorMessage
{
color: darkred;
font-weight: bold;
}
p.pageTitle
{
font-weight: bold;
font-size: 28px;
line-height: 20px;
padding: 0px 0px;
}
p.pageTitle a
{
text-decoration: none;
color: black;
}
p.pageSubTitle
{
font-size: 10px;
line-height: 18px;
padding: 0px 0px;
}
#recaptcha_area
{
margin: 0 auto;
}

48
bin/web/css/reset.css Normal file
View file

@ -0,0 +1,48 @@
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

1722
bin/web/headlines.xml Normal file

File diff suppressed because it is too large Load diff

BIN
bin/web/icon-01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

30
bin/web/index.html Normal file
View file

@ -0,0 +1,30 @@
<!doctype html>
<html>
<head>
<style>
div.fill-screen {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
text-align: center;
}
img.fit {
max-width: 99%;
max-height: 99%;
}
</style>
<title>Sapphire</title>
</head>
<body bgcolor="#FFFFFF" link="#FFFFFF" vlink="#FFFFFF" alink="#666666">
<div class='fill-screen' style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select:none; user-select:none;-o-user-select:none;" unselectable="on" onselectstart="return false;" onmousedown="return false;">
<p style="text-align: center;"><img class='fit' src="icon-01.png" alt="" />
</p>
</div>
</body>
</html>

75
bin/web/login.html Normal file
View file

@ -0,0 +1,75 @@
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>FFXIV 1.0 Login</title>
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/global.css" />
<script src="//cdnjs.cloudflare.com/ajax/libs/json3/3.3.2/json3.min.js"></script>
<script>
function doLogin(){
var url = "sapphire-api/lobby/login";
var params = "{\"username\":\"" + document.getElementsByName('username')[0].value + "\",\"pass\":\"" + document.getElementsByName('password')[0].value + "\"}";
var xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
try{
var response = readBody(xhr);
var parsed = JSON.parse(response);
window.external.Boot(parsed.sId, parsed.lobbyHost, parsed.frontierHost);
}catch(err){
document.getElementById("errorMessage").innerHTML = "Login failed.";
}
}
}
xhr.send(params);
}
function readBody(xhr) {
var data;
if (!xhr.responseType || xhr.responseType === "text") {
data = xhr.responseText;
} else if (xhr.responseType === "document") {
data = xhr.responseXML;
} else {
data = xhr.response;
}
return data;
}
</script>
</head>
<body oncontextmenu="return false;">
<div style="width: 80%; height: 300px; margin-left: auto; margin-right: auto; margin-top: 20%">
<div class="contentContainer" >
<img style="width: 100%;" src="./sapphire_logo.png" />
</div>
<div class="contentContainer">
<div class="info">
<br />
<table class="infoForm">
<tr>
<td>Username:</td>
<td><input type="text" name="username" /></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" name="password" /></td>
</tr>
<tr>
<td colspan="2">
<input id="submitButton" type="button" value="Login" onclick="doLogin();" />
</td>
</tr>
</table>
<p class="errorMessage" id="errorMessage"></p>
<br>
<a href="createUser.html">Create Account</a>
</div>
</div>
</div>
</body>
</html>

162
bin/web/news.xml Normal file

File diff suppressed because one or more lines are too long

BIN
bin/web/sapphire_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 KiB

BIN
bin/zlib1.dll Normal file

Binary file not shown.

54
sql/accounts.sql Normal file
View file

@ -0,0 +1,54 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `dbaccounts`
--
DROP TABLE IF EXISTS `accounts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accounts` (
`account_id` int(11) NOT NULL DEFAULT '0',
`account_name` varchar(255) COLLATE latin1_general_ci NOT NULL,
`account_pass` varchar(255) COLLATE latin1_general_ci NOT NULL,
`account_created` int(11) NOT NULL DEFAULT '0',
`account_status` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`account_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `dbaccounts`
--
LOCK TABLES `accounts` WRITE;
/*!40000 ALTER TABLE `accounts` DISABLE KEYS */;
INSERT INTO `accounts` VALUES (1,'test','CY9rzUYh03PK3k6DJie09g==',0,2);
/*!40000 ALTER TABLE `accounts` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:06

1318
sql/battlenpc.sql Normal file

File diff suppressed because it is too large Load diff

101
sql/charabase.sql Normal file
View file

@ -0,0 +1,101 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `charabase`
--
DROP TABLE IF EXISTS `charabase`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `charabase` (
`AccountId` int(11) NOT NULL,
`Hp` int(10) DEFAULT NULL,
`Mp` int(10) DEFAULT NULL,
`Tp` int(10) DEFAULT NULL,
`Gp` int(10) DEFAULT NULL,
`Mode` int(3) DEFAULT '0',
`Mount` int(3) DEFAULT NULL,
`Voice` int(3) DEFAULT NULL,
`Customize` binary(26) DEFAULT NULL,
`ModelMainWeapon` int(20) DEFAULT NULL,
`ModelSubWeapon` int(20) DEFAULT NULL,
`ModelSystemWeapon` int(20) DEFAULT NULL,
`ModelEquip` binary(40) DEFAULT NULL,
`EmoteModeType` int(3) DEFAULT NULL,
`CharacterId` int(20) NOT NULL DEFAULT '0',
`CharacterType` int(5) DEFAULT NULL,
`Name` varchar(32) DEFAULT NULL,
`FirstLogin` int(20) DEFAULT NULL,
`Language` int(10) DEFAULT NULL,
`IsNewGame` int(3) DEFAULT NULL,
`Invisible` int(3) DEFAULT NULL,
`InstantiationTime` int(20) DEFAULT NULL,
`PrimaryTerritoryType` int(5) DEFAULT NULL,
`PrimaryTerritoryId` int(20) DEFAULT NULL,
`Pos_0_0` float DEFAULT NULL,
`Pos_0_1` float DEFAULT NULL,
`Pos_0_2` float DEFAULT NULL,
`Pos_0_3` float DEFAULT NULL,
`PrimaryLayoutId` int(10) DEFAULT NULL,
`PrimaryExclusiveId` int(10) DEFAULT NULL,
`PrimaryMoveType` int(3) DEFAULT NULL,
`PrimaryContentId` int(10) DEFAULT NULL,
`SecondaryTerritoryType` int(5) DEFAULT NULL,
`SecondaryTerritoryId` int(20) DEFAULT NULL,
`Pos_1_0` float DEFAULT NULL,
`Pos_1_1` float DEFAULT NULL,
`Pos_1_2` float DEFAULT NULL,
`Pos_1_3` float DEFAULT NULL,
`SecondaryLayoutId` int(10) DEFAULT NULL,
`Effectiveness` int(3) DEFAULT NULL,
`Update` int(10) DEFAULT NULL,
`Pos_0` float DEFAULT NULL,
`Pos_1` float DEFAULT NULL,
`Pos_2` float DEFAULT NULL,
`Pos_3` float DEFAULT NULL,
`ContentId` bigint(20) DEFAULT NULL,
`IsNewAdventurer` int(1) NOT NULL DEFAULT '1',
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` datetime DEFAULT NULL,
PRIMARY KEY (`CharacterId`),
KEY `ContentId` (`ContentId`),
KEY `Name` (`Name`),
KEY `AccountId` (`AccountId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `charabase`
--
LOCK TABLES `charabase` WRITE;
/*!40000 ALTER TABLE `charabase` DISABLE KEYS */;
/*!40000 ALTER TABLE `charabase` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:07

100
sql/characlass.sql Normal file
View file

@ -0,0 +1,100 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `characlass`
--
DROP TABLE IF EXISTS `characlass`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `characlass` (
`Lv_0` int(5) DEFAULT '0',
`Exp_0` int(10) DEFAULT '0',
`Lv_1` int(5) DEFAULT '0',
`Exp_1` int(10) DEFAULT '0',
`Lv_2` int(5) DEFAULT '0',
`Exp_2` int(10) DEFAULT '0',
`Lv_3` int(5) DEFAULT '0',
`Exp_3` int(10) DEFAULT '0',
`Lv_4` int(5) DEFAULT '0',
`Exp_4` int(10) DEFAULT '0',
`Lv_5` int(5) DEFAULT '0',
`Exp_5` int(10) DEFAULT '0',
`Lv_6` int(5) DEFAULT '0',
`Exp_6` int(10) DEFAULT '0',
`Lv_7` int(5) DEFAULT '0',
`Exp_7` int(10) DEFAULT '0',
`Lv_8` int(5) DEFAULT '0',
`Exp_8` int(10) DEFAULT '0',
`Lv_9` int(5) DEFAULT '0',
`Exp_9` int(10) DEFAULT '0',
`Lv_10` int(5) DEFAULT '0',
`Exp_10` int(10) DEFAULT '0',
`Lv_11` int(5) DEFAULT '0',
`Exp_11` int(10) DEFAULT '0',
`Lv_12` int(5) DEFAULT '0',
`Exp_12` int(10) DEFAULT '0',
`Lv_13` int(5) DEFAULT '0',
`Exp_13` int(10) DEFAULT '0',
`Lv_14` int(5) DEFAULT '0',
`Exp_14` int(10) DEFAULT '0',
`Lv_15` int(5) DEFAULT '0',
`Exp_15` int(10) DEFAULT '0',
`Lv_16` int(5) DEFAULT '0',
`Exp_16` int(10) DEFAULT '0',
`Lv_17` int(5) DEFAULT '0',
`Exp_17` int(10) DEFAULT '0',
`Lv_18` int(5) DEFAULT '0',
`Exp_18` int(10) DEFAULT '0',
`Lv_19` int(5) NOT NULL DEFAULT '0',
`Exp_19` int(10) NOT NULL DEFAULT '0',
`Lv_20` int(5) NOT NULL DEFAULT '0',
`Exp_20` int(10) NOT NULL DEFAULT '0',
`Lv_21` int(5) NOT NULL DEFAULT '0',
`Exp_21` int(10) NOT NULL DEFAULT '0',
`Lv_22` int(5) NOT NULL DEFAULT '0',
`Exp_22` int(10) NOT NULL DEFAULT '0',
`Lv_23` int(5) DEFAULT '0',
`Exp_23` int(10) DEFAULT '0',
`CharacterId` int(20) NOT NULL DEFAULT '0',
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` datetime DEFAULT NULL,
PRIMARY KEY (`CharacterId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `characlass`
--
LOCK TABLES `characlass` WRITE;
/*!40000 ALTER TABLE `characlass` DISABLE KEYS */;
/*!40000 ALTER TABLE `characlass` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:12

115
sql/charadetail.sql Normal file
View file

@ -0,0 +1,115 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `charadetail`
--
DROP TABLE IF EXISTS `charadetail`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE TABLE charadetail (
`GuardianDeity` int(3) DEFAULT NULL,
`BirthDay` int(3) DEFAULT NULL,
`BirthMonth` int(3) NOT NULL,
`Class` int(3) DEFAULT NULL,
`MakeValid` int(3) DEFAULT NULL,
`RetainerId` int(20) DEFAULT NULL,
`RetainerName` varchar(32) DEFAULT NULL,
`CreateUnixTime` int(20) DEFAULT NULL,
`IsActive` int(3) DEFAULT NULL,
`IsRename` int(3) DEFAULT NULL,
`Status` int(3) DEFAULT NULL,
`Platform` varchar(32) DEFAULT NULL,
`TotalPlayTime` int(10) DEFAULT '0',
`TotalPlayTimeSecond` float DEFAULT NULL,
`FirstClass` int(3) DEFAULT NULL,
`HomePoint` int(3) DEFAULT NULL,
`FavoritePoint` binary(3) DEFAULT NULL,
`RestPoint` int(10) DEFAULT NULL,
`RentalTimer` float DEFAULT NULL,
`StartTown` int(3) DEFAULT NULL,
`ActiveTitle` int(5) DEFAULT NULL,
`TitleList` binary(32) DEFAULT NULL,
`Achievement` binary(16) DEFAULT NULL,
`Aetheryte` binary(12) DEFAULT NULL,
`HowTo` binary(32) DEFAULT NULL,
`Minions` binary(32) DEFAULT NULL,
`Mounts` binary(11) DEFAULT NULL,
`EquippedMannequin` int(5) DEFAULT NULL,
`ConfigFlags` smallint(5) NOT NULL DEFAULT '0',
`GatheringHistoryPointId` binary(8) DEFAULT NULL,
`GatheringDivisionOpenFla` binary(40) DEFAULT NULL,
`GatheringItemGetFlags` binary(60) DEFAULT NULL,
`RecipeDivisionOpenFlags` binary(80) DEFAULT NULL,
`RecipeCreateFlags` binary(100) DEFAULT NULL,
`QuestCompleteFlags` binary(200) DEFAULT NULL,
`LeveCompleteFlags` binary(200) DEFAULT NULL,
`OpeningSequence` int(3) DEFAULT NULL,
`QuestTracking` binary(10) DEFAULT NULL,
`LeveTicketNum` int(3) DEFAULT NULL,
`LeveTicketLastGetTime` int(10) DEFAULT NULL,
`GuildleveAssignmentSeed` int(5) DEFAULT NULL,
`GuildleveAssignmentCount` int(3) DEFAULT NULL,
`GuildleveFactionCreditBr` int(5) DEFAULT NULL,
`GuildleveFactionCreditAz` int(5) DEFAULT NULL,
`GuildleveFactionCreditHo` int(5) DEFAULT NULL,
`GrandCompany` int(3) DEFAULT NULL,
`GrandCompanyRank` binary(3) DEFAULT NULL,
`Discovery` blob,
`ContentRetryTime` blob,
`ContentJoinTime` int(10) DEFAULT NULL,
`ContentClearFlag` blob,
`TownWarpFstFlags` binary(2) DEFAULT NULL,
`PathId` int(10) DEFAULT NULL,
`StepIndex` int(5) DEFAULT NULL,
`ChocoboTaxiStandFlags` binary(8) DEFAULT NULL,
`unlocks` binary(64) DEFAULT NULL,
`CharacterId` int(20) NOT NULL DEFAULT '0',
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE charadetail
ADD PRIMARY KEY (`CharacterId`);
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `charadetail`
--
LOCK TABLES `charadetail` WRITE;
/*!40000 ALTER TABLE `charadetail` DISABLE KEYS */;
/*!40000 ALTER TABLE `charadetail` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:12

77
sql/charaglobalitem.sql Normal file
View file

@ -0,0 +1,77 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `charaglobalitem`
--
DROP TABLE IF EXISTS `charaglobalitem`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `charaglobalitem` (
`CharacterId` int(20) NOT NULL DEFAULT '0',
`itemId` int(20) NOT NULL DEFAULT '0',
`storageId` int(5) NOT NULL DEFAULT '0',
`containerIndex` int(5) NOT NULL DEFAULT '0',
`stack` int(10) DEFAULT '1',
`catalogId` int(10) DEFAULT '0',
`reservedFlag` int(10) DEFAULT '0',
`signatureId` int(20) DEFAULT '0',
`flags` int(3) DEFAULT '0',
`durability` int(5) DEFAULT '30000',
`refine` int(5) DEFAULT '0',
`materia_0` int(5) DEFAULT '0',
`materia_1` int(5) DEFAULT '0',
`materia_2` int(5) DEFAULT '0',
`materia_3` int(5) DEFAULT '0',
`materia_4` int(5) DEFAULT '0',
`stain` int(3) DEFAULT '0',
`pattern` int(10) DEFAULT '0',
`buffer_0` int(3) DEFAULT '0',
`buffer_1` int(3) DEFAULT '0',
`buffer_2` int(3) DEFAULT '0',
`buffer_3` int(3) DEFAULT '0',
`buffer_4` int(3) DEFAULT '0',
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`itemId`),
KEY `CharacterId` (`CharacterId`),
KEY `storageId` (`storageId`),
KEY `storageId_2` (`storageId`,`containerIndex`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `charaglobalitem`
--
LOCK TABLES `charaglobalitem` WRITE;
/*!40000 ALTER TABLE `charaglobalitem` DISABLE KEYS */;
/*!40000 ALTER TABLE `charaglobalitem` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:12

View file

@ -0,0 +1,53 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `charainfoblacklist`
--
DROP TABLE IF EXISTS `charainfoblacklist`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `charainfoblacklist` (
`CharacterId` int(20) NOT NULL,
`CharacterIdList` blob,
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` date DEFAULT NULL,
PRIMARY KEY (`CharacterId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `charainfoblacklist`
--
LOCK TABLES `charainfoblacklist` WRITE;
/*!40000 ALTER TABLE `charainfoblacklist` DISABLE KEYS */;
/*!40000 ALTER TABLE `charainfoblacklist` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:08

View file

@ -0,0 +1,54 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `charainfofriendlist`
--
DROP TABLE IF EXISTS `charainfofriendlist`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `charainfofriendlist` (
`CharacterId` int(20) NOT NULL,
`CharacterIdList` blob,
`InviteDataList` blob,
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` date DEFAULT NULL,
PRIMARY KEY (`CharacterId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `charainfofriendlist`
--
LOCK TABLES `charainfofriendlist` WRITE;
/*!40000 ALTER TABLE `charainfofriendlist` DISABLE KEYS */;
/*!40000 ALTER TABLE `charainfofriendlist` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:09

View file

@ -0,0 +1,53 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `charainfolinkshell`
--
DROP TABLE IF EXISTS `charainfolinkshell`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `charainfolinkshell` (
`CharacterId` int(20) NOT NULL,
`LinkshellIdList` binary(64) DEFAULT NULL,
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` date DEFAULT NULL,
PRIMARY KEY (`CharacterId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `charainfolinkshell`
--
LOCK TABLES `charainfolinkshell` WRITE;
/*!40000 ALTER TABLE `charainfolinkshell` DISABLE KEYS */;
/*!40000 ALTER TABLE `charainfolinkshell` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:09

54
sql/charainfosearch.sql Normal file
View file

@ -0,0 +1,54 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `charainfosearch`
--
DROP TABLE IF EXISTS `charainfosearch`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `charainfosearch` (
`CharacterId` int(20) DEFAULT NULL,
`SelectClassId` int(3) DEFAULT '0',
`SelectRegion` int(3) DEFAULT '0',
`SearchComment` binary(193) DEFAULT "",
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `charainfosearch`
--
LOCK TABLES `charainfosearch` WRITE;
/*!40000 ALTER TABLE `charainfosearch` DISABLE KEYS */;
/*!40000 ALTER TABLE `charainfosearch` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:09

74
sql/charaitemcrystal.sql Normal file
View file

@ -0,0 +1,74 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `charaitemcrystal`
--
DROP TABLE IF EXISTS `charaitemcrystal`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `charaitemcrystal` (
`CharacterId` int(20) DEFAULT '0',
`storageId` int(10) DEFAULT '2001',
`type` int(5) DEFAULT '0',
`idx` int(5) NOT NULL AUTO_INCREMENT,
`container_0` int(20) DEFAULT '0',
`container_1` int(20) DEFAULT '0',
`container_2` int(20) DEFAULT '0',
`container_3` int(20) DEFAULT '0',
`container_4` int(20) DEFAULT '0',
`container_5` int(20) DEFAULT '0',
`container_6` int(20) DEFAULT '0',
`container_7` int(20) DEFAULT '0',
`container_8` int(20) DEFAULT '0',
`container_9` int(20) DEFAULT '0',
`container_10` int(20) DEFAULT '0',
`container_11` int(20) DEFAULT '0',
`container_12` int(20) DEFAULT '0',
`container_13` int(20) DEFAULT '0',
`container_14` int(20) DEFAULT '0',
`container_15` int(20) DEFAULT '0',
`container_16` int(20) DEFAULT '0',
`container_17` int(20) DEFAULT '0',
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`idx`),
KEY `CharacterId` (`CharacterId`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `charaitemcrystal`
--
LOCK TABLES `charaitemcrystal` WRITE;
/*!40000 ALTER TABLE `charaitemcrystal` DISABLE KEYS */;
/*!40000 ALTER TABLE `charaitemcrystal` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:10

68
sql/charaitemcurrency.sql Normal file
View file

@ -0,0 +1,68 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `charaitemcurrency`
--
DROP TABLE IF EXISTS `charaitemcurrency`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `charaitemcurrency` (
`CharacterId` int(20) NOT NULL,
`storageId` int(10) DEFAULT '2000',
`type` int(5) DEFAULT '0',
`idx` int(5) NOT NULL AUTO_INCREMENT,
`container_0` int(20) DEFAULT '0',
`container_1` int(20) DEFAULT '0',
`container_2` int(20) DEFAULT '0',
`container_3` int(20) DEFAULT '0',
`container_4` int(20) DEFAULT '0',
`container_5` int(20) DEFAULT '0',
`container_6` int(20) DEFAULT '0',
`container_7` int(20) DEFAULT '0',
`container_8` int(20) NOT NULL DEFAULT '0',
`container_9` int(20) NOT NULL DEFAULT '0',
`container_10` int(20) NOT NULL DEFAULT '0',
`container_11` int(20) NOT NULL DEFAULT '0',
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`idx`),
UNIQUE KEY `CharacterId` (`CharacterId`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `charaitemcurrency`
--
LOCK TABLES `charaitemcurrency` WRITE;
/*!40000 ALTER TABLE `charaitemcurrency` DISABLE KEYS */;
/*!40000 ALTER TABLE `charaitemcurrency` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:11

70
sql/charaitemgearset.sql Normal file
View file

@ -0,0 +1,70 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `charaitemgearset`
--
DROP TABLE IF EXISTS `charaitemgearset`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `charaitemgearset` (
`CharacterId` int(20) NOT NULL,
`storageId` int(10) NOT NULL,
`type` int(5) DEFAULT '0',
`idx` int(5) NOT NULL AUTO_INCREMENT,
`container_0` int(20) DEFAULT '0',
`container_1` int(20) DEFAULT '0',
`container_2` int(20) DEFAULT '0',
`container_3` int(20) DEFAULT '0',
`container_4` int(20) DEFAULT '0',
`container_5` int(20) DEFAULT '0',
`container_6` int(20) DEFAULT '0',
`container_7` int(20) DEFAULT '0',
`container_8` int(20) DEFAULT '0',
`container_9` int(20) DEFAULT '0',
`container_10` int(20) DEFAULT '0',
`container_11` int(20) DEFAULT '0',
`container_12` int(20) DEFAULT '0',
`container_13` int(20) DEFAULT '0',
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`CharacterId`,`storageId`),
UNIQUE KEY `idx` (`idx`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `charaitemgearset`
--
LOCK TABLES `charaitemgearset` WRITE;
/*!40000 ALTER TABLE `charaitemgearset` DISABLE KEYS */;
/*!40000 ALTER TABLE `charaitemgearset` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:11

View file

@ -0,0 +1,81 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `charaiteminventory`
--
DROP TABLE IF EXISTS `charaiteminventory`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `charaiteminventory` (
`CharacterId` int(20) NOT NULL,
`storageId` int(10) NOT NULL,
`type` int(5) DEFAULT '0',
`idx` int(5) NOT NULL AUTO_INCREMENT,
`container_0` int(20) DEFAULT '0',
`container_1` int(20) DEFAULT '0',
`container_2` int(20) DEFAULT '0',
`container_3` int(20) DEFAULT '0',
`container_4` int(20) DEFAULT '0',
`container_5` int(20) DEFAULT '0',
`container_6` int(20) DEFAULT '0',
`container_7` int(20) DEFAULT '0',
`container_8` int(20) DEFAULT '0',
`container_9` int(20) DEFAULT '0',
`container_10` int(20) DEFAULT '0',
`container_11` int(20) DEFAULT '0',
`container_12` int(20) DEFAULT '0',
`container_13` int(20) DEFAULT '0',
`container_14` int(20) DEFAULT '0',
`container_15` int(20) DEFAULT '0',
`container_16` int(20) DEFAULT '0',
`container_17` int(20) DEFAULT '0',
`container_18` int(20) DEFAULT '0',
`container_19` int(20) DEFAULT '0',
`container_20` int(20) DEFAULT '0',
`container_21` int(20) DEFAULT '0',
`container_22` int(20) DEFAULT '0',
`container_23` int(20) DEFAULT '0',
`container_24` int(20) DEFAULT '0',
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`CharacterId`,`storageId`),
UNIQUE KEY `idx` (`idx`)
) ENGINE=MyISAM AUTO_INCREMENT=161 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `charaiteminventory`
--
LOCK TABLES `charaiteminventory` WRITE;
/*!40000 ALTER TABLE `charaiteminventory` DISABLE KEYS */;
/*!40000 ALTER TABLE `charaiteminventory` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:10

309
sql/charaquest.sql Normal file
View file

@ -0,0 +1,309 @@
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE TABLE charaquest (
`QuestId_0` int(5) DEFAULT '0',
`Sequence_0` int(3) DEFAULT '0',
`Flags_0` int(3) DEFAULT '0',
`Variables_0_0` int(3) DEFAULT '0',
`Variables_0_1` int(3) DEFAULT '0',
`Variables_0_2` int(3) DEFAULT '0',
`Variables_0_3` int(3) DEFAULT '0',
`Variables_0_4` int(3) DEFAULT '0',
`Variables_0_5` int(3) DEFAULT '0',
`Variables_0_6` int(3) DEFAULT '0',
`QuestId_1` int(5) DEFAULT '0',
`Sequence_1` int(3) DEFAULT '0',
`Flags_1` int(3) DEFAULT '0',
`Variables_1_0` int(3) DEFAULT '0',
`Variables_1_1` int(3) DEFAULT '0',
`Variables_1_2` int(3) DEFAULT '0',
`Variables_1_3` int(3) DEFAULT '0',
`Variables_1_4` int(3) DEFAULT '0',
`Variables_1_5` int(3) DEFAULT '0',
`Variables_1_6` int(3) DEFAULT '0',
`QuestId_2` int(5) DEFAULT '0',
`Sequence_2` int(3) DEFAULT '0',
`Flags_2` int(3) DEFAULT '0',
`Variables_2_0` int(3) DEFAULT '0',
`Variables_2_1` int(3) DEFAULT '0',
`Variables_2_2` int(3) DEFAULT '0',
`Variables_2_3` int(3) DEFAULT '0',
`Variables_2_4` int(3) DEFAULT '0',
`Variables_2_5` int(3) DEFAULT '0',
`Variables_2_6` int(3) DEFAULT '0',
`QuestId_3` int(5) DEFAULT '0',
`Sequence_3` int(3) DEFAULT '0',
`Flags_3` int(3) DEFAULT '0',
`Variables_3_0` int(3) DEFAULT '0',
`Variables_3_1` int(3) DEFAULT '0',
`Variables_3_2` int(3) DEFAULT '0',
`Variables_3_3` int(3) DEFAULT '0',
`Variables_3_4` int(3) DEFAULT '0',
`Variables_3_5` int(3) DEFAULT '0',
`Variables_3_6` int(3) DEFAULT '0',
`QuestId_4` int(5) DEFAULT '0',
`Sequence_4` int(3) DEFAULT '0',
`Flags_4` int(3) DEFAULT '0',
`Variables_4_0` int(3) DEFAULT '0',
`Variables_4_1` int(3) DEFAULT '0',
`Variables_4_2` int(3) DEFAULT '0',
`Variables_4_3` int(3) DEFAULT '0',
`Variables_4_4` int(3) DEFAULT '0',
`Variables_4_5` int(3) DEFAULT '0',
`Variables_4_6` int(3) DEFAULT '0',
`QuestId_5` int(5) DEFAULT '0',
`Sequence_5` int(3) DEFAULT '0',
`Flags_5` int(3) DEFAULT '0',
`Variables_5_0` int(3) DEFAULT '0',
`Variables_5_1` int(3) DEFAULT '0',
`Variables_5_2` int(3) DEFAULT '0',
`Variables_5_3` int(3) DEFAULT '0',
`Variables_5_4` int(3) DEFAULT '0',
`Variables_5_5` int(3) DEFAULT '0',
`Variables_5_6` int(3) DEFAULT '0',
`QuestId_6` int(5) DEFAULT '0',
`Sequence_6` int(3) DEFAULT '0',
`Flags_6` int(3) DEFAULT '0',
`Variables_6_0` int(3) DEFAULT '0',
`Variables_6_1` int(3) DEFAULT '0',
`Variables_6_2` int(3) DEFAULT '0',
`Variables_6_3` int(3) DEFAULT '0',
`Variables_6_4` int(3) DEFAULT '0',
`Variables_6_5` int(3) DEFAULT '0',
`Variables_6_6` int(3) DEFAULT '0',
`QuestId_7` int(5) DEFAULT '0',
`Sequence_7` int(3) DEFAULT '0',
`Flags_7` int(3) DEFAULT '0',
`Variables_7_0` int(3) DEFAULT '0',
`Variables_7_1` int(3) DEFAULT '0',
`Variables_7_2` int(3) DEFAULT '0',
`Variables_7_3` int(3) DEFAULT '0',
`Variables_7_4` int(3) DEFAULT '0',
`Variables_7_5` int(3) DEFAULT '0',
`Variables_7_6` int(3) DEFAULT '0',
`QuestId_8` int(5) DEFAULT '0',
`Sequence_8` int(3) DEFAULT '0',
`Flags_8` int(3) DEFAULT '0',
`Variables_8_0` int(3) DEFAULT '0',
`Variables_8_1` int(3) DEFAULT '0',
`Variables_8_2` int(3) DEFAULT '0',
`Variables_8_3` int(3) DEFAULT '0',
`Variables_8_4` int(3) DEFAULT '0',
`Variables_8_5` int(3) DEFAULT '0',
`Variables_8_6` int(3) DEFAULT '0',
`QuestId_9` int(5) DEFAULT '0',
`Sequence_9` int(3) DEFAULT '0',
`Flags_9` int(3) DEFAULT '0',
`Variables_9_0` int(3) DEFAULT '0',
`Variables_9_1` int(3) DEFAULT '0',
`Variables_9_2` int(3) DEFAULT '0',
`Variables_9_3` int(3) DEFAULT '0',
`Variables_9_4` int(3) DEFAULT '0',
`Variables_9_5` int(3) DEFAULT '0',
`Variables_9_6` int(3) DEFAULT '0',
`QuestId_10` int(5) DEFAULT '0',
`Sequence_10` int(3) DEFAULT '0',
`Flags_10` int(3) DEFAULT '0',
`Variables_10_0` int(3) DEFAULT '0',
`Variables_10_1` int(3) DEFAULT '0',
`Variables_10_2` int(3) DEFAULT '0',
`Variables_10_3` int(3) DEFAULT '0',
`Variables_10_4` int(3) DEFAULT '0',
`Variables_10_5` int(3) DEFAULT '0',
`Variables_10_6` int(3) DEFAULT '0',
`QuestId_11` int(5) DEFAULT '0',
`Sequence_11` int(3) DEFAULT '0',
`Flags_11` int(3) DEFAULT '0',
`Variables_11_0` int(3) DEFAULT '0',
`Variables_11_1` int(3) DEFAULT '0',
`Variables_11_2` int(3) DEFAULT '0',
`Variables_11_3` int(3) DEFAULT '0',
`Variables_11_4` int(3) DEFAULT '0',
`Variables_11_5` int(3) DEFAULT '0',
`Variables_11_6` int(3) DEFAULT '0',
`QuestId_12` int(5) DEFAULT '0',
`Sequence_12` int(3) DEFAULT '0',
`Flags_12` int(3) DEFAULT '0',
`Variables_12_0` int(3) DEFAULT '0',
`Variables_12_1` int(3) DEFAULT '0',
`Variables_12_2` int(3) DEFAULT '0',
`Variables_12_3` int(3) DEFAULT '0',
`Variables_12_4` int(3) DEFAULT '0',
`Variables_12_5` int(3) DEFAULT '0',
`Variables_12_6` int(3) DEFAULT '0',
`QuestId_13` int(5) DEFAULT '0',
`Sequence_13` int(3) DEFAULT '0',
`Flags_13` int(3) DEFAULT '0',
`Variables_13_0` int(3) DEFAULT '0',
`Variables_13_1` int(3) DEFAULT '0',
`Variables_13_2` int(3) DEFAULT '0',
`Variables_13_3` int(3) DEFAULT '0',
`Variables_13_4` int(3) DEFAULT '0',
`Variables_13_5` int(3) DEFAULT '0',
`Variables_13_6` int(3) DEFAULT '0',
`QuestId_14` int(5) DEFAULT '0',
`Sequence_14` int(3) DEFAULT '0',
`Flags_14` int(3) DEFAULT '0',
`Variables_14_0` int(3) DEFAULT '0',
`Variables_14_1` int(3) DEFAULT '0',
`Variables_14_2` int(3) DEFAULT '0',
`Variables_14_3` int(3) DEFAULT '0',
`Variables_14_4` int(3) DEFAULT '0',
`Variables_14_5` int(3) DEFAULT '0',
`Variables_14_6` int(3) DEFAULT '0',
`QuestId_15` int(5) DEFAULT '0',
`Sequence_15` int(3) DEFAULT '0',
`Flags_15` int(3) DEFAULT '0',
`Variables_15_0` int(3) DEFAULT '0',
`Variables_15_1` int(3) DEFAULT '0',
`Variables_15_2` int(3) DEFAULT '0',
`Variables_15_3` int(3) DEFAULT '0',
`Variables_15_4` int(3) DEFAULT '0',
`Variables_15_5` int(3) DEFAULT '0',
`Variables_15_6` int(3) DEFAULT '0',
`QuestId_16` int(5) DEFAULT '0',
`Sequence_16` int(3) DEFAULT '0',
`Flags_16` int(3) DEFAULT '0',
`Variables_16_0` int(3) DEFAULT '0',
`Variables_16_1` int(3) DEFAULT '0',
`Variables_16_2` int(3) DEFAULT '0',
`Variables_16_3` int(3) DEFAULT '0',
`Variables_16_4` int(3) DEFAULT '0',
`Variables_16_5` int(3) DEFAULT '0',
`Variables_16_6` int(3) DEFAULT '0',
`QuestId_17` int(5) DEFAULT '0',
`Sequence_17` int(3) DEFAULT '0',
`Flags_17` int(3) DEFAULT '0',
`Variables_17_0` int(3) DEFAULT '0',
`Variables_17_1` int(3) DEFAULT '0',
`Variables_17_2` int(3) DEFAULT '0',
`Variables_17_3` int(3) DEFAULT '0',
`Variables_17_4` int(3) DEFAULT '0',
`Variables_17_5` int(3) DEFAULT '0',
`Variables_17_6` int(3) DEFAULT '0',
`QuestId_18` int(5) DEFAULT '0',
`Sequence_18` int(3) DEFAULT '0',
`Flags_18` int(3) DEFAULT '0',
`Variables_18_0` int(3) DEFAULT '0',
`Variables_18_1` int(3) DEFAULT '0',
`Variables_18_2` int(3) DEFAULT '0',
`Variables_18_3` int(3) DEFAULT '0',
`Variables_18_4` int(3) DEFAULT '0',
`Variables_18_5` int(3) DEFAULT '0',
`Variables_18_6` int(3) DEFAULT '0',
`QuestId_19` int(5) DEFAULT '0',
`Sequence_19` int(3) DEFAULT '0',
`Flags_19` int(3) DEFAULT '0',
`Variables_19_0` int(3) DEFAULT '0',
`Variables_19_1` int(3) DEFAULT '0',
`Variables_19_2` int(3) DEFAULT '0',
`Variables_19_3` int(3) DEFAULT '0',
`Variables_19_4` int(3) DEFAULT '0',
`Variables_19_5` int(3) DEFAULT '0',
`Variables_19_6` int(3) DEFAULT '0',
`QuestId_20` int(5) DEFAULT '0',
`Sequence_20` int(3) DEFAULT '0',
`Flags_20` int(3) DEFAULT '0',
`Variables_20_0` int(3) DEFAULT '0',
`Variables_20_1` int(3) DEFAULT '0',
`Variables_20_2` int(3) DEFAULT '0',
`Variables_20_3` int(3) DEFAULT '0',
`Variables_20_4` int(3) DEFAULT '0',
`Variables_20_5` int(3) DEFAULT '0',
`Variables_20_6` int(3) DEFAULT '0',
`QuestId_21` int(5) DEFAULT '0',
`Sequence_21` int(3) DEFAULT '0',
`Flags_21` int(3) DEFAULT '0',
`Variables_21_0` int(3) DEFAULT '0',
`Variables_21_1` int(3) DEFAULT '0',
`Variables_21_2` int(3) DEFAULT '0',
`Variables_21_3` int(3) DEFAULT '0',
`Variables_21_4` int(3) DEFAULT '0',
`Variables_21_5` int(3) DEFAULT '0',
`Variables_21_6` int(3) DEFAULT '0',
`QuestId_22` int(5) DEFAULT '0',
`Sequence_22` int(3) DEFAULT '0',
`Flags_22` int(3) DEFAULT '0',
`Variables_22_0` int(3) DEFAULT '0',
`Variables_22_1` int(3) DEFAULT '0',
`Variables_22_2` int(3) DEFAULT '0',
`Variables_22_3` int(3) DEFAULT '0',
`Variables_22_4` int(3) DEFAULT '0',
`Variables_22_5` int(3) DEFAULT '0',
`Variables_22_6` int(3) DEFAULT '0',
`QuestId_23` int(5) DEFAULT '0',
`Sequence_23` int(3) DEFAULT '0',
`Flags_23` int(3) DEFAULT '0',
`Variables_23_0` int(3) DEFAULT '0',
`Variables_23_1` int(3) DEFAULT '0',
`Variables_23_2` int(3) DEFAULT '0',
`Variables_23_3` int(3) DEFAULT '0',
`Variables_23_4` int(3) DEFAULT '0',
`Variables_23_5` int(3) DEFAULT '0',
`Variables_23_6` int(3) DEFAULT '0',
`QuestId_24` int(5) DEFAULT '0',
`Sequence_24` int(3) DEFAULT '0',
`Flags_24` int(3) DEFAULT '0',
`Variables_24_0` int(3) DEFAULT '0',
`Variables_24_1` int(3) DEFAULT '0',
`Variables_24_2` int(3) DEFAULT '0',
`Variables_24_3` int(3) DEFAULT '0',
`Variables_24_4` int(3) DEFAULT '0',
`Variables_24_5` int(3) DEFAULT '0',
`Variables_24_6` int(3) DEFAULT '0',
`QuestId_25` int(5) DEFAULT '0',
`Sequence_25` int(3) DEFAULT '0',
`Flags_25` int(3) DEFAULT '0',
`Variables_25_0` int(3) DEFAULT '0',
`Variables_25_1` int(3) DEFAULT '0',
`Variables_25_2` int(3) DEFAULT '0',
`Variables_25_3` int(3) DEFAULT '0',
`Variables_25_4` int(3) DEFAULT '0',
`Variables_25_5` int(3) DEFAULT '0',
`Variables_25_6` int(3) DEFAULT '0',
`QuestId_26` int(5) DEFAULT '0',
`Sequence_26` int(3) DEFAULT '0',
`Flags_26` int(3) DEFAULT '0',
`Variables_26_0` int(3) DEFAULT '0',
`Variables_26_1` int(3) DEFAULT '0',
`Variables_26_2` int(3) DEFAULT '0',
`Variables_26_3` int(3) DEFAULT '0',
`Variables_26_4` int(3) DEFAULT '0',
`Variables_26_5` int(3) DEFAULT '0',
`Variables_26_6` int(3) DEFAULT '0',
`QuestId_27` int(5) DEFAULT '0',
`Sequence_27` int(3) DEFAULT '0',
`Flags_27` int(3) DEFAULT '0',
`Variables_27_0` int(3) DEFAULT '0',
`Variables_27_1` int(3) DEFAULT '0',
`Variables_27_2` int(3) DEFAULT '0',
`Variables_27_3` int(3) DEFAULT '0',
`Variables_27_4` int(3) DEFAULT '0',
`Variables_27_5` int(3) DEFAULT '0',
`Variables_27_6` int(3) DEFAULT '0',
`QuestId_28` int(5) DEFAULT '0',
`Sequence_28` int(3) DEFAULT '0',
`Flags_28` int(3) DEFAULT '0',
`Variables_28_0` int(3) DEFAULT '0',
`Variables_28_1` int(3) DEFAULT '0',
`Variables_28_2` int(3) DEFAULT '0',
`Variables_28_3` int(3) DEFAULT '0',
`Variables_28_4` int(3) DEFAULT '0',
`Variables_28_5` int(3) DEFAULT '0',
`Variables_28_6` int(3) DEFAULT '0',
`QuestId_29` int(5) DEFAULT '0',
`Sequence_29` int(3) DEFAULT '0',
`Flags_29` int(3) DEFAULT '0',
`Variables_29_0` int(3) DEFAULT '0',
`Variables_29_1` int(3) DEFAULT '0',
`Variables_29_2` int(3) DEFAULT '0',
`Variables_29_3` int(3) DEFAULT '0',
`Variables_29_4` int(3) DEFAULT '0',
`Variables_29_5` int(3) DEFAULT '0',
`Variables_29_6` int(3) DEFAULT '0',
`CharacterId` int(20) DEFAULT '0',
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

148
sql/discoveryinfo.sql Normal file
View file

@ -0,0 +1,148 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `discoveryinfo`
--
DROP TABLE IF EXISTS `discoveryinfo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `discoveryinfo` (
`id` int(10) NOT NULL,
`map_id` int(3) NOT NULL,
`discover_id` int(3) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `discoveryinfo`
--
LOCK TABLES `discoveryinfo` WRITE;
/*!40000 ALTER TABLE `discoveryinfo` DISABLE KEYS */;
INSERT INTO `discoveryinfo` VALUES (-858993460,-858993460,-858993460);
INSERT INTO `discoveryinfo` VALUES (1367775,4,2);
INSERT INTO `discoveryinfo` VALUES (1367776,4,2);
INSERT INTO `discoveryinfo` VALUES (1367777,4,2);
INSERT INTO `discoveryinfo` VALUES (1367778,4,1);
INSERT INTO `discoveryinfo` VALUES (1367779,4,2);
INSERT INTO `discoveryinfo` VALUES (1367780,4,3);
INSERT INTO `discoveryinfo` VALUES (1367785,4,3);
INSERT INTO `discoveryinfo` VALUES (1367795,4,4);
INSERT INTO `discoveryinfo` VALUES (1367798,4,1);
INSERT INTO `discoveryinfo` VALUES (1367800,4,2);
INSERT INTO `discoveryinfo` VALUES (2052662,4,7);
INSERT INTO `discoveryinfo` VALUES (2052665,4,7);
INSERT INTO `discoveryinfo` VALUES (2052668,4,8);
INSERT INTO `discoveryinfo` VALUES (2052672,4,13);
INSERT INTO `discoveryinfo` VALUES (2052682,4,9);
INSERT INTO `discoveryinfo` VALUES (2052693,4,12);
INSERT INTO `discoveryinfo` VALUES (2052695,4,12);
INSERT INTO `discoveryinfo` VALUES (2052699,4,10);
INSERT INTO `discoveryinfo` VALUES (2052703,4,11);
INSERT INTO `discoveryinfo` VALUES (2052705,4,11);
INSERT INTO `discoveryinfo` VALUES (2052710,4,6);
INSERT INTO `discoveryinfo` VALUES (2052711,4,6);
INSERT INTO `discoveryinfo` VALUES (2052712,4,6);
INSERT INTO `discoveryinfo` VALUES (2052714,4,5);
INSERT INTO `discoveryinfo` VALUES (2052715,4,5);
INSERT INTO `discoveryinfo` VALUES (2052716,4,5);
INSERT INTO `discoveryinfo` VALUES (2052721,4,5);
INSERT INTO `discoveryinfo` VALUES (2052722,4,5);
INSERT INTO `discoveryinfo` VALUES (2052730,4,11);
INSERT INTO `discoveryinfo` VALUES (2465005,4,4);
INSERT INTO `discoveryinfo` VALUES (2465008,4,6);
INSERT INTO `discoveryinfo` VALUES (2465009,4,6);
INSERT INTO `discoveryinfo` VALUES (2465010,4,2);
INSERT INTO `discoveryinfo` VALUES (2465013,4,2);
INSERT INTO `discoveryinfo` VALUES (2465018,4,13);
INSERT INTO `discoveryinfo` VALUES (2465020,4,12);
INSERT INTO `discoveryinfo` VALUES (2496289,4,5);
INSERT INTO `discoveryinfo` VALUES (2652480,4,1);
INSERT INTO `discoveryinfo` VALUES (2652487,4,1);
INSERT INTO `discoveryinfo` VALUES (2652490,4,1);
INSERT INTO `discoveryinfo` VALUES (3907879,4,1);
INSERT INTO `discoveryinfo` VALUES (3907888,4,1);
INSERT INTO `discoveryinfo` VALUES (3907899,4,2);
INSERT INTO `discoveryinfo` VALUES (3907901,4,2);
INSERT INTO `discoveryinfo` VALUES (3907902,4,2);
INSERT INTO `discoveryinfo` VALUES (3907903,4,2);
INSERT INTO `discoveryinfo` VALUES (3907908,4,2);
INSERT INTO `discoveryinfo` VALUES (3907909,4,2);
INSERT INTO `discoveryinfo` VALUES (3975004,15,1);
INSERT INTO `discoveryinfo` VALUES (3975007,15,2);
INSERT INTO `discoveryinfo` VALUES (3975010,15,3);
INSERT INTO `discoveryinfo` VALUES (3975011,15,4);
INSERT INTO `discoveryinfo` VALUES (3975013,15,5);
INSERT INTO `discoveryinfo` VALUES (3975015,15,6);
INSERT INTO `discoveryinfo` VALUES (3975016,15,7);
INSERT INTO `discoveryinfo` VALUES (4161435,15,1);
INSERT INTO `discoveryinfo` VALUES (4161439,15,3);
INSERT INTO `discoveryinfo` VALUES (4161440,15,3);
INSERT INTO `discoveryinfo` VALUES (4161442,15,3);
INSERT INTO `discoveryinfo` VALUES (4161449,15,4);
INSERT INTO `discoveryinfo` VALUES (4161454,15,6);
INSERT INTO `discoveryinfo` VALUES (4161456,15,6);
INSERT INTO `discoveryinfo` VALUES (4161457,15,6);
INSERT INTO `discoveryinfo` VALUES (4164846,18,2);
INSERT INTO `discoveryinfo` VALUES (4164858,18,1);
INSERT INTO `discoveryinfo` VALUES (4164861,18,1);
INSERT INTO `discoveryinfo` VALUES (4164900,18,3);
INSERT INTO `discoveryinfo` VALUES (4164905,18,3);
INSERT INTO `discoveryinfo` VALUES (4164911,18,4);
INSERT INTO `discoveryinfo` VALUES (4164912,18,4);
INSERT INTO `discoveryinfo` VALUES (4164914,18,4);
INSERT INTO `discoveryinfo` VALUES (4164917,18,5);
INSERT INTO `discoveryinfo` VALUES (4164923,18,6);
INSERT INTO `discoveryinfo` VALUES (4164924,18,7);
INSERT INTO `discoveryinfo` VALUES (4164926,18,10);
INSERT INTO `discoveryinfo` VALUES (4164929,18,7);
INSERT INTO `discoveryinfo` VALUES (4164931,18,8);
INSERT INTO `discoveryinfo` VALUES (4164934,18,8);
INSERT INTO `discoveryinfo` VALUES (4164937,18,9);
INSERT INTO `discoveryinfo` VALUES (4164938,18,9);
INSERT INTO `discoveryinfo` VALUES (4164940,18,10);
INSERT INTO `discoveryinfo` VALUES (4164942,18,11);
INSERT INTO `discoveryinfo` VALUES (4164944,18,11);
INSERT INTO `discoveryinfo` VALUES (4164945,18,12);
INSERT INTO `discoveryinfo` VALUES (4164947,18,13);
INSERT INTO `discoveryinfo` VALUES (4164953,18,17);
INSERT INTO `discoveryinfo` VALUES (4164955,18,18);
INSERT INTO `discoveryinfo` VALUES (4164956,18,18);
INSERT INTO `discoveryinfo` VALUES (4164957,18,18);
INSERT INTO `discoveryinfo` VALUES (4164958,18,19);
INSERT INTO `discoveryinfo` VALUES (4242609,15,1);
INSERT INTO `discoveryinfo` VALUES (4242610,15,1);
INSERT INTO `discoveryinfo` VALUES (4248537,53,17);
INSERT INTO `discoveryinfo` VALUES (4665752,18,11);
INSERT INTO `discoveryinfo` VALUES (416144215,1,-858993460);
INSERT INTO `discoveryinfo` VALUES (416494218,10,-858993460);
/*!40000 ALTER TABLE `discoveryinfo` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:13

16
sql/export.sh Normal file
View file

@ -0,0 +1,16 @@
#!/bin/bash
EXPORT_PATH="C://coding//repositories//ffxiv related//sapphire//Sapphire2Clone//sql//"
USER=root
PASS=root
DBNAME=sapphire
#test -d EXPORT_PATH || mkdir -p $EXPORT_PATH
list=`mysqlshow -u $USER -p$PASS $DBNAME`
for T in $list;
do
if [[ "$T" != "information_schema" ]] && [[ "$T" != "performance_schema" ]] &&
[[ "$T" != "mysql" ]] && [[ "$T" != "${DBNAME}"* ]] && [[ "$T" != *"*"* ]] && [[ "$T" != *"+"* ]] && [[ "$T" != *"+="* ]] &&
[[ "$T" != "Tables" ]] && [[ "$T" != "Database"* ]] && [[ "$T" != "" ]]; then
echo "Backing up " $T;
mysqldump -u $USER -p$PASS $DBNAME $T --extended-insert=FALSE > "${EXPORT_PATH}/${T}.sql"
fi
done;

29
sql/import.sh Normal file
View file

@ -0,0 +1,29 @@
#!/bin/bash
IMPORT_PATH="C://coding//repositories//ffxiv related//sapphire//Sapphire2Clone//sql//"
USER=root
PASS=root
DBNAME=sapphire
ECHO Creating Database $DBNAME
mysqladmin -h localhost -u $USER -p$PASS DROP $DBNAME
ECHO Creating Database $DBNAME
mysqladmin -h localhost -u $USER -p$PASS CREATE $DBNAME IF NOT EXISTS $DBNAME
ECHO Loading $DBNAME tables into the database
sh cd $IMPORT_PATH
"C:\program files\mysql\mysql server 5.7\bin\mysql" $DBNAME -h localhost -u $USER -p$PASS -e 'SET AUTOCOMMIT=0;'
for X in '*.sql';
do
for Y in $X
do
echo Importing $Y;
"C:\program files\mysql\mysql server 5.7\bin\mysql" $DBNAME -h localhost -u $USER -p$PASS < $Y
done
done
"C:\program files\mysql\mysql server 5.7\bin\mysql" $DBNAME -h localhost -u $USER -p$PASS -e 'COMMIT;'
ECHO Finished!

57
sql/infolinkshell.sql Normal file
View file

@ -0,0 +1,57 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `infolinkshell`
--
DROP TABLE IF EXISTS `infolinkshell`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `infolinkshell` (
`LinkshellId` int(20) NOT NULL AUTO_INCREMENT,
`MasterCharacterId` int(20) DEFAULT NULL,
`CharacterIdList` blob,
`LinkshellName` varchar(32) DEFAULT NULL,
`LeaderIdList` blob,
`InviteIdList` blob,
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` date DEFAULT NULL,
PRIMARY KEY (`LinkshellId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `infolinkshell`
--
LOCK TABLES `infolinkshell` WRITE;
/*!40000 ALTER TABLE `infolinkshell` DISABLE KEYS */;
/*!40000 ALTER TABLE `infolinkshell` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:15

505
sql/uniqueiddata.sql Normal file
View file

@ -0,0 +1,505 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `uniqueiddata`
--
DROP TABLE IF EXISTS `uniqueiddata`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `uniqueiddata` (
`NextId` int(20) NOT NULL AUTO_INCREMENT,
`IdName` varchar(16) DEFAULT 'NOT SET',
`IS_DELETE` int(3) DEFAULT '0',
`IS_NOT_ACTIVE_FLG` int(3) DEFAULT '0',
`UPDATE_DATE` datetime DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`NextId`)
) ENGINE=MyISAM AUTO_INCREMENT=1000447 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `uniqueiddata`
--
LOCK TABLES `uniqueiddata` WRITE;
/*!40000 ALTER TABLE `uniqueiddata` DISABLE KEYS */;
INSERT INTO `uniqueiddata` VALUES (1,'NOT_SET',0,0,'2016-02-10 22:04:00');
INSERT INTO `uniqueiddata` VALUES (2,'NOT_SET',0,0,'2016-02-10 22:04:23');
INSERT INTO `uniqueiddata` VALUES (3,'NOT_SET',0,0,'2016-02-10 22:06:29');
INSERT INTO `uniqueiddata` VALUES (4,'NOT_SET',0,0,'2016-02-10 22:06:29');
INSERT INTO `uniqueiddata` VALUES (5,'NOT_SET',0,0,'2016-02-10 22:06:29');
INSERT INTO `uniqueiddata` VALUES (6,'NOT_SET',0,0,'2016-02-10 22:06:29');
INSERT INTO `uniqueiddata` VALUES (1000001,'NOT_SET',0,0,'2016-02-10 22:07:59');
INSERT INTO `uniqueiddata` VALUES (1000002,'NOT_SET',0,0,'2016-02-10 22:07:59');
INSERT INTO `uniqueiddata` VALUES (1000003,'NOT_SET',0,0,'2016-02-10 22:07:59');
INSERT INTO `uniqueiddata` VALUES (1000004,'NOT_SET',0,0,'2016-02-10 22:07:59');
INSERT INTO `uniqueiddata` VALUES (1000005,'NOT_SET',0,0,'2016-02-11 00:50:07');
INSERT INTO `uniqueiddata` VALUES (1000006,'NOT_SET',0,0,'2016-02-11 00:54:50');
INSERT INTO `uniqueiddata` VALUES (1000007,'NOT_SET',0,0,'2016-02-11 20:46:38');
INSERT INTO `uniqueiddata` VALUES (1000008,'NOT_SET',0,0,'2016-02-11 20:46:47');
INSERT INTO `uniqueiddata` VALUES (1000009,'NOT_SET',0,0,'2016-02-11 20:46:54');
INSERT INTO `uniqueiddata` VALUES (1000010,'NOT_SET',0,0,'2016-02-11 20:47:04');
INSERT INTO `uniqueiddata` VALUES (1000011,'NOT_SET',0,0,'2016-02-11 20:47:11');
INSERT INTO `uniqueiddata` VALUES (1000012,'NOT_SET',0,0,'2016-02-11 22:20:14');
INSERT INTO `uniqueiddata` VALUES (1000013,'NOT_SET',0,0,'2016-02-12 08:18:49');
INSERT INTO `uniqueiddata` VALUES (1000014,'NOT_SET',0,0,'2016-02-12 08:22:10');
INSERT INTO `uniqueiddata` VALUES (1000015,'NOT_SET',0,0,'2016-02-12 18:54:51');
INSERT INTO `uniqueiddata` VALUES (1000016,'NOT_SET',0,0,'2016-02-12 18:54:51');
INSERT INTO `uniqueiddata` VALUES (1000017,'NOT_SET',0,0,'2016-02-12 18:54:51');
INSERT INTO `uniqueiddata` VALUES (1000018,'NOT_SET',0,0,'2016-02-12 18:54:51');
INSERT INTO `uniqueiddata` VALUES (1000019,'NOT_SET',0,0,'2016-02-12 18:54:51');
INSERT INTO `uniqueiddata` VALUES (1000020,'NOT_SET',0,0,'2016-02-13 11:45:32');
INSERT INTO `uniqueiddata` VALUES (1000021,'NOT_SET',0,0,'2016-02-13 11:45:40');
INSERT INTO `uniqueiddata` VALUES (1000022,'NOT_SET',0,0,'2016-02-13 11:45:43');
INSERT INTO `uniqueiddata` VALUES (1000023,'NOT_SET',0,0,'2016-02-13 11:46:02');
INSERT INTO `uniqueiddata` VALUES (1000024,'NOT_SET',0,0,'2016-02-13 11:46:04');
INSERT INTO `uniqueiddata` VALUES (1000025,'NOT_SET',0,0,'2016-02-13 11:46:06');
INSERT INTO `uniqueiddata` VALUES (1000026,'NOT_SET',0,0,'2016-02-13 11:46:08');
INSERT INTO `uniqueiddata` VALUES (1000027,'NOT_SET',0,0,'2016-02-13 11:46:10');
INSERT INTO `uniqueiddata` VALUES (1000028,'NOT_SET',0,0,'2016-02-13 11:50:06');
INSERT INTO `uniqueiddata` VALUES (1000029,'NOT_SET',0,0,'2016-02-13 11:51:25');
INSERT INTO `uniqueiddata` VALUES (1000030,'NOT_SET',0,0,'2016-02-13 11:55:58');
INSERT INTO `uniqueiddata` VALUES (1000031,'NOT_SET',0,0,'2016-02-13 11:56:02');
INSERT INTO `uniqueiddata` VALUES (1000032,'NOT_SET',0,0,'2016-02-13 11:56:05');
INSERT INTO `uniqueiddata` VALUES (1000033,'NOT_SET',0,0,'2016-02-13 11:56:08');
INSERT INTO `uniqueiddata` VALUES (1000034,'NOT_SET',0,0,'2016-02-13 11:56:11');
INSERT INTO `uniqueiddata` VALUES (1000035,'NOT_SET',0,0,'2016-02-13 11:56:17');
INSERT INTO `uniqueiddata` VALUES (1000036,'NOT_SET',0,0,'2016-02-13 11:57:24');
INSERT INTO `uniqueiddata` VALUES (1000037,'NOT_SET',0,0,'2016-02-13 11:57:27');
INSERT INTO `uniqueiddata` VALUES (1000038,'NOT_SET',0,0,'2016-02-13 11:57:28');
INSERT INTO `uniqueiddata` VALUES (1000039,'NOT_SET',0,0,'2016-02-13 11:57:29');
INSERT INTO `uniqueiddata` VALUES (1000040,'NOT_SET',0,0,'2016-02-13 11:57:30');
INSERT INTO `uniqueiddata` VALUES (1000041,'NOT_SET',0,0,'2016-02-13 11:57:31');
INSERT INTO `uniqueiddata` VALUES (1000042,'NOT_SET',0,0,'2016-02-13 11:57:34');
INSERT INTO `uniqueiddata` VALUES (1000043,'NOT_SET',0,0,'2016-02-13 11:57:36');
INSERT INTO `uniqueiddata` VALUES (1000044,'NOT_SET',0,0,'2016-02-13 11:57:37');
INSERT INTO `uniqueiddata` VALUES (1000045,'NOT_SET',0,0,'2016-02-13 11:57:38');
INSERT INTO `uniqueiddata` VALUES (1000046,'NOT_SET',0,0,'2016-02-13 11:57:39');
INSERT INTO `uniqueiddata` VALUES (1000047,'NOT_SET',0,0,'2016-02-13 11:57:40');
INSERT INTO `uniqueiddata` VALUES (1000048,'NOT_SET',0,0,'2016-02-13 11:57:41');
INSERT INTO `uniqueiddata` VALUES (1000049,'NOT_SET',0,0,'2016-02-13 11:57:42');
INSERT INTO `uniqueiddata` VALUES (1000050,'NOT_SET',0,0,'2016-02-13 11:57:44');
INSERT INTO `uniqueiddata` VALUES (1000051,'NOT_SET',0,0,'2016-02-13 11:57:47');
INSERT INTO `uniqueiddata` VALUES (1000052,'NOT_SET',0,0,'2016-02-13 11:57:50');
INSERT INTO `uniqueiddata` VALUES (1000053,'NOT_SET',0,0,'2016-02-13 11:57:52');
INSERT INTO `uniqueiddata` VALUES (1000054,'NOT_SET',0,0,'2016-02-13 11:57:55');
INSERT INTO `uniqueiddata` VALUES (1000055,'NOT_SET',0,0,'2016-02-13 11:57:57');
INSERT INTO `uniqueiddata` VALUES (1000056,'NOT_SET',0,0,'2016-02-13 11:57:57');
INSERT INTO `uniqueiddata` VALUES (1000057,'NOT_SET',0,0,'2016-02-13 11:58:00');
INSERT INTO `uniqueiddata` VALUES (1000058,'NOT_SET',0,0,'2016-02-13 11:58:00');
INSERT INTO `uniqueiddata` VALUES (1000059,'NOT_SET',0,0,'2016-02-13 11:58:02');
INSERT INTO `uniqueiddata` VALUES (1000060,'NOT_SET',0,0,'2016-02-13 11:58:02');
INSERT INTO `uniqueiddata` VALUES (1000061,'NOT_SET',0,0,'2016-02-13 13:03:07');
INSERT INTO `uniqueiddata` VALUES (1000062,'NOT_SET',0,0,'2016-02-13 13:03:07');
INSERT INTO `uniqueiddata` VALUES (1000063,'NOT_SET',0,0,'2016-02-13 13:03:51');
INSERT INTO `uniqueiddata` VALUES (1000064,'NOT_SET',0,0,'2016-02-13 13:03:51');
INSERT INTO `uniqueiddata` VALUES (1000065,'NOT_SET',0,0,'2016-02-13 13:04:03');
INSERT INTO `uniqueiddata` VALUES (1000066,'NOT_SET',0,0,'2016-02-13 13:04:07');
INSERT INTO `uniqueiddata` VALUES (1000067,'NOT_SET',0,0,'2016-02-13 13:04:20');
INSERT INTO `uniqueiddata` VALUES (1000068,'NOT_SET',0,0,'2016-02-13 13:04:41');
INSERT INTO `uniqueiddata` VALUES (1000069,'NOT_SET',0,0,'2016-02-15 11:43:46');
INSERT INTO `uniqueiddata` VALUES (1000070,'NOT_SET',0,0,'2016-02-15 11:43:46');
INSERT INTO `uniqueiddata` VALUES (1000071,'NOT_SET',0,0,'2016-02-15 11:43:46');
INSERT INTO `uniqueiddata` VALUES (1000072,'NOT_SET',0,0,'2016-02-15 11:43:46');
INSERT INTO `uniqueiddata` VALUES (1000073,'NOT_SET',0,0,'2016-02-15 11:43:46');
INSERT INTO `uniqueiddata` VALUES (1000074,'NOT_SET',0,0,'2016-02-15 12:12:37');
INSERT INTO `uniqueiddata` VALUES (1000075,'NOT_SET',0,0,'2016-02-15 12:12:37');
INSERT INTO `uniqueiddata` VALUES (1000076,'NOT_SET',0,0,'2016-02-15 12:12:37');
INSERT INTO `uniqueiddata` VALUES (1000077,'NOT_SET',0,0,'2016-02-15 12:12:37');
INSERT INTO `uniqueiddata` VALUES (1000078,'NOT_SET',0,0,'2016-02-15 12:12:37');
INSERT INTO `uniqueiddata` VALUES (1000079,'NOT_SET',0,0,'2016-02-15 13:19:52');
INSERT INTO `uniqueiddata` VALUES (1000080,'NOT_SET',0,0,'2016-02-15 13:22:50');
INSERT INTO `uniqueiddata` VALUES (1000081,'NOT_SET',0,0,'2016-02-15 13:28:08');
INSERT INTO `uniqueiddata` VALUES (1000082,'NOT_SET',0,0,'2016-02-15 13:31:52');
INSERT INTO `uniqueiddata` VALUES (1000083,'NOT_SET',0,0,'2016-02-15 13:33:42');
INSERT INTO `uniqueiddata` VALUES (1000084,'NOT_SET',0,0,'2016-02-15 13:35:28');
INSERT INTO `uniqueiddata` VALUES (1000085,'NOT_SET',0,0,'2016-02-15 13:50:28');
INSERT INTO `uniqueiddata` VALUES (1000086,'NOT_SET',0,0,'2016-02-15 14:28:11');
INSERT INTO `uniqueiddata` VALUES (1000087,'NOT_SET',0,0,'2016-02-15 14:28:21');
INSERT INTO `uniqueiddata` VALUES (1000088,'NOT_SET',0,0,'2016-02-15 14:28:25');
INSERT INTO `uniqueiddata` VALUES (1000089,'NOT_SET',0,0,'2016-02-15 14:28:26');
INSERT INTO `uniqueiddata` VALUES (1000090,'NOT_SET',0,0,'2016-02-15 14:28:26');
INSERT INTO `uniqueiddata` VALUES (1000091,'NOT_SET',0,0,'2016-02-15 14:28:27');
INSERT INTO `uniqueiddata` VALUES (1000092,'NOT_SET',0,0,'2016-02-15 14:28:27');
INSERT INTO `uniqueiddata` VALUES (1000093,'NOT_SET',0,0,'2016-02-15 14:28:35');
INSERT INTO `uniqueiddata` VALUES (1000094,'NOT_SET',0,0,'2016-02-15 14:40:54');
INSERT INTO `uniqueiddata` VALUES (1000095,'NOT_SET',0,0,'2016-02-15 14:42:22');
INSERT INTO `uniqueiddata` VALUES (1000096,'NOT_SET',0,0,'2016-02-15 14:44:54');
INSERT INTO `uniqueiddata` VALUES (1000097,'NOT_SET',0,0,'2016-02-15 14:50:58');
INSERT INTO `uniqueiddata` VALUES (1000098,'NOT_SET',0,0,'2016-02-15 14:51:00');
INSERT INTO `uniqueiddata` VALUES (1000099,'NOT_SET',0,0,'2016-02-15 14:51:02');
INSERT INTO `uniqueiddata` VALUES (1000100,'NOT_SET',0,0,'2016-02-15 14:51:02');
INSERT INTO `uniqueiddata` VALUES (1000101,'NOT_SET',0,0,'2016-02-15 14:51:15');
INSERT INTO `uniqueiddata` VALUES (1000102,'NOT_SET',0,0,'2016-02-15 14:51:17');
INSERT INTO `uniqueiddata` VALUES (1000103,'NOT_SET',0,0,'2016-02-15 14:51:18');
INSERT INTO `uniqueiddata` VALUES (1000104,'NOT_SET',0,0,'2016-02-15 14:51:19');
INSERT INTO `uniqueiddata` VALUES (1000105,'NOT_SET',0,0,'2016-02-15 14:51:19');
INSERT INTO `uniqueiddata` VALUES (1000106,'NOT_SET',0,0,'2016-02-15 14:51:20');
INSERT INTO `uniqueiddata` VALUES (1000107,'NOT_SET',0,0,'2016-02-15 14:51:20');
INSERT INTO `uniqueiddata` VALUES (1000108,'NOT_SET',0,0,'2016-02-15 14:51:21');
INSERT INTO `uniqueiddata` VALUES (1000109,'NOT_SET',0,0,'2016-02-15 14:51:21');
INSERT INTO `uniqueiddata` VALUES (1000110,'NOT_SET',0,0,'2016-02-15 14:51:22');
INSERT INTO `uniqueiddata` VALUES (1000111,'NOT_SET',0,0,'2016-02-15 14:51:23');
INSERT INTO `uniqueiddata` VALUES (1000112,'NOT_SET',0,0,'2016-02-15 14:51:24');
INSERT INTO `uniqueiddata` VALUES (1000113,'NOT_SET',0,0,'2016-02-15 14:51:25');
INSERT INTO `uniqueiddata` VALUES (1000114,'NOT_SET',0,0,'2016-02-15 14:51:26');
INSERT INTO `uniqueiddata` VALUES (1000115,'NOT_SET',0,0,'2016-02-15 14:51:26');
INSERT INTO `uniqueiddata` VALUES (1000116,'NOT_SET',0,0,'2016-02-15 14:51:27');
INSERT INTO `uniqueiddata` VALUES (1000117,'NOT_SET',0,0,'2016-02-15 14:51:28');
INSERT INTO `uniqueiddata` VALUES (1000118,'NOT_SET',0,0,'2016-02-15 14:51:29');
INSERT INTO `uniqueiddata` VALUES (1000119,'NOT_SET',0,0,'2016-02-15 14:51:29');
INSERT INTO `uniqueiddata` VALUES (1000120,'NOT_SET',0,0,'2016-02-15 14:51:30');
INSERT INTO `uniqueiddata` VALUES (1000121,'NOT_SET',0,0,'2016-02-15 14:51:31');
INSERT INTO `uniqueiddata` VALUES (1000122,'NOT_SET',0,0,'2016-02-15 14:51:31');
INSERT INTO `uniqueiddata` VALUES (1000123,'NOT_SET',0,0,'2016-02-15 14:51:31');
INSERT INTO `uniqueiddata` VALUES (1000124,'NOT_SET',0,0,'2016-02-15 14:51:32');
INSERT INTO `uniqueiddata` VALUES (1000125,'NOT_SET',0,0,'2016-02-15 14:51:32');
INSERT INTO `uniqueiddata` VALUES (1000126,'NOT_SET',0,0,'2016-02-15 14:51:33');
INSERT INTO `uniqueiddata` VALUES (1000127,'NOT_SET',0,0,'2016-02-15 14:51:33');
INSERT INTO `uniqueiddata` VALUES (1000128,'NOT_SET',0,0,'2016-02-15 14:52:22');
INSERT INTO `uniqueiddata` VALUES (1000129,'NOT_SET',0,0,'2016-02-15 14:52:22');
INSERT INTO `uniqueiddata` VALUES (1000130,'NOT_SET',0,0,'2016-02-15 14:52:39');
INSERT INTO `uniqueiddata` VALUES (1000131,'NOT_SET',0,0,'2016-02-15 14:52:39');
INSERT INTO `uniqueiddata` VALUES (1000132,'NOT_SET',0,0,'2016-02-15 15:09:49');
INSERT INTO `uniqueiddata` VALUES (1000133,'NOT_SET',0,0,'2016-02-15 15:09:56');
INSERT INTO `uniqueiddata` VALUES (1000134,'NOT_SET',0,0,'2016-02-15 15:10:05');
INSERT INTO `uniqueiddata` VALUES (1000135,'NOT_SET',0,0,'2016-02-15 15:10:05');
INSERT INTO `uniqueiddata` VALUES (1000136,'NOT_SET',0,0,'2016-02-15 15:10:14');
INSERT INTO `uniqueiddata` VALUES (1000137,'NOT_SET',0,0,'2016-02-15 15:10:14');
INSERT INTO `uniqueiddata` VALUES (1000138,'NOT_SET',0,0,'2016-02-15 15:10:34');
INSERT INTO `uniqueiddata` VALUES (1000139,'NOT_SET',0,0,'2016-02-15 15:10:34');
INSERT INTO `uniqueiddata` VALUES (1000140,'NOT_SET',0,0,'2016-02-15 15:11:20');
INSERT INTO `uniqueiddata` VALUES (1000141,'NOT_SET',0,0,'2016-02-15 15:11:20');
INSERT INTO `uniqueiddata` VALUES (1000142,'NOT_SET',0,0,'2016-02-15 15:12:49');
INSERT INTO `uniqueiddata` VALUES (1000143,'NOT_SET',0,0,'2016-02-15 15:12:49');
INSERT INTO `uniqueiddata` VALUES (1000144,'NOT_SET',0,0,'2016-02-15 15:14:34');
INSERT INTO `uniqueiddata` VALUES (1000145,'NOT_SET',0,0,'2016-02-15 15:14:34');
INSERT INTO `uniqueiddata` VALUES (1000146,'NOT_SET',0,0,'2016-02-15 15:14:38');
INSERT INTO `uniqueiddata` VALUES (1000147,'NOT_SET',0,0,'2016-02-15 15:14:38');
INSERT INTO `uniqueiddata` VALUES (1000148,'NOT_SET',0,0,'2016-02-15 15:14:41');
INSERT INTO `uniqueiddata` VALUES (1000149,'NOT_SET',0,0,'2016-02-15 15:14:41');
INSERT INTO `uniqueiddata` VALUES (1000150,'NOT_SET',0,0,'2016-02-15 15:14:42');
INSERT INTO `uniqueiddata` VALUES (1000151,'NOT_SET',0,0,'2016-02-15 15:14:42');
INSERT INTO `uniqueiddata` VALUES (1000152,'NOT_SET',0,0,'2016-02-15 15:18:32');
INSERT INTO `uniqueiddata` VALUES (1000153,'NOT_SET',0,0,'2016-02-15 15:18:32');
INSERT INTO `uniqueiddata` VALUES (1000154,'NOT_SET',0,0,'2016-02-15 15:18:47');
INSERT INTO `uniqueiddata` VALUES (1000155,'NOT_SET',0,0,'2016-02-15 15:18:47');
INSERT INTO `uniqueiddata` VALUES (1000156,'NOT_SET',0,0,'2016-02-15 15:18:59');
INSERT INTO `uniqueiddata` VALUES (1000157,'NOT_SET',0,0,'2016-02-15 15:18:59');
INSERT INTO `uniqueiddata` VALUES (1000158,'NOT_SET',0,0,'2016-02-15 15:19:09');
INSERT INTO `uniqueiddata` VALUES (1000159,'NOT_SET',0,0,'2016-02-15 15:19:09');
INSERT INTO `uniqueiddata` VALUES (1000160,'NOT_SET',0,0,'2016-02-15 15:19:10');
INSERT INTO `uniqueiddata` VALUES (1000161,'NOT_SET',0,0,'2016-02-15 15:19:10');
INSERT INTO `uniqueiddata` VALUES (1000162,'NOT_SET',0,0,'2016-02-15 15:20:33');
INSERT INTO `uniqueiddata` VALUES (1000163,'NOT_SET',0,0,'2016-02-15 15:20:33');
INSERT INTO `uniqueiddata` VALUES (1000164,'NOT_SET',0,0,'2016-02-15 15:21:20');
INSERT INTO `uniqueiddata` VALUES (1000165,'NOT_SET',0,0,'2016-02-15 15:21:20');
INSERT INTO `uniqueiddata` VALUES (1000166,'NOT_SET',0,0,'2016-02-15 15:21:46');
INSERT INTO `uniqueiddata` VALUES (1000167,'NOT_SET',0,0,'2016-02-15 15:21:46');
INSERT INTO `uniqueiddata` VALUES (1000168,'NOT_SET',0,0,'2016-02-15 15:23:36');
INSERT INTO `uniqueiddata` VALUES (1000169,'NOT_SET',0,0,'2016-02-15 15:23:36');
INSERT INTO `uniqueiddata` VALUES (1000170,'NOT_SET',0,0,'2016-02-15 15:23:51');
INSERT INTO `uniqueiddata` VALUES (1000171,'NOT_SET',0,0,'2016-02-15 15:23:51');
INSERT INTO `uniqueiddata` VALUES (1000172,'NOT_SET',0,0,'2016-02-15 15:29:44');
INSERT INTO `uniqueiddata` VALUES (1000173,'NOT_SET',0,0,'2016-02-15 15:29:44');
INSERT INTO `uniqueiddata` VALUES (1000174,'NOT_SET',0,0,'2016-02-15 15:29:44');
INSERT INTO `uniqueiddata` VALUES (1000175,'NOT_SET',0,0,'2016-02-15 15:32:11');
INSERT INTO `uniqueiddata` VALUES (1000176,'NOT_SET',0,0,'2016-02-15 15:32:11');
INSERT INTO `uniqueiddata` VALUES (1000177,'NOT_SET',0,0,'2016-02-15 15:32:11');
INSERT INTO `uniqueiddata` VALUES (1000178,'NOT_SET',0,0,'2016-02-15 15:32:24');
INSERT INTO `uniqueiddata` VALUES (1000179,'NOT_SET',0,0,'2016-02-15 15:32:24');
INSERT INTO `uniqueiddata` VALUES (1000180,'NOT_SET',0,0,'2016-02-15 15:32:24');
INSERT INTO `uniqueiddata` VALUES (1000181,'NOT_SET',0,0,'2016-02-15 15:34:55');
INSERT INTO `uniqueiddata` VALUES (1000182,'NOT_SET',0,0,'2016-02-15 15:34:55');
INSERT INTO `uniqueiddata` VALUES (1000183,'NOT_SET',0,0,'2016-02-15 15:34:55');
INSERT INTO `uniqueiddata` VALUES (1000184,'NOT_SET',0,0,'2016-02-15 16:12:30');
INSERT INTO `uniqueiddata` VALUES (1000185,'NOT_SET',0,0,'2016-02-15 16:12:30');
INSERT INTO `uniqueiddata` VALUES (1000186,'NOT_SET',0,0,'2016-02-15 16:12:30');
INSERT INTO `uniqueiddata` VALUES (1000187,'NOT_SET',0,0,'2016-02-15 16:12:44');
INSERT INTO `uniqueiddata` VALUES (1000188,'NOT_SET',0,0,'2016-02-15 16:12:44');
INSERT INTO `uniqueiddata` VALUES (1000189,'NOT_SET',0,0,'2016-02-15 16:12:44');
INSERT INTO `uniqueiddata` VALUES (1000190,'NOT_SET',0,0,'2016-02-15 16:12:45');
INSERT INTO `uniqueiddata` VALUES (1000191,'NOT_SET',0,0,'2016-02-15 16:12:45');
INSERT INTO `uniqueiddata` VALUES (1000192,'NOT_SET',0,0,'2016-02-15 16:12:45');
INSERT INTO `uniqueiddata` VALUES (1000193,'NOT_SET',0,0,'2016-02-15 16:12:46');
INSERT INTO `uniqueiddata` VALUES (1000194,'NOT_SET',0,0,'2016-02-15 16:12:46');
INSERT INTO `uniqueiddata` VALUES (1000195,'NOT_SET',0,0,'2016-02-15 16:12:46');
INSERT INTO `uniqueiddata` VALUES (1000196,'NOT_SET',0,0,'2016-02-15 16:12:46');
INSERT INTO `uniqueiddata` VALUES (1000197,'NOT_SET',0,0,'2016-02-15 16:12:46');
INSERT INTO `uniqueiddata` VALUES (1000198,'NOT_SET',0,0,'2016-02-15 16:12:46');
INSERT INTO `uniqueiddata` VALUES (1000199,'NOT_SET',0,0,'2016-02-15 16:14:50');
INSERT INTO `uniqueiddata` VALUES (1000200,'NOT_SET',0,0,'2016-02-15 16:14:50');
INSERT INTO `uniqueiddata` VALUES (1000201,'NOT_SET',0,0,'2016-02-15 16:14:50');
INSERT INTO `uniqueiddata` VALUES (1000202,'NOT_SET',0,0,'2016-02-15 16:15:03');
INSERT INTO `uniqueiddata` VALUES (1000203,'NOT_SET',0,0,'2016-02-15 16:15:03');
INSERT INTO `uniqueiddata` VALUES (1000204,'NOT_SET',0,0,'2016-02-15 16:15:03');
INSERT INTO `uniqueiddata` VALUES (1000205,'NOT_SET',0,0,'2016-02-15 16:15:11');
INSERT INTO `uniqueiddata` VALUES (1000206,'NOT_SET',0,0,'2016-02-15 16:15:11');
INSERT INTO `uniqueiddata` VALUES (1000207,'NOT_SET',0,0,'2016-02-15 16:15:11');
INSERT INTO `uniqueiddata` VALUES (1000208,'NOT_SET',0,0,'2016-02-15 22:32:45');
INSERT INTO `uniqueiddata` VALUES (1000209,'NOT_SET',0,0,'2016-02-15 22:32:45');
INSERT INTO `uniqueiddata` VALUES (1000210,'NOT_SET',0,0,'2016-02-15 22:32:45');
INSERT INTO `uniqueiddata` VALUES (1000211,'NOT_SET',0,0,'2016-02-15 22:32:45');
INSERT INTO `uniqueiddata` VALUES (1000212,'NOT_SET',0,0,'2016-02-15 22:32:45');
INSERT INTO `uniqueiddata` VALUES (1000213,'NOT_SET',0,0,'2016-02-15 22:34:23');
INSERT INTO `uniqueiddata` VALUES (1000214,'NOT_SET',0,0,'2016-02-15 23:11:20');
INSERT INTO `uniqueiddata` VALUES (1000215,'NOT_SET',0,0,'2016-02-15 23:11:20');
INSERT INTO `uniqueiddata` VALUES (1000216,'NOT_SET',0,0,'2016-02-15 23:11:20');
INSERT INTO `uniqueiddata` VALUES (1000217,'NOT_SET',0,0,'2016-02-15 23:11:20');
INSERT INTO `uniqueiddata` VALUES (1000218,'NOT_SET',0,0,'2016-02-15 23:11:20');
INSERT INTO `uniqueiddata` VALUES (1000219,'NOT_SET',0,0,'2016-02-15 23:16:58');
INSERT INTO `uniqueiddata` VALUES (1000220,'NOT_SET',0,0,'2016-02-16 19:00:04');
INSERT INTO `uniqueiddata` VALUES (1000221,'NOT_SET',0,0,'2016-02-16 19:03:23');
INSERT INTO `uniqueiddata` VALUES (1000222,'NOT_SET',0,0,'2016-02-16 19:06:00');
INSERT INTO `uniqueiddata` VALUES (1000223,'NOT_SET',0,0,'2016-02-16 19:11:54');
INSERT INTO `uniqueiddata` VALUES (1000224,'NOT_SET',0,0,'2016-02-16 19:14:18');
INSERT INTO `uniqueiddata` VALUES (1000225,'NOT_SET',0,0,'2016-02-16 19:22:28');
INSERT INTO `uniqueiddata` VALUES (1000226,'NOT_SET',0,0,'2016-02-16 21:43:08');
INSERT INTO `uniqueiddata` VALUES (1000227,'NOT_SET',0,0,'2016-02-16 21:44:28');
INSERT INTO `uniqueiddata` VALUES (1000228,'NOT_SET',0,0,'2016-02-16 21:46:22');
INSERT INTO `uniqueiddata` VALUES (1000229,'NOT_SET',0,0,'2016-02-16 21:46:52');
INSERT INTO `uniqueiddata` VALUES (1000230,'NOT_SET',0,0,'2016-02-16 21:47:53');
INSERT INTO `uniqueiddata` VALUES (1000231,'NOT_SET',0,0,'2016-02-16 21:48:12');
INSERT INTO `uniqueiddata` VALUES (1000232,'NOT_SET',0,0,'2016-02-16 21:48:59');
INSERT INTO `uniqueiddata` VALUES (1000233,'NOT_SET',0,0,'2016-02-16 21:49:38');
INSERT INTO `uniqueiddata` VALUES (1000234,'NOT_SET',0,0,'2016-02-16 21:51:07');
INSERT INTO `uniqueiddata` VALUES (1000235,'NOT_SET',0,0,'2016-02-16 21:51:19');
INSERT INTO `uniqueiddata` VALUES (1000236,'NOT_SET',0,0,'2016-02-16 21:57:09');
INSERT INTO `uniqueiddata` VALUES (1000237,'NOT_SET',0,0,'2016-02-16 22:12:34');
INSERT INTO `uniqueiddata` VALUES (1000238,'NOT_SET',0,0,'2016-02-16 22:12:45');
INSERT INTO `uniqueiddata` VALUES (1000239,'NOT_SET',0,0,'2016-02-16 22:13:01');
INSERT INTO `uniqueiddata` VALUES (1000240,'NOT_SET',0,0,'2016-02-16 22:13:08');
INSERT INTO `uniqueiddata` VALUES (1000241,'NOT_SET',0,0,'2016-02-17 23:58:31');
INSERT INTO `uniqueiddata` VALUES (1000242,'NOT_SET',0,0,'2016-02-17 23:58:38');
INSERT INTO `uniqueiddata` VALUES (1000243,'NOT_SET',0,0,'2016-02-17 23:58:46');
INSERT INTO `uniqueiddata` VALUES (1000244,'NOT_SET',0,0,'2016-02-18 00:00:21');
INSERT INTO `uniqueiddata` VALUES (1000245,'NOT_SET',0,0,'2016-02-18 00:02:48');
INSERT INTO `uniqueiddata` VALUES (1000246,'NOT_SET',0,0,'2016-02-18 00:05:42');
INSERT INTO `uniqueiddata` VALUES (1000247,'NOT_SET',0,0,'2016-02-18 00:06:33');
INSERT INTO `uniqueiddata` VALUES (1000248,'NOT_SET',0,0,'2016-02-18 00:11:51');
INSERT INTO `uniqueiddata` VALUES (1000249,'NOT_SET',0,0,'2016-02-18 00:15:13');
INSERT INTO `uniqueiddata` VALUES (1000250,'NOT_SET',0,0,'2016-02-18 00:20:42');
INSERT INTO `uniqueiddata` VALUES (1000251,'NOT_SET',0,0,'2016-02-18 00:22:35');
INSERT INTO `uniqueiddata` VALUES (1000252,'NOT_SET',0,0,'2016-02-18 00:29:39');
INSERT INTO `uniqueiddata` VALUES (1000253,'NOT_SET',0,0,'2016-02-18 00:34:22');
INSERT INTO `uniqueiddata` VALUES (1000254,'NOT_SET',0,0,'2016-02-18 00:35:05');
INSERT INTO `uniqueiddata` VALUES (1000255,'NOT_SET',0,0,'2016-02-18 00:35:10');
INSERT INTO `uniqueiddata` VALUES (1000256,'NOT_SET',0,0,'2016-02-18 00:35:14');
INSERT INTO `uniqueiddata` VALUES (1000257,'NOT_SET',0,0,'2016-02-18 00:35:17');
INSERT INTO `uniqueiddata` VALUES (1000258,'NOT_SET',0,0,'2016-02-18 00:35:22');
INSERT INTO `uniqueiddata` VALUES (1000259,'NOT_SET',0,0,'2016-02-18 00:35:27');
INSERT INTO `uniqueiddata` VALUES (1000260,'NOT_SET',0,0,'2016-02-18 00:35:37');
INSERT INTO `uniqueiddata` VALUES (1000261,'NOT_SET',0,0,'2016-02-18 00:36:37');
INSERT INTO `uniqueiddata` VALUES (1000262,'NOT_SET',0,0,'2016-02-18 00:36:48');
INSERT INTO `uniqueiddata` VALUES (1000263,'NOT_SET',0,0,'2016-02-18 00:36:53');
INSERT INTO `uniqueiddata` VALUES (1000264,'NOT_SET',0,0,'2016-02-18 00:36:57');
INSERT INTO `uniqueiddata` VALUES (1000265,'NOT_SET',0,0,'2016-02-18 00:37:01');
INSERT INTO `uniqueiddata` VALUES (1000266,'NOT_SET',0,0,'2016-02-18 00:37:05');
INSERT INTO `uniqueiddata` VALUES (1000267,'NOT_SET',0,0,'2016-02-18 00:37:07');
INSERT INTO `uniqueiddata` VALUES (1000268,'NOT_SET',0,0,'2016-02-18 00:37:20');
INSERT INTO `uniqueiddata` VALUES (1000269,'NOT_SET',0,0,'2016-02-18 00:41:21');
INSERT INTO `uniqueiddata` VALUES (1000270,'NOT_SET',0,0,'2016-02-18 00:41:55');
INSERT INTO `uniqueiddata` VALUES (1000271,'NOT_SET',0,0,'2016-02-18 00:42:00');
INSERT INTO `uniqueiddata` VALUES (1000272,'NOT_SET',0,0,'2016-02-18 00:42:03');
INSERT INTO `uniqueiddata` VALUES (1000273,'NOT_SET',0,0,'2016-02-18 00:42:09');
INSERT INTO `uniqueiddata` VALUES (1000274,'NOT_SET',0,0,'2016-02-18 00:43:13');
INSERT INTO `uniqueiddata` VALUES (1000275,'NOT_SET',0,0,'2016-02-18 00:43:18');
INSERT INTO `uniqueiddata` VALUES (1000276,'NOT_SET',0,0,'2016-02-18 00:44:32');
INSERT INTO `uniqueiddata` VALUES (1000277,'NOT_SET',0,0,'2016-02-18 00:45:24');
INSERT INTO `uniqueiddata` VALUES (1000278,'NOT_SET',0,0,'2016-02-18 17:38:42');
INSERT INTO `uniqueiddata` VALUES (1000279,'NOT_SET',0,0,'2016-02-18 17:38:50');
INSERT INTO `uniqueiddata` VALUES (1000280,'NOT_SET',0,0,'2016-02-18 17:38:59');
INSERT INTO `uniqueiddata` VALUES (1000281,'NOT_SET',0,0,'2016-02-18 17:39:04');
INSERT INTO `uniqueiddata` VALUES (1000282,'NOT_SET',0,0,'2016-02-18 17:39:12');
INSERT INTO `uniqueiddata` VALUES (1000283,'NOT_SET',0,0,'2016-02-18 17:39:21');
INSERT INTO `uniqueiddata` VALUES (1000284,'NOT_SET',0,0,'2016-02-18 17:39:37');
INSERT INTO `uniqueiddata` VALUES (1000285,'NOT_SET',0,0,'2016-02-18 17:39:55');
INSERT INTO `uniqueiddata` VALUES (1000286,'NOT_SET',0,0,'2016-02-18 17:40:03');
INSERT INTO `uniqueiddata` VALUES (1000287,'NOT_SET',0,0,'2016-02-18 17:40:10');
INSERT INTO `uniqueiddata` VALUES (1000288,'NOT_SET',0,0,'2016-02-18 17:40:24');
INSERT INTO `uniqueiddata` VALUES (1000289,'NOT_SET',0,0,'2016-02-18 17:40:29');
INSERT INTO `uniqueiddata` VALUES (1000290,'NOT_SET',0,0,'2016-02-18 17:40:32');
INSERT INTO `uniqueiddata` VALUES (1000291,'NOT_SET',0,0,'2016-02-18 17:40:46');
INSERT INTO `uniqueiddata` VALUES (1000292,'NOT_SET',0,0,'2016-02-18 17:41:00');
INSERT INTO `uniqueiddata` VALUES (1000293,'NOT_SET',0,0,'2016-02-18 17:41:09');
INSERT INTO `uniqueiddata` VALUES (1000294,'NOT_SET',0,0,'2016-02-18 17:41:12');
INSERT INTO `uniqueiddata` VALUES (1000295,'NOT_SET',0,0,'2016-02-18 17:41:16');
INSERT INTO `uniqueiddata` VALUES (1000296,'NOT_SET',0,0,'2016-02-18 17:41:44');
INSERT INTO `uniqueiddata` VALUES (1000297,'NOT_SET',0,0,'2016-02-18 17:41:50');
INSERT INTO `uniqueiddata` VALUES (1000298,'NOT_SET',0,0,'2016-02-18 17:41:54');
INSERT INTO `uniqueiddata` VALUES (1000299,'NOT_SET',0,0,'2016-02-18 17:41:58');
INSERT INTO `uniqueiddata` VALUES (1000300,'NOT_SET',0,0,'2016-02-18 17:42:02');
INSERT INTO `uniqueiddata` VALUES (1000301,'NOT_SET',0,0,'2016-02-18 17:42:06');
INSERT INTO `uniqueiddata` VALUES (1000302,'NOT_SET',0,0,'2016-02-18 17:42:11');
INSERT INTO `uniqueiddata` VALUES (1000303,'NOT_SET',0,0,'2016-02-18 17:42:48');
INSERT INTO `uniqueiddata` VALUES (1000304,'NOT_SET',0,0,'2016-02-18 17:42:52');
INSERT INTO `uniqueiddata` VALUES (1000305,'NOT_SET',0,0,'2016-02-18 17:43:05');
INSERT INTO `uniqueiddata` VALUES (1000306,'NOT_SET',0,0,'2016-02-18 17:43:11');
INSERT INTO `uniqueiddata` VALUES (1000307,'NOT_SET',0,0,'2016-02-18 17:43:28');
INSERT INTO `uniqueiddata` VALUES (1000308,'NOT_SET',0,0,'2016-02-18 17:43:38');
INSERT INTO `uniqueiddata` VALUES (1000309,'NOT_SET',0,0,'2016-02-18 17:43:45');
INSERT INTO `uniqueiddata` VALUES (1000310,'NOT_SET',0,0,'2016-02-18 17:43:47');
INSERT INTO `uniqueiddata` VALUES (1000311,'NOT_SET',0,0,'2016-02-18 17:43:52');
INSERT INTO `uniqueiddata` VALUES (1000312,'NOT_SET',0,0,'2016-02-18 17:43:57');
INSERT INTO `uniqueiddata` VALUES (1000313,'NOT_SET',0,0,'2016-02-18 17:44:03');
INSERT INTO `uniqueiddata` VALUES (1000314,'NOT_SET',0,0,'2016-02-18 17:44:10');
INSERT INTO `uniqueiddata` VALUES (1000315,'NOT_SET',0,0,'2016-02-18 17:44:13');
INSERT INTO `uniqueiddata` VALUES (1000316,'NOT_SET',0,0,'2016-02-18 17:44:17');
INSERT INTO `uniqueiddata` VALUES (1000317,'NOT_SET',0,0,'2016-02-18 17:44:20');
INSERT INTO `uniqueiddata` VALUES (1000318,'NOT_SET',0,0,'2016-02-18 17:44:29');
INSERT INTO `uniqueiddata` VALUES (1000319,'NOT_SET',0,0,'2016-02-18 17:46:36');
INSERT INTO `uniqueiddata` VALUES (1000320,'NOT_SET',0,0,'2016-02-18 17:46:46');
INSERT INTO `uniqueiddata` VALUES (1000321,'NOT_SET',0,0,'2016-02-18 17:50:52');
INSERT INTO `uniqueiddata` VALUES (1000322,'NOT_SET',0,0,'2016-02-18 17:50:59');
INSERT INTO `uniqueiddata` VALUES (1000323,'NOT_SET',0,0,'2016-02-18 20:27:42');
INSERT INTO `uniqueiddata` VALUES (1000324,'NOT_SET',0,0,'2016-02-18 20:28:24');
INSERT INTO `uniqueiddata` VALUES (1000325,'NOT_SET',0,0,'2016-02-18 20:28:41');
INSERT INTO `uniqueiddata` VALUES (1000326,'NOT_SET',0,0,'2016-02-18 20:30:27');
INSERT INTO `uniqueiddata` VALUES (1000327,'NOT_SET',0,0,'2016-02-18 22:45:38');
INSERT INTO `uniqueiddata` VALUES (1000328,'NOT_SET',0,0,'2016-02-18 22:46:11');
INSERT INTO `uniqueiddata` VALUES (1000329,'NOT_SET',0,0,'2016-02-18 22:47:38');
INSERT INTO `uniqueiddata` VALUES (1000330,'NOT_SET',0,0,'2016-02-18 22:47:50');
INSERT INTO `uniqueiddata` VALUES (1000331,'NOT_SET',0,0,'2016-06-02 21:29:07');
INSERT INTO `uniqueiddata` VALUES (1000332,'NOT_SET',0,0,'2016-06-02 21:29:07');
INSERT INTO `uniqueiddata` VALUES (1000333,'NOT_SET',0,0,'2016-06-02 21:29:07');
INSERT INTO `uniqueiddata` VALUES (1000334,'NOT_SET',0,0,'2016-06-02 21:29:07');
INSERT INTO `uniqueiddata` VALUES (1000335,'NOT_SET',0,0,'2016-06-02 21:29:07');
INSERT INTO `uniqueiddata` VALUES (1000336,'NOT_SET',0,0,'2016-06-02 21:31:00');
INSERT INTO `uniqueiddata` VALUES (1000337,'NOT_SET',0,0,'2016-06-07 09:43:05');
INSERT INTO `uniqueiddata` VALUES (1000338,'NOT_SET',0,0,'2016-06-07 09:44:38');
INSERT INTO `uniqueiddata` VALUES (1000339,'NOT_SET',0,0,'2016-06-07 09:46:36');
INSERT INTO `uniqueiddata` VALUES (1000340,'NOT_SET',0,0,'2016-06-07 10:04:57');
INSERT INTO `uniqueiddata` VALUES (1000341,'NOT_SET',0,0,'2016-06-12 12:38:23');
INSERT INTO `uniqueiddata` VALUES (1000342,'NOT_SET',0,0,'2016-06-12 12:38:23');
INSERT INTO `uniqueiddata` VALUES (1000343,'NOT_SET',0,0,'2016-06-12 12:38:23');
INSERT INTO `uniqueiddata` VALUES (1000344,'NOT_SET',0,0,'2016-06-12 12:38:23');
INSERT INTO `uniqueiddata` VALUES (1000345,'NOT_SET',0,0,'2016-06-12 12:38:23');
INSERT INTO `uniqueiddata` VALUES (1000346,'NOT_SET',0,0,'2016-06-12 14:09:36');
INSERT INTO `uniqueiddata` VALUES (1000347,'NOT_SET',0,0,'2016-06-12 14:09:36');
INSERT INTO `uniqueiddata` VALUES (1000348,'NOT_SET',0,0,'2016-06-12 14:09:36');
INSERT INTO `uniqueiddata` VALUES (1000349,'NOT_SET',0,0,'2016-06-12 14:09:36');
INSERT INTO `uniqueiddata` VALUES (1000350,'NOT_SET',0,0,'2016-06-12 14:09:36');
INSERT INTO `uniqueiddata` VALUES (1000351,'NOT_SET',0,0,'2016-06-12 14:14:55');
INSERT INTO `uniqueiddata` VALUES (1000352,'NOT_SET',0,0,'2016-06-14 10:55:22');
INSERT INTO `uniqueiddata` VALUES (1000353,'NOT_SET',0,0,'2016-06-14 10:55:22');
INSERT INTO `uniqueiddata` VALUES (1000354,'NOT_SET',0,0,'2016-06-14 10:55:22');
INSERT INTO `uniqueiddata` VALUES (1000355,'NOT_SET',0,0,'2016-06-14 10:55:22');
INSERT INTO `uniqueiddata` VALUES (1000356,'NOT_SET',0,0,'2016-06-14 10:55:22');
INSERT INTO `uniqueiddata` VALUES (1000357,'NOT_SET',0,0,'2016-06-14 10:57:31');
INSERT INTO `uniqueiddata` VALUES (1000358,'NOT_SET',0,0,'2016-06-24 17:11:46');
INSERT INTO `uniqueiddata` VALUES (1000359,'NOT_SET',0,0,'2016-06-24 17:11:46');
INSERT INTO `uniqueiddata` VALUES (1000360,'NOT_SET',0,0,'2016-06-24 17:11:46');
INSERT INTO `uniqueiddata` VALUES (1000361,'NOT_SET',0,0,'2016-06-24 17:11:46');
INSERT INTO `uniqueiddata` VALUES (1000362,'NOT_SET',0,0,'2016-06-24 17:11:46');
INSERT INTO `uniqueiddata` VALUES (1000363,'NOT_SET',0,0,'2016-07-03 23:42:26');
INSERT INTO `uniqueiddata` VALUES (1000364,'NOT_SET',0,0,'2016-07-03 23:42:26');
INSERT INTO `uniqueiddata` VALUES (1000365,'NOT_SET',0,0,'2016-07-03 23:42:26');
INSERT INTO `uniqueiddata` VALUES (1000366,'NOT_SET',0,0,'2016-07-03 23:42:26');
INSERT INTO `uniqueiddata` VALUES (1000367,'NOT_SET',0,0,'2016-07-03 23:42:26');
INSERT INTO `uniqueiddata` VALUES (1000368,'NOT_SET',0,0,'2016-07-03 23:44:12');
INSERT INTO `uniqueiddata` VALUES (1000369,'NOT_SET',0,0,'2016-07-03 23:50:02');
INSERT INTO `uniqueiddata` VALUES (1000370,'NOT_SET',0,0,'2016-07-03 23:50:02');
INSERT INTO `uniqueiddata` VALUES (1000371,'NOT_SET',0,0,'2016-07-03 23:50:02');
INSERT INTO `uniqueiddata` VALUES (1000372,'NOT_SET',0,0,'2016-07-03 23:50:02');
INSERT INTO `uniqueiddata` VALUES (1000373,'NOT_SET',0,0,'2016-07-03 23:50:02');
INSERT INTO `uniqueiddata` VALUES (1000374,'NOT_SET',0,0,'2016-07-05 18:50:51');
INSERT INTO `uniqueiddata` VALUES (1000375,'NOT_SET',0,0,'2016-07-05 23:11:55');
INSERT INTO `uniqueiddata` VALUES (1000376,'NOT_SET',0,0,'2016-07-05 23:11:55');
INSERT INTO `uniqueiddata` VALUES (1000377,'NOT_SET',0,0,'2016-07-05 23:11:55');
INSERT INTO `uniqueiddata` VALUES (1000378,'NOT_SET',0,0,'2016-07-05 23:11:55');
INSERT INTO `uniqueiddata` VALUES (1000379,'NOT_SET',0,0,'2016-07-05 23:11:55');
INSERT INTO `uniqueiddata` VALUES (1000380,'NOT_SET',0,0,'2016-07-05 23:15:14');
INSERT INTO `uniqueiddata` VALUES (1000381,'NOT_SET',0,0,'2016-07-06 08:57:30');
INSERT INTO `uniqueiddata` VALUES (1000382,'NOT_SET',0,0,'2016-07-06 08:57:30');
INSERT INTO `uniqueiddata` VALUES (1000383,'NOT_SET',0,0,'2016-07-06 08:57:30');
INSERT INTO `uniqueiddata` VALUES (1000384,'NOT_SET',0,0,'2016-07-06 08:57:30');
INSERT INTO `uniqueiddata` VALUES (1000385,'NOT_SET',0,0,'2016-07-06 08:57:30');
INSERT INTO `uniqueiddata` VALUES (1000386,'NOT_SET',0,0,'2016-07-06 08:58:55');
INSERT INTO `uniqueiddata` VALUES (1000387,'NOT_SET',0,0,'2016-07-06 14:24:09');
INSERT INTO `uniqueiddata` VALUES (1000388,'NOT_SET',0,0,'2016-07-06 14:24:09');
INSERT INTO `uniqueiddata` VALUES (1000389,'NOT_SET',0,0,'2016-07-06 14:24:09');
INSERT INTO `uniqueiddata` VALUES (1000390,'NOT_SET',0,0,'2016-07-06 14:24:09');
INSERT INTO `uniqueiddata` VALUES (1000391,'NOT_SET',0,0,'2016-07-06 14:24:09');
INSERT INTO `uniqueiddata` VALUES (1000392,'NOT_SET',0,0,'2016-07-06 14:25:57');
INSERT INTO `uniqueiddata` VALUES (1000393,'NOT_SET',0,0,'2016-07-07 01:23:56');
INSERT INTO `uniqueiddata` VALUES (1000394,'NOT_SET',0,0,'2016-07-07 01:23:56');
INSERT INTO `uniqueiddata` VALUES (1000395,'NOT_SET',0,0,'2016-07-07 01:23:56');
INSERT INTO `uniqueiddata` VALUES (1000396,'NOT_SET',0,0,'2016-07-07 01:23:56');
INSERT INTO `uniqueiddata` VALUES (1000397,'NOT_SET',0,0,'2016-07-07 01:23:56');
INSERT INTO `uniqueiddata` VALUES (1000398,'NOT_SET',0,0,'2016-07-07 01:45:10');
INSERT INTO `uniqueiddata` VALUES (1000399,'NOT_SET',0,0,'2016-07-07 01:51:59');
INSERT INTO `uniqueiddata` VALUES (1000400,'NOT_SET',0,0,'2016-07-07 01:51:59');
INSERT INTO `uniqueiddata` VALUES (1000401,'NOT_SET',0,0,'2016-07-07 01:51:59');
INSERT INTO `uniqueiddata` VALUES (1000402,'NOT_SET',0,0,'2016-07-07 01:51:59');
INSERT INTO `uniqueiddata` VALUES (1000403,'NOT_SET',0,0,'2016-07-07 01:51:59');
INSERT INTO `uniqueiddata` VALUES (1000404,'NOT_SET',0,0,'2016-07-07 01:53:28');
INSERT INTO `uniqueiddata` VALUES (1000405,'NOT_SET',0,0,'2016-07-08 01:21:37');
INSERT INTO `uniqueiddata` VALUES (1000406,'NOT_SET',0,0,'2016-07-08 01:21:37');
INSERT INTO `uniqueiddata` VALUES (1000407,'NOT_SET',0,0,'2016-07-08 01:21:37');
INSERT INTO `uniqueiddata` VALUES (1000408,'NOT_SET',0,0,'2016-07-08 01:21:37');
INSERT INTO `uniqueiddata` VALUES (1000409,'NOT_SET',0,0,'2016-07-08 01:21:37');
INSERT INTO `uniqueiddata` VALUES (1000410,'NOT_SET',0,0,'2016-07-08 01:23:17');
INSERT INTO `uniqueiddata` VALUES (1000411,'NOT_SET',0,0,'2016-07-14 10:19:45');
INSERT INTO `uniqueiddata` VALUES (1000412,'NOT_SET',0,0,'2016-07-14 10:19:45');
INSERT INTO `uniqueiddata` VALUES (1000413,'NOT_SET',0,0,'2016-07-14 10:19:45');
INSERT INTO `uniqueiddata` VALUES (1000414,'NOT_SET',0,0,'2016-07-14 10:19:45');
INSERT INTO `uniqueiddata` VALUES (1000415,'NOT_SET',0,0,'2016-07-14 10:19:45');
INSERT INTO `uniqueiddata` VALUES (1000416,'NOT_SET',0,0,'2016-07-14 10:21:22');
INSERT INTO `uniqueiddata` VALUES (1000417,'NOT_SET',0,0,'2016-07-14 13:19:59');
INSERT INTO `uniqueiddata` VALUES (1000418,'NOT_SET',0,0,'2016-07-14 13:19:59');
INSERT INTO `uniqueiddata` VALUES (1000419,'NOT_SET',0,0,'2016-07-14 13:19:59');
INSERT INTO `uniqueiddata` VALUES (1000420,'NOT_SET',0,0,'2016-07-14 13:19:59');
INSERT INTO `uniqueiddata` VALUES (1000421,'NOT_SET',0,0,'2016-07-14 13:19:59');
INSERT INTO `uniqueiddata` VALUES (1000422,'NOT_SET',0,0,'2016-07-14 13:22:36');
INSERT INTO `uniqueiddata` VALUES (1000423,'NOT_SET',0,0,'2016-07-14 13:27:51');
INSERT INTO `uniqueiddata` VALUES (1000424,'NOT_SET',0,0,'2016-07-14 13:27:51');
INSERT INTO `uniqueiddata` VALUES (1000425,'NOT_SET',0,0,'2016-07-14 13:27:51');
INSERT INTO `uniqueiddata` VALUES (1000426,'NOT_SET',0,0,'2016-07-14 13:27:51');
INSERT INTO `uniqueiddata` VALUES (1000427,'NOT_SET',0,0,'2016-07-14 13:27:51');
INSERT INTO `uniqueiddata` VALUES (1000428,'NOT_SET',0,0,'2016-07-14 13:29:27');
INSERT INTO `uniqueiddata` VALUES (1000429,'NOT_SET',0,0,'2016-07-20 16:28:04');
INSERT INTO `uniqueiddata` VALUES (1000430,'NOT_SET',0,0,'2016-07-20 16:28:04');
INSERT INTO `uniqueiddata` VALUES (1000431,'NOT_SET',0,0,'2016-07-20 16:28:04');
INSERT INTO `uniqueiddata` VALUES (1000432,'NOT_SET',0,0,'2016-07-20 16:28:04');
INSERT INTO `uniqueiddata` VALUES (1000433,'NOT_SET',0,0,'2016-07-20 16:28:04');
INSERT INTO `uniqueiddata` VALUES (1000434,'NOT_SET',0,0,'2016-07-20 17:16:05');
INSERT INTO `uniqueiddata` VALUES (1000435,'NOT_SET',0,0,'2016-07-23 20:32:11');
INSERT INTO `uniqueiddata` VALUES (1000436,'NOT_SET',0,0,'2016-07-23 20:32:11');
INSERT INTO `uniqueiddata` VALUES (1000437,'NOT_SET',0,0,'2016-07-23 20:32:11');
INSERT INTO `uniqueiddata` VALUES (1000438,'NOT_SET',0,0,'2016-07-23 20:32:11');
INSERT INTO `uniqueiddata` VALUES (1000439,'NOT_SET',0,0,'2016-07-23 20:32:11');
INSERT INTO `uniqueiddata` VALUES (1000440,'NOT_SET',0,0,'2016-07-23 20:54:37');
INSERT INTO `uniqueiddata` VALUES (1000441,'NOT_SET',0,0,'2016-07-28 20:18:23');
INSERT INTO `uniqueiddata` VALUES (1000442,'NOT_SET',0,0,'2016-07-28 20:18:23');
INSERT INTO `uniqueiddata` VALUES (1000443,'NOT_SET',0,0,'2016-07-28 20:18:23');
INSERT INTO `uniqueiddata` VALUES (1000444,'NOT_SET',0,0,'2016-07-28 20:18:23');
INSERT INTO `uniqueiddata` VALUES (1000445,'NOT_SET',0,0,'2016-07-28 20:18:23');
INSERT INTO `uniqueiddata` VALUES (1000446,'NOT_SET',0,0,'2016-07-28 20:20:56');
/*!40000 ALTER TABLE `uniqueiddata` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:16

27
sql/update.sql Normal file
View file

@ -0,0 +1,27 @@
RENAME TABLE `dbaccounts` TO `accounts`;
RENAME TABLE `dbbattlenpc` TO `battlenpc`;
RENAME TABLE `dbchara` TO `charabase`;
RENAME TABLE `dbcharapcclass` TO `characlass`;
RENAME TABLE `dbcharapc` TO `charadetail`;
RENAME TABLE `dbcharaitems` TO `charaglobalitem`;
RENAME TABLE `dbcharainfoblacklist` TO `charainfoblacklist`;
RENAME TABLE `dbcharainfofriendlist` TO `charainfofriendlist`;
RENAME TABLE `dbcharainfolinkshell` TO `charainfolinkshell`;
RENAME TABLE `dbcharainfoprofile` TO `charainfosearch`;
RENAME TABLE `dbcharaitemcrystal` TO `charaitemcrystal`;
RENAME TABLE `dbcharaitemcurrency` TO `charaitemcurrency`;
RENAME TABLE `dbcharaitemmannequin` TO `charaitemgearset`;
RENAME TABLE `dbcharaitembaggage` TO `charaiteminventory`;
RENAME TABLE `dbcharaquest` TO `charaquest`;
RENAME TABLE `dbdiscoveryref` TO `discoveryinfo`;
RENAME TABLE `dbinfolinkshell` TO `infolinkshell`;
RENAME TABLE `dbuniqueiddata` TO `uniqueiddata`;
RENAME TABLE `dbzonemapping` TO `zonemapping`;
RENAME TABLE `dbzonepositions` TO `zonepositions`;
RENAME TABLE `dbzoneservers` TO `zoneservers`;
ALTER TABLE `charaiteminventory` ADD `container_25` INT(20) NOT NULL AFTER `container_24`, ADD `container_26` INT(20) NOT NULL AFTER `container_25`, ADD `container_27` INT(20) NOT NULL AFTER `container_26`, ADD `container_28` INT(20) NOT NULL AFTER `container_27`, ADD `container_29` INT(20) NOT NULL AFTER `container_28`, ADD `container_30` INT(20) NOT NULL AFTER `container_29`, ADD `container_31` INT(20) NOT NULL AFTER `container_30`, ADD `container_32` INT(20) NOT NULL AFTER `container_31`, ADD `container_33` INT(20) NOT NULL AFTER `container_32`, ADD `container_34` INT(20) NOT NULL AFTER `container_33`;
ALTER TABLE `characlass` ADD `Lv_24` INT(5) NOT NULL DEFAULT '0' AFTER `Exp_23`, ADD `Exp_24` INT(10) NOT NULL DEFAULT '0' AFTER `Lv_24`, ADD `Lv_25` INT(5) NOT NULL DEFAULT '0' AFTER `Exp_24`, ADD `Exp_25` INT(19) NOT NULL DEFAULT '0' AFTER `Lv_25`;
ALTER TABLE `charadetail` CHANGE `Aetheryte` `Aetheryte` BINARY(16) NULL DEFAULT NULL, CHANGE `HowTo` `HowTo` BINARY(33) NULL DEFAULT NULL, CHANGE `Minions` `Minions` BINARY(33) NULL DEFAULT NULL, CHANGE `Mounts` `Mounts` BINARY(13) NULL DEFAULT NULL;

525
sql/zonemapping.sql Normal file
View file

@ -0,0 +1,525 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `zonemapping`
--
DROP TABLE IF EXISTS `zonemapping`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `zonemapping` (
`serverid` int(3) NOT NULL,
`zoneid` int(3) NOT NULL,
`flags` int(19) DEFAULT NULL,
PRIMARY KEY (`zoneid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `zonemapping`
--
LOCK TABLES `zonemapping` WRITE;
/*!40000 ALTER TABLE `zonemapping` DISABLE KEYS */;
INSERT INTO `zonemapping` VALUES (100,1,0);
INSERT INTO `zonemapping` VALUES (100,2,0);
INSERT INTO `zonemapping` VALUES (100,3,0);
INSERT INTO `zonemapping` VALUES (100,4,0);
INSERT INTO `zonemapping` VALUES (100,5,0);
INSERT INTO `zonemapping` VALUES (100,6,0);
INSERT INTO `zonemapping` VALUES (100,7,0);
INSERT INTO `zonemapping` VALUES (100,8,0);
INSERT INTO `zonemapping` VALUES (100,9,0);
INSERT INTO `zonemapping` VALUES (100,10,0);
INSERT INTO `zonemapping` VALUES (100,11,0);
INSERT INTO `zonemapping` VALUES (100,13,0);
INSERT INTO `zonemapping` VALUES (100,14,0);
INSERT INTO `zonemapping` VALUES (100,15,0);
INSERT INTO `zonemapping` VALUES (100,16,0);
INSERT INTO `zonemapping` VALUES (100,17,0);
INSERT INTO `zonemapping` VALUES (100,18,0);
INSERT INTO `zonemapping` VALUES (100,19,0);
INSERT INTO `zonemapping` VALUES (100,20,0);
INSERT INTO `zonemapping` VALUES (100,21,0);
INSERT INTO `zonemapping` VALUES (100,22,0);
INSERT INTO `zonemapping` VALUES (100,24,0);
INSERT INTO `zonemapping` VALUES (100,25,0);
INSERT INTO `zonemapping` VALUES (100,26,0);
INSERT INTO `zonemapping` VALUES (100,27,0);
INSERT INTO `zonemapping` VALUES (100,28,0);
INSERT INTO `zonemapping` VALUES (100,128,0);
INSERT INTO `zonemapping` VALUES (100,129,0);
INSERT INTO `zonemapping` VALUES (100,130,0);
INSERT INTO `zonemapping` VALUES (100,131,0);
INSERT INTO `zonemapping` VALUES (100,132,0);
INSERT INTO `zonemapping` VALUES (100,133,0);
INSERT INTO `zonemapping` VALUES (100,134,0);
INSERT INTO `zonemapping` VALUES (100,135,0);
INSERT INTO `zonemapping` VALUES (100,136,0);
INSERT INTO `zonemapping` VALUES (100,137,0);
INSERT INTO `zonemapping` VALUES (100,138,0);
INSERT INTO `zonemapping` VALUES (100,139,0);
INSERT INTO `zonemapping` VALUES (100,140,0);
INSERT INTO `zonemapping` VALUES (100,141,0);
INSERT INTO `zonemapping` VALUES (100,142,0);
INSERT INTO `zonemapping` VALUES (100,143,0);
INSERT INTO `zonemapping` VALUES (100,144,0);
INSERT INTO `zonemapping` VALUES (100,145,0);
INSERT INTO `zonemapping` VALUES (100,146,0);
INSERT INTO `zonemapping` VALUES (100,147,0);
INSERT INTO `zonemapping` VALUES (100,148,0);
INSERT INTO `zonemapping` VALUES (100,149,0);
INSERT INTO `zonemapping` VALUES (100,150,0);
INSERT INTO `zonemapping` VALUES (100,151,0);
INSERT INTO `zonemapping` VALUES (100,152,0);
INSERT INTO `zonemapping` VALUES (100,153,0);
INSERT INTO `zonemapping` VALUES (100,154,0);
INSERT INTO `zonemapping` VALUES (100,155,0);
INSERT INTO `zonemapping` VALUES (100,156,0);
INSERT INTO `zonemapping` VALUES (100,157,0);
INSERT INTO `zonemapping` VALUES (100,158,0);
INSERT INTO `zonemapping` VALUES (100,159,0);
INSERT INTO `zonemapping` VALUES (100,160,0);
INSERT INTO `zonemapping` VALUES (100,161,0);
INSERT INTO `zonemapping` VALUES (100,162,0);
INSERT INTO `zonemapping` VALUES (100,163,0);
INSERT INTO `zonemapping` VALUES (100,164,0);
INSERT INTO `zonemapping` VALUES (100,166,0);
INSERT INTO `zonemapping` VALUES (100,167,0);
INSERT INTO `zonemapping` VALUES (100,168,0);
INSERT INTO `zonemapping` VALUES (100,169,0);
INSERT INTO `zonemapping` VALUES (100,170,0);
INSERT INTO `zonemapping` VALUES (100,171,0);
INSERT INTO `zonemapping` VALUES (100,172,0);
INSERT INTO `zonemapping` VALUES (100,174,0);
INSERT INTO `zonemapping` VALUES (100,175,0);
INSERT INTO `zonemapping` VALUES (100,176,0);
INSERT INTO `zonemapping` VALUES (100,177,0);
INSERT INTO `zonemapping` VALUES (100,178,0);
INSERT INTO `zonemapping` VALUES (100,179,0);
INSERT INTO `zonemapping` VALUES (100,180,0);
INSERT INTO `zonemapping` VALUES (100,181,0);
INSERT INTO `zonemapping` VALUES (100,182,0);
INSERT INTO `zonemapping` VALUES (100,183,0);
INSERT INTO `zonemapping` VALUES (100,184,0);
INSERT INTO `zonemapping` VALUES (100,185,0);
INSERT INTO `zonemapping` VALUES (100,186,0);
INSERT INTO `zonemapping` VALUES (100,187,0);
INSERT INTO `zonemapping` VALUES (100,188,0);
INSERT INTO `zonemapping` VALUES (100,189,0);
INSERT INTO `zonemapping` VALUES (100,190,0);
INSERT INTO `zonemapping` VALUES (100,191,0);
INSERT INTO `zonemapping` VALUES (100,192,0);
INSERT INTO `zonemapping` VALUES (100,193,0);
INSERT INTO `zonemapping` VALUES (100,194,0);
INSERT INTO `zonemapping` VALUES (100,195,0);
INSERT INTO `zonemapping` VALUES (100,196,0);
INSERT INTO `zonemapping` VALUES (100,197,0);
INSERT INTO `zonemapping` VALUES (100,198,0);
INSERT INTO `zonemapping` VALUES (100,199,0);
INSERT INTO `zonemapping` VALUES (100,200,0);
INSERT INTO `zonemapping` VALUES (100,201,0);
INSERT INTO `zonemapping` VALUES (100,202,0);
INSERT INTO `zonemapping` VALUES (100,203,0);
INSERT INTO `zonemapping` VALUES (100,204,0);
INSERT INTO `zonemapping` VALUES (100,205,0);
INSERT INTO `zonemapping` VALUES (100,206,0);
INSERT INTO `zonemapping` VALUES (100,207,0);
INSERT INTO `zonemapping` VALUES (100,208,0);
INSERT INTO `zonemapping` VALUES (100,209,0);
INSERT INTO `zonemapping` VALUES (100,210,0);
INSERT INTO `zonemapping` VALUES (100,211,0);
INSERT INTO `zonemapping` VALUES (100,212,0);
INSERT INTO `zonemapping` VALUES (100,213,0);
INSERT INTO `zonemapping` VALUES (100,214,0);
INSERT INTO `zonemapping` VALUES (100,215,0);
INSERT INTO `zonemapping` VALUES (100,216,0);
INSERT INTO `zonemapping` VALUES (100,217,0);
INSERT INTO `zonemapping` VALUES (100,218,0);
INSERT INTO `zonemapping` VALUES (100,219,0);
INSERT INTO `zonemapping` VALUES (100,220,0);
INSERT INTO `zonemapping` VALUES (100,221,0);
INSERT INTO `zonemapping` VALUES (100,222,0);
INSERT INTO `zonemapping` VALUES (100,223,0);
INSERT INTO `zonemapping` VALUES (100,224,0);
INSERT INTO `zonemapping` VALUES (100,225,0);
INSERT INTO `zonemapping` VALUES (100,226,0);
INSERT INTO `zonemapping` VALUES (100,227,0);
INSERT INTO `zonemapping` VALUES (100,228,0);
INSERT INTO `zonemapping` VALUES (100,229,0);
INSERT INTO `zonemapping` VALUES (100,230,0);
INSERT INTO `zonemapping` VALUES (100,231,0);
INSERT INTO `zonemapping` VALUES (100,232,0);
INSERT INTO `zonemapping` VALUES (100,233,0);
INSERT INTO `zonemapping` VALUES (100,234,0);
INSERT INTO `zonemapping` VALUES (100,235,0);
INSERT INTO `zonemapping` VALUES (100,236,0);
INSERT INTO `zonemapping` VALUES (100,237,0);
INSERT INTO `zonemapping` VALUES (100,238,0);
INSERT INTO `zonemapping` VALUES (100,239,0);
INSERT INTO `zonemapping` VALUES (100,240,0);
INSERT INTO `zonemapping` VALUES (100,241,0);
INSERT INTO `zonemapping` VALUES (100,242,0);
INSERT INTO `zonemapping` VALUES (100,243,0);
INSERT INTO `zonemapping` VALUES (100,244,0);
INSERT INTO `zonemapping` VALUES (100,245,0);
INSERT INTO `zonemapping` VALUES (100,246,0);
INSERT INTO `zonemapping` VALUES (100,247,0);
INSERT INTO `zonemapping` VALUES (100,248,0);
INSERT INTO `zonemapping` VALUES (100,249,0);
INSERT INTO `zonemapping` VALUES (100,250,0);
INSERT INTO `zonemapping` VALUES (100,251,0);
INSERT INTO `zonemapping` VALUES (100,252,0);
INSERT INTO `zonemapping` VALUES (100,253,0);
INSERT INTO `zonemapping` VALUES (100,254,0);
INSERT INTO `zonemapping` VALUES (100,255,0);
INSERT INTO `zonemapping` VALUES (100,256,0);
INSERT INTO `zonemapping` VALUES (100,257,0);
INSERT INTO `zonemapping` VALUES (100,258,0);
INSERT INTO `zonemapping` VALUES (100,259,0);
INSERT INTO `zonemapping` VALUES (100,260,0);
INSERT INTO `zonemapping` VALUES (100,261,0);
INSERT INTO `zonemapping` VALUES (100,262,0);
INSERT INTO `zonemapping` VALUES (100,263,0);
INSERT INTO `zonemapping` VALUES (100,264,0);
INSERT INTO `zonemapping` VALUES (100,265,0);
INSERT INTO `zonemapping` VALUES (100,266,0);
INSERT INTO `zonemapping` VALUES (100,267,0);
INSERT INTO `zonemapping` VALUES (100,268,0);
INSERT INTO `zonemapping` VALUES (100,269,0);
INSERT INTO `zonemapping` VALUES (100,270,0);
INSERT INTO `zonemapping` VALUES (100,271,0);
INSERT INTO `zonemapping` VALUES (100,272,0);
INSERT INTO `zonemapping` VALUES (100,273,0);
INSERT INTO `zonemapping` VALUES (100,274,0);
INSERT INTO `zonemapping` VALUES (100,275,0);
INSERT INTO `zonemapping` VALUES (100,276,0);
INSERT INTO `zonemapping` VALUES (100,277,0);
INSERT INTO `zonemapping` VALUES (100,278,0);
INSERT INTO `zonemapping` VALUES (100,279,0);
INSERT INTO `zonemapping` VALUES (100,280,0);
INSERT INTO `zonemapping` VALUES (100,281,0);
INSERT INTO `zonemapping` VALUES (100,282,0);
INSERT INTO `zonemapping` VALUES (100,283,0);
INSERT INTO `zonemapping` VALUES (100,284,0);
INSERT INTO `zonemapping` VALUES (100,285,0);
INSERT INTO `zonemapping` VALUES (100,286,0);
INSERT INTO `zonemapping` VALUES (100,287,0);
INSERT INTO `zonemapping` VALUES (100,288,0);
INSERT INTO `zonemapping` VALUES (100,289,0);
INSERT INTO `zonemapping` VALUES (100,290,0);
INSERT INTO `zonemapping` VALUES (100,291,0);
INSERT INTO `zonemapping` VALUES (100,292,0);
INSERT INTO `zonemapping` VALUES (100,293,0);
INSERT INTO `zonemapping` VALUES (100,294,0);
INSERT INTO `zonemapping` VALUES (100,295,0);
INSERT INTO `zonemapping` VALUES (100,296,0);
INSERT INTO `zonemapping` VALUES (100,297,0);
INSERT INTO `zonemapping` VALUES (100,298,0);
INSERT INTO `zonemapping` VALUES (100,299,0);
INSERT INTO `zonemapping` VALUES (100,300,0);
INSERT INTO `zonemapping` VALUES (100,301,0);
INSERT INTO `zonemapping` VALUES (100,302,0);
INSERT INTO `zonemapping` VALUES (100,303,0);
INSERT INTO `zonemapping` VALUES (100,304,0);
INSERT INTO `zonemapping` VALUES (100,305,0);
INSERT INTO `zonemapping` VALUES (100,306,0);
INSERT INTO `zonemapping` VALUES (100,307,0);
INSERT INTO `zonemapping` VALUES (100,308,0);
INSERT INTO `zonemapping` VALUES (100,309,0);
INSERT INTO `zonemapping` VALUES (100,310,0);
INSERT INTO `zonemapping` VALUES (100,311,0);
INSERT INTO `zonemapping` VALUES (100,312,0);
INSERT INTO `zonemapping` VALUES (100,313,0);
INSERT INTO `zonemapping` VALUES (100,314,0);
INSERT INTO `zonemapping` VALUES (100,315,0);
INSERT INTO `zonemapping` VALUES (100,316,0);
INSERT INTO `zonemapping` VALUES (100,317,0);
INSERT INTO `zonemapping` VALUES (100,318,0);
INSERT INTO `zonemapping` VALUES (100,319,0);
INSERT INTO `zonemapping` VALUES (100,320,0);
INSERT INTO `zonemapping` VALUES (100,321,0);
INSERT INTO `zonemapping` VALUES (100,322,0);
INSERT INTO `zonemapping` VALUES (100,323,0);
INSERT INTO `zonemapping` VALUES (100,324,0);
INSERT INTO `zonemapping` VALUES (100,325,0);
INSERT INTO `zonemapping` VALUES (100,326,0);
INSERT INTO `zonemapping` VALUES (100,327,0);
INSERT INTO `zonemapping` VALUES (100,328,0);
INSERT INTO `zonemapping` VALUES (100,329,0);
INSERT INTO `zonemapping` VALUES (100,330,0);
INSERT INTO `zonemapping` VALUES (100,331,0);
INSERT INTO `zonemapping` VALUES (100,332,0);
INSERT INTO `zonemapping` VALUES (100,333,0);
INSERT INTO `zonemapping` VALUES (100,334,0);
INSERT INTO `zonemapping` VALUES (100,335,0);
INSERT INTO `zonemapping` VALUES (100,336,0);
INSERT INTO `zonemapping` VALUES (100,337,0);
INSERT INTO `zonemapping` VALUES (100,338,0);
INSERT INTO `zonemapping` VALUES (100,339,0);
INSERT INTO `zonemapping` VALUES (100,340,0);
INSERT INTO `zonemapping` VALUES (100,341,0);
INSERT INTO `zonemapping` VALUES (100,342,0);
INSERT INTO `zonemapping` VALUES (100,343,0);
INSERT INTO `zonemapping` VALUES (100,344,0);
INSERT INTO `zonemapping` VALUES (100,345,0);
INSERT INTO `zonemapping` VALUES (100,346,0);
INSERT INTO `zonemapping` VALUES (100,347,0);
INSERT INTO `zonemapping` VALUES (100,348,0);
INSERT INTO `zonemapping` VALUES (100,349,0);
INSERT INTO `zonemapping` VALUES (100,350,0);
INSERT INTO `zonemapping` VALUES (100,351,0);
INSERT INTO `zonemapping` VALUES (100,352,0);
INSERT INTO `zonemapping` VALUES (100,353,0);
INSERT INTO `zonemapping` VALUES (100,354,0);
INSERT INTO `zonemapping` VALUES (100,355,0);
INSERT INTO `zonemapping` VALUES (100,356,0);
INSERT INTO `zonemapping` VALUES (100,357,0);
INSERT INTO `zonemapping` VALUES (100,358,0);
INSERT INTO `zonemapping` VALUES (100,359,0);
INSERT INTO `zonemapping` VALUES (100,360,0);
INSERT INTO `zonemapping` VALUES (100,361,0);
INSERT INTO `zonemapping` VALUES (100,362,0);
INSERT INTO `zonemapping` VALUES (100,363,0);
INSERT INTO `zonemapping` VALUES (100,364,0);
INSERT INTO `zonemapping` VALUES (100,365,0);
INSERT INTO `zonemapping` VALUES (100,366,0);
INSERT INTO `zonemapping` VALUES (100,367,0);
INSERT INTO `zonemapping` VALUES (100,368,0);
INSERT INTO `zonemapping` VALUES (100,369,0);
INSERT INTO `zonemapping` VALUES (100,370,0);
INSERT INTO `zonemapping` VALUES (100,371,0);
INSERT INTO `zonemapping` VALUES (100,372,0);
INSERT INTO `zonemapping` VALUES (100,373,0);
INSERT INTO `zonemapping` VALUES (100,374,0);
INSERT INTO `zonemapping` VALUES (100,375,0);
INSERT INTO `zonemapping` VALUES (100,376,0);
INSERT INTO `zonemapping` VALUES (100,377,0);
INSERT INTO `zonemapping` VALUES (100,378,0);
INSERT INTO `zonemapping` VALUES (100,379,0);
INSERT INTO `zonemapping` VALUES (100,380,0);
INSERT INTO `zonemapping` VALUES (100,381,0);
INSERT INTO `zonemapping` VALUES (100,382,0);
INSERT INTO `zonemapping` VALUES (100,383,0);
INSERT INTO `zonemapping` VALUES (100,384,0);
INSERT INTO `zonemapping` VALUES (100,385,0);
INSERT INTO `zonemapping` VALUES (100,386,0);
INSERT INTO `zonemapping` VALUES (100,387,0);
INSERT INTO `zonemapping` VALUES (100,388,0);
INSERT INTO `zonemapping` VALUES (100,389,0);
INSERT INTO `zonemapping` VALUES (100,390,0);
INSERT INTO `zonemapping` VALUES (100,391,0);
INSERT INTO `zonemapping` VALUES (100,392,0);
INSERT INTO `zonemapping` VALUES (100,393,0);
INSERT INTO `zonemapping` VALUES (100,394,0);
INSERT INTO `zonemapping` VALUES (100,395,0);
INSERT INTO `zonemapping` VALUES (100,396,0);
INSERT INTO `zonemapping` VALUES (100,397,0);
INSERT INTO `zonemapping` VALUES (100,398,0);
INSERT INTO `zonemapping` VALUES (100,399,0);
INSERT INTO `zonemapping` VALUES (100,400,0);
INSERT INTO `zonemapping` VALUES (100,401,0);
INSERT INTO `zonemapping` VALUES (100,402,0);
INSERT INTO `zonemapping` VALUES (100,404,0);
INSERT INTO `zonemapping` VALUES (100,405,0);
INSERT INTO `zonemapping` VALUES (100,406,0);
INSERT INTO `zonemapping` VALUES (100,407,0);
INSERT INTO `zonemapping` VALUES (100,408,0);
INSERT INTO `zonemapping` VALUES (100,409,0);
INSERT INTO `zonemapping` VALUES (100,410,0);
INSERT INTO `zonemapping` VALUES (100,411,0);
INSERT INTO `zonemapping` VALUES (100,412,0);
INSERT INTO `zonemapping` VALUES (100,413,0);
INSERT INTO `zonemapping` VALUES (100,414,0);
INSERT INTO `zonemapping` VALUES (100,415,0);
INSERT INTO `zonemapping` VALUES (100,416,0);
INSERT INTO `zonemapping` VALUES (100,417,0);
INSERT INTO `zonemapping` VALUES (100,418,0);
INSERT INTO `zonemapping` VALUES (100,419,0);
INSERT INTO `zonemapping` VALUES (100,420,0);
INSERT INTO `zonemapping` VALUES (100,421,0);
INSERT INTO `zonemapping` VALUES (100,422,0);
INSERT INTO `zonemapping` VALUES (100,423,0);
INSERT INTO `zonemapping` VALUES (100,424,0);
INSERT INTO `zonemapping` VALUES (100,425,0);
INSERT INTO `zonemapping` VALUES (100,426,0);
INSERT INTO `zonemapping` VALUES (100,427,0);
INSERT INTO `zonemapping` VALUES (100,428,0);
INSERT INTO `zonemapping` VALUES (100,429,0);
INSERT INTO `zonemapping` VALUES (100,430,0);
INSERT INTO `zonemapping` VALUES (100,431,0);
INSERT INTO `zonemapping` VALUES (100,432,0);
INSERT INTO `zonemapping` VALUES (100,433,0);
INSERT INTO `zonemapping` VALUES (100,434,0);
INSERT INTO `zonemapping` VALUES (100,435,0);
INSERT INTO `zonemapping` VALUES (100,436,0);
INSERT INTO `zonemapping` VALUES (100,437,0);
INSERT INTO `zonemapping` VALUES (100,438,0);
INSERT INTO `zonemapping` VALUES (100,439,0);
INSERT INTO `zonemapping` VALUES (100,440,0);
INSERT INTO `zonemapping` VALUES (100,441,0);
INSERT INTO `zonemapping` VALUES (100,442,0);
INSERT INTO `zonemapping` VALUES (100,443,0);
INSERT INTO `zonemapping` VALUES (100,444,0);
INSERT INTO `zonemapping` VALUES (100,445,0);
INSERT INTO `zonemapping` VALUES (100,446,0);
INSERT INTO `zonemapping` VALUES (100,447,0);
INSERT INTO `zonemapping` VALUES (100,448,0);
INSERT INTO `zonemapping` VALUES (100,449,0);
INSERT INTO `zonemapping` VALUES (100,450,0);
INSERT INTO `zonemapping` VALUES (100,451,0);
INSERT INTO `zonemapping` VALUES (100,452,0);
INSERT INTO `zonemapping` VALUES (100,453,0);
INSERT INTO `zonemapping` VALUES (100,454,0);
INSERT INTO `zonemapping` VALUES (100,455,0);
INSERT INTO `zonemapping` VALUES (100,456,0);
INSERT INTO `zonemapping` VALUES (100,457,0);
INSERT INTO `zonemapping` VALUES (100,458,0);
INSERT INTO `zonemapping` VALUES (100,459,0);
INSERT INTO `zonemapping` VALUES (100,460,0);
INSERT INTO `zonemapping` VALUES (100,461,0);
INSERT INTO `zonemapping` VALUES (100,462,0);
INSERT INTO `zonemapping` VALUES (100,463,0);
INSERT INTO `zonemapping` VALUES (100,464,0);
INSERT INTO `zonemapping` VALUES (100,465,0);
INSERT INTO `zonemapping` VALUES (100,466,0);
INSERT INTO `zonemapping` VALUES (100,467,0);
INSERT INTO `zonemapping` VALUES (100,468,0);
INSERT INTO `zonemapping` VALUES (100,469,0);
INSERT INTO `zonemapping` VALUES (100,470,0);
INSERT INTO `zonemapping` VALUES (100,471,0);
INSERT INTO `zonemapping` VALUES (100,472,0);
INSERT INTO `zonemapping` VALUES (100,473,0);
INSERT INTO `zonemapping` VALUES (100,474,0);
INSERT INTO `zonemapping` VALUES (100,475,0);
INSERT INTO `zonemapping` VALUES (100,476,0);
INSERT INTO `zonemapping` VALUES (100,477,0);
INSERT INTO `zonemapping` VALUES (100,478,0);
INSERT INTO `zonemapping` VALUES (100,479,0);
INSERT INTO `zonemapping` VALUES (100,480,0);
INSERT INTO `zonemapping` VALUES (100,481,0);
INSERT INTO `zonemapping` VALUES (100,482,0);
INSERT INTO `zonemapping` VALUES (100,483,0);
INSERT INTO `zonemapping` VALUES (100,484,0);
INSERT INTO `zonemapping` VALUES (100,485,0);
INSERT INTO `zonemapping` VALUES (100,486,0);
INSERT INTO `zonemapping` VALUES (100,487,0);
INSERT INTO `zonemapping` VALUES (100,488,0);
INSERT INTO `zonemapping` VALUES (100,489,0);
INSERT INTO `zonemapping` VALUES (100,490,0);
INSERT INTO `zonemapping` VALUES (100,491,0);
INSERT INTO `zonemapping` VALUES (100,492,0);
INSERT INTO `zonemapping` VALUES (100,493,0);
INSERT INTO `zonemapping` VALUES (100,494,0);
INSERT INTO `zonemapping` VALUES (100,495,0);
INSERT INTO `zonemapping` VALUES (100,496,0);
INSERT INTO `zonemapping` VALUES (100,497,0);
INSERT INTO `zonemapping` VALUES (100,498,0);
INSERT INTO `zonemapping` VALUES (100,499,0);
INSERT INTO `zonemapping` VALUES (100,500,0);
INSERT INTO `zonemapping` VALUES (100,501,0);
INSERT INTO `zonemapping` VALUES (100,502,0);
INSERT INTO `zonemapping` VALUES (100,503,0);
INSERT INTO `zonemapping` VALUES (100,504,0);
INSERT INTO `zonemapping` VALUES (100,505,0);
INSERT INTO `zonemapping` VALUES (100,506,0);
INSERT INTO `zonemapping` VALUES (100,507,0);
INSERT INTO `zonemapping` VALUES (100,508,0);
INSERT INTO `zonemapping` VALUES (100,509,0);
INSERT INTO `zonemapping` VALUES (100,510,0);
INSERT INTO `zonemapping` VALUES (100,511,0);
INSERT INTO `zonemapping` VALUES (100,512,0);
INSERT INTO `zonemapping` VALUES (100,513,0);
INSERT INTO `zonemapping` VALUES (100,514,0);
INSERT INTO `zonemapping` VALUES (100,515,0);
INSERT INTO `zonemapping` VALUES (100,516,0);
INSERT INTO `zonemapping` VALUES (100,517,0);
INSERT INTO `zonemapping` VALUES (100,518,0);
INSERT INTO `zonemapping` VALUES (100,519,0);
INSERT INTO `zonemapping` VALUES (100,520,0);
INSERT INTO `zonemapping` VALUES (100,521,0);
INSERT INTO `zonemapping` VALUES (100,522,0);
INSERT INTO `zonemapping` VALUES (100,523,0);
INSERT INTO `zonemapping` VALUES (100,524,0);
INSERT INTO `zonemapping` VALUES (100,525,0);
INSERT INTO `zonemapping` VALUES (100,526,0);
INSERT INTO `zonemapping` VALUES (100,527,0);
INSERT INTO `zonemapping` VALUES (100,528,0);
INSERT INTO `zonemapping` VALUES (100,529,0);
INSERT INTO `zonemapping` VALUES (100,530,0);
INSERT INTO `zonemapping` VALUES (100,531,0);
INSERT INTO `zonemapping` VALUES (100,532,0);
INSERT INTO `zonemapping` VALUES (100,533,0);
INSERT INTO `zonemapping` VALUES (100,534,0);
INSERT INTO `zonemapping` VALUES (100,535,0);
INSERT INTO `zonemapping` VALUES (100,536,0);
INSERT INTO `zonemapping` VALUES (100,537,0);
INSERT INTO `zonemapping` VALUES (100,538,0);
INSERT INTO `zonemapping` VALUES (100,539,0);
INSERT INTO `zonemapping` VALUES (100,540,0);
INSERT INTO `zonemapping` VALUES (100,541,0);
INSERT INTO `zonemapping` VALUES (100,542,0);
INSERT INTO `zonemapping` VALUES (100,543,0);
INSERT INTO `zonemapping` VALUES (100,544,0);
INSERT INTO `zonemapping` VALUES (100,545,0);
INSERT INTO `zonemapping` VALUES (100,546,0);
INSERT INTO `zonemapping` VALUES (100,547,0);
INSERT INTO `zonemapping` VALUES (100,548,0);
INSERT INTO `zonemapping` VALUES (100,549,0);
INSERT INTO `zonemapping` VALUES (100,550,0);
INSERT INTO `zonemapping` VALUES (100,551,0);
INSERT INTO `zonemapping` VALUES (100,552,0);
INSERT INTO `zonemapping` VALUES (100,553,0);
INSERT INTO `zonemapping` VALUES (100,554,0);
INSERT INTO `zonemapping` VALUES (100,555,0);
INSERT INTO `zonemapping` VALUES (100,556,0);
INSERT INTO `zonemapping` VALUES (100,557,0);
INSERT INTO `zonemapping` VALUES (100,558,0);
INSERT INTO `zonemapping` VALUES (100,559,0);
INSERT INTO `zonemapping` VALUES (100,560,0);
INSERT INTO `zonemapping` VALUES (100,561,0);
INSERT INTO `zonemapping` VALUES (100,562,0);
INSERT INTO `zonemapping` VALUES (100,563,0);
INSERT INTO `zonemapping` VALUES (100,564,0);
INSERT INTO `zonemapping` VALUES (100,565,0);
INSERT INTO `zonemapping` VALUES (100,566,0);
INSERT INTO `zonemapping` VALUES (100,567,0);
INSERT INTO `zonemapping` VALUES (100,568,0);
INSERT INTO `zonemapping` VALUES (100,569,0);
INSERT INTO `zonemapping` VALUES (100,570,0);
INSERT INTO `zonemapping` VALUES (100,571,0);
INSERT INTO `zonemapping` VALUES (100,572,0);
INSERT INTO `zonemapping` VALUES (100,573,0);
INSERT INTO `zonemapping` VALUES (100,574,0);
INSERT INTO `zonemapping` VALUES (100,575,0);
INSERT INTO `zonemapping` VALUES (100,576,0);
INSERT INTO `zonemapping` VALUES (100,577,0);
INSERT INTO `zonemapping` VALUES (100,578,0);
/*!40000 ALTER TABLE `zonemapping` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:16

165
sql/zonepositions.sql Normal file
View file

@ -0,0 +1,165 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `zonepositions`
--
DROP TABLE IF EXISTS `zonepositions`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `zonepositions` (
`id` int(11) NOT NULL,
`target_zone_id` int(11) NOT NULL,
`pos_x` float NOT NULL,
`pos_y` float NOT NULL,
`pos_z` float NOT NULL,
`pos_o` float NOT NULL,
`radius` int(11) NOT NULL DEFAULT '2',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `zonepositions`
--
LOCK TABLES `zonepositions` WRITE;
/*!40000 ALTER TABLE `zonepositions` DISABLE KEYS */;
INSERT INTO `zonepositions` VALUES (1317556,133,16.3201,8.34547,-91.7458,2.48019,2);
INSERT INTO `zonepositions` VALUES (1317554,133,140.8,11.15,-22.6,2.5,2);
INSERT INTO `zonepositions` VALUES (1317535,132,10.2559,1.03707,-11.7784,-0.43944,2);
INSERT INTO `zonepositions` VALUES (1317558,133,-130.42,5.5,-36.36,-1.69019,2);
INSERT INTO `zonepositions` VALUES (1317552,148,129.341,26.9524,-311.06,-0.01836,2);
INSERT INTO `zonepositions` VALUES (1317623,132,149.42,-11.2378,157.749,-1.66604,2);
INSERT INTO `zonepositions` VALUES (1317628,152,-515.845,18.4252,271.573,2.83271,2);
INSERT INTO `zonepositions` VALUES (1320077,148,384,-3,-184,-1,2);
INSERT INTO `zonepositions` VALUES (1317540,132,-104,1,12.6,0.3,2);
INSERT INTO `zonepositions` VALUES (1320086,148,158,-24,546,-3,2);
INSERT INTO `zonepositions` VALUES (1317630,153,-366,29,-241,0.8,2);
INSERT INTO `zonepositions` VALUES (1332303,152,-165,6,450,-1.4,2);
INSERT INTO `zonepositions` VALUES (1320082,153,275.5,11.1,-258.7,-0.8,2);
INSERT INTO `zonepositions` VALUES (1317533,132,105,6,9,-0.6,2);
INSERT INTO `zonepositions` VALUES (1317542,154,452,-1,196,-1,2);
INSERT INTO `zonepositions` VALUES (1320072,133,-205,10,-96,1.6,2);
INSERT INTO `zonepositions` VALUES (1317633,154,14.8739,-55.3396,527.905,-2.44165,2);
INSERT INTO `zonepositions` VALUES (1359064,132,40.1767,1.19993,33.5491,-2.0572,2);
INSERT INTO `zonepositions` VALUES (1359244,152,-196.215,3.10004,291.934,1.0742,2);
INSERT INTO `zonepositions` VALUES (1359648,153,185.686,9.21862,-74.6898,-0.828473,2);
INSERT INTO `zonepositions` VALUES (1359652,154,-31.4935,-39.9006,238.436,-1.95462,2);
INSERT INTO `zonepositions` VALUES (3693843,129,-96.5371,18.5462,0.164331,1.55699,2);
INSERT INTO `zonepositions` VALUES (3693863,130,-144.305,-3.15489,-163.06,0.844608,2);
INSERT INTO `zonepositions` VALUES (3860373,135,156.876,14.0959,680.845,-3.01048,2);
INSERT INTO `zonepositions` VALUES (3961173,137,491.614,18.236,474.858,-2.71565,2);
INSERT INTO `zonepositions` VALUES (3965407,138,651.437,9.39925,507.082,-0.015805,2);
INSERT INTO `zonepositions` VALUES (4142002,139,437.484,4.21339,84.1072,0,2);
INSERT INTO `zonepositions` VALUES (4142062,180,-117.633,64.3225,-219.456,0,2);
INSERT INTO `zonepositions` VALUES (3965476,140,73.0305,45.9193,-232.058,-0.837415,2);
INSERT INTO `zonepositions` VALUES (3965498,145,-379.737,-59,142.563,-1.60992,2);
INSERT INTO `zonepositions` VALUES (3965549,146,-153.169,26.3166,-418.709,-0.966313,2);
INSERT INTO `zonepositions` VALUES (3965676,147,28.5353,6.97858,454.249,-1.59139,2);
INSERT INTO `zonepositions` VALUES (3965792,155,228.603,312,-238.728,-0.872663,2);
INSERT INTO `zonepositions` VALUES (3965896,156,47.7514,20.4912,-667.904,-1.5964,2);
INSERT INTO `zonepositions` VALUES (2563653,132,165.172,-2.53922,83.0344,2.28249,2);
INSERT INTO `zonepositions` VALUES (2563690,133,101.232,8.36029,-108.339,-1.72413,2);
INSERT INTO `zonepositions` VALUES (2563700,133,117.217,11.5772,-231.311,2.29494,2);
INSERT INTO `zonepositions` VALUES (2563702,133,-146.938,3.99984,-13.7873,-1.46085,2);
INSERT INTO `zonepositions` VALUES (2563740,133,-307.932,7.06028,-174.981,1.41482,2);
INSERT INTO `zonepositions` VALUES (2563748,133,-73.8652,6.99362,-136.568,1.13622,2);
INSERT INTO `zonepositions` VALUES (2563810,148,128.68,25.6247,-302.237,-0.407334,2);
INSERT INTO `zonepositions` VALUES (2563828,154,448.667,-0.881895,198.039,-0.81543,2);
INSERT INTO `zonepositions` VALUES (4205005,134,224,113.1,-261,0.71968,2);
INSERT INTO `zonepositions` VALUES (4205026,141,-16.1511,-1.87702,-163.139,3.13206,2);
INSERT INTO `zonepositions` VALUES (4265667,250,40.9851,5.6,-23.4832,0,2);
INSERT INTO `zonepositions` VALUES (3724283,148,-502.084,73.8739,-349.12,0.022136,2);
INSERT INTO `zonepositions` VALUES (1406089,155,7.46379,184.824,573.833,-2.9039,2);
INSERT INTO `zonepositions` VALUES (1406085,154,-366.571,-7.6982,194.777,0.759619,2);
INSERT INTO `zonepositions` VALUES (4176152,153,-282.699,-0.13973,692.715,2.57545,2);
INSERT INTO `zonepositions` VALUES (1320088,145,366.689,31.0121,-291.751,-0.526007,2);
INSERT INTO `zonepositions` VALUES (1406087,156,120.007,31.4998,-765.044,-0.804052,2);
INSERT INTO `zonepositions` VALUES (1418272,155,-228.277,218.179,698.528,-2.42958,2);
INSERT INTO `zonepositions` VALUES (1418277,147,-102.023,84.4271,-411.113,-0.874677,2);
INSERT INTO `zonepositions` VALUES (4295875,156,-421.317,-3.21682,-122.225,-2.80336,2);
INSERT INTO `zonepositions` VALUES (3876614,134,-36.4611,36.6508,150.243,1.98843,2);
INSERT INTO `zonepositions` VALUES (2464045,129,58.7886,20,-0.066879,-1.53495,2);
INSERT INTO `zonepositions` VALUES (2453662,134,194.511,65.2717,285.229,-1.59811,2);
INSERT INTO `zonepositions` VALUES (2464048,135,235.118,73.7873,-338.534,0.887104,2);
INSERT INTO `zonepositions` VALUES (2453729,134,-372.325,33.3472,-595.069,0.942594,2);
INSERT INTO `zonepositions` VALUES (2464054,138,810.028,49.9019,384.635,-2.54678,2);
INSERT INTO `zonepositions` VALUES (2210360,135,-46.1092,73.9411,116.089,1.54535,2);
INSERT INTO `zonepositions` VALUES (2443382,128,24.9766,44.5,175.56,-3.13474,2);
INSERT INTO `zonepositions` VALUES (4323017,135,596.704,61.6635,-112.685,-2.81539,2);
INSERT INTO `zonepositions` VALUES (2453713,135,571.106,96.3,-518.642,-0.05646,2);
INSERT INTO `zonepositions` VALUES (2453673,137,-132.425,69.3748,739.518,-3.13744,2);
INSERT INTO `zonepositions` VALUES (2453708,135,693.492,79.5221,-382.789,-0.232514,2);
INSERT INTO `zonepositions` VALUES (2453666,137,246.611,56.1687,831.572,2.89764,2);
INSERT INTO `zonepositions` VALUES (2372269,130,42.3246,4,-158.943,-0.273386,2);
INSERT INTO `zonepositions` VALUES (2377056,141,-114.159,18.3778,332.705,2.8655,2);
INSERT INTO `zonepositions` VALUES (2376310,130,91.1395,4,-111.101,-2.27906,2);
INSERT INTO `zonepositions` VALUES (2377064,131,94.3718,4,-108.09,0.815058,2);
INSERT INTO `zonepositions` VALUES (2376964,130,58.4986,8,-88.0199,-2.27798,2);
INSERT INTO `zonepositions` VALUES (2377068,131,67.2002,8,-80.4213,0.854852,2);
INSERT INTO `zonepositions` VALUES (2376969,130,-12.143,10,-44.8101,-2.89781,2);
INSERT INTO `zonepositions` VALUES (2377071,131,-7.5771,12.5628,-27.816,0.26209,2);
INSERT INTO `zonepositions` VALUES (2369965,130,-176.583,14,-14.6283,1.56838,2);
INSERT INTO `zonepositions` VALUES (2377075,140,465.194,96.6206,159.051,-1.73197,2);
INSERT INTO `zonepositions` VALUES (2379246,130,-123.162,9.99999,-8.84062,-1.56451,2);
INSERT INTO `zonepositions` VALUES (2377082,131,-107.435,6.98457,-9.0397,1.57633,2);
INSERT INTO `zonepositions` VALUES (2379249,130,-121.899,10.0722,9.43441,-1.5354,2);
INSERT INTO `zonepositions` VALUES (2377078,131,-106.993,6.98457,9.39492,1.58387,2);
INSERT INTO `zonepositions` VALUES (2372279,131,159.45,4,42.6079,-1.86339,2);
INSERT INTO `zonepositions` VALUES (2376287,141,20.1486,18.3778,565.384,1.34262,2);
INSERT INTO `zonepositions` VALUES (2210427,128,-3.02154,43,-27.8195,1.52636,2);
INSERT INTO `zonepositions` VALUES (2210364,129,-2.24011,20.0008,27.8738,1.54483,2);
INSERT INTO `zonepositions` VALUES (2210434,128,-92.7087,35.5,104.59,0.839544,2);
INSERT INTO `zonepositions` VALUES (2210376,129,-89.9423,20.6775,111.428,-3.09037,2);
INSERT INTO `zonepositions` VALUES (2210411,128,-70.0571,40.6609,-125.182,2.3762,2);
INSERT INTO `zonepositions` VALUES (2210368,129,-84.1969,18.0003,-22.3949,0.030137,2);
INSERT INTO `zonepositions` VALUES (2453691,134,-166.683,35.0913,-726.536,-0.302407,2);
INSERT INTO `zonepositions` VALUES (2464051,137,-108.773,70.3399,46.5696,1.79447,2);
INSERT INTO `zonepositions` VALUES (2453742,137,80.4418,80.0177,-115.679,0.063873,2);
INSERT INTO `zonepositions` VALUES (2453717,139,717.879,0.468218,208.285,-3.11069,2);
INSERT INTO `zonepositions` VALUES (2453747,138,408.384,27.5189,-5.33734,-0.320773,2);
INSERT INTO `zonepositions` VALUES (2453733,139,-472.983,1.43406,283.031,2.36451,2);
INSERT INTO `zonepositions` VALUES (4057217,139,-350.797,47.4884,-14.5283,-1.14213,2);
INSERT INTO `zonepositions` VALUES (4056858,148,-326.559,51.2799,-87.2374,-2.82522,2);
INSERT INTO `zonepositions` VALUES (4057229,139,289.163,41.1628,-198.013,0.64875,2);
INSERT INTO `zonepositions` VALUES (4056861,148,238.76,54.7158,-252.767,-1.7284,2);
INSERT INTO `zonepositions` VALUES (2376981,141,-398.28,-0.789985,99.3511,1.96518,2);
INSERT INTO `zonepositions` VALUES (2372291,140,258.5,52.6883,-4.64944,-0.456935,2);
INSERT INTO `zonepositions` VALUES (2377124,141,226.726,2.7533,669.653,-2.22354,2);
INSERT INTO `zonepositions` VALUES (2372323,146,-423.482,12.8616,-422.811,0.697403,2);
INSERT INTO `zonepositions` VALUES (2377115,141,446.556,-17.9999,-174.403,-0.73727,2);
INSERT INTO `zonepositions` VALUES (2372300,145,-559.838,-19.777,335.605,2.10368,2);
INSERT INTO `zonepositions` VALUES (2377133,141,-26.9884,33,-486.807,0.127408,2);
INSERT INTO `zonepositions` VALUES (2372337,147,36.6025,5.93622,506.673,3.10036,2);
INSERT INTO `zonepositions` VALUES (2377127,145,-173.756,-45.2898,483.95,-2.64246,2);
INSERT INTO `zonepositions` VALUES (2377118,146,-27.6321,16.1257,-760.456,-0.049568,2);
INSERT INTO `zonepositions` VALUES (1359242,148,5.5,-1.2,39,2,2);
/*!40000 ALTER TABLE `zonepositions` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:16

51
sql/zoneservers.sql Normal file
View file

@ -0,0 +1,51 @@
-- MySQL dump 10.13 Distrib 5.7.13, for Win64 (x86_64)
--
-- Host: localhost Database: sapphire
-- ------------------------------------------------------
-- Server version 5.7.13-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `zoneservers`
--
DROP TABLE IF EXISTS `zoneservers`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `zoneservers` (
`id` int(5) NOT NULL,
`ip` varchar(50) DEFAULT NULL,
`port` int(5) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `zoneservers`
--
LOCK TABLES `zoneservers` WRITE;
/*!40000 ALTER TABLE `zoneservers` DISABLE KEYS */;
INSERT INTO `zoneservers` VALUES (100,'127.0.0.1',54995);
/*!40000 ALTER TABLE `zoneservers` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2016-12-09 17:37:17

View file

@ -0,0 +1,16 @@
cmake_minimum_required(VERSION 2.6)
project (Sapphire_root)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(PROJECT_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
include_directories("${PROJECT_INCLUDE_DIR}")
include_directories("${PROJECT_SOURCE_DIR}")
add_subdirectory(${PROJECT_SOURCE_DIR}/Server_Common)
add_subdirectory(${PROJECT_SOURCE_DIR}/Server_Lobby)
add_subdirectory(${PROJECT_SOURCE_DIR}/Server_REST)
add_subdirectory(${PROJECT_SOURCE_DIR}/Server_Zone)

View file

@ -0,0 +1,130 @@
#include "Hive.h"
#include "Acceptor.h"
#include "Connection.h"
#include <boost/interprocess/detail/atomic.hpp>
#include <boost/bind.hpp>
namespace Core
{
namespace Network
{
//-----------------------------------------------------------------------------
Acceptor::Acceptor( HivePtr hive )
: m_hive( hive ),
m_acceptor( hive->GetService() ),
m_io_strand( hive->GetService() ),
m_error_state( 0 )
{
}
Acceptor::~Acceptor()
{
}
bool Acceptor::OnAccept( ConnectionPtr connection, const std::string & host, uint16_t port )
{
return true;
}
void Acceptor::OnError( const boost::system::error_code & error )
{
}
void Acceptor::StartError( const boost::system::error_code & error )
{
if( boost::interprocess::ipcdetail::atomic_cas32( &m_error_state, 1, 0 ) == 0 )
{
boost::system::error_code ec;
m_acceptor.cancel( ec );
m_acceptor.close( ec );
OnError( error );
}
}
void Acceptor::DispatchAccept( ConnectionPtr connection )
{
m_acceptor.async_accept( connection->GetSocket(),
connection->GetStrand().wrap( boost::bind( &Acceptor::HandleAccept,
shared_from_this(),
_1,
connection ) ) );
}
void Acceptor::HandleAccept( const boost::system::error_code & error, ConnectionPtr connection )
{
if( error || HasError() || m_hive->HasStopped() )
{
connection->StartError( error );
}
else
{
if( connection->GetSocket().is_open() )
{
if( OnAccept( connection,
connection->GetSocket().remote_endpoint().address().to_string(),
connection->GetSocket().remote_endpoint().port() ) )
{
connection->OnAccept( m_acceptor.local_endpoint().address().to_string(), m_acceptor.local_endpoint().port() );
connection->Recv();
}
}
else
{
connection->StartError( error );
}
}
}
void Acceptor::Stop()
{
}
void Acceptor::Accept( ConnectionPtr connection )
{
m_io_strand.post( boost::bind( &Acceptor::DispatchAccept, shared_from_this(), connection ) );
}
void Acceptor::Listen( const std::string & host, const uint16_t & port )
{
try
{
boost::asio::ip::tcp::resolver resolver( m_hive->GetService() );
boost::asio::ip::tcp::resolver::query query( host, std::to_string( port ) );
boost::asio::ip::tcp::endpoint endpoint = *resolver.resolve( query );
m_acceptor.open( endpoint.protocol() );
m_acceptor.set_option( boost::asio::ip::tcp::acceptor::reuse_address( false ) );
m_acceptor.bind( endpoint );
m_acceptor.listen( boost::asio::socket_base::max_connections );
}
catch( ... )
{
// this should not happen
assert( true );
}
}
HivePtr Acceptor::GetHive()
{
return m_hive;
}
boost::asio::ip::tcp::acceptor & Acceptor::GetAcceptor()
{
return m_acceptor;
}
bool Acceptor::HasError()
{
return ( boost::interprocess::ipcdetail::atomic_cas32( &m_error_state, 1, 1 ) == 1 );
}
}
}

View file

@ -0,0 +1,78 @@
#ifndef ACCEPTOR_H_
#define ACCEPTOR_H_
#include <boost/asio.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/shared_ptr.hpp>
#include "Forwards.h"
namespace Core
{
namespace Network
{
class Connection;
class Acceptor : public boost::enable_shared_from_this< Acceptor >
{
friend class Hive;
private:
HivePtr m_hive;
boost::asio::ip::tcp::acceptor m_acceptor;
boost::asio::strand m_io_strand;
volatile uint32_t m_error_state;
private:
Acceptor( const Acceptor & rhs );
Acceptor & operator =( const Acceptor & rhs );
void StartError( const boost::system::error_code & error );
void DispatchAccept( ConnectionPtr connection );
void HandleAccept( const boost::system::error_code & error, ConnectionPtr connection );
private:
// Called when a connection has connected to the server. This function
// should return true to invoke the connection's OnAccept function if the
// connection will be kept. If the connection will not be kept, the
// connection's Disconnect function should be called and the function
// should return false.
virtual bool OnAccept( ConnectionPtr connection, const std::string & host, uint16_t port );
// Called when an error is encountered. Most typically, this is when the
// acceptor is being closed via the Stop function or if the Listen is
// called on an address that is not available.
virtual void OnError( const boost::system::error_code & error );
public:
Acceptor( HivePtr hive );
virtual ~Acceptor();
// Returns the Hive object.
HivePtr GetHive();
// Returns the acceptor object.
boost::asio::ip::tcp::acceptor & GetAcceptor();
// Returns the strand object.
boost::asio::strand & GetStrand();
// Returns true if this object has an error associated with it.
bool HasError();
public:
// Begin listening on the specific network interface.
void Listen( const std::string & host, const uint16_t & port );
// Posts the connection to the listening interface. The next client that
// connections will be given this connection. If multiple calls to Accept
// are called at a time, then they are accepted in a FIFO order.
void Accept( ConnectionPtr connection );
// Stop the Acceptor from listening.
void Stop();
};
}
}
#endif

View file

@ -0,0 +1,76 @@
cmake_minimum_required(VERSION 2.6)
project(Sapphire)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/sapphire/datReader/")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/external/ChaiScript-6.0.0/include/")
if(UNIX)
include_directories("/usr/include/mysql/")
message(STATUS "Setting GCC flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -m32")
find_package(Boost ${SAPPHIRE_BOOST_VER} COMPONENTS log log_setup thread date_time filesystem system)
if(Boost_FOUND)
set(BOOST_LIBRARY_DIR ${Boost_LIBRARY_DIR})
else()
if (EXISTS /opt/build_libs/${SAPPHIRE_BOOST_FOLDER_NAME})
set(Boost_INCLUDE_DIR /opt/build_libs/${SAPPHIRE_BOOST_FOLDER_NAME})
set(BOOST_LIBRARYDIR /opt/build_libs/${SAPPHIRE_BOOST_FOLDER_NAME}/stage/lib)
else()
message(FATAL_ERROR "Unable to find boost ${SAPPHIRE_BOOST_VER} package!")
endif()
endif()
else()
add_definitions(-D_WIN32_WINNT=0x601)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/external/MySQL/")
message(STATUS "Setting MSVC flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHc")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/external/${SAPPHIRE_BOOST_FOLDER_NAME})
message(STATUS "Using boost in /libraries/external")
set(Boost_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/external/${SAPPHIRE_BOOST_FOLDER_NAME})
set(BOOST_LIBRARYDIR ${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/external/${SAPPHIRE_BOOST_FOLDER_NAME}/lib32-msvc-14.0)
else()
find_package(Boost ${SAPPHIRE_BOOST_VER} COMPONENTS log log_setup thread date_time filesystem system)
if(Boost_FOUND)
set(BOOST_LIBRARY_DIR ${Boost_LIBRARY_DIR})
elseif ((EXISTS $ENV{BOOST_ROOT_DIR}) AND (EXISTS $ENV{BOOST_LIB_DIR}))
set(Boost_INCLUDE_DIR $ENV{BOOST_ROOT_DIR})
set(BOOST_LIBRARYDIR $ENV{BOOST_LIB_DIR})
else()
message(FATAL_ERROR "SapphireError: Unable to find boost ${SAPPHIRE_BOOST_VER} package and environment variables BOOST_ROOT_DIR and BOOST_LIB_DIR not set!")
endif()
endif()
endif()
set(Boost_USE_STATIC_LIBS ON)
file(GLOB UTILS_PUBLIC_INCLUDE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*")
file(GLOB UTILS_SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}*.cpp")
find_package(Boost ${SAPPHIRE_BOOST_VER} COMPONENTS log log_setup thread date_time filesystem system)
include_directories(${Boost_INCLUDE_DIR})
link_directories(${BOOST_LIBRARYDIR})
link_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/sapphire/datReader/")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_library(Common ${UTILS_PUBLIC_INCLUDE_FILES} ${UTILS_SOURCE_FILES})
set_target_properties(Common PROPERTIES
CXX_STANDARD 14
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS ON
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/"
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/"
RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/"
RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL "${CMAKE_CURRENT_SOURCE_DIR}/../../../bin/"
)
if (UNIX)
target_link_libraries(Common xivdat mysqlclient)
else()
target_link_libraries(Common xivdat libmysql)
endif()

View file

@ -0,0 +1,16 @@
#include <chaiscript/chaiscript_stdlib.hpp>
#include <chaiscript/chaiscript.hpp>
#include "ChaiscriptStdLib.h"
#include <boost/make_shared.hpp>
std::shared_ptr< chaiscript::Module > Core::Scripting::create_chaiscript_stdlib()
{
return chaiscript::Std_Lib::library();
}
boost::shared_ptr< chaiscript::ChaiScript > Core::Scripting::create_chaiscript()
{
auto chai = boost::make_shared< chaiscript::ChaiScript >();
//create_chaiscript_bindings( chai );
return chai;
}

View file

@ -0,0 +1,19 @@
#ifndef CHAISCRIPT_STDLIB
#define CHAISCRIPT_STDLIB
#include <boost/shared_ptr.hpp>
namespace chaiscript
{
class Module;
class ChaiScript;
}
namespace Core { namespace Scripting {
std::shared_ptr<chaiscript::Module> create_chaiscript_stdlib();
boost::shared_ptr< chaiscript::ChaiScript > create_chaiscript();
} }
#endif

View file

@ -0,0 +1,958 @@
#ifndef _COMMON_H
#define _COMMON_H
#include <stdint.h>
#include <vector>
#include <boost/make_shared.hpp>
// +---------------------------------------------------------------------------
// The following enumerations are structures to require their type be included.
// They are also defined within the Core::Common namespace to avoid collisions.
// +---------------------------------------------------------------------------
namespace Core {
namespace Common {
// 99 is the last spawn id that seems to spawn any actor
const uint8_t MAX_DISPLAYED_ACTORS = 99;
const int32_t INVALID_GAME_OBJECT_ID = 0xE0000000;
struct FFXIVARR_POSITION3
{
float x;
float y;
float z;
};
enum EquipSlot : uint8_t
{
MainHand = 0,
OffHand = 1,
Head = 2,
Body = 3,
Hands = 4,
Waist = 5,
Legs = 6,
Feet = 7,
Neck = 8,
Ear = 9,
Wrist = 10,
Ring1 = 11,
Ring2 = 12,
SoulCrystal = 13,
};
enum InventoryType : uint16_t
{
Bag0 = 0,
Bag1 = 1,
Bag2 = 2,
Bag3 = 3,
GearSet0 = 1000,
GearSet1 = 1001,
Currency = 2000,
Crystal = 2001,
//UNKNOWN_0 = 2003,
KeyItem = 2004,
DamagedGear = 2007,
//UNKNOWN_1 = 2008,
ArmoryOff = 3200,
ArmoryHead = 3201,
ArmoryBody = 3202,
ArmoryHand = 3203,
ArmoryWaist = 3204,
ArmoryLegs = 3205,
ArmoryFeet = 3206,
ArmotyNeck = 3207,
ArmoryEar = 3208,
ArmoryWrist = 3209,
ArmoryRing = 3300,
ArmorySoulCrystal = 3400,
ArmoryMain = 3500,
RetainerBag0 = 10000,
RetainerBag1 = 10001,
RetainerBag2 = 10002,
RetainerBag3 = 10003,
RetainerBag4 = 10004,
RetainerBag5 = 10005,
RetainerBag6 = 10006,
RetainerEquippedGear = 11000,
RetainerGil = 12000,
RetainerCrystal = 12001,
RetainerMarket = 12002,
FreeCompanyBag0 = 20000,
FreeCompanyBag1 = 20001,
FreeCompanyBag2 = 20002,
FreeCompanyGil = 22000,
FreeCompanyCrystal = 22001
};
enum Race : uint8_t
{
Hyur = 1,
Elezen = 2,
Lalafell = 3,
Miqote = 4,
Roegadyn = 5,
AuRa = 6,
};
enum struct ZoneingType : uint8_t
{
None = 1,
Teleport = 2,
Return = 3,
ReturnDead = 4,
FadeIn = 5,
};
enum Tribe : uint8_t
{
Midlander = 1,
Highlander = 2,
Wildwood = 3,
Duskwight = 4,
Plainsfolk = 5,
Dunesfolk = 6,
SeekerOfTheSun = 7,
KeeperOfTheMoon = 8,
SeaWolf = 9,
Hellsguard = 10,
Raen = 11,
Xaela = 12,
};
enum Gender : uint8_t
{
Male = 0,
Female = 1,
};
enum GuardianDeity : uint8_t
{
Halone = 1, // the Fury
Menphina = 2, // the Lover
Thaliak = 3, // the Scholar
Nymeia = 4, // the Spinner
Llymlaen = 5, // the Navigator
Oschon = 6, // the Wanderer
Byregot = 7, // the Builder
Rhalgr = 8, // the Destroyer
Azeyma = 9, // the Warden
NaldThal = 10, // the Traders
Nophica = 11, // the Matron
Althyk = 12, // the Keeper
};
enum struct GrandCompany : uint8_t
{
None = 0,
Maelstrom = 1,
TwinAdder = 2,
ImmortalFlames = 3,
};
enum struct GCRank : uint8_t
{
None = 0,
PrivateThirdClass = 1,
PrivateSecondClass = 2,
PrivateFirstClass = 3,
Corporal = 4,
SergeantThirdClass = 5,
SergeantSecondClass = 6,
SergeantFirstClass = 7,
ChiefSergeant = 8,
SecondLieutenant = 9,
FirstLieutenant = 10,
Captain = 11,
SecondCommander = 12,
FirstCommander = 13,
HighCommander = 14,
RearMarshal = 15,
ViceMarshal = 16,
Marshal = 17,
GrandMarshal = 18,
Champion = 19,
};
enum struct Weather : uint8_t
{
None,
Clear,
Fair,
Overcast,
Fog,
Wind,
Gales,
Rain,
Showers,
Thunder,
Thunderstorms,
DustStorms,
Sandstorms,
HotSpells,
HeatWave,
Snow,
Blizzards,
Gloom,
Aurora,
Darkness,
Hopelessness,
Overcast1,
StormClouds,
Torrential,
Torrential1,
Lour,
HeatWave1,
Gloom1,
Gales1,
Eruptions,
Fair1
};
enum Town : uint8_t
{
LimsaLominsa = 1,
Gridania = 2,
Uldah = 3,
Ishgard = 4,
};
enum ClassJob : uint8_t
{
CLASS_ADV = 0, // purely internal
CLASS_GLADIATOR = 1, // gladiator
CLASS_PUGILIST = 2, // pugilist
CLASS_MARAUDER = 3, // marauder
CLASS_LANCER = 4, // lancer
CLASS_ARCHER = 5, // archer
CLASS_CONJURER = 6, // conjurer
CLASS_THAUMATURGE = 7, // thaumaturge
CLASS_WOODWORKER = 8, // carpenter
CLASS_BLACKSMIT = 9, // blacksmith
CLASS_ARMOURER = 10, // armorer
CLASS_GOLDSMITH = 11, // goldsmith
CLASS_TANNER = 12, // leatherworker
CLASS_WEAVER = 13, // weaver
CLASS_ALCHEMIST = 14, // alchemist
CLASS_CULINARIAN = 15, // culinarian
CLASS_MINER = 16, // miner
CLASS_HARVESTER = 17, // botanist
CLASS_FISHERMAN = 18, // fisher
JOB_KNIGHT = 19, // paladin
JOB_MONK = 20, // monk
JOB_WARRIOR = 21, // warrior
JOB_DRAGON = 22, // dragoon
JOB_BARD = 23, // bard
JOB_WHITE = 24, // white mage
JOB_BLACK = 25, // black mage
CLASS_ARCANIST = 26, // arcanist
JOB_SUMMONER = 27, // summoner
JOB_SCHOLAR = 28, // scholar
CLASS_ROGUE = 29,
JOB_NINJA = 30,
JOB_MACHINIST = 31, // machinist
JOB_DARKKNIGHT = 32, // darknight
JOB_ASTROLOGIAN = 33, // astro
JOB_SAMURAI = 34, // sam
JOB_REDMAGE = 35, // red mage
};
enum PlayerSyncFlags : uint32_t
{
None = 0x00000000,
Position = 0x00000001, // x,y,z,zone
Status = 0x00000002, // hp,mp,tp,class
Look = 0x00000004, // models to display
ExpLevel = 0x00000008, // exp,level
Quests = 0x00000010, // quest status
Achievements = 0x00000020, // achievements
Discovery = 0x00000040, // Discovered places
Aetherytes = 0x00000080, // Attuned aetherytes
HomePoint = 0x00000100, // Current homepoint
HowTo = 0x00000200,
FirstLogin = 0x00000400,
HpMp = 0x00000800,
QuestTracker = 0x00001000,
NewGame = 0x00002000,
Unlocks = 0x00008000,
PlayTime = 0x00010000,
NewAdventurer = 0x00020000,
SearchInfo = 0x00040000,
GC = 0x00080000,
All = 0xFFFFFFFF,
};
/**
* Structural representation of the packet sent by the server
* Send the entire StatusEffect list
*/
struct StatusEffect
{
uint16_t effect_id;
uint16_t unknown1;
float duration;
uint32_t sourceActorId;
};
enum struct ItemCategory : uint8_t
{
not_set = 0,
PugWep = 1,
GlaWep = 2,
MrdWep = 3,
ArcWep = 4,
LncWep = 5,
ThmWep = 6,
Thm2Wep = 7,
CnjWep = 8,
Cnj2Wep = 9,
ArnWep = 10,
Shield = 11,
CrpPri = 12,
BlmPri = 13,
ArmPri = 14,
GldPri = 15,
LtwPri = 16,
WvrPri = 17,
AlcPri = 18,
ClnPri = 19,
MinPri = 20,
BotPri = 21,
FshPri = 22,
CrpSec = 23,
BsmSec = 24,
ArmSec = 25,
GldSec = 26,
LtwSec = 27,
WvrSec = 28,
AlcSec = 29,
ClnSec = 30,
MinSec = 31,
BotSec = 32,
FshSec = 33,
Throw = 34,
Head = 35,
Body = 36,
Hands = 37,
Waist = 38,
Legs = 39,
Feet = 40,
UndShirt = 41,
UndGarm = 42,
Earring = 43,
Necklace = 44,
Bracelet = 45,
Ring = 46,
Crystal = 47,
Materia = 48,
Material = 49,
Food = 50,
Enhancement = 51,
Curative = 52,
PLaceholder = 53,
Enfeeb = 54,
Medecine = 55,
};
enum RegionType : uint8_t
{
normal,
instance,
};
enum CharaLook : uint8_t
{
Race = 0x00,
Gender = 0x01,
Tribe = 0x04,
Height = 0x03,
ModelType = 0x02, // Au Ra: changes horns/tails, everything else: seems to drastically change appearance (flip between two sets, odd/even numbers). sometimes retains hairstyle and other features
FaceType = 0x05,
HairStyle = 0x06,
HasHighlights = 0x07, // negative to enable, positive to disable
SkinColor = 0x08,
EyeColor = 0x09, // color of character's right eye
HairColor = 0x0A, // main color
HairColor2 = 0x0B, // highlights color
FaceFeatures = 0x0C, // seems to be a toggle, (-odd and +even for large face covering), opposite for small
FaceFeaturesColor = 0x0D,
Eyebrows = 0x0E,
EyeColor2 = 0x0F, // color of character's left eye
EyeShape = 0x10,
NoseShape = 0x11,
JawShape = 0x12,
LipStyle = 0x13, // lip colour depth and shape (negative values around -120 darker/more noticeable, positive no colour)
LipColor = 0x14,
RaceFeatureSize = 0x15,
RaceFeatureType = 0x16, // negative or out of range tail shapes for race result in no tail (e.g. Au Ra has max of 4 tail shapes), incorrect value can crash client
BustSize = 0x17, // char creator allows up to max of 100, i set to 127 cause who wouldnt but no visible difference
Facepaint = 0x18,
FacepaintColor = 0x19,
};
enum MoveType : uint16_t
{
Run = 0x00,
Walk = 0x02,
Strafe = 0x04,
Jump = 0x100,
Fall = 0x400,
Land = 0x200,
};
enum UserLevel : uint8_t
{
all = 0xff,
player = 0x01,
gm = 0x02,
dev = 0x04,
admin = 0x08
};
struct QuestActive
{
QuestActive()
{
c.questId = 0;
c.sequence = 0;
c.flags = 0;
c.UI8A = 0;
c.UI8B = 0;
c.UI8C = 0;
c.UI8D = 0;
c.UI8E = 0;
c.UI8F = 0;
c.padding = 0;
}
union
{
struct
{
uint16_t questId;
uint8_t sequence;
uint8_t flags;
uint8_t padding;
uint8_t BitFlag48;
uint8_t BitFlag40;
uint8_t BitFlag32;
uint8_t BitFlag24;
uint8_t BitFlag16;
uint8_t BitFlag8;
uint8_t padding1;
} a;
struct
{
uint16_t questId;
uint8_t sequence;
uint8_t flags;
uint8_t padding;
uint8_t UI8AL : 4;
uint8_t UI8AH : 4;
uint8_t UI8BL : 4;
uint8_t UI8BH : 4;
uint8_t UI8CL : 4;
uint8_t UI8CH : 4;
uint8_t UI8DL : 4;
uint8_t UI8DH : 4;
uint8_t UI8EL : 4;
uint8_t UI8EH : 4;
uint8_t UI8FL : 4;
uint8_t UI8FH : 4;
uint8_t padding1;
} b;
struct
{
uint16_t questId;
uint8_t sequence;
uint8_t flags;
uint8_t padding;
uint8_t UI8A;
uint8_t UI8B;
uint8_t UI8C;
uint8_t UI8D;
uint8_t UI8E;
uint8_t UI8F;
uint8_t padding1;
} c;
//struct
//{
// uint16_t questId;
// uint8_t sequence;
// uint8_t flags;
// uint8_t padding;
// uint16_t UI16A;
// uint16_t UI16B;
// uint16_t UI16C;
// uint8_t padding1;
//} d;
//struct
//{
// uint8_t padding;
// uint32_t UI32A;
// uint16_t padding2;
//} e;
};
};
enum EventType : uint16_t
{
Quest = 0x0001,
ChocoRent = 0x0002,
Shop = 0x0004,
Aetheryte = 0x0005,
GuildLeveAssign = 0x0006,
DefaultTalk = 0x0009,
CustomTalk = 0x000B,
CraftLeve = 0x000E,
ChocoPort = 0x0012,
Opening = 0x0013,
GCShop = 0x0016,
GuildOrderGuide = 0x0017,
GuildOrderOfficer = 0x0018,
Stories = 0x001A,
FcTalk = 0x001F,
};
enum ActionType : uint8_t
{
Event,
Spell,
Teleport
};
enum struct PlayerStateFlag : uint8_t
{
NoFlag = 0,
NoCombat,
Combat,
Casting,
StatusAffliction,
StatusAffliction1,
Occupied,
Occupied1,
Occupied2,
Occupied3,
BoundByDuty,
Occupied4,
NewAdventurer,
TradeOpen,
BrowsingBazaar,
HandlingItems,
Crafting,
PreparingToCraft,
Gathering,
Fishing,
BeingRaised,
BetweenAreas,
Stealthed,
InnRoom,
Jumping,
AutoRun,
Occupied5,
BetweenAreas1,
SystemError,
LoggingOut,
InvalidLocation,
WaitingForDuty,
BoundByDuty1,
Mounting,
WatchingCutscene,
WaitingForDutyFinder,
CreatingCharacter,
Jumping1,
PvpDisplay,
StatusAfflication2,
Mounting1,
CarryingItem,
UsingPartyFinder,
HousingFunctions,
Transformed,
FreeTrail,
BeingMoved,
Mounting2,
StatusAffliction3,
StatusAffliction4,
RegisteringRaceOrMatch,
WaitingForRaceOrMatch,
WaitingForTripleTriadMatch,
InFlight,
WatchingCutscene1
};
enum struct FateStatus : uint8_t
{
Active = 2,
Inactive = 4,
Preparing = 7,
Completed = 8,
};
enum struct OnlineStatus : uint8_t
{
None = 0,
Producer,
GameMaster,
GameMaster1,
GameMaster2,
Disconnected,
WaitFriendlistApproval,
WaitLinkshellApproval,
WaitFCApproval,
NotFound,
Offline,
CameraMode,
Mentor,
Busy,
PvP,
TripleTriad,
Cutscene,
ChocoPorter,
Afk,
LfRepairs,
LfRepair,
LfMeld,
RolePlaying,
LfParty,
SwordForHire,
WaitDutyFinder,
RecPartyMembers,
Mentor1,
PvEMentor,
TradeMentor,
PvPMentor,
Returner,
NewAdventurer,
AllianceLead,
AlliancePartyLead,
AllianceMember,
PartyLeader,
PartyMember,
PartyLeaderCross,
PartyMemberCross,
AnotherWorld,
SharingDuty,
SimliarDuty,
InDuty,
TrialAdventurer,
FreeCompany,
GrandCompany,
Online
};
enum ActorControlType : uint16_t
{
ToggleWeapon = 0x01,
SetStatus = 0x02,
CastStart = 0x03,
ToggleAggro = 0x04,
ClassJobChange = 0x05,
DefeatMsg = 0x06,
GainExpMsg = 0x07,
LevelUpEffect = 0x0A,
ExpChainMsg = 0x0C,
HpSetStat = 0x0D,
DeathAnimation = 0x0E,
CastInterrupt = 0x0F,
StatusEffectGain = 0x14,
StatusEffectLose = 0x15,
UpdateRestedExp = 0x018,
Unk2 = 0x19,
Flee = 0x1B,
Unk3 = 0x20,
CombatIndicationShow = 0x22,
SpawnEffect = 0x25,
ToggleInvisible = 0x26,
ToggleActionUnlock = 0x29,
UpdateUiExp = 0x2B,
DmgTakenMsg = 0x2D,
SetTarget = 0x32,
ToggleNameHidden = 0x36,
LimitbreakStart = 0x47,
LimitbreakPartyStart = 0x48,
BubbleText = 0x49,
DamageEffect = 0x50,
RaiseAnimation = 0x51,
TreasureScreenMsg = 0x57,
ItemRepairMsg = 0x5C,
LeveStartAnim = 0x66,
Unk4 = 0x67,
PlayerNameGrayout = 0x6A,
ItemObtainMsg = 0x75,
DutyQuestScreenMsg = 0x7B,
ItemObtainIcon = 0x84,
FateItemFailMsg = 0x85,
ItemFailMsg = 0x86,
ActionLearnMsg1 = 0x87,
FreeEventPos = 0x8A,
UnlockAetherCurrentMsg = 0xA4,
RemoveName = 0xA8,
ScreenFadeOut = 0xAA,
ZoneIn = 0xC8,
ZoneInDefaultPos = 0xC9,
TeleportStart = 0xCB,
TeleportDone = 0xCD,
TeleportDoneFadeOut = 0xCE,
DespawnZoneScreenMsg = 0xCF,
InstanceSelectDlg = 0xD2,
ActorDespawnEffect = 0xD4,
CompanionUnlock = 0xFD,
ObtainBarding = 0xFE,
EquipBarding = 0xFF,
CompanionMsg1 = 0x102,
CompanionMsg2 = 0x103,
ShowPetHotbar = 0x104,
ActionLearnMsg = 0x109,
ActorFadeOut = 0x10A,
ActorFadeIn = 0x10B,
WithdrawMsg = 0x10C,
OrderMinion = 0x10D,
ToggleMinion = 0x10E,
LearnMinion = 0x10F,
ActorFateOut1 = 0x110,
Emote = 0x122,
SetPose = 0x127,
CraftingUnk = 0x12C,
GatheringSenseMsg = 0x130,
PartyMsg = 0x131,
GatheringSenseMsg1 = 0x132,
GatheringSenseMsg2 = 0x138,
FishingMsg = 0x140,
FishingBaitMsg = 0x145,
FishingReachMsg = 0x147,
FishingFailMsg = 0x148,
MateriaConvertMsg = 0x15E,
MeldSuccessMsg = 0x15F,
MeldFailMsg = 0x160,
MeldModeToggle = 0x161,
AetherRestoreMsg = 0x163,
DyeMsg = 0x168,
ToggleCrestMsg = 0x16A,
ToggleBulkCrestMsg = 0x16B,
MateriaRemoveMsg = 0x16C,
GlamourCastMsg = 0x16D,
GlamourRemoveMsg = 0x16E,
RelicInfuseMsg = 0x179,
AetherReductionDlg = 0x17D,
Unk6 = 0x19C,
SetTitle = 0x1F4,
SetStatusIcon = 0x1F8,
SetHomepoint = 0x1FB,
SetFavorite = 0x1FC,
LearnTeleport = 0x1FD,
ArmoryErrorMsg = 0x201,
AchievementPopup = 0x203,
Unk7 = 0x205,
AchievementMsg = 0x206,
SetItemLevel = 0x209,
ChallengeEntryCompleteMsg = 0x20B,
ChallengeEntryUnlockMsg = 0x20C,
GilTrailMsg = 0x211,
SetMaxGearSets = 0x230,
ToggleDisplayHeadAndWeapon = 0x260,
GearSetEquipMsg = 0x321
};
enum struct ChatType : uint32_t
{
LogKindError,
ServerDebug,
ServerUrgent,
ServerNotice,
Unused4,
Unused5,
Unused6,
Unused7,
Unused8,
Unused9,
Say,
Shout,
Tell,
TellReceive,
Party,
Alliance,
LS1,
LS2,
LS3,
LS4,
LS5,
LS6,
LS7,
LS8,
FreeCompany,
Unused25,
Unused26,
NoviceNetwork,
CustomEmote,
StandardEmote,
Yell,
Unknown31,
PartyUnk2,
Unused33,
Unused34,
Unused35,
Unused36,
Unused37,
Unused38,
Unused39,
Unused40,
BattleDamage,
BattleFailed,
BattleActions,
BattleItems,
BattleHealing,
BattleBeneficial,
BattleDetrimental,
BattleUnk48,
BattleUnk49,
Unused50,
Unused51,
Unused52,
Unused53,
Unused54,
Unused55,
Echo,
SystemMessage,
SystemErrorMessage,
BattleSystem,
GatheringSystem,
NPCMessage,
LootMessage,
Unused63,
CharProgress,
Loot,
Crafting,
Gathering,
NPCAnnouncement,
FCAnnouncement,
FCLogin,
RetainerSale,
PartySearch,
PCSign,
DiceRoll,
NoviceNetworkNotice,
Unknown76,
Unused77,
Unused78,
Unused79,
GMTell,
GMSay,
GMShout,
GMYell,
GMParty,
GMFreeCompany,
GMLS1,
GMLS2,
GMLS3,
GMLS4,
GMLS5,
GMLS6,
GMLS7,
GMLS8,
GMNoviceNetwork,
Unused95,
Unused96,
Unused97,
Unused98,
Unused99,
Unused100
};
struct ServerEntry
{
uint32_t serverId;
uint32_t flags;
};
typedef std::vector< PlayerStateFlag > PlayerStateFlagList;
} /* Common */
} /* Core */
#endif

View file

@ -0,0 +1,318 @@
/**
* Structural definitions common to all FFXIV:ARR packets.
*/
#ifndef _CORE_NETWORK_PACKETS_COMMON_H
#define _CORE_NETWORK_PACKETS_COMMON_H
#include <iostream>
#include <vector>
using namespace std;
namespace Core {
namespace Network {
namespace Packets {
/**
* Anticipated usage:
* ==================
* Set up a stream buffer to collect the bytes to be transmitted as a packet.
* Now, you can do the following (given you have the structs filled out already).
*
* FFXIVARR_PACKET_HEADER pkt_hdr = { . . . };
* FFXIVARR_PACKET_SEGMENT_HEADER pkt_seg_hdr[n] = { . . . };
*
* std::stringstream buf;
* buf << pkt_hdr;
* for (int i = 0; i < n; i++)
* {
* buf << pkt_seg_hdr[i];
* buf << {pkt_seg_data[i]};
* }
*
* The reverse can be done parsing a packet. Remember to validate the packet
* type before parsing the headers.
*
* Compression and Encryption:
* ===========================
* By using std::iostream's, you can support stream filters. Simply create a
* stream that performs the compression or encryption, and use that stream to
* read and write.
*/
/**
* Structure representing the common header for all FFXIVARR packets.
*
* 0 4 8 12 14 16
* +-------------------------------+---------------+-------+-------+
* | timestamp | size | cType | count |
* +---+---+-------+---------------+---------------+-------+-------+
* | ? |CMP| ? | ? |
* +---+---+-------+---------------+
* (followed by /count/ FFXIVARR_PACKET_SEGMENTs)
*/
struct FFXIVARR_PACKET_HEADER
{
uint64_t unknown_0;
uint64_t unknown_8;
/**
* Represents the number of milliseconds since epoch that the packet was
* sent.
*/
uint64_t timestamp;
/** The size of the packet header and its payload */
uint32_t size;
/** The type of this connection - 1 zone, 2 chat*/
uint16_t connectionType;
/** The number of packet segments that follow. */
uint16_t count;
uint8_t unknown_20;
/** Indicates if the data segments of this packet are compressed. */
uint8_t isCompressed;
uint32_t unknown_24;
};
inline ostream& operator<<(ostream& os, const FFXIVARR_PACKET_HEADER& hdr)
{
return os.write(reinterpret_cast<const char*>(&hdr), sizeof hdr);
}
inline istream& operator>>(istream& is, FFXIVARR_PACKET_HEADER& hdr)
{
return is.read(reinterpret_cast<char*>(&hdr), sizeof hdr);
}
/**
* Structure representing the header portion of a packet segment.
*
* NOTE: If the main packet header indicated the packet is compressed, this
* header will be compressed as well! The header will NOT ever be encrypted.
*
* 0 4 8 12 16
* +---------------+---------------+---------------+-------+-------+
* | size | source_actor | target_actor | type | ? |
* +---------------+---------------+---------------+-------+-------+
* | |
* : type-specific data of length, size, follows :
* | (NOTE: Some segments MAY be encrypted) |
* +---------------------------------------------------------------+
*/
struct FFXIVARR_PACKET_SEGMENT_HEADER
{
/** The size of the segment header and its data. */
uint32_t size;
/** The session ID this segment describes. */
uint32_t source_actor;
/** The session ID this packet is being delivered to. */
uint32_t target_actor;
/** The segment type. (1, 2, 3, 7, 8, 9, 10) */
uint16_t type;
uint16_t _reserved_E;
};
inline ostream& operator<<(ostream& os, const FFXIVARR_PACKET_SEGMENT_HEADER& hdr)
{
return os.write(reinterpret_cast<const char*>(&hdr), sizeof hdr);
}
inline istream& operator>>(istream& is, FFXIVARR_PACKET_SEGMENT_HEADER& hdr)
{
return is.read(reinterpret_cast<char*>(&hdr), sizeof hdr);
}
// TODO: Include structures for the individual packet segment types
/**
* Server IPC Type Codes.
*/
enum ServerIpcType : uint16_t
{
LobbyError = 0x0002,
LobbyServiceAccountList = 0x000C,
LobbyCharList = 0x000D,
LobbyCharCreate = 0x000E,
LobbyEnterWorld = 0x000F,
LobbyServerList = 0x0015,
LobbyRetainerList = 0x0017,
Ping = 0x0065, // updated for sb
Init = 0x0066, // updated for sb
Chat = 0x0067, // updated for sb
Logout = 0x0077, // updated for sb
Playtime = 0x00AF, // updated for sb
SocialRequestError = 0x00AD,
SocialRequestResponse = 0x11AF,
SocialList = 0x00B4, // updated for sb
UpdateSearchInfo = 0x00B2,
InitSearchInfo = 0x00B7, // updated for sb
ServerNotice = 0x00BC, // updated for sb
SetOnlineStatus = 0x00B9,
BlackList = 0x00CA, // updated for sb
LinkshellList = 0x00D1, // updated for sb
StatusEffectList = 0x00F0, // updated for sb
Effect = 0x00F1, // updated for sb
GCAffiliation = 0x00FC,
ActorSetPos = 0x0114, // updated for sb
ActorCast = 0x0116, // updated for sb
PlayerSpawn = 0x0110, // updated for sb
NpcSpawn = 0x0111, // updated for sb
ActorMove = 0x0112, // updated for sb
HateList = 0x011A, // updated for sb borked
UpdateClassInfo = 0x0117,
InitUI = 0x011E, // updated for sb
PlayerStats = 0x011F, // updated for sb
ActorOwner = 0x0120, // updated for sb
PlayerStateFlags = 0x0121, // updated for sb
PlayerClassInfo = 0x0123, // updated for sb
ModelEquip = 0x0124, // updated for sb
ItemInfo = 0x0139, // updated for sb
ContainerInfo = 0x013A, // updated for sb
InventoryTransactionFinish = 0x013B,
InventoryTransaction = 0x012A,
CurrencyCrystalInfo = 0x013D,
InventoryActionAck = 0x0139,
UpdateInventorySlot = 0x0140, // updated for sb
AddStatusEffect = 0x0141,
ActorControl142 = 0x0142, // unchanged for sb
ActorControl143 = 0x0143, // unchanged for sb
ActorControl144 = 0x0144, // unchanged for sb
UpdateHpMpTp = 0x0145, // unchanged for sb
CFNotify = 0x0078,
CFMemberStatus = 0x0079,
CFDutyInfo = 0x007A,
CFPlayerInNeed = 0x007F,
CFRegistered = 0x00B0,
CFAvailableContents = 0x01CF,
EventPlay = 0x0154, // updated for sb
EventStart = 0x015D, // updated for sb
EventFinish = 0x015E, // updated for sb
QuestActiveList = 0x0171, // updated for sb
QuestUpdate = 0x0172, // updated for sb
QuestCompleteList = 0x0173, // updated for sb
QuestFinish = 0x0174, // updated for sb
QuestMessage = 0x0179,
QuestTracker = 0x0181, // updated for sb
ActorSpawn = 0x0190, // todo: split into playerspawn/actorspawn and use opcode 0x110/0x111
ActorFreeSpawn = 0x0191, // unchanged for sb
InitZone = 0x019A, // unchanged for sb
WeatherChange = 0x01AF, // updated for sb
Discovery = 0x01B2, // updated for sb
PrepareZoning = 0x0239, // updated for sb
// Unknown IPC types that still need to be sent
// TODO: figure all these out properly
IPCTYPE_UNK_320 = 0x1FB,
IPCTYPE_UNK_322 = 0x1FD,
};
// TODO: Include structures for the individual packet segment types
/**
* Client IPC Type Codes.
*/
enum ClientIpcType : uint16_t
{
ReqCharList = 0x0003,
ReqEnterWorld = 0x0004,
ReqServiceAccountList = 0x0005,
ReqCharDelete = 0x000A,
ReqCharCreate = 0x000B,
PingHandler = 0x0065,// updated for sb
InitHandler = 0x0066,// updated for sb
ChatHandler = 0x0067,// updated for sb
FinishLoadingHandler = 0x0069,// updated for sb
PlayTimeHandler = 0x0073,// updated for sb
LogoutHandler = 0x0074,// updated for sb
CFDutyInfoHandler = 0x0078,
SocialReqSendHandler = 0x00A5,
SocialListHandler = 0x00AA,// updated for sb
SetSearchInfoHandler = 0x00AC,
ReqSearchInfoHandler = 0x00AD,
BlackListHandler = 0x00B7,// updated for sb
LinkshellListHandler = 0x00BF,// updated for sb
FcInfoReqHandler = 0x0100,// updated for sb
ZoneLineHandler = 0x0107, // updated for sb
ActionHandler = 0x0108,// updated for sb
DiscoveryHandler = 0x0109,// updated for sb
SkillHandler = 0x010B, // updated for sb
GMCommand1 = 0x010D,// updated for sb
GMCommand2 = 0x010E,// updated for sb
UpdatePositionHandler = 0x010F, // updated for sb
InventoryModifyHandler = 0x0116, // updated for sb
TalkEventHandler = 0x011F, // updated for sb
EmoteEventHandler = 0x0120, // updated for sb
WithinRangeEventHandler = 0x0121, // updated for sb
OutOfRangeEventHandler = 0x0122, // updated for sb
EnterTeriEventHandler = 0x0123, // updated for sb
ReturnEventHandler = 0x0128,
TradeReturnEventHandler = 0x0129,
};
struct FFXIVARR_PACKET_RAW
{
FFXIVARR_PACKET_SEGMENT_HEADER segHdr;
std::vector<uint8_t> data;
};
/**
* Structural representation of the common header for IPC packet segments.
* NOTE: This is packet segment type 3.
*
* 0 4 6 8 12 16
* +-------+-------+------+----------+---------------+---------------+
* | 14 00 | type | ?? | serverId | timestamp | ??? |
* +-------+-------+------+----------+---------------+---------------+
* | |
* : data :
* | |
* +-----------------------------------------------------------------+
*/
struct FFXIVARR_IPC_HEADER
{
uint16_t reserved;
ServerIpcType type;
uint16_t unknown_2;
uint16_t serverId;
uint32_t timestamp;
uint32_t unknown_C;
};
inline ostream& operator<<(ostream& os, const FFXIVARR_IPC_HEADER& hdr)
{
return os.write(reinterpret_cast<const char*>(&hdr), sizeof hdr);
}
inline istream& operator>>(istream& is, FFXIVARR_IPC_HEADER& hdr)
{
return is.read(reinterpret_cast<char*>(&hdr), sizeof hdr);
}
} /* Packets */
} /* Network */
} /* Core */
#endif /*_CORE_NETWORK_PACKETS_COMMON_H*/

View file

@ -0,0 +1,210 @@
#include "Connection.h"
#include "Hive.h"
#include <boost/interprocess/detail/atomic.hpp>
#include <boost/bind.hpp>
namespace Core {
namespace Network {
//-----------------------------------------------------------------------------
Connection::Connection( HivePtr hive )
: m_hive( hive ),
m_socket( hive->GetService() ),
m_io_strand( hive->GetService() ),
m_receive_buffer_size( 32000 ),
m_error_state( 0 )
{
}
Connection::~Connection()
{
}
void Connection::Bind( const std::string & ip, uint16_t port )
{
boost::asio::ip::tcp::endpoint endpoint( boost::asio::ip::address::from_string( ip ), port );
m_socket.open( endpoint.protocol() );
m_socket.set_option( boost::asio::ip::tcp::acceptor::reuse_address( false ) );
m_socket.bind( endpoint );
}
void Connection::StartSend()
{
if( !m_pending_sends.empty() )
{
boost::asio::async_write( m_socket,
boost::asio::buffer( m_pending_sends.front() ),
m_io_strand.wrap( boost::bind( &Connection::HandleSend,
shared_from_this(),
boost::asio::placeholders::error,
m_pending_sends.begin() ) ) );
}
}
void Connection::StartRecv( int32_t total_bytes )
{
if( total_bytes > 0 )
{
m_recv_buffer.resize( total_bytes );
boost::asio::async_read( m_socket,
boost::asio::buffer( m_recv_buffer ),
m_io_strand.wrap( boost::bind( &Connection::HandleRecv,
shared_from_this(),
_1,
_2 ) ) );
}
else
{
m_recv_buffer.resize( m_receive_buffer_size );
m_socket.async_read_some( boost::asio::buffer( m_recv_buffer ),
m_io_strand.wrap( boost::bind( &Connection::HandleRecv,
shared_from_this(),
_1,
_2 ) ) );
}
}
void Connection::StartError( const boost::system::error_code & error )
{
if( boost::interprocess::ipcdetail::atomic_cas32( &m_error_state, 1, 0 ) == 0 )
{
boost::system::error_code ec;
m_socket.shutdown( boost::asio::ip::tcp::socket::shutdown_both, ec );
m_socket.close( ec );
OnError( error );
}
}
void Connection::HandleConnect( const boost::system::error_code & error )
{
if( error || HasError() || m_hive->HasStopped() )
{
StartError( error );
}
else
{
if( m_socket.is_open() )
{
OnConnect( m_socket.remote_endpoint().address().to_string(), m_socket.remote_endpoint().port() );
Recv();
}
else
{
StartError( error );
}
}
}
void Connection::HandleSend( const boost::system::error_code & error, std::list< std::vector< uint8_t > >::iterator itr )
{
if( error || HasError() || m_hive->HasStopped() )
{
StartError( error );
}
else
{
OnSend( *itr );
m_pending_sends.erase( itr );
StartSend();
}
}
void Connection::HandleRecv( const boost::system::error_code & error, int32_t actual_bytes )
{
if( error || HasError() || m_hive->HasStopped() )
{
StartError( error );
}
else
{
m_recv_buffer.resize( actual_bytes );
OnRecv( m_recv_buffer );
Recv();
m_pending_recvs.pop_front();
if( !m_pending_recvs.empty() )
{
StartRecv( m_pending_recvs.front() );
}
}
}
void Connection::DispatchSend( std::vector< uint8_t > buffer )
{
bool should_start_send = m_pending_sends.empty();
m_pending_sends.push_back( buffer );
if( should_start_send )
{
StartSend();
}
}
void Connection::DispatchRecv( int32_t total_bytes )
{
bool should_start_receive = m_pending_recvs.empty();
m_pending_recvs.push_back( total_bytes );
if( should_start_receive )
{
StartRecv( total_bytes );
}
}
void Connection::Connect( const std::string & host, uint16_t port)
{
boost::asio::ip::tcp::resolver resolver( m_hive->GetService() );
boost::asio::ip::tcp::resolver::query query( host, std::to_string( port ) );
boost::asio::ip::tcp::resolver::iterator iterator = resolver.resolve( query );
m_socket.async_connect( *iterator, m_io_strand.wrap( boost::bind( &Connection::HandleConnect, shared_from_this(), _1 ) ) );
}
void Connection::Disconnect()
{
OnDisconnect();
m_socket.close();
}
void Connection::Recv( int32_t total_bytes )
{
m_io_strand.post( boost::bind( &Connection::DispatchRecv, shared_from_this(), total_bytes ) );
}
void Connection::Send( const std::vector< uint8_t > & buffer )
{
m_io_strand.post( boost::bind( &Connection::DispatchSend, shared_from_this(), buffer ) );
}
boost::asio::ip::tcp::socket & Connection::GetSocket()
{
return m_socket;
}
boost::asio::strand & Connection::GetStrand()
{
return m_io_strand;
}
HivePtr Connection::GetHive()
{
return m_hive;
}
void Connection::SetReceiveBufferSize( int32_t size )
{
m_receive_buffer_size = size;
}
int32_t Connection::GetReceiveBufferSize() const
{
return m_receive_buffer_size;
}
bool Connection::HasError()
{
return ( boost::interprocess::ipcdetail::atomic_cas32( &m_error_state, 1, 1 ) == 1 );
}
}
}
//-----------------------------------------------------------------------------

View file

@ -0,0 +1,144 @@
#ifndef CONNECTION_H_
#define CONNECTION_H_
//-----------------------------------------------------------------------------
#include <boost/asio.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <vector>
#include <list>
#include <boost/cstdint.hpp>
#include "Forwards.h"
#include "Acceptor.h"
namespace Core {
namespace Network {
//-----------------------------------------------------------------------------
class Hive;
class Acceptor;
class Connection;
//-----------------------------------------------------------------------------
class Connection : public boost::enable_shared_from_this< Connection >
{
friend class Acceptor;
friend class Hive;
protected:
HivePtr m_hive;
boost::asio::ip::tcp::socket m_socket;
boost::asio::strand m_io_strand;
std::vector< uint8_t > m_recv_buffer;
std::list< int32_t > m_pending_recvs;
std::list< std::vector< uint8_t > > m_pending_sends;
int32_t m_receive_buffer_size;
volatile uint32_t m_error_state;
Connection( HivePtr hive );
virtual ~Connection();
private:
Connection( const Connection & rhs );
Connection & operator =( const Connection & rhs );
void StartSend();
void StartRecv( int32_t total_bytes );
void StartError( const boost::system::error_code & error );
void DispatchSend( std::vector< uint8_t > buffer );
void DispatchRecv( int32_t total_bytes );
void HandleConnect( const boost::system::error_code & error );
void HandleSend( const boost::system::error_code & error, std::list< std::vector< uint8_t > >::iterator itr );
void HandleRecv( const boost::system::error_code & error, int32_t actual_bytes );
private:
// Called when the connection has successfully connected to the local host.
virtual void OnAccept( const std::string & host, uint16_t port ) {};
// Called when the connection has successfully connected to the remote host.
virtual void OnConnect( const std::string & host, uint16_t port ) {};
// Called when data has been sent by the connection.
virtual void OnSend( const std::vector< uint8_t > & buffer ) {};
// Called when data has been received by the connection.
virtual void OnRecv( std::vector< uint8_t > & buffer ) {};
// Called when an error is encountered.
virtual void OnError( const boost::system::error_code & error ) {};
// Called when the connection has been disconnected
virtual void OnDisconnect() {};
public:
// Returns the Hive object.
HivePtr GetHive();
// Returns the socket object.
boost::asio::ip::tcp::socket & GetSocket();
// Returns the strand object.
boost::asio::strand & GetStrand();
// Sets the application specific receive buffer size used. For stream
// based protocols such as HTTP, you want this to be pretty large, like
// 64kb. For packet based protocols, then it will be much smaller,
// usually 512b - 8kb depending on the protocol. The default value is
// 4kb.
void SetReceiveBufferSize( int32_t size );
// Returns the size of the receive buffer size of the current object.
int32_t GetReceiveBufferSize() const;
// Returns true if this object has an error associated with it.
bool HasError();
// Binds the socket to the specified interface.
void Bind( const std::string & ip, uint16_t port );
// Starts an a/synchronous connect.
void Connect( const std::string & host, uint16_t port );
// Posts data to be sent to the connection.
void Send( const std::vector< uint8_t > & buffer );
// Posts a recv for the connection to process. If total_bytes is 0, then
// as many bytes as possible up to GetReceiveBufferSize() will be
// waited for. If Recv is not 0, then the connection will wait for exactly
// total_bytes before invoking OnRecv.
void Recv( int32_t total_bytes = 0 );
// Posts an asynchronous disconnect event for the object to process.
void Disconnect();
};
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
template<class T>
boost::shared_ptr< T > addServerToHive( const std::string& listenIp, uint32_t port, HivePtr pHive )
{
try
{
AcceptorPtr acceptor( new Acceptor( pHive ) );
acceptor->Listen( listenIp, port );
boost::shared_ptr< T > connection( new T( pHive, acceptor ) );
acceptor->Accept( connection );
return connection;
}
catch( std::runtime_error e )
{
throw;
}
}
}
}
#endif

View file

@ -0,0 +1,411 @@
#include "Database.h"
#include <stdio.h>
#include <stdarg.h>
#include <thread>
#include <chrono>
#include <sstream>
#include "Logger.h"
extern Core::Logger g_log;
namespace Core {
namespace Db {
QueryResult::QueryResult( MYSQL_RES *res, uint32_t fields, uint32_t rows )
: m_result( res ),
m_fieldCount( fields ),
m_rowCount( rows )
{
m_currentRow = new Field[fields];
}
QueryResult::~QueryResult()
{
mysql_free_result( m_result );
delete[] m_currentRow;
}
bool QueryResult::nextRow()
{
MYSQL_ROW row = mysql_fetch_row( m_result );
if( row == NULL )
{
return false;
}
for( uint32_t i = 0; i < m_fieldCount; ++i )
{
m_currentRow[i].setValue( row[i] );
}
return true;
}
Database::Database()
{
m_port = 0;
_counter = 0;
m_pConnections = nullptr;
m_connectionCount = -1; // Not connected.
}
Database::~Database()
{
for( int32_t i = 0; i < m_connectionCount; ++i )
{
if( m_pConnections[i].conn != nullptr )
{
mysql_close( m_pConnections[i].conn );
}
}
delete[] m_pConnections;
}
bool Database::initialize( const DatabaseParams& params )
{
uint32_t i;
MYSQL * temp;
MYSQL * temp2;
my_bool my_true = true;
g_log.Log( Core::LoggingSeverity::info, "Database: Connecting to " + params.hostname + ", database " + params.databaseName + "..." );
m_pConnections = new DatabaseConnection[params.connectionCount];
for( i = 0; i < params.connectionCount; ++i )
{
temp = mysql_init( NULL );
if( mysql_options( temp, MYSQL_SET_CHARSET_NAME, "utf8" ) )
{
g_log.Log( Core::LoggingSeverity::error, "Database: Could not set utf8 character set." );
}
if( mysql_options( temp, MYSQL_OPT_RECONNECT, &my_true ) )
{
g_log.Log( Core::LoggingSeverity::error, "Database: MYSQL_OPT_RECONNECT could not be set, connection drops may occur but will be counteracted." );
}
temp2 = mysql_real_connect( temp,
params.hostname.c_str(),
params.username.c_str(),
params.password.c_str(),
params.databaseName.c_str(),
params.port,
NULL,
0 );
if( temp2 == NULL )
{
g_log.Log( Core::LoggingSeverity::fatal, "Database: Connection failed due to: `%s`" + std::string( mysql_error( temp ) ) );
return false;
}
m_pConnections[i].conn = temp2;
}
return true;
}
uint64_t Database::getNextUId()
{
execute( "INSERT INTO uniqueiddata( IdName ) VALUES( 'NOT_SET' );" );
auto res = query( "SELECT LAST_INSERT_ID();" );
if( !res )
{
return 0;
}
Db::Field *field = res->fetch();
return field[0].getUInt64();
}
DatabaseConnection * Database::getFreeConnection()
{
uint32_t i = 0;
for( ;;)
{
DatabaseConnection * con = &m_pConnections[( ( i++ ) % m_connectionCount )];
if( con->lock.try_lock() )
{
return con;
}
// sleep every 20 iterations, otherwise this can cause 100% cpu if the db link goes dead
if( !( i % 20 ) )
{
std::this_thread::sleep_for( std::chrono::milliseconds( 10 ) );
}
}
// shouldn't be reached
return NULL;
}
boost::shared_ptr<QueryResult> Database::query( const std::string& QueryString )
{
// Send the query
boost::shared_ptr<QueryResult> qResult( nullptr );
DatabaseConnection * con = getFreeConnection();
if( _SendQuery( con, QueryString.c_str(), false ) )
{
qResult = boost::shared_ptr<QueryResult>( _StoreQueryResult( con ) );
}
con->lock.unlock();
return qResult;
}
QueryResult * Database::queryNA( const char* QueryString )
{
// Send the query
QueryResult * qResult = NULL;
DatabaseConnection * con = getFreeConnection();
if( _SendQuery( con, QueryString, false ) )
{
qResult = _StoreQueryResult( con );
}
con->lock.unlock();
return qResult;
}
QueryResult * Database::fQuery( const char * QueryString, DatabaseConnection * con ) {
// Send the query
QueryResult * qResult = NULL;
if( _SendQuery( con, QueryString, false ) )
{
qResult = _StoreQueryResult( con );
}
return qResult;
}
void Database::fWaitExecute( const char * QueryString, DatabaseConnection * con )
{
// Send the query
_SendQuery( con, QueryString, false );
}
bool Database::execute( const char* QueryString, ... ) {
char query[16384];
va_list vlist;
va_start( vlist, QueryString );
vsnprintf( query, 16384, QueryString, vlist );
va_end( vlist );
return waitExecuteNA( query );
}
bool Database::execute( const std::string& QueryString )
{
return waitExecuteNA( QueryString.c_str() );
}
bool Database::executeNA( const char* QueryString )
{
return waitExecuteNA( QueryString );
}
//this will wait for completion
bool Database::waitExecute( const char* QueryString, ... )
{
char sql[16384];
va_list vlist;
va_start( vlist, QueryString );
vsnprintf( sql, 16384, QueryString, vlist );
va_end( vlist );
DatabaseConnection * con = getFreeConnection();
bool Result = _SendQuery( con, sql, false );
con->lock.unlock();
return Result;
}
bool Database::waitExecuteNA( const char* QueryString )
{
DatabaseConnection * con = getFreeConnection();
bool Result = _SendQuery( con, QueryString, false );
con->lock.unlock();
return Result;
}
void Database::freeQueryResult( QueryResult * p )
{
delete p;
}
std::string Database::escapeString( std::string Escape )
{
char a2[16384] = { 0 };
DatabaseConnection * con = getFreeConnection();
const char * ret;
if( mysql_real_escape_string( con->conn, a2, Escape.c_str(), ( unsigned long ) Escape.length() ) == 0 )
{
ret = Escape.c_str();
}
else {
ret = a2;
}
con->lock.unlock();
return std::string( ret );
}
void Database::escapeLongString( const char * str, uint32_t len, std::stringstream& out )
{
char a2[65536 * 3] = { 0 };
DatabaseConnection * con = getFreeConnection();
mysql_real_escape_string( con->conn, a2, str, ( unsigned long ) len );
out.write( a2, ( std::streamsize )strlen( a2 ) );
con->lock.unlock();
}
std::string Database::escapeString( const char * esc, DatabaseConnection * con )
{
char a2[16384] = { 0 };
const char * ret;
if( mysql_real_escape_string( con->conn, a2, ( char* ) esc, ( unsigned long ) strlen( esc ) ) == 0 )
{
ret = esc;
}
else
{
ret = a2;
}
return std::string( ret );
}
bool Database::_SendQuery( DatabaseConnection *con, const char* Sql, bool Self )
{
//dunno what it does ...leaving untouched
int result = mysql_query( con->conn, Sql );
if( result > 0 )
{
if( Self == false && _HandleError( con, mysql_errno( con->conn ) ) )
{
// Re-send the query, the connection was successful.
// The true on the end will prevent an endless loop here, as it will
// stop after sending the query twice.
result = _SendQuery( con, Sql, true );
}
else
{
g_log.Log( Core::LoggingSeverity::error, "Database: query failed " + std::string( mysql_error( con->conn ) ) );
g_log.Log( Core::LoggingSeverity::error, "\t" + std::string( Sql ) );
}
}
return ( result == 0 ? true : false );
}
bool Database::_HandleError( DatabaseConnection * con, uint32_t ErrorNumber )
{
// Handle errors that should cause a reconnect to the CDatabase.
switch( ErrorNumber ) {
case 2006: // Mysql server has gone away
case 2008: // Client ran out of memory
case 2013: // Lost connection to sql server during query
case 2055: // Lost connection to sql server - system error
{
// Let's instruct a reconnect to the db when we encounter these errors.
return _Reconnect( con );
}break;
}
return false;
}
QueryResult * Database::_StoreQueryResult( DatabaseConnection * con )
{
QueryResult *res;
MYSQL_RES * pRes = mysql_store_result( con->conn );
uint32_t uRows = ( uint32_t ) mysql_affected_rows( con->conn );
uint32_t uFields = ( uint32_t ) mysql_field_count( con->conn );
if( uRows == 0 || uFields == 0 || pRes == 0 )
{
if( pRes != NULL )
{
mysql_free_result( pRes );
}
return NULL;
}
res = new QueryResult( pRes, uFields, uRows );
res->nextRow();
return res;
}
bool Database::_Reconnect( DatabaseConnection * conn )
{
MYSQL * temp;
MYSQL * temp2;
temp = mysql_init( NULL );
temp2 = mysql_real_connect( temp,
m_hostname.c_str(),
m_username.c_str(),
m_password.c_str(),
m_databaseName.c_str(),
m_port,
NULL,
0 );
if( temp2 == NULL )
{
g_log.Log( Core::LoggingSeverity::error, "Database: Could not reconnect to database because of " + std::string( mysql_error( temp ) ) );
mysql_close( temp );
return false;
}
if( conn->conn != NULL )
{
mysql_close( conn->conn );
}
conn->conn = temp;
return true;
}
void Database::cleanupLibs()
{
mysql_library_end();
}
void Database::shutdown()
{
for( int32_t i = 0; i < m_connectionCount; ++i )
{
if( m_pConnections[i].conn != NULL )
{
mysql_close( m_pConnections[i].conn );
m_pConnections[i].conn = NULL;
}
}
}
}
}

View file

@ -0,0 +1,242 @@
#ifndef _DATABASE_H
#define _DATABASE_H
#include <mutex>
#include <stdio.h>
#include <mysql.h>
#include <boost/shared_ptr.hpp>
#include <string.h>
namespace Core {
namespace Db {
// CField is used to access db-query resultsets
class Field
{
public:
// set value
__inline void setValue( char* value )
{
m_pValue = value;
}
// return as string
__inline const char *getString()
{
return m_pValue ? m_pValue : "";
}
// return as string
__inline void getBinary( char* dstBuf, uint16_t size )
{
if( m_pValue )
{
memcpy( dstBuf, m_pValue, size );
}
else
{
dstBuf = NULL;
}
}
// return as float
__inline float getFloat()
{
return m_pValue ? static_cast< float >( atof( m_pValue ) ) : 0;
}
// return as bool
__inline bool getBool()
{
return m_pValue ? atoi( m_pValue ) > 0 : false;
}
// return as unsigned 8 bit integer
__inline uint8_t getUInt8()
{
return m_pValue ? static_cast< uint8_t >( atol( m_pValue ) ) : 0;
}
// return as signed 8 bit integer
__inline int8_t getInt8()
{
return m_pValue ? static_cast< int8_t >( atol( m_pValue ) ) : 0;
}
// return as unsigned 16 bit integer
__inline uint16_t getUInt16()
{
return m_pValue ? static_cast< uint16_t >( atol( m_pValue ) ) : 0;
}
// return as signed 16 bit integer
__inline int16_t getInt16()
{
return m_pValue ? static_cast< int16_t >( atol( m_pValue ) ) : 0;
}
// return as unsigned 32 bit integer
__inline uint32_t getUInt32()
{
return m_pValue ? static_cast< uint32_t >( atol( m_pValue ) ) : 0;
}
// return as signed 8 bit integer
__inline int32_t getInt32()
{
return m_pValue ? static_cast< int32_t >( atol( m_pValue ) ) : 0;
}
// return as unsigned 64 bit integer
uint64_t getUInt64()
{
if( m_pValue )
{
#ifdef _WIN32
uint64_t value;
sscanf( m_pValue, "%I64d", &value );
return value;
#else
uint64_t value;
sscanf( m_pValue, "%Lu", &value );
return value;
#endif
}
else
return 0;
}
private:
char *m_pValue;
};
class QueryResult
{
public:
QueryResult( MYSQL_RES *res, uint32_t fields, uint32_t rows );
~QueryResult();
bool nextRow();
void Delete()
{
delete this;
}
__inline Field* fetch()
{
return m_currentRow;
}
__inline uint32_t getFieldCount() const
{
return m_fieldCount;
}
__inline uint32_t getRowCount() const
{
return m_rowCount;
}
protected:
uint32_t m_fieldCount;
uint32_t m_rowCount;
Field *m_currentRow;
MYSQL_RES *m_result;
};
struct DatabaseConnection
{
std::mutex lock;
MYSQL *conn;
};
struct DatabaseParams
{
std::string hostname;
std::string username;
std::string password;
std::string databaseName;
uint16_t port;
uint32_t bufferSize;
uint32_t connectionCount;
};
class Database
{
public:
Database();
virtual ~Database();
/************************************************************************/
/* Virtual Functions */
/************************************************************************/
bool initialize( const DatabaseParams& params );
void shutdown();
boost::shared_ptr<QueryResult> query( const std::string& QueryString );
QueryResult* queryNA( const char* QueryString );
QueryResult* fQuery( const char * QueryString, DatabaseConnection *con );
void fWaitExecute( const char * QueryString, DatabaseConnection *con );
bool waitExecute( const char* QueryString, ... );//Wait For Request Completion
bool waitExecuteNA( const char* QueryString );//Wait For Request Completion
bool execute( const char* QueryString, ... );
bool execute( const std::string& QueryString );
bool executeNA( const char* QueryString );
__inline const std::string& getHostName()
{
return m_hostname;
}
__inline const std::string& getDatabaseName()
{
return m_databaseName;
}
std::string escapeString( std::string Escape );
void escapeLongString( const char * str, uint32_t len, std::stringstream& out );
std::string escapeString( const char * esc, DatabaseConnection *con );
void freeQueryResult( QueryResult * p );
DatabaseConnection *getFreeConnection();
void cleanupLibs();
/* database is killed off manually. */
void onShutdown() {}
uint64_t getNextUId();
protected:
// actual query function
bool _SendQuery( DatabaseConnection *con, const char* Sql, bool Self );
QueryResult * _StoreQueryResult( DatabaseConnection * con );
bool _HandleError( DatabaseConnection *conn, uint32_t ErrorNumber );
bool _Reconnect( DatabaseConnection *conn );
DatabaseConnection *m_pConnections;
uint32_t _counter;
///////////////////////////////
int32_t m_connectionCount;
// For reconnecting a broken connection
std::string m_hostname;
std::string m_username;
std::string m_password;
std::string m_databaseName;
uint32_t m_port;
};
}
}
#endif

View file

@ -0,0 +1,672 @@
#include "ExdData.h"
#include <boost/make_shared.hpp>
#include <boost/variant.hpp>
/* TYPES !!
case DataType::boolean: 1
case DataType::int8: 2
case DataType::uint8: 3
case DataType::int16: 4
case DataType::uint16: 5
case DataType::int32: 6
case DataType::uint32: 7
case DataType::float32: 8
case DataType::uint64: 9
*/
Core::Data::ExdData::ExdData()
{
}
Core::Data::ExdData::~ExdData( void )
{
}
xiv::exd::Exd Core::Data::ExdData::setupDatAccess( const std::string& name, xiv::exd::Language lang )
{
auto& cat = m_exd_data->get_category( name );
return static_cast< xiv::exd::Exd >( cat.get_data_ln( lang ) );
};
bool Core::Data::ExdData::init( const std::string& path )
{
try
{
m_data = boost::make_shared< xiv::dat::GameData >( path );
m_exd_data = boost::make_shared< xiv::exd::ExdData >( *m_data );
m_questDat = setupDatAccess( "Quest", xiv::exd::Language::en );
m_openingDat = setupDatAccess( "Opening", xiv::exd::Language::none );
m_customTalkDat = setupDatAccess( "CustomTalk", xiv::exd::Language::en );
m_aetheryteDat = setupDatAccess( "Aetheryte", xiv::exd::Language::en );
m_levelDat = setupDatAccess( "Level", xiv::exd::Language::none );
m_placeNameDat = setupDatAccess( "PlaceName", xiv::exd::Language::en );
m_itemsDat = setupDatAccess( "Item", xiv::exd::Language::en );
m_classJobCatDat = setupDatAccess( "ClassJobCategory", xiv::exd::Language::en );
m_raceDat = setupDatAccess( "Race", xiv::exd::Language::en );
m_eventItemDat = setupDatAccess( "EventItem", xiv::exd::Language::en );
}
catch( std::runtime_error )
{
return false;
}
return true;
}
bool Core::Data::ExdData::loadZoneInfo()
{
auto territoryTypeData = setupDatAccess( "TerritoryType", xiv::exd::Language::none );
auto placeNameData = setupDatAccess( "PlaceName", xiv::exd::Language::en );
auto mapData = setupDatAccess( "Map", xiv::exd::Language::none );
auto weatherRate = setupDatAccess( "WeatherRate", xiv::exd::Language::none );
auto territoryTypeDataRows = territoryTypeData.get_rows();
for( auto row : territoryTypeDataRows )
{
auto& fields = row.second;
uint32_t id = row.first;
uint16_t place_id = getField< uint16_t >( fields, 5 );
uint16_t map_id = getField< uint16_t >( fields, 6 );
std::string zoneStr = getField< std::string >( fields, 0 );
if( zoneStr.empty() )
continue;
auto placeNameDataFields = placeNameData.get_row( place_id );
std::string zone_str = getField< std::string >( placeNameDataFields, 0 );
auto mapDataFields = mapData.get_row( map_id );
int16_t map_index = getField< int16_t >( mapDataFields, 12 );
bool is_two_bytes = getField< bool >( mapDataFields, 15 );
uint8_t weather_rate = getField< uint8_t >( fields, 10 ) > 75 ? 0 : getField< uint8_t >( fields, 10 );
auto weatherRateFields = weatherRate.get_row( weather_rate );
int32_t aetheryte_index = getField< int32_t >( fields, 20 );
ZoneInfo info{ 0 };
info.id = id;
info.zone_name = zoneStr;
info.zone_str = zone_str;
info.layout_id = id;
info.discovery_index = map_index;
info.is_two_byte = is_two_bytes;
info.map_id = map_id;
info.weather_rate = weather_rate; // TODO: deal with weather groups
info.aetheryte_index = aetheryte_index;
uint8_t sumPc = 0;
for( size_t i = 0; i < 16; )
{
int32_t weatherId = getField< int32_t >( weatherRateFields, i );
if( weatherId == 0 )
break;
sumPc += getField< uint8_t >( weatherRateFields, i + 1 );
info.weather_rate_map[sumPc] = weatherId;
i += 2;
}
m_zoneInfoMap[id] = info;
}
return true;
}
bool Core::Data::ExdData::loadStatusEffectInfo()
{
auto StatusDat = setupDatAccess( "Status", xiv::exd::Language::en );
auto rows1 = StatusDat.get_rows();
for( auto row : rows1 )
{
auto& fields = row.second;
uint32_t id = row.first;
StatusEffectInfo info { 0 };
info.id = id;
info.name = getField< std::string >( fields, 0 );
m_statusEffectInfoMap[id] = info;
}
return true;
}
bool Core::Data::ExdData::loadAetheryteInfo()
{
auto AetheryteDat = setupDatAccess( "Aetheryte", xiv::exd::Language::en );
auto rows = AetheryteDat.get_rows();
for( auto row : rows )
{
auto& fields = row.second;
auto info = boost::make_shared< AetheryteInfo >();
info->id = row.first;
info->target_zone = getField< uint16_t >( fields, 10 );
info->isAetheryte = getField< bool >( fields, 15 );
uint16_t placename = getField< uint16_t >( fields, 8 );
auto placeNameInfo = getPlaceNameInfo( placename );
if( placeNameInfo )
{
info->placename = placeNameInfo->placename;
}
uint16_t placename_aethernet = getField< uint16_t >( fields, 9 );
auto placename_aethernetInfo = getPlaceNameInfo( placename_aethernet );
if( placename_aethernetInfo )
{
info->placename_aethernet = placename_aethernetInfo->placename;
}
info->levelId = getField< uint32_t >( fields, 11 );
info->map_coord_x = getField< int16_t >( fields, 20 );
info->map_coord_y = getField< int16_t >( fields, 21 );
m_aetheryteInfoMap.emplace( std::make_pair( info->id, info ) );
}
return true;
}
bool Core::Data::ExdData::loadClassJobInfo()
{
auto ClassJobDat = setupDatAccess( "ClassJob", xiv::exd::Language::en );
auto rows = ClassJobDat.get_rows();
for( auto row : rows )
{
auto& fields = row.second;
ClassJobInfo info { 0 };
uint32_t id = row.first;
if( id == 0 )
continue;
std::string name = getField< std::string >( fields, 0 );
std::string short_name = getField< std::string >( fields, 1 );
int8_t exp_idx = getField< int8_t >( fields, 4 );
info.id = id;
info.name = name;
info.name_short = short_name;
info.exp_idx = exp_idx;
info.start_weapon_id = getField< int32_t >( fields, 28 );
info.mod_hp = getField< uint16_t >( fields, 9 );
info.mod_mpcpgp = getField< uint16_t >( fields, 10 );
info.mod_str = getField< uint16_t >( fields, 11 );
info.mod_vit = getField< uint16_t >( fields, 12 );
info.mod_dex = getField< uint16_t >( fields, 13 );
info.mod_int = getField< uint16_t >( fields, 14 );
info.mod_mnd = getField< uint16_t >( fields, 15 );
info.mod_pie = getField< uint16_t >( fields, 16 );
m_classJobInfoMap[id] = info;
}
return true;
}
bool Core::Data::ExdData::loadParamGrowInfo()
{
auto ParamGrowDat = setupDatAccess( "ParamGrow", xiv::exd::Language::none );
auto rows = ParamGrowDat.get_rows();
for( auto row : rows )
{
auto& fields = row.second;
ParamGrowthInfo info { 0 };
uint32_t id = row.first;
info.level = id;
info.needed_exp = getField< int32_t >( fields, 0 );
info.piety_scalar = getField< uint16_t >( fields, 3 ); // 3
info.mp_const = getField< int32_t >( fields, 4 ); // 4
info.base_secondary = getField< int32_t >( fields, 5 );// 5
info.hp_mod = getField< uint16_t >( fields, 8 ); // 8
info.quest_exp_mod = getField< uint8_t >( fields, 7 ); // 7
m_paramGrowthInfoMap[id] = info;
}
return true;
}
bool Core::Data::ExdData::loadTribeInfo()
{
auto tribeDat = setupDatAccess( "Tribe", xiv::exd::Language::en );
auto rows = tribeDat.get_rows();
for( auto row : rows )
{
auto& fields = row.second;
TribeInfo info { 0 };
uint32_t id = row.first;
info.id = id;
info.name = getField< std::string >( fields, 0 );
info.mod_str = getField< int8_t >( fields, 4 );
info.mod_vit = getField< int8_t >( fields, 5 );
info.mod_dex = getField< int8_t >( fields, 6 );
info.mod_int = getField< int8_t >( fields, 7 );
info.mod_mnd = getField< int8_t >( fields, 8 );
info.mod_pie = getField< int8_t >( fields, 9 );
m_tribeInfoMap[id] = info;
}
return true;
}
bool Core::Data::ExdData::loadEventActionInfo()
{
auto EventActionDat = setupDatAccess( "EventAction", xiv::exd::Language::en );
auto rows = EventActionDat.get_rows();
for( auto row : rows )
{
auto& fields = row.second;
EventActionInfo info { 0 };
uint32_t id = row.first;
if( id == 0 )
{
continue;
}
std::string name = getField< std::string >( fields, 0 );
uint8_t time = getField< uint8_t >( fields, 2 );
info.id = id;
info.name = name;
info.castTime = time * 1000;
m_EventActionInfoMap[id] = info;
}
return true;
}
bool Core::Data::ExdData::loadActionInfo()
{
auto ActionDat = setupDatAccess( "Action", xiv::exd::Language::en );
auto rows = ActionDat.get_rows();
for( auto row : rows )
{
auto& fields = row.second;
ActionInfo info{ 0 };
uint32_t id = row.first;
if( id == 0 )
{
continue;
}
std::string name = getField< std::string >( fields, 0 );
uint8_t category = getField< uint8_t >( fields, 3 );
int8_t class_job = getField< int8_t >( fields, 10 );//9
uint8_t unlock_level = getField< uint8_t >( fields, 11 );//10
int8_t range = getField< int8_t >( fields, 13 );//11
bool can_target_self = getField< bool >( fields, 14 );//12
bool can_target_party = getField< bool>( fields, 15 );//13
bool can_target_friendly = getField< bool >( fields, 16 );//14
bool can_target_enemy = getField< bool >( fields, 17 );//15
bool is_aoe = getField< bool >( fields, 20 );//18
bool can_target_ko = getField< bool >( fields, 24 );//22
uint8_t aoe_type = getField< uint8_t >( fields, 26 );//24
uint8_t radius = getField< uint8_t >( fields, 27 );//25
uint8_t points_type = getField< uint8_t >( fields, 30 );//28
uint16_t points_cost = getField< uint16_t >( fields, 31 );//29
bool is_instant = getField< bool >( fields, 35 );
uint16_t cast_time = getField< uint16_t >( fields, 36 );
uint16_t recast_time = getField< uint16_t >( fields, 37 );
info.id = id;
info.name = name;
info.category = category;
info.class_job = class_job;
info.unlock_level = unlock_level;
info.range = range;
info.can_target_self = can_target_self;
info.can_target_party = can_target_party;
info.can_target_friendly = can_target_friendly;
info.can_target_enemy = can_target_enemy;
info.can_target_ko = can_target_ko;
info.is_aoe = is_aoe;
info.aoe_type = aoe_type;
info.radius = radius;
info.points_type = points_type;
info.points_cost = points_cost;
info.is_instant = is_instant;
info.cast_time = cast_time * 100;
info.recast_time = recast_time * 100;
m_actionInfoMap[id] = info;
}
return true;
}
boost::shared_ptr< Core::Data::PlaceNameInfo >
Core::Data::ExdData::getPlaceNameInfo( uint32_t placeNameId )
{
try
{
auto row = m_placeNameDat.get_row( placeNameId );
auto info = boost::make_shared< PlaceNameInfo >();
info->id = placeNameId;
info->placename = getField< std::string >( row, 0 );
return info;
}
catch( ... )
{
return nullptr;
}
return nullptr;
}
boost::shared_ptr< Core::Data::ItemInfo >
Core::Data::ExdData::getItemInfo( uint32_t catalogId )
{
try
{
auto row = m_itemsDat.get_row( catalogId );
auto info = boost::make_shared< ItemInfo >();
info->id = catalogId;
info->name = getField< std::string >( row, 0 );
info->item_level = getField< uint16_t >( row, 11 );
info->required_level = getField< uint8_t >( row, 12 );
info->ui_category = getField< uint8_t >( row, 17 );
info->stack_size = getField< uint32_t >( row, 19 );
info->is_hqable = getField< bool >( row, 20 );
info->model_primary = getField< uint64_t >( row, 45 );
info->model_secondary = getField< uint64_t >( row, 46 );
info->delayMs = getField< uint16_t >( row, 51 );
info->is_unique = getField< int16_t >( row, 64 ) != 0 ? true : false;
info->is_untradeable = getField< uint8_t >( row, 65 ) != 0 ? true : false;
return info;
}
catch( ... )
{
return nullptr;
}
return nullptr;
}
boost::shared_ptr< Core::Data::AetheryteInfo >
Core::Data::ExdData::getAetheryteInfo( uint32_t aetheryteId )
{
try
{
return m_aetheryteInfoMap[aetheryteId];
}
catch( ... )
{
return nullptr;
}
return nullptr;
}
boost::shared_ptr< Core::Data::CustomTalkInfo >
Core::Data::ExdData::getCustomTalkInfo( uint32_t customTalkId )
{
try
{
auto row = m_customTalkDat.get_row( customTalkId );
auto info = boost::make_shared< CustomTalkInfo >();
info->id = customTalkId;
info->name_intern = getField< std::string >( row, 2 );
return info;
}
catch( ... )
{
return nullptr;
}
return nullptr;
}
boost::shared_ptr< Core::Data::QuestInfo >
Core::Data::ExdData::getQuestInfo( uint32_t questId )
{
try
{
auto row = m_questDat.get_row( questId );
auto info = boost::make_shared< QuestInfo >();
info->id = questId;
info->name = getField< std::string >( row, 0 );
info->name_intern = getField< std::string >( row, 1 );
info->quest_level = getField< uint16_t >( row, 4 );
info->enpc_resident_start = getField< uint32_t >( row, 38 );
info->enpc_resident_end = getField< uint32_t >( row, 40 );
info->reward_exp_factor = getField< uint16_t >( row, 1437 );
info->reward_gil = getField< uint32_t >( row, 1438 );
info->reward_gc_seals = getField< uint16_t >( row, 1440 );
info->reward_item_type = getField< uint8_t >( row, 1447 );
for( uint32_t i = 0; i < 6; i++ )
{
uint32_t entry = getField< uint32_t >( row, i + 1448 );
if( entry > 0 )
info->reward_item.push_back( entry );
uint8_t entry1 = getField< uint8_t >( row, i + 1455 );
if( entry1 > 0 )
info->reward_item_count.push_back( entry1 );
uint8_t entry2 = getField< uint8_t >( row, i + 1462 );
if( entry2 > 0 )
info->reward_item_stain.push_back( entry2 );
}
for( uint32_t i = 0; i < 5; i++ )
{
uint32_t entry = getField< uint32_t >( row, i + 1469 );
if( entry > 0 )
info->reward_item_optional.push_back( entry );
uint8_t entry1 = getField< uint8_t >( row, i + 1474 );
if( entry1 > 0 )
info->reward_item_optional_count.push_back( entry1 );
uint8_t entry2 = getField< uint8_t >( row, i + 1484 );
if( entry2 > 0 )
info->reward_item_optional_stain.push_back( entry2 );
}
info->reward_emote = getField< uint8_t >( row, 1489 );
info->reward_action = getField< uint16_t >( row, 1490 );
info->reward_action_general1 = getField< uint8_t >( row, 1491 );
info->reward_action_general2 = getField< uint8_t >( row, 1492 );
info->reward_other = getField< uint8_t >( row, 1494 );
info->instanced_content_unlock = getField< uint32_t >( row, 1497 );
info->reward_tome_type = getField< uint8_t >( row, 1499 );
info->reward_tome_count = getField< uint8_t >( row, 1500 );
info->reward_reputation = getField< uint8_t >( row, 1501 );
for( uint32_t i = 0; i < 50; i++ )
{
std::string entry = getField< std::string >( row, i + 47 );
if( entry.size() > 0 )
{
info->script_entity.push_back( entry );
uint32_t entry1 = getField< uint32_t >( row, i + 97 );
info->script_value.push_back( entry1 );
}
}
return info;
}
catch( ... )
{
return nullptr;
}
return nullptr;
}
boost::shared_ptr< Core::Data::EventItemInfo >
Core::Data::ExdData::getEventItemInfo( uint32_t eventItemId )
{
try
{
auto row = m_eventItemDat.get_row( eventItemId );
auto info = boost::make_shared< EventItemInfo >();
info->id = eventItemId;
info->name = getField< std::string >( row, 0 );
info->eventId = getField< uint32_t >( row, 14 );
info->castTime = getField< uint8_t >( row, 15 ) * 1000;
return info;
}
catch( ... )
{
return nullptr;
}
return nullptr;
}
boost::shared_ptr< Core::Data::LevelInfo >
Core::Data::ExdData::getLevelInfo( uint32_t levelId )
{
try
{
auto row = m_levelDat.get_row( levelId );
auto info = boost::make_shared< LevelInfo >();
info->id = levelId;
info->x = getField< float >( row, 0 );
info->y = getField< float >( row, 1 );
info->z = getField< float >( row, 2 );
info->r = getField< float >( row, 3 );
info->actor_id = getField< uint32_t >( row, 6 );
info->zone_id = getField< uint16_t >( row, 9 );
return info;
}
catch( ... )
{
return nullptr;
}
return nullptr;
}
const std::vector<boost::shared_ptr< Core::Data::AetheryteInfo > > Core::Data::ExdData::getAetheryteInfoForZone( uint16_t zoneId )
{
std::vector< boost::shared_ptr< AetheryteInfo > > aetheryteList;
for( auto& aetheryteInfo : m_aetheryteInfoMap )
{
if( aetheryteInfo.second->target_zone == zoneId )
{
aetheryteList.push_back( aetheryteInfo.second );
}
}
return aetheryteList;
}
boost::shared_ptr< Core::Data::OpeningInfo >
Core::Data::ExdData::getOpeningInfo( uint32_t openingId )
{
try
{
auto row = m_openingDat.get_row( openingId );
auto info = boost::make_shared< OpeningInfo >();
info->id = openingId;
info->name = getField< std::string >( row, 0 );
return info;
}
catch( ... )
{
return nullptr;
}
return nullptr;
}
boost::shared_ptr< Core::Data::RaceInfo >
Core::Data::ExdData::getRaceInfo( uint32_t raceId )
{
try
{
auto row = m_raceDat.get_row( raceId );
auto info = boost::make_shared< RaceInfo >();
info->id = raceId;
info->name = getField< std::string >( row, 0 );
info->male_body = getField< int32_t >( row, 2 );
info->male_hands = getField< int32_t >( row, 3 );
info->male_legs = getField< int32_t >( row, 4 );
info->male_feet = getField< int32_t >( row, 5 );
info->female_body = getField< int32_t >( row, 6 );
info->female_hands = getField< int32_t >( row, 7 );
info->female_legs = getField< int32_t >( row, 8 );
info->female_feet = getField< int32_t >( row, 9 );
return info;
}
catch( ... )
{
return nullptr;
}
return nullptr;
}

View file

@ -0,0 +1,329 @@
#ifndef _EXDDATA_H
#define _EXDDATA_H
#include <GameData.h>
#include <File.h>
#include <ExdData.h>
#include <ExdCat.h>
#include <Exd.h>
/* TYPES !!
case DataType::boolean: 1
case DataType::int8: 2
case DataType::uint8: 3
case DataType::int16: 4
case DataType::uint16: 5
case DataType::int32: 6
case DataType::uint32: 7
case DataType::float32: 8
case DataType::uint64: 9
*/
namespace Core {
namespace Data {
struct ZoneInfo
{
uint16_t id;
std::string zone_str;
std::string zone_name;
uint32_t layout_id;
uint16_t map_id;
int16_t discovery_index;
bool is_two_byte;
uint8_t weather_rate;
std::map< uint8_t, int32_t> weather_rate_map;
int32_t aetheryte_index;
};
struct ClassJobInfo
{
uint8_t id;
std::string name;
std::string name_short;
uint8_t exp_idx;
uint32_t start_weapon_id;
uint16_t mod_hp;
uint16_t mod_mpcpgp;
uint16_t mod_str;
uint16_t mod_vit;
uint16_t mod_dex;
uint16_t mod_int;
uint16_t mod_mnd;
uint16_t mod_pie;
};
struct QuestInfo
{
uint32_t id;
std::string name;
std::string name_intern;
uint16_t quest_level;
uint32_t enpc_resident_start;
uint32_t enpc_resident_end;
uint16_t reward_exp_factor;
uint32_t reward_gil;
uint16_t reward_gc_seals;
uint8_t reward_item_type;
std::vector< uint32_t > reward_item;
std::vector< uint8_t > reward_item_count;
std::vector< uint8_t > reward_item_stain;
std::vector< uint32_t > reward_item_optional;
std::vector< uint8_t > reward_item_optional_count;
std::vector< uint8_t > reward_item_optional_stain;
uint8_t reward_emote;
uint16_t reward_action;
uint8_t reward_action_general1;
uint8_t reward_action_general2;
uint8_t reward_other;
uint32_t instanced_content_unlock;
uint8_t reward_tome_type;
uint8_t reward_tome_count;
uint8_t reward_reputation;
std::vector< std::string > script_entity;
std::vector< uint32_t > script_value;
};
struct EventActionInfo
{
uint32_t id;
std::string name;
uint32_t castTime;
};
struct OpeningInfo
{
uint32_t id;
std::string name;
};
struct ParamGrowthInfo
{
uint32_t level;
uint32_t needed_exp;
int16_t hp_mod;
int32_t mp_const;
int16_t piety_scalar;
int32_t base_secondary;
uint16_t quest_exp_mod;
};
struct CustomTalkInfo
{
uint32_t id;
std::string name_intern;
};
struct PlaceNameInfo
{
uint32_t id;
std::string placename;
};
struct AetheryteInfo
{
uint32_t id;
std::string placename;
std::string placename_aethernet;
int32_t target_zone;
int32_t levelId;
bool isAetheryte;
int16_t map_coord_x;
int16_t map_coord_y;
};
struct RaceInfo
{
uint32_t id;
std::string name;
uint32_t male_body;
uint32_t male_hands;
uint32_t male_legs;
uint32_t male_feet;
uint32_t female_body;
uint32_t female_hands;
uint32_t female_legs;
uint32_t female_feet;
int8_t mod_str;
int8_t mod_dex;
int8_t mod_vit;
int8_t mod_int;
int8_t mod_mnd;
int8_t mod_pie;
};
struct TribeInfo
{
uint32_t id;
std::string name;
int8_t mod_str;
int8_t mod_dex;
int8_t mod_vit;
int8_t mod_int;
int8_t mod_mnd;
int8_t mod_pie;
};
struct LevelInfo
{
uint32_t id;
float x;
float y;
float z;
float r;
uint32_t actor_id;
uint32_t zone_id;
};
struct ClassJobCategoryInfo
{
uint32_t id;
// should they add new jobs, this needs to be changed
bool can_equip[0x33];
};
struct ItemInfo
{
uint32_t id;
std::string name; //0
uint16_t item_level;//11
uint8_t required_level;//12
uint32_t stack_size;//19
uint16_t unknown_category;//15
uint16_t ui_category;//17
bool is_hqable;//20
uint64_t model_primary;//28
uint64_t model_secondary;//29
uint32_t class_job_requirement;//58
uint16_t delayMs; //59
bool is_unique;//72
bool is_untradeable;//73
uint32_t class_job_index;//86
};
struct ActionInfo
{
uint32_t id;
std::string name; //0
uint16_t category;//3
int8_t class_job;//9
uint8_t unlock_level;//10
int8_t range;//11
bool can_target_self;//12
bool can_target_party;//13
bool can_target_friendly;//14
bool can_target_enemy;//15
bool is_aoe;//18
bool can_target_ko;//22
uint8_t aoe_type;//24
uint8_t radius;//25
uint8_t points_type;//28
uint16_t points_cost;//29
bool is_instant;//33
uint32_t cast_time;//34
uint32_t recast_time;//35
};
struct EventItemInfo
{
uint32_t id;
std::string name; //0
uint32_t eventId;
uint32_t castTime;
};
struct StatusEffectInfo
{
uint32_t id;
std::string name; //0
};
class ExdData
{
public:
ExdData();
~ExdData(void);
bool init( const std::string& path );
xiv::exd::Exd setupDatAccess( const std::string& name, xiv::exd::Language lang );
template< class T >
T getField( std::vector< xiv::exd::Field >& fields, uint32_t index )
{
return *boost::get< T >( &fields.at( index ) );
}
boost::shared_ptr<xiv::dat::GameData> m_data;
boost::shared_ptr<xiv::exd::ExdData> m_exd_data;
xiv::exd::Exd m_questDat;
xiv::exd::Exd m_openingDat;
xiv::exd::Exd m_customTalkDat;
xiv::exd::Exd m_aetheryteDat;
xiv::exd::Exd m_levelDat;
xiv::exd::Exd m_placeNameDat;
xiv::exd::Exd m_itemsDat;
xiv::exd::Exd m_classJobCatDat;
xiv::exd::Exd m_raceDat;
xiv::exd::Exd m_eventItemDat;
std::map<uint32_t, ZoneInfo> m_zoneInfoMap;
std::map<uint8_t, ClassJobInfo> m_classJobInfoMap;
std::map<uint32_t, ParamGrowthInfo> m_paramGrowthInfoMap;
std::map<uint16_t, EventActionInfo> m_EventActionInfoMap;
std::map<uint16_t, ActionInfo> m_actionInfoMap;
std::map<uint16_t, StatusEffectInfo> m_statusEffectInfoMap;
std::map<uint32_t, boost::shared_ptr< AetheryteInfo > > m_aetheryteInfoMap;
std::map<uint32_t, TribeInfo > m_tribeInfoMap;
bool loadZoneInfo();
bool loadClassJobInfo();
bool loadParamGrowInfo();
bool loadEventActionInfo();
bool loadActionInfo();
bool loadStatusEffectInfo();
bool loadAetheryteInfo();
bool loadTribeInfo();
boost::shared_ptr< QuestInfo > getQuestInfo( uint32_t questId );
boost::shared_ptr< OpeningInfo > getOpeningInfo( uint32_t openingId );
boost::shared_ptr< CustomTalkInfo > getCustomTalkInfo( uint32_t customTalkId );
boost::shared_ptr< AetheryteInfo > getAetheryteInfo( uint32_t aetheryteId );
boost::shared_ptr< PlaceNameInfo > getPlaceNameInfo( uint32_t placeNameId );
boost::shared_ptr< ItemInfo > getItemInfo( uint32_t catalogId );
boost::shared_ptr< RaceInfo > getRaceInfo( uint32_t raceId );
boost::shared_ptr< EventItemInfo > getEventItemInfo( uint32_t eventItemId );
boost::shared_ptr< LevelInfo > getLevelInfo( uint32_t levelId );
const std::vector< boost::shared_ptr< AetheryteInfo > > getAetheryteInfoForZone( uint16_t zoneId );
};
}
}
#endif

View file

@ -0,0 +1,38 @@
#ifndef _COMMON_FORWARDS_H
#define _COMMON_FORWARDS_H
#include <boost/shared_ptr.hpp>
namespace Core
{
class XMLConfig;
typedef boost::shared_ptr<XMLConfig> XMLConfigPtr;
namespace Network
{
class Hive;
class Acceptor;
class Connection;
typedef boost::shared_ptr<Hive> HivePtr;
typedef boost::shared_ptr<Acceptor> AcceptorPtr;
typedef boost::shared_ptr<Connection> ConnectionPtr;
namespace Packets
{
class GamePacket;
typedef boost::shared_ptr<GamePacket> GamePacketPtr;
}
}
}
#endif

View file

@ -0,0 +1,111 @@
#include <stdio.h>
#include "GamePacket.h"
#include <time.h>
#include <boost/lexical_cast.hpp>
#include <boost/format.hpp>
Core::Network::Packets::GamePacket::GamePacket( uint16_t subType, uint16_t size, uint32_t id1, uint32_t id2, uint16_t type )
{
m_dataBuf = std::vector<uint8_t>( size );
memset( &m_segHdr, 0, sizeof( m_segHdr ) );
setHeader( size, type, id1, id2, subType, 0x00 );
}
void Core::Network::Packets::GamePacket::setHeader( uint16_t size, uint16_t type, uint32_t id1, uint32_t id2, uint16_t subType, uint32_t unknown )
{
m_segHdr.size = size;
m_segHdr.type = type;
m_segHdr.source_actor = id1;
m_segHdr.target_actor = id2;
m_segHdr._reserved_E = 0x00;
m_subType = subType;
m_timeStamp = static_cast< uint32_t >( time( nullptr ) );
if( size > 0 )
{
memcpy( &m_dataBuf[0], &m_segHdr, sizeof( m_segHdr ) );
m_dataBuf[0x10] = 0x14;
*reinterpret_cast< uint16_t* >( &m_dataBuf[0] + 0x12 ) = m_subType;
}
if( size > 0x18 )
*reinterpret_cast< uint32_t* >( &m_dataBuf[0] + 0x18 ) = m_timeStamp;
}
Core::Network::Packets::GamePacket::GamePacket( char * pData, uint16_t size, bool bWriteStamp )
{
m_dataBuf = std::vector<uint8_t>( size );
memcpy( &m_dataBuf[0], pData, size );
m_unknown2 = 0;
if( bWriteStamp && size > 0x18 )
{
m_timeStamp = static_cast< uint32_t >( time( nullptr ) );
*reinterpret_cast< uint32_t* >( &m_dataBuf[0] + 0x18 ) = m_timeStamp;
}
m_segHdr._reserved_E = 0;
m_segHdr.size = *reinterpret_cast< uint32_t* >( &m_dataBuf[0] );
m_segHdr.type = *reinterpret_cast< uint16_t* >( &m_dataBuf[0] + 0x0C );
m_subType = *reinterpret_cast< uint16_t* >( &m_dataBuf[0] + 0x12 );
m_segHdr.source_actor = *reinterpret_cast< uint32_t* >( &m_dataBuf[0] + 0x04 );
m_segHdr.target_actor = *reinterpret_cast< uint32_t* >( &m_dataBuf[0] + 0x08 );
}
Core::Network::Packets::GamePacket::GamePacket( const Packets::FFXIVARR_PACKET_RAW& packetData )
{
m_segHdr = packetData.segHdr;
m_dataBuf = std::vector<uint8_t>( m_segHdr.size );
memcpy( &m_dataBuf[0] + sizeof( Packets::FFXIVARR_PACKET_SEGMENT_HEADER ), &packetData.data[0], m_segHdr.size - sizeof( Packets::FFXIVARR_PACKET_SEGMENT_HEADER ) );
memcpy( &m_dataBuf[0], &m_segHdr, sizeof( Packets::FFXIVARR_PACKET_SEGMENT_HEADER ) );
m_subType = *reinterpret_cast< uint16_t* >( &m_dataBuf[0] + 0x12 );
if( m_segHdr.size > 0x18 )
m_timeStamp = *reinterpret_cast< uint32_t* >( &m_dataBuf[0] + 0x18 );
}
Core::Network::Packets::GamePacket::GamePacket()
{
}
Core::Network::Packets::GamePacket::~GamePacket()
{
}
void Core::Network::Packets::GamePacket::savePacket()
{
char filename[20];
sprintf( filename, "dump_0x%x.dat", m_subType );
FILE * fp = nullptr;
fp = fopen( filename, "wb" );
fwrite( &m_dataBuf[0], 1, m_segHdr.size, fp );
fclose( fp );
}
std::string Core::Network::Packets::GamePacket::toString()
{
std::string str = "\n";
for( unsigned int i = 0; i < getSize(); i++ )
{
str += boost::str( boost::format( "%|02X|" ) % ( int ) ( m_dataBuf[i] & 0xFF ) ) + " ";
if( ( i + 1 ) % 16 == 0 )
str += "\n";
}
str += "\n";
return str;
}

View file

@ -0,0 +1,92 @@
#ifndef _GAMEPACKET_H_
#define _GAMEPACKET_H_
#include "CommonNetwork.h"
#include "Forwards.h"
#include <stdint.h>
#include <string.h>
namespace Core {
namespace Network {
namespace Packets {
class GamePacket {
public:
GamePacket( uint16_t subType, uint16_t size, uint32_t id1, uint32_t id2, uint16_t type = 0x03 );
GamePacket( char * pData, uint16_t size, bool bWriteStamp = true );
GamePacket( const Packets::FFXIVARR_PACKET_RAW& packetData );
GamePacket( void );
~GamePacket( void );
uint16_t getSize()
{
return m_segHdr.size;
}
uint16_t getType()
{
return m_segHdr.type;
}
uint16_t getSubType()
{
return m_subType;
}
template<class T>
void setValAt( uint16_t pos, T value )
{
memcpy( reinterpret_cast< unsigned char* >( &m_dataBuf[0] + pos ), &value, sizeof( T ) );
}
template<class T>
T getValAt( uint16_t pos )
{
return *reinterpret_cast< T* >( &m_dataBuf[0] + pos );
}
void setBytesAt( uint16_t offset, unsigned char * bytes, uint16_t length )
{
memcpy( reinterpret_cast< unsigned char* >( &m_dataBuf[0] + offset ), bytes, length );
}
char * getStringAt( uint16_t pos )
{
return reinterpret_cast< char* >( &m_dataBuf[0] + pos );
}
void setStringAt( uint16_t pos, const std::string& str )
{
memcpy( reinterpret_cast< unsigned char* >( &m_dataBuf[0] + pos ), str.c_str(), str.length() );
}
unsigned char * getData()
{
return reinterpret_cast< unsigned char* >( &m_dataBuf[0] );
}
void setHeader( uint16_t size, uint16_t type, uint32_t id1, uint32_t id2, uint16_t subType, uint32_t unknown = 0xFED2E000 );
std::string toString();
void savePacket();
FFXIVARR_PACKET_SEGMENT_HEADER m_segHdr;
protected:
uint16_t m_unknown2;
uint16_t m_subType;
uint32_t m_timeStamp;
std::vector<uint8_t> m_dataBuf;
};
}
}
}
#endif

View file

@ -0,0 +1,234 @@
#ifndef _GAMEPACKETNEW_H
#define _GAMEPACKETNEW_H
#include <stdint.h>
#include <iostream>
#include "GamePacket.h"
#include <sstream>
#include <time.h>
namespace Core {
namespace Network {
namespace Packets {
// Must forward define these in order to enable the compiler to produce the
// correct template functions.
template <typename T>
class GamePacketNew;
template <typename T>
std::ostream& operator<< ( std::ostream& os, const GamePacketNew<T>& packet );
/**
* The base implementation of a game packet. Needed for parsing packets.
*/
class GamePacketNewBase
{
public:
virtual ~GamePacketNewBase() = default;
/**
* @brief Gets the IPC type of this packet. (Useful for determining the
* type of a parsed packet.)
*/
virtual ServerIpcType ipcType( void ) = 0;
};
/**
* A game packet, or IPC packet, object is a template class for constructing
* the data to be sent or parsed. The template works by accepting a structure
* type that represents just the IPC data portion (the bytes after the initial
* 32 byte header information.)
*/
template <typename T>
class GamePacketNew : public GamePacketNewBase
{
public:
/**
* @brief Constructs a new game packet with the specified actors.
* @param sourceActorId The source actor id.
* @param targetActorId The target actor id.
*/
GamePacketNew<T>( uint32_t sourceActorId, uint32_t targetActorId )
{
initialize();
m_segHdr.source_actor = sourceActorId;
m_segHdr.target_actor = targetActorId;
};
/**
* @brief Constructs a new game packet with the specified actors.
* @param sourceActorId The source and target actor id.
*/
GamePacketNew<T>( uint32_t bothActorId )
{
initialize();
m_segHdr.source_actor = bothActorId;
m_segHdr.target_actor = bothActorId;
};
protected:
/** Initializes the fields of the header structures */
virtual void initialize( void )
{
// Zero out the structures.
memset( &m_segHdr, 0, sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) );
memset( &m_ipcHdr, 0, sizeof( FFXIVARR_IPC_HEADER ) );
memset( &m_data, 0, sizeof( T ) );
// Set the values of static fields.
// The size must be the sum of the segment header, the ipc header, and
// the IPC data itself.
m_segHdr.size = sizeof( FFXIVARR_PACKET_SEGMENT_HEADER ) + sizeof( FFXIVARR_IPC_HEADER ) + sizeof( T );
// Game packets (IPC) are type 3.
m_segHdr.type = 3;
// The IPC type itself.
m_ipcHdr.type = static_cast< ServerIpcType >( m_data._ServerIpcType );
};
public:
virtual ServerIpcType ipcType( void )
{
return static_cast< ServerIpcType >( m_data._ServerIpcType );
};
/** Gets a reference to the underlying IPC data structure. */
T& data( void ) { return m_data; };
/**
* @brief Sets the source actor id for this IPC packet.
* @param actorId The source actor id.
* @return This IPC packet object (can be used for chaining).
*/
GamePacketNew<T> sourceActor( uint32_t actorId )
{
m_segHdr.source_actor = actorId;
return this;
};
/**
* @brief Gets the source actor id for this IPC packet.
* @return The source actor id.
*/
uint32_t sourceActor( void ) const
{
return m_segHdr.source_actor;
};
/**
* @brief Sets the target actor id for this IPC packet.
* @param actorId The target actor id.
* @return This IPC packet object (can be used for chaining).
*/
GamePacketNew<T> targetActor( uint32_t actorId )
{
m_segHdr.target_actor = actorId;
return this;
};
/**
* @brief Gets the target actor id for this IPC packet.
* @return The target actor id.
*/
uint32_t targetActor( void ) const
{
return m_segHdr.target_actor;
};
friend std::ostream& operator<< <> ( std::ostream& os, const GamePacketNew<T>& packet );
friend class GamePacketFactory;
/**
* @brief Adapts the new-style packet into the old style.
*/
operator GamePacket* ( ) const
{
std::ostringstream buf;
serialize( buf );
// NOTE: This should be ok because CGamePacket's constructor will
// copy the contents of the buffer.
GamePacket* pOldStyle = new GamePacket( const_cast< char* >( buf.str().c_str() ), m_segHdr.size, false );
return pOldStyle;
};
operator GamePacketPtr () const
{
std::ostringstream buf;
serialize( buf );
// NOTE: This should be ok because CGamePacket's constructor will
// copy the contents of the buffer.
GamePacketPtr pOldStyle( new GamePacket( const_cast< char* >( buf.str().c_str() ), m_segHdr.size, true ) );
return pOldStyle;
};
protected:
// TODO: Is this a waste of storage memory?
/** The segment header */
FFXIVARR_PACKET_SEGMENT_HEADER m_segHdr;
/** The IPC packet header */
FFXIVARR_IPC_HEADER m_ipcHdr;
/** The underlying data portion of the packet as a structure */
T m_data;
private:
std::ostream& serialize( std::ostream& os ) const
{
// Since the packet itself is constant, we need to make a copy of the IPC
// header in order to set the timestamp.
FFXIVARR_IPC_HEADER ipcHdr;
memcpy( &ipcHdr, &m_ipcHdr, sizeof( ipcHdr ) );
// TODO: Fixed timestamp? Can we use a manipulator on the stream to assign
// a fixed timestamp value. This might be useful if several packets must
// be sent having the exact same timestamp. (Maybe this doesn't really
// need to happen though...)
ipcHdr.timestamp = static_cast< uint32_t >( time( nullptr ) );
// TODO: What about encryption? compression?
// Ideally, these could come directly from the stream using manipulators.
// We could check the stream's flags, and perform the appropriate
// operations here. The snag is encryption, which does not occur for
// segment headers, but may occur for IPC headers, and their data.
// Compression occurs for the entire segment header down.
os << m_segHdr << ipcHdr;
return os.write( reinterpret_cast< const char* >( &m_data ), sizeof( T ) );
};
};
template <typename T>
std::ostream& operator<<( std::ostream& os, const GamePacketNew<T>& packet )
{
#if 0
// Since the packet itself is constant, we need to make a copy of the IPC
// header in order to set the timestamp.
FFXIVARR_IPC_HEADER ipcHdr;
memcpy( &ipcHdr, &packet.m_ipcHdr, sizeof( ipcHdr ) );
// TODO: Fixed timestamp? Can we use a manipulator on the stream to assign
// a fixed timestamp value. This might be useful if several packets must
// be sent having the exact same timestamp. (Maybe this doesn't really
// need to happen though...)
ipcHdr.timestamp = time( NULL );
// TODO: What about encryption? compression?
// Ideally, these could come directly from the stream using manipulators.
// We could check the stream's flags, and perform the appropriate
// operations here. The snag is encryption, which does not occur for
// segment headers, but may occur for IPC headers, and their data.
// Compression occurs for the entire segment header down.
os << packet.m_segHdr << ipcHdr;
return os.write(
reinterpret_cast< const char* >( &packet.m_data ), sizeof( T ) );
#else
return packet.serialize( os );
#endif
}
} /* Packets */
} /* Network */
} /* Core */
#endif /*_CORE_NETWORK_PACKETS_CGAMEPACKETNEW_H*/

View file

@ -0,0 +1,61 @@
#include <boost/bind.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/interprocess/detail/atomic.hpp>
#include "Hive.h"
namespace Core {
namespace Network {
//-----------------------------------------------------------------------------
Hive::Hive()
: m_work_ptr( new boost::asio::io_service::work( m_io_service ) ),
m_shutdown( 0 )
{
}
Hive::~Hive()
{
}
boost::asio::io_service & Hive::GetService()
{
return m_io_service;
}
bool Hive::HasStopped()
{
return ( boost::interprocess::ipcdetail::atomic_cas32( &m_shutdown, 1, 1 ) == 1 );
}
void Hive::Poll()
{
m_io_service.poll();
}
void Hive::Run()
{
m_io_service.run();
}
void Hive::Stop()
{
if( boost::interprocess::ipcdetail::atomic_cas32( &m_shutdown, 1, 0 ) == 0 )
{
m_work_ptr.reset();
m_io_service.run();
m_io_service.stop();
}
}
void Hive::Reset()
{
if( boost::interprocess::ipcdetail::atomic_cas32( &m_shutdown, 0, 1 ) == 1 )
{
m_io_service.reset();
m_work_ptr.reset( new boost::asio::io_service::work( m_io_service ) );
}
}
}
}

View file

@ -0,0 +1,54 @@
#ifndef HIVE_H_
#define HIVE_H_
#include <boost/asio.hpp>
#include <boost/enable_shared_from_this.hpp>
namespace Core {
namespace Network {
class Hive : public boost::enable_shared_from_this< Hive >
{
private:
boost::asio::io_service m_io_service;
boost::shared_ptr< boost::asio::io_service::work > m_work_ptr;
volatile uint32_t m_shutdown;
private:
Hive( const Hive & rhs );
Hive & operator =( const Hive & rhs );
public:
Hive();
virtual ~Hive();
// Returns the io_service of this object.
boost::asio::io_service & GetService();
// Returns true if the Stop function has been called.
bool HasStopped();
// Polls the networking subsystem once from the current thread and
// returns.
void Poll();
// Runs the networking system on the current thread. This function blocks
// until the networking system is stopped, so do not call on a single
// threaded application with no other means of being able to call Stop
// unless you code in such logic.
void Run();
// Stops the networking system. All work is finished and no more
// networking interactions will be possible afterwards until Reset is called.
void Stop();
// Restarts the networking system after Stop as been called. A new work
// object is created ad the shutdown flag is cleared.
void Reset();
};
}
}
//-----------------------------------------------------------------------------
#endif

View file

@ -0,0 +1,124 @@
#pragma once
#include <memory>
#include <thread>
#include <mutex>
#include <queue>
#include <boost/utility.hpp>
namespace Core {
template<class T>
class LockedQueue
{
public:
LockedQueue();
~LockedQueue();
T pop();
//we can pass this in by reference, instead of copying
void push(const T object);
//we can pass this in by reference
//this will push it onto the queue, and swap the object
// with a default-constructed T at the same time.
void push_swap(T& object);
void push_reset(T& object);
std::size_t size();
protected:
std::queue<T> m_queue;
std::mutex m_mutex;
};
template <class T>
LockedQueue<T>::LockedQueue()
{
}
template <class T>
std::size_t LockedQueue<T>::size()
{
std::lock_guard<std::mutex> lock( m_mutex);
return m_queue.size();
}
template <class T>
LockedQueue<T>::~LockedQueue()
{
}
template <class T>
T LockedQueue<T>::pop()
{
std::lock_guard<std::mutex> lock( m_mutex);
if( m_queue.empty())
{
return T();
}
T result = m_queue.front();
m_queue.pop();
return result;
}
template <class T>
void LockedQueue<T>::push(const T object)
{
std::lock_guard<std::mutex> lock( m_mutex);
m_queue.push(object);
}
template <class T>
void LockedQueue<T>::push_swap(T& object)
{
std::lock_guard<std::mutex> lock( m_mutex);
m_queue.push(object);
T default_ctored_object = T();
//this is a special swap that will do a legit naive swap normally,
// except if there exists a function called T::swap(), which is
// specialized and possibly faster.
boost::swap(object, default_ctored_object);
//default_ctored_object is now the value of object, and it will go out
// of scope here. In the case that T is a shared_ptr of some kind,
// this will allow that the object on the queue is the *last* shared_ptr
// in existance by the time this function returns.
}
template <class T>
void LockedQueue<T>::push_reset(T& object)
{
std::lock_guard<std::mutex> lock( m_mutex);
m_queue.push(object);
T default_ctored_object = T();
object.reset();
//default_ctored_object is now the value of object, and it will go out
// of scope here. In the case that T is a shared_ptr of some kind,
// this will allow that the object on the queue is the *last* shared_ptr
// in existance by the time this function returns.
}
}

View file

@ -0,0 +1,88 @@
#include "Logger.h"
#include <boost/log/core.hpp>
#include <boost/log/trivial.hpp>
#include <boost/log/expressions.hpp>
#include <boost/log/sinks/text_file_backend.hpp>
#include <boost/log/utility/setup/file.hpp>
#include <boost/log/utility/setup/common_attributes.hpp>
#include <boost/log/sources/severity_logger.hpp>
#include <boost/log/sources/record_ostream.hpp>
#include <boost/log/sources/global_logger_storage.hpp>
#include <boost/log/support/date_time.hpp>
#include <boost/log/utility/manipulators/add_value.hpp>
#include <boost/log/utility/setup/console.hpp>
#include <iostream>
namespace Core {
Logger::Logger()
{
}
Logger::~Logger()
{
}
void Logger::setLogPath(const std::string& logPath)
{
m_logFile = logPath;
}
void Logger::init()
{
auto format = (
boost::log::expressions::stream <<
boost::log::expressions::format_date_time< boost::posix_time::ptime >("TimeStamp", "[%H:%M:%S]") <<
"[" << boost::log::trivial::severity << "] " <<
boost::log::expressions::smessage
);
boost::log::add_file_log
(
boost::log::keywords::file_name = m_logFile + "%Y-%m-%d.log", /*< file name pattern >*/
boost::log::keywords::rotation_size = 10 * 1024 * 1024, /*< rotate files every 10 MiB... >*/
boost::log::keywords::time_based_rotation = boost::log::sinks::file::rotation_at_time_point(0, 0, 0), /*< ...or at midnight >*/
boost::log::keywords::open_mode = std::ios::app,
boost::log::keywords::format = format,
boost::log::keywords::auto_flush = true
);
boost::log::add_console_log(std::cout, boost::log::keywords::format = format);
boost::log::add_common_attributes();
}
void Logger::Log(LoggingSeverity logSev, const std::string& text)
{
BOOST_LOG_SEV(m_lg, (boost::log::trivial::severity_level)logSev) << text;
}
void Logger::error( const std::string& text )
{
BOOST_LOG_SEV( m_lg, boost::log::trivial::severity_level::error ) << text;
}
void Logger::info( const std::string& text )
{
BOOST_LOG_SEV( m_lg, boost::log::trivial::severity_level::info ) << text;
}
void Logger::debug( const std::string& text )
{
BOOST_LOG_SEV( m_lg, boost::log::trivial::severity_level::debug ) << text;
}
void Logger::fatal( const std::string& text )
{
BOOST_LOG_SEV( m_lg, boost::log::trivial::severity_level::fatal ) << text;
}
}

View file

@ -0,0 +1,51 @@
#ifndef _LOGGER_H
#define _LOGGER_H
#include <boost/log/trivial.hpp>
namespace Core {
enum struct LoggingSeverity : uint8_t
{
trace = 0,
debug = 1,
info = 2,
warning = 3,
error = 4,
fatal = 5
};
class Logger
{
private:
boost::log::sources::severity_logger_mt< boost::log::trivial::severity_level > m_lg;
std::string m_logFile;
public:
Logger();
~Logger();
void init();
void Log(LoggingSeverity logSev, const std::string& text);
void error( const std::string& text );
void info( const std::string& text );
void debug( const std::string& text );
void fatal( const std::string& text );
void setLogPath(const std::string& logPath);
};
}
#endif

View file

@ -0,0 +1,79 @@
#include "PacketContainer.h"
#include "GamePacket.h"
#include "Common.h"
#include <boost/format.hpp>
#include <chrono>
Core::Network::Packets::PacketContainer::PacketContainer( void )
{
memset( &m_ipcHdr, 0, sizeof( FFXIVARR_PACKET_HEADER ) );
m_ipcHdr.size = sizeof( FFXIVARR_PACKET_HEADER );
m_ipcHdr.count = 0;
}
Core::Network::Packets::PacketContainer::~PacketContainer( void )
{
m_entryList.clear();
}
void Core::Network::Packets::PacketContainer::addPacket( GamePacket pEntry )
{
m_entryList.push_back( pEntry );
m_ipcHdr.size += pEntry.getSize();
m_ipcHdr.count++;
}
void Core::Network::Packets::PacketContainer::fillSendBuffer( std::vector< uint8_t >& sendBuffer )
{
uint8_t* tempBuffer = new uint8_t[m_ipcHdr.size];
memset( tempBuffer, 0, m_ipcHdr.size );
using namespace std::chrono;
auto ms = duration_cast< milliseconds >( system_clock::now().time_since_epoch() );
uint64_t tick = ms.count();
m_ipcHdr.timestamp = tick;
m_ipcHdr.unknown_20 = 1;
memcpy( tempBuffer, &m_ipcHdr, sizeof( FFXIVARR_PACKET_HEADER ) );
auto it = m_entryList.begin();
uint16_t offset = 0;
if( m_entryList.size() > 1 )
offset = 0;
for( ; it != m_entryList.end(); ++it )
{
memcpy( tempBuffer + sizeof( FFXIVARR_PACKET_HEADER ) + offset, it->getData(), it->m_segHdr.size );
offset += it->m_segHdr.size;
}
sendBuffer.assign( tempBuffer, tempBuffer + m_ipcHdr.size );
delete[] tempBuffer;
}
std::string Core::Network::Packets::PacketContainer::toString()
{
std::vector< uint8_t > tmpBuffer;
fillSendBuffer( tmpBuffer );
std::string str = "\n";
for( unsigned int i = 0; i < m_ipcHdr.size; i++ )
{
str += boost::str( boost::format( "%|02X|" ) % static_cast< int >( tmpBuffer[i] & 0xFF ) ) + " ";
if( ( i + 1 ) % 16 == 0 )
str += "\n";
}
str += "\n";
return str;
}

View file

@ -0,0 +1,38 @@
#ifndef _PacketContainer_H_
#define _PacketContainer_H_
#include <vector>
#include "Common.h"
#include "CommonNetwork.h"
#include "GamePacket.h"
namespace Core {
namespace Network {
namespace Packets {
class GamePacket;
class PacketContainer
{
public:
PacketContainer( void );
~PacketContainer( void );
void addPacket( GamePacket pEntry );
FFXIVARR_PACKET_HEADER m_ipcHdr;
std::vector<GamePacket> m_entryList;
std::string toString();
void fillSendBuffer( std::vector< uint8_t >& sendBuffer );
};
}
}
}
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,42 @@
#include "Util.h"
#include <chrono>
std::string Core::Util::binaryToHexString( uint8_t* pBinData, uint16_t size )
{
std::string outStr;
for( unsigned int i = 0; i < size; i++ )
{
outStr += boost::str( boost::format( "%|02X|" ) % ( int ) ( pBinData[i] & 0xFF ) );
}
return outStr;
}
uint64_t Core::Util::getTimeMs()
{
std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
auto now_ms = std::chrono::time_point_cast< std::chrono::milliseconds >( t1 ).time_since_epoch().count();
return now_ms;
}
uint64_t Core::Util::getEorzeanTimeStamp()
{
std::chrono::high_resolution_clock::time_point t1 = std::chrono::high_resolution_clock::now();
auto now = std::chrono::time_point_cast< std::chrono::seconds >( t1 ).time_since_epoch().count();
return static_cast< uint64_t >( now * 20.571428571428573f );
}
void Core::Util::valueToFlagByteIndexValue( uint32_t inVal, uint8_t& outVal, uint16_t& outIndex )
{
uint32_t id = inVal;
outIndex = id / 8;
uint8_t bitIndex = id % 8;
outVal = 1 << bitIndex;
}

View file

@ -0,0 +1,20 @@
#ifndef _UTIL_H
#define _UTIL_H
#include <stdint.h>
#include <boost/format.hpp>
namespace Core {
namespace Util {
std::string binaryToHexString( uint8_t* pBinData, uint16_t size );
uint64_t getTimeMs();
uint64_t getEorzeanTimeStamp();
void valueToFlagByteIndexValue( uint32_t inVal, uint8_t& outVal, uint16_t& outIndex );
}
}
#endif

View file

@ -0,0 +1,71 @@
#include <math.h>
#include "UtilMath.h"
float Core::Math::Util::distanceSq( float x, float y, float z, float x1, float y1, float z1 )
{
float deltaX = x - x1;
float deltaY = y - y1;
float deltaZ = z - z1;
return ( deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ );
}
float Core::Math::Util::distance( float x, float y, float z, float x1, float y1, float z1 )
{
return sqrtf( distanceSq( x, y, z, x1, y1, z1 ) );
}
float Core::Math::Util::distance2DSq( float x, float y, float x1, float y1 )
{
float deltaX = x - x1;
float deltaY = y - y1;
return ( deltaX * deltaX + deltaY * deltaY );
}
float Core::Math::Util::distance2D( float x, float y, float x1, float y1 )
{
return sqrtf( distance2DSq( x, y, x1, y1 ) );
}
float Core::Math::Util::calcAngTo( float x, float y, float x1, float y1 )
{
float dx = x - x1;
float dy = y - y1;
if( dy != 0.0f )
{
return atan2( dy, dx );
}
else
{
return 0.0f;
}
}
float Core::Math::Util::calcAngFrom( float x, float y, float x1, float y1 )
{
float dx = x - x1;
float dy = y - y1;
if( dy != 0.0f )
{
return atan2( dy, dx );
}
else
{
return 0.0f;
}
}
uint16_t Core::Math::Util::floatToUInt16( float val )
{
return static_cast< uint16_t >( 0x8000 + val * 32.767f );
}
uint16_t Core::Math::Util::floatToUInt16Rot( float val )
{
return static_cast< uint16_t >( 0x8000 * ( ( val + PI ) ) / PI );
}
uint8_t Core::Math::Util::floatToUInt8Rot( float val )
{
return static_cast< uint8_t >( 0x80 * ( ( val + PI ) ) / PI );
}

View file

@ -0,0 +1,38 @@
#ifndef _UTILMATH_H
#define _UTILMATH_H
#include "Common.h"
#define PI 3.14159265358979323846f
namespace Core {
namespace Math {
namespace Util {
float distanceSq( float x, float y, float z, float x1, float y1, float z1 );
float distance( float x, float y, float z, float x1, float y1, float z1 );
float distance2DSq( float x, float y, float x1, float y1 );
float distance2D( float x, float y, float x1, float y1 );
float calcAngTo( float x, float y, float x1, float y1 );
float calcAngFrom( float x, float y, float x1, float y1 );
uint16_t floatToUInt16( float val );
uint16_t floatToUInt16Rot( float val );
uint8_t floatToUInt8Rot( float val );
template
<typename T>
T clamp( T val, T minimum, T maximum )
{
return std::max( std::min( val, maximum ), minimum );
}
}
}
}
#endif

View file

@ -0,0 +1,35 @@
#include "UtilNetwork.h"
#include <string.h>
bool Core::Network::Util::bufferToPacketList( const std::vector< uint8_t > &buffer,
Packets::FFXIVARR_PACKET_HEADER &ipcHeader,
std::vector< Packets::FFXIVARR_PACKET_RAW > &packetList )
{
memcpy( &ipcHeader, ( uint8_t* ) &buffer[0], sizeof( struct Packets::FFXIVARR_PACKET_HEADER ) );
uint16_t offset = 0;
for( std::size_t x = 0; x < ipcHeader.count; x++ )
{
Packets::FFXIVARR_PACKET_RAW packet;
uint32_t headerSize = sizeof( struct Packets::FFXIVARR_PACKET_HEADER );
uint32_t headerSegSize = sizeof( struct Packets::FFXIVARR_PACKET_SEGMENT_HEADER );
memcpy( &packet.segHdr, ( uint8_t* ) &buffer[headerSize + offset], headerSegSize );
std::vector<uint8_t> packetData;
uint16_t startOff = sizeof( struct Packets::FFXIVARR_PACKET_HEADER ) + offset;
for( std::size_t y = 0; y < packet.segHdr.size - sizeof( struct Packets::FFXIVARR_PACKET_SEGMENT_HEADER ); y++ )
{
packet.data.push_back( buffer.at( startOff + y + sizeof( struct Packets::FFXIVARR_PACKET_SEGMENT_HEADER ) ) );
}
offset += packet.segHdr.size;
packetList.push_back( packet );
}
return true;
}

Some files were not shown because too many files have changed in this diff Show more