ported double tracking from TC

This commit is contained in:
mikx 2020-10-30 23:45:46 -04:00
commit 44b1f31c23
4914 changed files with 4961129 additions and 0 deletions

9
.dockerignore Normal file
View File

@ -0,0 +1,9 @@
build*/
var/*
data/contrib/*
data/doc/*
conf/*
!conf/dist
docker/worldserver/data/*
.idea
cmake-build-debug/*

8
.editorconfig Normal file
View File

@ -0,0 +1,8 @@
[*]
charset = utf-8
indent_style = space
indent_size = 4
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 80

12
.env.dist Normal file
View File

@ -0,0 +1,12 @@
WORLDSERVER_DATA=./docker/worldserver/data
WORLDSERVER_ETC=./docker/worldserver/etc
WORLDSERVER_LOGS=./docker/worldserver/logs
AUTHSERVER_ETC=./docker/authserver/etc
AUTHSERVER_LOGS=./docker/authserver/logs
WORLD_EXTERNAL_PORT=8085
AUTH_EXTERNAL_PORT=3724
DB_EXTERNAL_PORT=3306
DB_ROOT_PASSWORD=password
SOAP_EXTERNAL_PORT=7878

49
.git_commit_template.txt Normal file
View File

@ -0,0 +1,49 @@
### TITLE
## Type(Scope/Subscope): Commit ultra short explanation
## |---- Write below the examples with a maximum of 50 characters ----|
## Example 1: fix(DB/SAI): Missing spell to NPC Hogger
## Example 2: fix(CORE/Raid): Phase 2 of Ragnaros
## Example 3: feat(CORE/Commands): New GM command to do something
### DESCRIPTION
## Explain why this change is being made, what does it fix etc...
## |---- Write below the examples with a maximum of 72 characters per lines ----|
## Example: Hogger (id: 492) was not charging player when being engaged.
## Provide links to any issue, commit, pull request or other resource
## Example 1: Closes AzerothCore issue #23
## Example 2: Ported from other project's commit (link)
## Example 3: References taken from wowpedia / wowhead / wowwiki / https://wowgaming.altervista.org/aowow/
## =======================================================
## EXTRA INFOS
## =======================================================
## "Type" can be:
## feat (new feature)
## fix (bug fix)
## refactor (refactoring production code)
## style (formatting, missing semi colons, etc; no code change)
## docs (changes to documentation)
## test (adding or refactoring tests; no production code change)
## chore (updating bash scripts, git files etc; no production code change)
## --------------------
## Remember to
## Capitalize the subject line
## Use the imperative mood in the subject line
## Do not end the subject line with a period
## Separate subject from body with a blank line
## Use the body to explain what and why rather than how
## Can use multiple lines with "-" for bullet points in body
## --------------------
## More info here https://www.conventionalcommits.org/en/v1.0.0-beta.2/
## =======================================================
## "Scope" can be:
## CORE (core related, c++)
## DB (database related, sql)
## =======================================================
## "Subscope" is optional and depends on the nature of the commit.
## =======================================================

35
.gitattributes vendored Normal file
View File

@ -0,0 +1,35 @@
# Auto detect text files and perform LF normalization
* text=auto
# End of line rules
*.sh eol=lf
*.sh.dist eol=lf
bin/* eol=lf
# Whitespace rules
# strict (no trailing, no tabs)
*.cpp whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol
*.h whitespace=trailing-space,space-before-tab,tab-in-indent,cr-at-eol
# normal (no trailing)
*.sql whitespace=trailing-space,space-before-tab,cr-at-eol
*.txt whitespace=trailing-space,space-before-tab,cr-at-eol
# special files which must ignore whitespace
*.patch whitespace=-trailing-space eol=lf
*.diff whitespace=-trailing-space eol=lf
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
# Ignore sql/* files
data/sql/* linguist-documentation

76
.github/CODE_OF_CONDUCT.md vendored Normal file
View File

@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the admin team at https://discord.gg/gkt4y2x. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

43
.github/CONTRIBUTING.md vendored Normal file
View File

@ -0,0 +1,43 @@
## CONTRIBUTING
AzerothCore is a learning project, and there are lots of different ways to contribute to the project:
* By [testing our fixes](http://www.azerothcore.org/wiki/How-to-test-a-PR) (we can teach you how to correctly use Git to help us but that will also help you out tremendously)
* By developing directly to the core or the modules
* By reporting bugs within the project
* By [creating new modules](http://www.azerothcore.org/wiki/Create-a-Module)
* By improving our wiki
* By providing direct support to our community (on discord, StackOverflow or specialized forums)
* By making extra content (video tutorial for example)
* By putting bounties on issues
If you want to contribute to the project, you will find a lot of resources that will guide you in our wiki.
Feel free to join us on [our Discord chat server](https://discord.gg/gkt4y2x) where we taught a lot of new people how to get started and who are now important contributors!
## AUTHORS & CONTRIBUTORS
This project exists thanks to:
- **The [AzerothCore developers and contributors](https://github.com/AzerothCore/azerothcore-wotlk/graphs/contributors)**
- The [SunwellCore developers xinef and pussywizard](http://www.azerothcore.org/pages/sunwell.pl/)
- All the [TrinityCore developers and contributors](https://github.com/TrinityCore/TrinityCore/blob/3.3.5/AUTHORS)
- All the [MaNGOS, ScriptDev2 and UDB developers and contributors](https://github.com/cmangos/mangos-wotlk/blob/master/AUTHORS.md)
## IMPORTANT LINKS
<!-- Remove if the PR 3210 is accepted
- [Code of Conduct](https://github.com/azerothcore-wotlk/.github/code_of_conduct.md
-->
- [Website](http://www.azerothcore.org/)
- [AzerothCore catalogue](http://www.azerothcore.org/catalogue/ "Modules, tools, and other things for AzerothCore") (modules, tools etc...)
- [Module template / Module skeleton](https://github.com/azerothcore/skeleton-module/)
- [Our community hub (Discord)](https://discord.gg/gkt4y2x)
- [Our wiki](http://www.azerothcore.org/wiki "Easy to use and developed by AzerothCore founder")
- [Our Facebook page](https://www.facebook.com/AzerothCore/)
- [Our LinkedIn page](https://www.linkedin.com/company/azerothcore/)
The AzerothCore Staff appreciate all the help and contribution that *you* put your time into.
Thank you!

95
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,95 @@
---
name: Bug report
about: Create a report to help us improve.
title: ''
labels: ''
assignees: ''
---
<!-- IF YOU DO NOT FILL THIS TEMPLATE OUT, WE WILL CLOSE YOUR ISSUE! -->
<!-- This template is for problem reports, for feature suggestion etc... feel free to edit it.
If this is a crash report, upload the crashlog on https://gist.github.com/
For issues containing a fix, please create a Pull Request following this tutorial: http://www.azerothcore.org/wiki/Contribute#how-to-create-a-pull-request -->
<!-- WRITE A RELEVANT TITLE -->
##### CURRENT BEHAVIOUR:
<!-- Describe the bug in detail. Database to link spells, NPCs, quests etc https://wowgaming.altervista.org/aowow/ -->
##### EXPECTED BLIZZLIKE BEHAVIOUR:
<!-- Describe how it should be working without the bug. -->
##### STEPS TO REPRODUCE THE PROBLEM:
<!-- Describe precisely how to reproduce the bug so we can fix it or confirm its existence:
- Which commands to use? Which NPC to teleport to?
- Do we need to have debug flags on Cmake?
- Do we need to look at the console while the bug happens?
- Other steps
-->
1.
2.
3.
##### EXTRA NOTES:
<!--
Any information that can help the developers to identify and fix the issue should be put here.
Examples:
- was this bug always present in AzerothCore? if it was introduced after a change, please mention it
- the code line(s) that cause the issue
- does this feature work in other server appplications (e.g. CMaNGOS, TrinityCore, etc...) ?
-->
##### AC HASH/COMMIT:
<!-- IF YOU DO NOT FILL THIS OUT, WE WILL CLOSE YOUR ISSUE! NEVER WRITE "LATEST", ALWAYS PUT THE ACTUAL VALUE INSTEAD.
Find the commit hash (unique identifier) by running "git log" on your own clone of AzerothCore or by looking at here https://github.com/azerothcore/azerothcore-wotlk/commits/master -->
##### OPERATING SYSTEM:
<!-- Windows 7/10, Debian 8/9/10, Ubuntu 16/18 etc... -->
##### MODULES:
<!-- Are you using modules? If yes, list them (note them down in a .txt for opening future issues) -->
##### OTHER CUSTOMIZATIONS:
<!-- Are you using any extra script?
- Did you apply any core patch/diff?
- Did you modify your database?
- Or do you have other customizations? If yes please specify them here.
-->
<!-- ------------------------- THE END ------------------------------
Thank you for your contribution.
If you use AzerothCore regularly, we really NEED your help to:
- TEST our fixes ( http://www.azerothcore.org/wiki/Contribute#how-to-test-a-pull-request )
- Report issues
- Improve the documentation/wiki
With your help the project can evolve much quicker!
-->
<!-- NOTE: If you intend to contribute more than once, you should really join us on our discord channel! We set cosmetic ranks for our contributors and may give access to special resources/knowledge to them! The link is on our site http://azerothcore.org/
-->

13
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,13 @@
blank_issues_enabled: false
contact_links:
- name: Website
url: http://www.azerothcore.org
- name: Wiki
url: azerothcore.org/wiki
about: You can find plenty of information on our Wiki.
- name: How to ask for help
url: https://www.azerothcore.org/wiki/How-to-ask-for-help
about: Before submitting an issue we'd love if you take a minute to read this.
- name: Discord
url: https://discord.gg/gkt4y2x
about: Join the discussions over at our Discord Server.

View File

@ -0,0 +1,35 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'Feature: '
labels: Suggestion
assignees: ''
---
<!-- IF YOU DO NOT FILL THIS TEMPLATE OUT, WE WILL CLOSE YOUR ISSUE! -->
<!-- This template is made for feature requests or suggestions on the project only. -->
**Describe your feature request or suggestion in detail**
<!-- A clear and concise description of what you want to happen. -->
**Describe a possible solution to your Feature or Suggestion in detail**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
<!-- ------------------------- THE END ------------------------------
Thank you for your contribution.
If you use AzerothCore regularly, we really NEED your help to:
- TEST our fixes ( http://www.azerothcore.org/wiki/Contribute#how-to-test-a-pull-request )
- Report issues
- Improve the documentation/wiki
With your help, the project can evolve much quicker!
-->
<!-- NOTE: If you intend to contribute more than once, you should really join us on our discord channel! We set cosmetic ranks for our contributors and may give access to special resources/knowledge to them! The link is on our site http://azerothcore.org/
-->

34
.github/SECURITY.md vendored Normal file
View File

@ -0,0 +1,34 @@
# Security Policy
## Supported Versions
We support these versions of AzerothCore:
| AzerothCore Branch | Supported |
| ------------------ | ------------------ |
| master | :white_check_mark: |
We support these versions of MySQL:
| MySQL Version | Supported |
| ------------- | ------------------ |
| 5.6 | :white_check_mark: |
| 5.7 | :white_check_mark: |
| 8.0 | :white_check_mark: |
We support these versions of MariaDB:
| MariaDB Version | Supported |
| --------------- | ------------------ |
| 10.2 | :white_check_mark: |
| 10.3 | :white_check_mark: |
| 10.4 | :white_check_mark: |
| 10.5 | :white_check_mark: |
Note: We do not support any repacks that may or may not have been made based on AzerothCore.
## Reporting a Vulnerability
We class a vulnerability to be any hack or exploit that has an impact on the server performance or that gives unfair advantages in the game (e.g fly hacking or injection tools).
If a new vulnerability is found you should always create a new [bug report](https://github.com/azerothcore/azerothcore-wotlk/issues/new/choose).

97
.github/SUPPORT.md vendored Normal file
View File

@ -0,0 +1,97 @@
# How to ask for help
### Need help?
Do you need support with AzerothCore? No worries, we're happy to help you!
Whether you have troubles installing AzerothCore, or you want to ask how-to or generic help questions, **we will help you**.
We just want you to ask for support in the **proper way**. Please read this document before asking for any help.
### Why is the "proper way" so important?
If you ask a question directly in the chat, it can get easily lost and you might never be helped unless there is someone online in that specific moment that can help you.
If you put your question on StackOverflow it will **stay** there and someone can help you at any moment. You can also link your question in the chat to give it more visibility. Doesn't make sense for you? Just keep reading.
Also, most of the questions asked by users are repetitive. So we need an efficient way to handle all the support requests. We use StackOverflow for support questions and GitHub for bug reports.
Sounds complicated? Not at all! **Just keep reading**.
### Bug reports
A game feature (e.g. spell/quest/talent/etc..) doesn't work as it is supposed to?
Congratulations! You've just found a bug, please search among the [existing issues](https://github.com/azerothcore/azerothcore-wotlk/issues). There is a good chance that someone else has already reported the same bug that you found, in such case we kindly ask you to "confirm" it by leaving a comment.
Example:
![AzerothCore example issue search](https://user-images.githubusercontent.com/75517/51130957-9b9f9580-182e-11e9-8f7f-11aa5d7b6d67.png)
If after searching for an existing issue report, you didn't find any, then you should [open a new issue](https://github.com/azerothcore/azerothcore-wotlk/issues/new).
### Other support requests
- Getting an error while installing AzerothCore?
- Is there something in the documentation that is not clear for you?
- Do you want to know how to do something specific with AzerothCore?
- Are you trying to do something like implementing a new feature, fixing a bug, etc...?
- Do you have questions about C++ or SQL code that is related to AzerothCore or other AC custom modules?
These kinds of questions are considered support questions and are handled via [StackOverflow](https://stackoverflow.com/questions/tagged/azerothcore). **Read below**
### Do I need to register in StackOverflow?
**Not necessarily!** If you have a Google or a Facebook account, you can already log in [StackOverflow](https://stackoverflow.com/questions/tagged/azerothcore) (click the **_Log in_** button on the top-right corner of the website).
![image](https://user-images.githubusercontent.com/75517/51560794-d84e3b00-1e85-11e9-8510-6f1dd0b33d18.png)
### Search among the existing questions
There is a good chance that your question has already been asked by someone else, so please **search** it on [StackOverflow](https://stackoverflow.com/questions/tagged/azerothcore).
For example, are you getting an error from MySQL? Search it under the **[azerothcore]** tag!
![image](https://user-images.githubusercontent.com/75517/51131779-f0dca680-1830-11e9-8ccc-ef10ee8855a6.png)
Oh, there is already a question! And it has an answer! Let's open it!
![image](https://user-images.githubusercontent.com/75517/51132034-85df9f80-1831-11e9-9cc9-3eaee236396e.png)
**Another example**, imagine you're wondering whether you can use LUA scripts on AzerothCore:
![image](https://user-images.githubusercontent.com/75517/51131089-f802b500-182e-11e9-9b5d-a438172b22ea.png)
There is already a question and answer for that! Let's upvote the guys who asked and answered:
![image](https://user-images.githubusercontent.com/75517/51131658-ac510b00-1830-11e9-98dc-e7f3ef0da058.png)
## How to ask new questions
What if you can't find a question related to my specific problem? **Let's [open a new question](https://stackoverflow.com/questions/ask)**.
Remember to:
- Add a descriptive message.
- **Bad** example `I got DB error plz help me`.
- **Good** example: `After importing the sql updates, I get the error "XXX"`
- Don't forget the **[azerothcore]** tag!
- ![image](https://user-images.githubusercontent.com/75517/51132313-364da380-1832-11e9-8483-3bb6898d438a.png)
- It's useful to add **4 more tags** according to the category of your question (e.g. `c++`, `docker`, `MySQL`, `sql`, etc... ).
- Link your question in the #support-general channel of our [Discord chat](https://discordapp.com/channels/217589275766685707/284406375495368704)
- Read: [stackoverflow.com/help/how-to-ask](https://stackoverflow.com/help/how-to-ask)
### Share your knowledge!
Do you have anything to share with the community? Do you feel like some information could be useful to someone else (or to yourself in the future)? Have you solved a problem that took a while to figure out?
Ask a question on StackOverflow and then **answer it yourself**! Is it allowed? Yes, it is! Read this:
[https://stackoverflow.com/help/self-answer](https://stackoverflow.com/help/self-answer)

157
.github/workflows/core_build.yml vendored Normal file
View File

@ -0,0 +1,157 @@
name: core-build
on:
push:
branches:
- '**' # matches every branch
- '!coverity_scan' # excludes coverity_scan
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
# the result of the matrix will be the combination of all attributes, so we get os*compiler*modules builds
os: [ubuntu-20.04]
compiler: [clang6, clang9, clang10]
modules: [with, without]
# we can include specific combinations here
include:
- os: ubuntu-18.04
compiler: clang
modules: without
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.modules }}-modules
env:
COMPILER: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v2
- name: Checkout modules
run: ./apps/ci/ci-install-modules.sh
if: matrix.modules == 'with'
- name: Cache
uses: actions/cache@v2
with:
path: /home/runner/.ccache
key: ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }}:${{ github.sha }}
restore-keys: |
ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules:${{ github.ref }}
ccache:${{ matrix.os }}:${{ matrix.compiler }}:${{ matrix.modules }}-modules
- name: Configure OS
run: source ./apps/ci/ci-install.sh
env:
CONTINUOUS_INTEGRATION: true
- name: Import db
run: source ./apps/ci/ci-import-db.sh
- name: Build
run: source ./apps/ci/ci-compile.sh
- name: Dry run
run: source ./apps/ci/ci-worldserver-dry-run.sh
- name: Check startup errors
run: source ./apps/ci/ci-error-check.sh
- name: Run unit tests
run: source ./apps/ci/ci-run-unit-tests.sh
mac-build:
strategy:
fail-fast: false
runs-on: macos-10.15
name: macos-10.15
steps:
- uses: actions/checkout@v2
- name: Cache
uses: actions/cache@v1.1.2
with:
path: /Users/runner/.ccache
key: ccache:macos-10.15:${{ github.ref }}:${{ github.sha }}
restore-keys: |
ccache:macos-10.15:${{ github.ref }}
ccache:macos-10.15
- name: Configure OS
run: source ./apps/ci/mac/ci-install.sh
- name: Build
run: source ./apps/ci/mac/ci-compile.sh
- name: Run unit tests
run: source ./apps/ci/ci-run-unit-tests.sh
windows-build:
strategy:
fail-fast: false
runs-on: windows-2019
name: windows-2019-MSVC16
steps:
- uses: actions/checkout@v2
- name: Configure OS
run: choco install --no-progress openssl
- name: Build
shell: bash
run: |
mkdir -p build && cd build
cmake .. -DTOOLS=ON
cmake --build . --config Release --parallel 4
- name: Copy dll files
shell: bash
run: |
cp "/c/mysql-5.7.21-winx64/lib/libmysql.dll" "build/bin/Release/"
cp "/c/Program Files/OpenSSL-Win64/bin/libcrypto-1_1-x64.dll" "build/bin/Release/"
cp "/c/Program Files/OpenSSL-Win64/bin/libssl-1_1-x64.dll" "build/bin/Release/"
- uses: actions/upload-artifact@v2
with:
name: windows-2019-MSVC16-release
path: build/bin/Release
docker-build:
strategy:
fail-fast: true
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Configure
run: |
docker --version
docker-compose --version
- name: Build
run: |
./bin/acore-docker-build-no-scripts
docker-worldserver:
strategy:
fail-fast: true
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Configure
run: |
docker --version
docker-compose --version
- name: Build
run: |
docker build -t azerothcore/worldserver -f docker/worldserver/Dockerfile docker/worldserver
docker-authserver:
strategy:
fail-fast: true
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Configure
run: |
docker --version
docker-compose --version
- name: Build
run: |
docker build -t azerothcore/authserver -f docker/authserver/Dockerfile docker/authserver
docker-database:
strategy:
fail-fast: true
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Configure
run: |
docker --version
docker-compose --version
- name: Build
run: |
docker build -t azerothcore/database -f docker/database/Dockerfile .

View File

@ -0,0 +1,34 @@
name: import-pending-sql
on:
push:
branches:
- master
jobs:
import-pending-sql:
strategy:
fail-fast: false
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Extract branch name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Import and commit pending sql
run: |
git config user.email "azerothcorebot@gmail.com" && git config user.name "AzerothCoreBot"
cd bin/
source acore-db-pendings
cd ..
git fetch --unshallow origin ${BRANCH}
git add -A .
git commit -am "chore(DB): import pending SQL update file" -m "Referenced commit(s): ${GITHUB_SHA}" || true
env:
BRANCH: ${{ steps.extract_branch.outputs.branch }}
- name: Push changes
uses: ad-m/github-push-action@fe38f0a751bf9149f0270cc1fe20bf9156854365
with:
github_token: ${{ secrets.AC_GITHUB_TOKEN }}
branch: ${{ steps.extract_branch.outputs.branch }}

95
.gitignore vendored Normal file
View File

@ -0,0 +1,95 @@
#
# AzerothCore
#
conf/*
!conf/dist
apps/drassil/*
env/dist/*
env/user/*
modules/*
!modules/*.md
!modules/*.sh
build*/
var/*
docker/build/cache
docker/authserver/bin
docker/worldserver/bin
docker/authserver/etc/authserver.conf
docker/authserver/etc/authserver.conf.dist
docker/worldserver/etc/worldserver.conf
docker/worldserver/etc/worldserver.conf.dist
docker/authserver/logs/
docker/worldserver/logs/
docker/worldserver/data/
!docker/build
.env
apps/joiner
!.gitkeep
#
#Generic
#
.directory
.mailmap
*.orig
*.rej
*~
.hg/
*.kdev*
.DS_Store
CMakeLists.txt.user
*.bak
*.patch
*.diff
*.REMOTE.*
*.BACKUP.*
*.BASE.*
*.LOCAL.*
#
# IDE & other software
#
/.settings/
/.externalToolBuilders/*
# exclude in all levels
nbproject/
.sync.ffs_db
*.kate-swp
.browse.VC*
.vscode
.idea
cmake-build-debug/*
cmake-build-debug-coverage/*
coverage-report/
#
# Eclipse
#
*.pydevproject
.metadata
.gradle
tmp/
*.tmp
*.swp
*~.nib
local.properties
.settings/
.loadpath
.project
.cproject
# ==================
#
# CUSTOM
#
# put below your custom ignore rules
# for example , if you want to include a
# module directly in repositoryyou can do:
#
# !modules/yourmodule
#
# ==================

177
CMakeLists.txt Normal file
View File

@ -0,0 +1,177 @@
#
# Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL3 v3 license: https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# Set projectname (must be done AFTER setting configurationtypes)
project(AzerothCore)
# Require a min version Cmake
cmake_minimum_required(VERSION 3.8)
# CMake policies (can not be handled elsewhere)
cmake_policy(SET CMP0005 NEW)
# add this options before PROJECT keyword
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
# Set RPATH-handing (CMake parameters)
set(CMAKE_SKIP_BUILD_RPATH 0)
set(CMAKE_BUILD_WITH_INSTALL_RPATH 0)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH 1)
set(AC_PATH_ROOT "${CMAKE_SOURCE_DIR}")
# set macro-directory
list(APPEND CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/src/cmake/macros"
"${CMAKE_SOURCE_DIR}/deps/cotire/CMake")
include(CheckCXXSourceRuns)
include(CheckIncludeFiles)
# some utils for cmake
include(deps/drassil/cmake-utils/utils.cmake)
include(src/cmake/ac_macros.cmake)
# set default buildoptions and print them
include(conf/dist/config.cmake)
# load custom configurations for cmake if exists
if(EXISTS "${CMAKE_SOURCE_DIR}/conf/config.cmake")
include(conf/config.cmake)
endif()
#
# Loading dyn modules
#
# add modules and dependencies
CU_SUBDIRLIST(sub_DIRS "${CMAKE_SOURCE_DIR}/modules" FALSE FALSE)
FOREACH(subdir ${sub_DIRS})
get_filename_component(MODULENAME ${subdir} NAME)
if (";${DISABLED_AC_MODULES};" MATCHES ";${MODULENAME};")
continue()
endif()
STRING(REGEX REPLACE "^${CMAKE_SOURCE_DIR}/" "" subdir_rel ${subdir})
if(EXISTS "${subdir}/CMakeLists.txt")
message("Loading module: ${subdir_rel}")
add_subdirectory("${subdir_rel}")
endif()
ENDFOREACH()
CU_RUN_HOOK("AFTER_LOAD_CONF")
# build in Release-mode by default if not explicitly set
if( NOT CMAKE_BUILD_TYPE )
set(CMAKE_BUILD_TYPE "Release")
endif()
# turn off PCH totally if enabled (hidden setting, mainly for devs)
if( NOPCH )
set(USE_COREPCH 0)
set(USE_SCRIPTPCH 0)
endif()
include(ConfigureBaseTargets)
include(CheckPlatform)
include(GroupSources)
include(AutoCollect)
CU_RUN_HOOK("AFTER_LOAD_CMAKE_MODULES")
# basic packagesearching and setup (further support will be needed, this is a preliminary release!)
set(ACE_EXPECTED_VERSION 6.0.3)
find_package(PCHSupport)
find_package(ACE REQUIRED)
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_definitions(-DACE_LACKS_AUTO_PTR=1)
endif()
find_package(MySQL REQUIRED)
if(UNIX AND WITH_PERFTOOLS)
find_package(Gperftools)
endif()
if(NOT WITHOUT_GIT)
find_package(Git)
endif()
# Find revision ID and hash of the sourcetree
include(src/cmake/genrev.cmake)
# print out the results before continuing
include(src/cmake/showoptions.cmake)
#
# Loading framework
#
add_subdirectory(deps)
if( SERVERS OR TOOLS)
add_subdirectory(src/common)
endif()
if( TOOLS )
add_subdirectory(src/tools)
endif()
#
# Loading application sources
#
CU_RUN_HOOK("BEFORE_SRC_LOAD")
# add core sources
add_subdirectory(src)
CU_RUN_HOOK("AFTER_SRC_LOAD")
if( UNIT_TESTS )
# we use these flags to get code coverage
set(UNIT_TEST_CXX_FLAGS "-fprofile-arcs -ftest-coverage -fno-inline")
# enable additional flags for GCC.
if ( CMAKE_CXX_COMPILER_ID MATCHES GNU )
set(UNIT_TEST_CXX_FLAGS "${UNIT_TEST_CXX_FLAGS} -fno-inline-small-functions -fno-default-inline")
endif()
message("Unit tests code coverage: enabling ${UNIT_TEST_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${UNIT_TEST_CXX_FLAGS}")
include(src/cmake/googletest.cmake)
fetch_googletest(
${PROJECT_SOURCE_DIR}/src/cmake
${PROJECT_BINARY_DIR}/googletest
)
enable_testing()
add_subdirectory(src/test)
add_custom_target(coverage DEPENDS coverage_command)
add_custom_command(OUTPUT coverage_command
# Run unit tests.
COMMAND ctest
# Run the graphical front-end for code coverage.
COMMAND lcov --directory src --capture --output-file coverage.info
COMMAND lcov --remove coverage.info '/usr/*' '${CMAKE_BINARY_DIR}/googletest/*' '${CMAKE_CURRENT_SOURCE_DIR}/src/test/*' --output-file coverage.info
COMMAND genhtml -o ${CMAKE_CURRENT_SOURCE_DIR}/coverage-report coverage.info
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
)
endif()

661
LICENSE-AGPL3 Normal file
View File

@ -0,0 +1,661 @@
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/>.

339
LICENSE-GPL2 Normal file
View File

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
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
this service 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.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
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
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the 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 a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE 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.
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
convey 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 General Public License as published by
the Free Software Foundation; either version 2 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 General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

23
PreLoad.cmake Normal file
View File

@ -0,0 +1,23 @@
# Copyright (C)
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# This file is run right before CMake starts configuring the sourcetree
# Example: Force CMAKE_INSTALL_PREFIX to be preloaded with something before
# doing the actual first "configure"-part - allows for hardforcing
# destinations elsewhere in the CMake buildsystem (commented out on purpose)
# Override CMAKE_INSTALL_PREFIX on Windows platforms
#if( WIN32 )
# if( NOT CYGWIN )
# set(CMAKE_INSTALL_PREFIX
# "" CACHE PATH "Default install path")
# endif()
#endif()

171
README.md Normal file
View File

@ -0,0 +1,171 @@
# ![logo](https://raw.githubusercontent.com/azerothcore/azerothcore.github.io/master/images/logo-github.png) AzerothCore
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e61f4ea81de14b289fbf83d2b0da0c35)](https://app.codacy.com/app/FrancescoBorzi/azerothcore-wotlk?utm_source=github.com&utm_medium=referral&utm_content=azerothcore/azerothcore-wotlk&utm_campaign=Badge_Grade_Settings)
[![core-build](https://github.com/azerothcore/azerothcore-wotlk/workflows/core-build/badge.svg?branch=master&event=push)](https://github.com/azerothcore/azerothcore-wotlk/actions?query=workflow%3Acore-build+branch%3Amaster+event%3Apush)
<a href="https://scan.coverity.com/projects/azerothcore-azerothcore-wotlk">
<img alt="Coverity Scan Build Status" src="https://scan.coverity.com/projects/13814/badge.svg"/>
</a>
[![Bountysource](https://www.bountysource.com/badge/tracker?tracker_id=40032087)](https://www.bountysource.com/teams/azerothcore/bounties "Put money on issues or get paid for fixing them")
[![StackOverflow](http://img.shields.io/badge/stackoverflow-azerothcore-blue.svg)](https://stackoverflow.com/questions/tagged/azerothcore?sort=newest "Ask / browse questions here")
[![Discord](https://img.shields.io/discord/217589275766685707.svg)](https://discord.gg/gkt4y2x "Our community hub on Discord")
## INTRODUCTION
AzerothCore (AC) is an open source game-server application for World of Warcraft, currently supporting the 3.3.5a game version.
It is written in C++ and is based on MaNGOS, TrinityCore and SunwellCore.
## WHY AZEROTHCORE?
1. Stability
1. Authenticity of the content
1. [Modularity](https://en.wikipedia.org/wiki/Modular_programming)
1. A lot of modules to choose from
1. Better configuration files system
1. Compatibility with other emulators
1. Friendly and helpful community
#### Stability
As players and administrators ourselves, we take great care into the stability of our core. Other projects focus on the development side of things and tend to forget that users want stability above everything else.
Hence why nobody is allowed to push commits directly to the core. All changes are reviewed and tested before they get to the `master` branch which means we need as many testers as possible to avoid stalling issues.
#### Authenticity
Fixing and implementing missing blizzlike content is one of our priorities, and we can boast to offer the most content-complete open source emulator.
<!-- Not sure for this below -->
<!-- We were the first open source emulator to have almost every dungeon and raid working. -->
#### Modules
Modules are essential to AzerothCore's success. Modules allows users to plug them in and out easily, and do not require to modify the core files. It also means users can keep pulling the git changes from the main repository and only develop their own modules.
We have a lot of modules already made, some of them are very important and will ease your work:
* [Transmogrification](https://github.com/azerothcore/mod-transmog)
* [Eluna (lua engine) support](https://github.com/azerothcore/mod-eluna-lua-engine/ "Creator of Eluna is part of our core team")
* Full list available in the AzerothCore catalogue (link at the end)
#### Configuration files
Our configuration file system allows the user to use a tiny configuration file for better readability and maintenance.
#### Compatibility with other emulators
Not very far from its ancestor TrinityCore, most scripts can be adapted quite easily. For MaNGOS compatibility, it might require more knowledge but it shares a common base.
## PHILOSOPHY
Our main goal is to create a playable game server, offering a fully working game experience.
Here are the main points we focus on:
* Stability
* Ease of use / Practicability
* Playability (ingame content)
* Customization
* Community driven software (check our discord)
We also welcome new users (even non-english speaking users!) and help them learn / improve their skills (C++, SQL, Git, software collaboration, tutoring / wiki etc...).
Unlike other projects which focus more on the developer's side of things, we want users to be able to run their own server with as few troubles as possible. All of our contributors run their own private server (in local or not).
That's why AzerothCore is easier to use, to maintain, to understand, to develop on and to customize to suit your needs, than other emulators.
In short, we focus on the **user experience (UX)**, whether it be the **player's experience**, the **developer's experience** or the **administrator's experience**.
## HOW TO THANK US
Being an open source project, we rely on volunteers to pursue development. Here are ways to help us if you use AzerothCore:
#### Github star
Click on the "star this repository" button to help us gain more visibility on Github!
#### By contributing
Check the **CONTRIBUTING** section below.
#### Financially :moneybag:
You can support the project by financing the resolution of issues [using Bountysource](http://www.azerothcore.org/wiki/Bountysource "Bountysource explained in our wiki").
#### Advertising
By talking about us on different platforms or to people who would like to get involved.
## CONTRIBUTING
AzerothCore is a learning project, and there are lots of different ways to contribute to the project:
* By [testing our fixes](http://www.azerothcore.org/wiki/How-to-test-a-PR) (we can teach you how to correctly use Git to help us but that will also help you out tremendously)
* By developing directly to the core or to the modules
* By [creating new modules](http://www.azerothcore.org/wiki/Create-a-Module)
* By improving our wiki
* By providing direct support to our community (on discord, stackoverflow or specialized forums)
* By making extra content (video tutorial for example)
* By putting bounties on issues
If you want to contribute to the project, you will find a lot of resources that will guide you in our wiki.
Feel free to join us on [our discord chat server][https://discord.com/invite/gkt4y2x] where we taught a lot of new people how to get started and who are now important contributors!
<!-- TO UNCOMMENT LATER -->
<!-- As we put a big emphasis on community, there are also special rewards for contributors such as reputation ranks (displayed in our discord and our website), reputation badges (to display on your project/portfolio), premium software licenses, private modules access, private tools access and a lot of small private repositories access. -->
## INSTALLATION
Installation instructions are available [here](http://www.azerothcore.org/wiki/Installation).
We also have an auto-installation bash script [here](/apps/installer/main.sh) (*Warning: try it/analyze it before running it*).
Dockerization of AzerothCore is fully supported, and we have various community made tutorials (eg: AWS / Digital Ocean installation).
## SUPPORT
Our self-made wiki probably has a lot of answers for you.
For help requests, it is recommended to ask your question on [StackOverflow](https://stackoverflow.com/questions/tagged/azerothcore) and link it in [our chat](https://discordapp.com/channels/217589275766685707/284406375495368704).
## AUTHORS & CONTRIBUTORS
This project exists thanks to:
- **The [AzerothCore developers and contributors](https://github.com/AzerothCore/azerothcore-wotlk/graphs/contributors)**
- The [SunwellCore developers xinef and pussywizard](http://www.azerothcore.org/pages/sunwell.pl/)
- All the [TrinityCore developers and contributors](https://github.com/TrinityCore/TrinityCore/blob/3.3.5/AUTHORS)
- All the [MaNGOS, ScriptDev2 and UDB developers and contributors](https://github.com/cmangos/mangos-wotlk/blob/master/AUTHORS.md)
## IMPORTANT LINKS
- [Website](http://www.azerothcore.org/)
- [AzerothCore catalogue](http://www.azerothcore.org/catalogue/ "Modules, tools, and other things for AzerothCore") (modules, tools etc...)
- [Module template / Module skeleton](https://github.com/azerothcore/skeleton-module/)
- [Our community hub (Discord)](https://discord.gg/gkt4y2x)
- [Our wiki](http://www.azerothcore.org/wiki "Easy to use and developed by AzerothCore founder")
- [Our Facebook page](https://www.facebook.com/AzerothCore/)
- [Our LinkedIn page](https://www.linkedin.com/company/azerothcore/)
## SPONSORS
List of organizations that help AzerothCore:
[![JetBrains](https://user-images.githubusercontent.com/75517/51205146-7f225c80-1905-11e9-82e0-835627be170d.png)](https://www.jetbrains.com/?from=AzerothCore)
## LICENSE
- The new AzerothCore source components are released under the [GNU AGPL v3](https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-AGPL3)
- The old sources based on MaNGOS/TrinityCore are released under the [GNU GPL v2](https://github.com/azerothcore/azerothcore-wotlk/blob/master/LICENSE-GPL2)

5
acore.json Normal file
View File

@ -0,0 +1,5 @@
{
"name" : "azerothcore-wotlk",
"version" : "3.0.0-dev",
"license" : "AGPL3"
}

7
acore.sh Normal file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/apps/installer/main.sh"

View File

@ -0,0 +1,23 @@
function registerHooks() { hwc_event_register_hooks "$@"; }
function runHooks() { hwc_event_run_hooks "$@"; }
source "$AC_PATH_CONF/dist/config.sh" # include dist to avoid missing conf variables
if [ -f "$AC_PATH_CONF/config.sh" ]; then
source "$AC_PATH_CONF/config.sh" # should overwrite previous
else
echo "NOTICE: file <$AC_PATH_CONF/config.sh> has not been found, you should create and configure it."
fi
#
# Load modules
#
for entry in "$AC_PATH_MODULES/"*/include.sh
do
if [ -e $entry ]; then
source $entry
fi
done
ACORE_VERSION=$("$AC_PATH_DEPS/jsonpath/JSONPath.sh" -f $AC_PATH_ROOT/acore.json -b '$.version')

View File

@ -0,0 +1,13 @@
unamestr=`uname`
if [[ "$unamestr" == 'Darwin' ]]; then
AC_PATH_ROOT=$(greadlink -f "$AC_PATH_APPS/../")
else
AC_PATH_ROOT=$(readlink -f "$AC_PATH_APPS/../")
fi
AC_PATH_CONF="$AC_PATH_ROOT/conf"
AC_PATH_MODULES="$AC_PATH_ROOT/modules"
AC_PATH_DEPS="$AC_PATH_ROOT/deps"

View File

@ -0,0 +1,17 @@
[[ ${GUARDYVAR:-} -eq 1 ]] && return || readonly GUARDYVAR=1 # include it once
# force default language for applications
LC_ALL=C
AC_PATH_APPS="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
AC_PATH_SHARED="$AC_PATH_APPS/bash_shared"
source "$AC_PATH_SHARED/defines.sh"
source "$AC_PATH_DEPS/hw-core/bash-lib-event/src/hooks.sh"
source "$AC_PATH_SHARED/common.sh"
[[ "$OSTYPE" = "msys" ]] && AC_BINPATH_FULL="$BINPATH" || AC_BINPATH_FULL="$BINPATH/bin"

11
apps/ci/ci-compile.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e
echo "compile core"
export CCACHE_CPP2=true
export CCACHE_MAXSIZE='500MB'
export CCACHE_COMPRESS=1
ccache -s
./acore.sh "compiler" "all"
ccache -s

17
apps/ci/ci-error-check.sh Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
DB_ERRORS_FILE="./env/dist/bin/DBErrors.log";
if [[ ! -f ${DB_ERRORS_FILE} ]]; then
echo "File ${DB_ERRORS_FILE} not found!";
exit 1
fi
if [[ -s ${DB_ERRORS_FILE} ]]; then
printf "The DBErrors.log file contains startup errors:\n\n";
cat ${DB_ERRORS_FILE};
printf "\nPlease solve the startup errors listed above!\n";
exit 1;
else
echo "No startup errors found in DBErrors.log, good job!";
fi

14
apps/ci/ci-import-db.sh Normal file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -e
sudo systemctl start mysql
./acore.sh "db-assembler" "import-all"
if [ -s modules/mod-premium/sql/example_item_9017.sql ]
then
echo "Import custom module item..."
# if the premium module is available insert the example item or else the worldserver dry run will fail
mysql -uroot -proot acore_world < modules/mod-premium/sql/example_item_9017.sql
echo "Done!"
fi

View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e
echo "install modules"
git clone --depth=1 --branch=master --recursive https://github.com/azerothcore/mod-eluna-lua-engine.git modules/mod-eluna-lua-engine
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-autobalance.git modules/mod-autobalance
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-transmog.git modules/mod-transmog
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-npc-beastmaster.git modules/mod-npc-beastmaster
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-duel-reset.git modules/mod-duel-reset
git clone --depth=1 --branch=master https://github.com/azerothcore/mod-premium modules/mod-premium

58
apps/ci/ci-install.sh Normal file
View File

@ -0,0 +1,58 @@
#!/bin/bash
set -e
cat >>conf/config.sh <<CONFIG_SH
MTHREADS=$(($(grep -c ^processor /proc/cpuinfo) + 2))
CWARNINGS=ON
CDEBUG=OFF
CTYPE=Release
CSCRIPTS=ON
CUNIT_TESTS=ON
CSERVERS=ON
CTOOLS=ON
CSCRIPTPCH=OFF
CCOREPCH=OFF
CCUSTOMOPTIONS='-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror"'
DB_CHARACTERS_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
DB_AUTH_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
DB_WORLD_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
CONFIG_SH
time sudo apt-get update -y
# time sudo apt-get upgrade -y
time sudo apt-get install -y git lsb-release sudo ccache
time ./acore.sh install-deps
case $COMPILER in
# this is in order to use the "default" clang version of the OS, without forcing a specific version
"clang" )
time sudo apt-get install -y clang
echo "CCOMPILERC=\"clang\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++\"" >> ./conf/config.sh
;;
"clang6" )
time sudo apt-get install -y clang-6.0
echo "CCOMPILERC=\"clang-6.0\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++-6.0\"" >> ./conf/config.sh
;;
"clang9" )
time sudo apt-get install -y clang-9
echo "CCOMPILERC=\"clang-9\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++-9\"" >> ./conf/config.sh
;;
"clang10" )
time sudo apt-get install -y clang-10
echo "CCOMPILERC=\"clang-10\"" >> ./conf/config.sh
echo "CCOMPILERCXX=\"clang++-10\"" >> ./conf/config.sh
;;
* )
echo "Unknown compiler $COMPILER"
exit 1
;;
esac

View File

@ -0,0 +1,3 @@
#!/bin/bash
time var/build/obj/src/test/unit_tests

View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e
echo "[worldserver]" >> ./env/dist/etc/worldserver.conf
echo "DataDir = \"../data/\"" >> ./env/dist/etc/worldserver.conf
echo "LoginDatabaseInfo = \"localhost;3306;root;root;acore_auth\"" >> ./env/dist/etc/worldserver.conf
echo "WorldDatabaseInfo = \"localhost;3306;root;root;acore_world\"" >> ./env/dist/etc/worldserver.conf
echo "CharacterDatabaseInfo = \"localhost;3306;root;root;acore_characters\"" >> ./env/dist/etc/worldserver.conf
git clone --depth=1 --branch=master --single-branch https://github.com/ac-data/ac-data.git ./env/dist/data
(cd ./env/dist/bin/ && timeout 5m ./worldserver --dry-run)

11
apps/ci/docker/.env.dist Normal file
View File

@ -0,0 +1,11 @@
WORLDSERVER_DATA=./docker/worldserver/data
WORLDSERVER_ETC=./docker/worldserver/etc
WORLDSERVER_LOGS=./docker/worldserver/logs
AUTHSERVER_ETC=./docker/authserver/etc
AUTHSERVER_LOGS=./docker/authserver/logs
WORLD_EXTERNAL_PORT=8085
AUTH_EXTERNAL_PORT=3724
DB_EXTERNAL_PORT=9000
DB_ROOT_PASSWORD=password

View File

@ -0,0 +1,3 @@
#!/bin/bash
cp apps/ci/docker/.env.dist .env

30
apps/ci/mac/ci-compile.sh Normal file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
export CCACHE_CPP2=true
export CCACHE_MAXSIZE='2G'
export CCACHE_COMPRESS=1
ccache -s
mkdir var/build/obj && cd var/build/obj;
time cmake ../../../ \
-DTOOLS=1 \
-DUNIT_TESTS=1 \
-DSCRIPTS=1 \
-DCMAKE_BUILD_TYPE=Debug \
-DMYSQL_ADD_INCLUDE_PATH=/usr/local/include \
-DMYSQL_LIBRARY=/usr/local/lib/libmysqlclient.dylib \
-DREADLINE_INCLUDE_DIR=/usr/local/opt/readline/include \
-DREADLINE_LIBRARY=/usr/local/opt/readline/lib/libreadline.dylib \
-DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include \
-DOPENSSL_SSL_LIBRARIES=/usr/local/opt/openssl/lib/libssl.dylib \
-DOPENSSL_CRYPTO_LIBRARIES=/usr/local/opt/openssl/lib/libcrypto.dylib \
-DCMAKE_C_FLAGS="-Werror" \
-DCMAKE_CXX_FLAGS="-Werror" \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
;
time make -j $(($(sysctl -n hw.ncpu ) + 2))
ccache -s

View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
time brew update
time brew install openssl readline ace coreutils bash bash-completion mysql ccache

2
apps/compiler/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
config.sh

32
apps/compiler/README.md Normal file
View File

@ -0,0 +1,32 @@
## How to compile:
first of all, if you need some custom configuration you have to copy
/conf/dist/config.sh in /conf/config.sh and configure it
* for a "clean" compilation you must run all scripts in their order:
./1-clean.sh
./2-configure.sh
./3-build.sh
* if you add/rename/delete some sources and you need to compile it you have to run:
./2-configure.sh
./3-build.sh
* if you have modified code only, you just need to run
./3-build.sh
## compiler.sh
compiler.sh script contains an interactive menu to clean/compile/build. You can also run actions directly by command lines specifying the option.
Ex:
./compiler.sh 3
It will start the build process (it's equivalent to ./3-build.sh)
## Note:
For an optimal development process and **really faster** compilation time, is suggested to use clang instead of gcc

72
apps/compiler/compiler.sh Normal file
View File

@ -0,0 +1,72 @@
#!/usr/bin/env bash
set -e
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/includes/includes.sh"
function run_option() {
re='^[0-9]+$'
if [[ $1 =~ $re ]] && test "${comp_functions[$1-1]+'test'}"; then
${comp_functions[$1-1]}
elif [ -n "$(type -t comp_$1)" ] && [ "$(type -t comp_$1)" = function ]; then
fun="comp_$1"
$fun
else
echo "invalid option, use --help option for the commands list"
fi
}
function comp_quit() {
exit 0
}
comp_options=(
"build: Configure and compile"
"clean: Clean build files"
"configure: Run CMake"
"compile: Compile only"
"all: clean, configure and compile"
"quit: Close this menu")
comp_functions=(
"comp_build"
"comp_clean"
"comp_configure"
"comp_compile"
"comp_all"
"comp_quit")
PS3='[ Please enter your choice ]: '
runHooks "ON_AFTER_OPTIONS" #you can create your custom options
function _switch() {
_reply="$1"
_opt="$2"
case $_reply in
""|"--help")
echo "Available commands:"
printf '%s\n' "${options[@]}"
;;
*)
run_option $_reply $_opt
;;
esac
}
while true
do
# run option directly if specified in argument
[ ! -z $1 ] && _switch $@
[ ! -z $1 ] && exit 0
select opt in "${comp_options[@]}"
do
echo "==== ACORE COMPILER ===="
_switch $REPLY
break;
done
done

View File

@ -0,0 +1,7 @@
# you can choose build type from cmd argument
if [ ! -z $1 ]
then
CCTYPE=$1
CCTYPE=${CCTYPE^} # capitalize first letter if it's not yet
fi

View File

@ -0,0 +1,73 @@
function comp_clean() {
echo "Cleaning build files"
CWD=$(pwd)
cd $BUILDPATH
make -f Makefile clean || true
make clean || true
find -iname '*cmake*' -not -name CMakeLists.txt -exec rm -rf {} \+
cd $CWD
}
function comp_configure() {
CWD=$(pwd)
cd $BUILDPATH
echo "Build path: $BUILDPATH"
echo "DEBUG info: $CDEBUG"
echo "Compilation type: $CTYPE"
# -DCMAKE_BUILD_TYPE=$CCTYPE disable optimization "slow and huge amount of ram"
# -DWITH_COREDEBUG=$CDEBUG compiled with debug information
#-DSCRIPTS_COMMANDS=$CSCRIPTS -DSCRIPTS_CUSTOM=$CSCRIPTS -DSCRIPTS_EASTERNKINGDOMS=$CSCRIPTS -DSCRIPTS_EVENTS=$CSCRIPTS -DSCRIPTS_KALIMDOR=$CSCRIPTS \
#-DSCRIPTS_NORTHREND=$CSCRIPTS -DSCRIPTS_OUTDOORPVP=$CSCRIPTS -DSCRIPTS_OUTLAND=$CSCRIPTS -DSCRIPTS_PET=$CSCRIPTS -DSCRIPTS_SPELLS=$CSCRIPTS -DSCRIPTS_WORLD=$CSCRIPTS \
#-DAC_WITH_UNIT_TEST=$CAC_UNIT_TEST -DAC_WITH_PLUGINS=$CAC_PLG \
local DCONF=""
if [ ! -z "$CONFDIR" ]; then
DCONF="-DCONF_DIR=$CONFDIR"
fi
cmake $SRCPATH -DCMAKE_INSTALL_PREFIX=$BINPATH $DCONF -DSERVERS=$CSERVERS \
-DSCRIPTS=$CSCRIPTS \
-DUNIT_TESTS=$CUNIT_TESTS \
-DTOOLS=$CTOOLS -DUSE_SCRIPTPCH=$CSCRIPTPCH -DUSE_COREPCH=$CCOREPCH -DWITH_COREDEBUG=$CDEBUG -DCMAKE_BUILD_TYPE=$CTYPE -DWITH_WARNINGS=$CWARNINGS \
-DCMAKE_C_COMPILER=$CCOMPILERC -DCMAKE_CXX_COMPILER=$CCOMPILERCXX "-DDISABLED_AC_MODULES=$CDISABLED_AC_MODULES" $CCUSTOMOPTIONS
cd $CWD
runHooks "ON_AFTER_CONFIG"
}
function comp_compile() {
[ $MTHREADS == 0 ] && MTHREADS=`grep -c ^processor /proc/cpuinfo` && MTHREADS=$(($MTHREADS + 2))
echo "Using $MTHREADS threads"
CWD=$(pwd)
cd $BUILDPATH
time make -j $MTHREADS
make -j $MTHREADS install
cd $CWD
runHooks "ON_AFTER_BUILD"
}
function comp_build() {
comp_configure
comp_compile
}
function comp_all() {
comp_clean
comp_build
}

View File

@ -0,0 +1,23 @@
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/../../bash_shared/includes.sh"
AC_PATH_COMPILER="$AC_PATH_APPS/compiler"
if [ -f "$AC_PATH_COMPILER/config.sh" ]; then
source "$AC_PATH_COMPILER/config.sh" # should overwrite previous
fi
function ac_on_after_build() {
# move the run engine
cp -rvf "$AC_PATH_APPS/startup-scripts/"* "$BINPATH"
}
registerHooks "ON_AFTER_BUILD" ac_on_after_build
source "$AC_PATH_COMPILER/includes/defines.sh"
source "$AC_PATH_COMPILER/includes/functions.sh"
mkdir -p $BUILDPATH
mkdir -p $BINPATH

3
apps/db_assembler/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/output/
/backup/
config.sh

View File

@ -0,0 +1,22 @@
## Description
This script allows you to assemble all sql files into one so you can easily import it to your databases (or use the main script to import directly). By default, it creates the merged files in `/env/dist`.
## How to use:
First of all, if you need some custom configuration, you have to copy `/conf/dist/config.sh` to `/conf/config.sh` and configure it. The file is here: https://github.com/azerothcore/azerothcore-wotlk/tree/master/conf
_Read it because there are several options to configure._
`db_assembler.sh` script contains an interactive menu to assemble and import sql files.
Just run it to display the options.
Note: You can even use actions directly by command lines specifying the option.
Ex:
./db_assembler.sh 1
It will merge all sql files without an interactive menu.

View File

@ -0,0 +1,77 @@
#!/usr/bin/env bash
set -e
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/includes/includes.sh"
cmdopt=$1
PS3='[Please enter your choice]: '
options=(
"all: Assemble all" # 1
"bases: Assemble only bases" # 2
"updates: Assemble only updates" # 3
"customs: Assemble only customs" # 4
"import-all: Assemble & Import all" # 5
"import-bases: Assemble & Import only bases" # 6
"import-updates: Assemble & Import only updates" # 7
"import-customs: Assemble & Import only customs" # 8
"quit: Exit from this menu" # 9
)
function _switch() {
_reply="$1"
_opt="$2"
case $_reply in
""|"all"|"1")
dbasm_run true true true
;;
""|"bases"|"2")
dbasm_run true false false
;;
""|"updates"|"3")
dbasm_run false true false
;;
""|"customs"|"4")
dbasm_run false false true
;;
""|"import-all"|"5")
dbasm_import true true true
;;
""|"import-bases"|"6")
dbasm_import true false false
;;
""|"import-updates"|"7")
dbasm_import false true false
;;
""|"import-customs"|"8")
dbasm_import false false true
;;
""|"quit"|"9")
echo "Goodbye!"
exit
;;
""|"--help")
echo "Available commands:"
printf '%s\n' "${options[@]}"
;;
*) echo "invalid option, use --help option for the commands list";;
esac
}
while true
do
# run option directly if specified in argument
[ ! -z $1 ] && _switch $@
[ ! -z $1 ] && exit 0
select opt in "${options[@]}"
do
echo "===== DB ASSEMBLER MENU ====="
_switch $REPLY
break
done
done

View File

@ -0,0 +1,381 @@
# globals
PROMPT_USER=""
PROMPT_PASS=""
# use in a subshell
function dbasm_resetExitCode() {
exit 0
}
function dbasm_mysqlExec() {
confs=$1
command=$2
options=$3
eval $confs
if [[ ! -z "${PROMPT_USER// }" ]]; then
MYSQL_USER=$PROMPT_USER
MYSQL_PASS=$PROMPT_PASS
fi
export MYSQL_PWD=$MYSQL_PASS
retval=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" $options -e "$command")
if [[ $? -ne 0 ]]; then
err=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" $options -e "$command" 2>&1 )
if [[ "$err" == *"Access denied"* ]]; then
read -p "Insert mysql user:" PROMPT_USER
read -p "Insert mysql pass:" -s PROMPT_PASS
export MYSQL_PWD=$PROMPT_PASS
retval=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" $options -e "$command")
if [[ $? -ne 0 ]]; then
err=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" $options -e "$command" 2>&1 )
# it happens on new mysql 5.7 installations
# since mysql_native_password is explicit now
if [[ "$err" == *"Access denied"* ]]; then
echo "Setting mysql_native_password and for $PROMPT_USER ..."
sudo -h "$MYSQL_HOST" "$DB_MYSQL_EXEC" -e "UPDATE mysql.user SET authentication_string=PASSWORD('${PROMPT_PASS}'), plugin='mysql_native_password' WHERE User='${PROMPT_USER}'; FLUSH PRIVILEGES;"
fi
fi
# create configured account if not exists
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" $options -e "CREATE USER '${MYSQL_USER}'@'${MYSQL_HOST}' IDENTIFIED BY '${MYSQL_PASS}' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;"
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" $options -e "GRANT CREATE ON *.* TO '${MYSQL_USER}'@'${MYSQL_HOST}' WITH GRANT OPTION;"
for db in ${DATABASES[@]}
do
local _uc=${db^^}
local _name="DB_"$_uc"_CONF"
local _confs=${!_name}
local _name="DB_"$_uc"_NAME"
local _dbname=${!_name}
eval $_confs
echo "Grant permissions for ${MYSQL_USER}'@'${MYSQL_HOST} to ${_dbname}"
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" $options -e "GRANT ALL PRIVILEGES ON ${_dbname}.* TO '${MYSQL_USER}'@'${MYSQL_HOST}' WITH GRANT OPTION;"
done
else
exit
fi
fi
}
function dbasm_isNotEmpty() {
dbname=$1
conf=$2
dbasm_mysqlExec "$conf" "SELECT COUNT(DISTINCT table_name) FROM information_schema.columns WHERE table_schema = '${dbname}'" "--skip-column-names"
if (( $retval > 0 )); then
true
else
false
fi
}
function dbasm_dbExists() {
dbname=$1
conf=$2
dbasm_mysqlExec "$conf" "SHOW DATABASES LIKE '${dbname}'" "--skip-column-names"
if [ "$retval" == "${dbname}" ]; then
true
else
false
fi
}
function dbasm_createDB() {
database=${1,,}
uc=${database^^}
name="DB_"$uc"_CONF"
confs=${!name}
name="DB_"$uc"_NAME"
dbname=${!name}
eval $confs
CONF_USER=$MYSQL_USER
CONF_PASS=$MYSQL_PASS
if dbasm_dbExists $dbname "$confs"; then
echo "$dbname database exists"
else
echo "Creating DB ${dbname} ..."
dbasm_mysqlExec "$confs" "CREATE DATABASE \`${dbname}\`" ""
dbasm_mysqlExec "$confs" "CREATE USER IF NOT EXISTS '${CONF_USER}'@'${MYSQL_HOST}' IDENTIFIED BY '${CONF_PASS}';"
dbasm_mysqlExec "$confs" "GRANT ALL PRIVILEGES ON \`${dbname}\`.* TO '${CONF_USER}'@'${MYSQL_HOST}' WITH GRANT OPTION;"
fi
}
function dbasm_assemble() {
# to lowercase
database=${1,,}
start_sql=$2
with_base=$3
with_updates=$4
with_custom=$5
uc=${database^^}
name="DB_"$uc"_PATHS"
v="$name[@]"
base=("${!v}")
name="DB_"$uc"_UPDATES_PATHS"
v="$name[@]"
updates=("${!v}")
name='DB_'$uc'_CUSTOM_PATHS'
v="$name[@]"
custom=("${!v}")
suffix_base="_base"
suffix_upd="_updates"
suffix_custom="_custom"
curTime=`date +%Y_%m_%d_%H_%M_%S`
# ALLOW FOR RECURSION WITH "**"
shopt -s globstar
if [ $with_base = true ]; then
echo "" > $OUTPUT_FOLDER$database$suffix_base".sql"
if [ ! ${#base[@]} -eq 0 ]; then
echo "Generating $OUTPUT_FOLDER$database$suffix_base ..."
for d in "${base[@]}"
do
echo "Searching on $d ..."
if [ ! -z $d ]; then
for entry in "$d"/**/*.sql
do
if [[ -e $entry ]]; then
cat "$entry" >> $OUTPUT_FOLDER$database$suffix_base".sql"
fi
done
fi
done
fi
fi
if [ $with_updates = true ]; then
updFile=$OUTPUT_FOLDER$database$suffix_upd".sql"
echo "" > $updFile
if [ ! ${#updates[@]} -eq 0 ]; then
echo "Generating $OUTPUT_FOLDER$database$suffix_upd ..."
for d in "${updates[@]}"
do
echo "Searching on $d ..."
if [ ! -z $d ]; then
for entry in "$d"/**/*.sql
do
if [[ ! -e $entry ]]; then
continue
fi
echo "-- $file" >> $updFile
cat "$entry" >> $updFile
done
fi
done
fi
fi
if [ $with_custom = true ]; then
custFile=$OUTPUT_FOLDER$database$suffix_custom".sql"
echo "" > $custFile
if [ ! ${#custom[@]} -eq 0 ]; then
echo "Generating $OUTPUT_FOLDER$database$suffix_custom ..."
for d in "${custom[@]}"
do
echo "Searching on $d ..."
if [ ! -z $d ]; then
for entry in "$d"/**/*.sql
do
if [[ ! -e $entry ]]; then
continue
fi
echo "-- $file" >> $custFile
cat "$entry" >> $custFile
done
fi
done
fi
fi
}
function dbasm_run() {
echo "===== STARTING ASSEMBLY PROCESS ====="
mkdir -p "$OUTPUT_FOLDER"
for db in ${DATABASES[@]}
do
dbasm_assemble "$db" $version".sql" $1 $2 $3
done
echo "===== DONE ====="
}
function dbasm_db_backup() {
echo "backing up $1"
database=${1,,}
uc=${database^^}
name="DB_"$uc"_CONF"
confs=${!name}
name="DB_"$uc"_NAME"
dbname=${!name}
eval $confs;
if [[ ! -z "${PROMPT_USER// }" ]]; then
MYSQL_USER=$PROMPT_USER
MYSQL_PASS=$PROMPT_PASS
fi
export MYSQL_PWD=$MYSQL_PASS
now=`date +%s`
"$DB_MYSQL_DUMP_EXEC" --opt --user="$MYSQL_USER" --host="$MYSQL_HOST" "$dbname" > "${BACKUP_FOLDER}${database}_backup_${now}.sql" && echo "done"
if [[ $? -ne 0 ]]; then
err=$("$DB_MYSQL_DUMP_EXEC" --opt --user="$MYSQL_USER" --host="$MYSQL_HOST" "$dbname" 2>&1 )
if [[ "$err" == *"Access denied"* ]]; then
read -p "Insert mysql user:" PROMPT_USER
read -p "Insert mysql pass:" -s PROMPT_PASS
export MYSQL_PWD=$PROMPT_PASS
"$DB_MYSQL_DUMP_EXEC" --opt --user="$PROMPT_USER" --host="$MYSQL_HOST" "$dbname" > "${BACKUP_FOLDER}${database}_backup_${now}.sql" && echo "done"
else
exit
fi
fi
}
function dbasm_db_import() {
database=${1,,}
type=$2
uc=${database^^}
name="DB_"$uc"_CONF"
confs=${!name}
name="DB_"$uc"_NAME"
dbname=${!name}
if [[ $type = "base" && $DB_SKIP_BASE_IMPORT_IF_EXISTS = true ]]; then
if dbasm_isNotEmpty $dbname "$confs"; then
echo "$dbname is not empty, base importing skipped"
return
else
echo "$dbname seems empty"
fi
fi
echo "importing $1 - $2 ..."
eval $confs;
if [[ ! -z "${PROMPT_USER// }" ]]; then
MYSQL_USER=$PROMPT_USER
MYSQL_PASS=$PROMPT_PASS
fi
export MYSQL_PWD=$MYSQL_PASS
# TODO: remove this line after we squash our DB updates
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" -e "SET GLOBAL max_allowed_packet=128*1024*1024;"
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" --default-character-set=utf8 "$dbname" < "${OUTPUT_FOLDER}${database}_${type}.sql"
if [[ $? -ne 0 ]]; then
err=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" "$dbname" 2>&1 )
if [[ "$err" == *"Access denied"* ]]; then
read -p "Insert mysql user:" PROMPT_USER
read -p "Insert mysql pass:" -s PROMPT_PASS
export MYSQL_PWD=$PROMPT_PASS
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$PROMPT_USER" "$dbname" < "${OUTPUT_FOLDER}${database}_${type}.sql"
else
exit
fi
fi
}
function dbasm_import() {
dbasm_run $1 $2 $3
with_base=$1
with_updates=$2
with_custom=$3
echo "===== CHECKING DBs ====="
for db in ${DATABASES[@]}
do
dbasm_createDB "$db"
done
echo "===== DONE ====="
#
# BACKUP
#
if [ $BACKUP_ENABLE = true ]; then
echo "===== STARTING BACKUP PROCESS ====="
mkdir -p "$BACKUP_FOLDER"
for db in ${DATABASES[@]}
do
dbasm_db_backup "$db"
done
echo "===== DONE ====="
fi
echo "===== STARTING IMPORTING PROCESS ====="
#
# IMPORT
#
if [ $with_base = true ]; then
for db in ${DATABASES[@]}
do
dbasm_db_import "$db" "base"
done
fi
if [ $with_updates = true ]; then
for db in ${DATABASES[@]}
do
dbasm_db_import "$db" "updates"
done
fi
if [ $with_custom = true ]; then
for db in ${DATABASES[@]}
do
dbasm_db_import "$db" "custom"
done
fi
echo "===== DONE ====="
}

View File

@ -0,0 +1,11 @@
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/../../bash_shared/includes.sh"
AC_PATH_DBASSEMBLER="$AC_PATH_APPS/db_assembler"
if [ -f "$AC_PATH_DBASSEMBLER/config.sh" ]; then
source "$AC_PATH_DBASSEMBLER/config.sh" # should overwrite previous
fi
source "$AC_PATH_DBASSEMBLER/includes/functions.sh"

1
apps/db_exporter/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
config.sh

View File

@ -0,0 +1,12 @@
This script is used by devs to export the databases to base directories
You should use it on clean databases
## USAGE
NOTE: this script is only working under unix currently
1) You must create a config.sh file changing DB connection configurations
of /conf/config.sh.dist
2) Run the db_export.sh script and wait

View File

@ -0,0 +1,52 @@
#!/usr/bin/env bash
ROOTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../" && pwd )"
source $ROOTPATH"/apps/bash_shared/includes.sh"
if [ -f "./config.sh" ]; then
source "./config.sh" # should overwrite previous
fi
echo "This is a dev-only procedure to export the DB into the SQL base files. All base files will be overwritten."
read -p "Are you sure you want to continue (y/N)? " choice
case "$choice" in
y|Y ) echo "Exporting the DB into the SQL base files...";;
* ) return;;
esac
echo "===== STARTING PROCESS ====="
function export() {
echo "Working on: "$1
database=$1
var_base_path="DB_"$database"_PATHS"
base_path=${!var_base_path}
base_conf="TPATH="$base_path";\
CLEANFOLDER=1; \
CHMODE=0; \
TEXTDUMPS=0; \
PARSEDUMP=1; \
FULL=0; \
DUMPOPTS='--skip-comments --skip-set-charset --routines --extended-insert --order-by-primary --single-transaction --quick'; \
"
var_base_conf="DB_"$database"_CONF"
base_conf=$base_conf${!var_base_conf}
var_base_name="DB_"$database"_NAME"
base_name=${!var_base_name}
bash $AC_PATH_DEPS"/drassil/mysql-tools/mysql-tools" dump "" $base_name "" "$base_conf"
}
for db in ${DATABASES[@]}
do
export "$db"
done
echo "===== DONE ====="

124
apps/db_pendings/import.sh Normal file
View File

@ -0,0 +1,124 @@
#!/usr/bin/env bash
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/../bash_shared/includes.sh"
UPDATES_PATH="$AC_PATH_ROOT/data/sql/updates/"
COMMIT_HASH=
function import() {
db=$1
folder="db_"$db
pendingPath="$AC_PATH_ROOT/data/sql/updates/pending_$folder"
updPath="$UPDATES_PATH/$folder"
latestUpd=`ls -1 $updPath/ | tail -n 1`
if [ -z $latestUpd ]; then
echo "FIRST UPDATE FILE MISSING!! DID YOU ARCHIVED IT?";
exit;
fi
dateToday=`date +%Y_%m_%d`
counter=0
dateLast=$latestUpd
tmp=${dateLast#*_*_*_}
oldCnt=${tmp%.sql}
oldDate=${dateLast%_$tmp}
if [ "$oldDate" = "$dateToday" ]; then
((counter=$oldCnt+1))
fi;
for entry in "$pendingPath"/*.sql
do
if [[ -e $entry ]]; then
oldVer=$oldDate"_"$oldCnt
cnt=$(printf -v counter "%02d" $counter ; echo $counter)
newVer=$dateToday"_"$cnt
startTransaction="START TRANSACTION;";
updHeader="ALTER TABLE version_db_"$db" CHANGE COLUMN "$oldVer" "$newVer" bit;";
endTransaction="COMMIT;";
newFile="$updPath/"$dateToday"_"$cnt".sql"
oldFile=$(basename "$entry")
prefix=${oldFile%_*.sql}
suffix=${oldFile#rev_}
rev=${suffix%.sql}
isRev=0
if [[ $prefix = "rev" && $rev =~ ^-?[0-9]+$ ]]; then
isRev=1
fi
echo "-- DB update $oldVer -> $newVer" > "$newFile";
if [[ $isRev -eq 1 ]]; then
echo "DROP PROCEDURE IF EXISTS \`updateDb\`;" >> "$newFile";
echo "DELIMITER //" >> "$newFile";
echo "CREATE PROCEDURE updateDb ()" >> "$newFile";
echo "proc:BEGIN DECLARE OK VARCHAR(100) DEFAULT 'FALSE';" >> "$newFile";
echo "SELECT COUNT(*) INTO @COLEXISTS" >> "$newFile";
echo "FROM information_schema.COLUMNS" >> "$newFile";
echo "WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'version_db_"$db"' AND COLUMN_NAME = '"$oldVer"';" >> "$newFile";
echo "IF @COLEXISTS = 0 THEN LEAVE proc; END IF;" >> "$newFile";
fi
echo "$startTransaction" >> "$newFile";
echo "$updHeader" >> "$newFile";
if [[ $isRev -eq 1 ]]; then
echo "SELECT sql_rev INTO OK FROM version_db_"$db" WHERE sql_rev = '$rev'; IF OK <> 'FALSE' THEN LEAVE proc; END IF;" >> "$newFile";
fi;
echo "--" >> "$newFile";
echo "-- START UPDATING QUERIES" >> "$newFile";
echo "--" >> "$newFile";
echo "" >> "$newFile";
cat $entry >> "$newFile";
echo "" >> "$newFile";
echo "--" >> "$newFile";
echo "-- END UPDATING QUERIES" >> "$newFile";
echo "--" >> "$newFile";
echo "$endTransaction" >> "$newFile";
if [[ $isRev -eq 1 ]]; then
echo "END //" >> "$newFile";
echo "DELIMITER ;" >> "$newFile";
echo "CALL updateDb();" >> "$newFile";
echo "DROP PROCEDURE IF EXISTS \`updateDb\`;" >> "$newFile";
fi;
currentHash="$(git log --diff-filter=A "$entry" | grep "^commit " | sed -e 's/commit //')"
if [[ "$COMMIT_HASH" != *"$currentHash"* ]]
then
COMMIT_HASH="$COMMIT_HASH $currentHash"
fi
rm $entry;
oldDate=$dateToday
oldCnt=$cnt
((counter+=1))
fi
done
}
import "world"
import "characters"
import "auth"
echo "Done."

View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
## Set a local git commit template
git config --local commit.template ".git_commit_template.txt" ;
echo "--- Successfully set the default commit template for this repository only. Verify with: git config -e"

View File

@ -0,0 +1,227 @@
function inst_configureOS() {
echo "Platform: $OSTYPE"
case "$OSTYPE" in
solaris*) echo "Solaris is not supported yet" ;;
darwin*) source "$AC_PATH_INSTALLER/includes/os_configs/osx.sh" ;;
linux*)
# If $OSDISTRO is set, use this value (from config.sh)
if [ ! -z "$OSDISTRO" ]; then
DISTRO=$OSDISTRO
# If available, use LSB to identify distribution
elif [ -f /etc/lsb-release -o -d /etc/lsb-release.d ]; then
DISTRO=$(lsb_release -i | cut -d: -f2 | sed s/'^\t'//)
# Otherwise, use release info file
else
DISTRO=$(ls -d /etc/[A-Za-z]*[_-][rv]e[lr]* | grep -v "lsb" | cut -d'/' -f3 | cut -d'-' -f1 | cut -d'_' -f1)
fi
case $DISTRO in
# add here distro that are debian or ubuntu based
# TODO: find a better way, maybe checking the existance
# of a package manager
"neon" | "ubuntu")
DISTRO="ubuntu"
;;
"debian")
DISTRO="debian"
;;
*)
echo "Distro: $DISTRO, is not supported. If your distribution is based on debian or ubuntu,
please set the 'OSDISTRO' environment variable to one of these distro (you can use config.sh file)"
;;
esac
DISTRO=${DISTRO,,}
echo "Distro: $DISTRO"
# TODO: implement different configurations by distro
source "$AC_PATH_INSTALLER/includes/os_configs/$DISTRO.sh"
;;
bsd*) echo "BSD is not supported yet" ;;
msys*) source "$AC_PATH_INSTALLER/includes/os_configs/windows.sh" ;;
*) echo "This platform is not supported" ;;
esac
}
function inst_updateRepo() {
cd "$AC_PATH_ROOT"
git pull origin $(git rev-parse --abbrev-ref HEAD)
}
function inst_resetRepo() {
cd "$AC_PATH_ROOT"
git reset --hard $(git rev-parse --abbrev-ref HEAD)
git clean -f
}
function inst_compile() {
comp_configure
comp_build
}
function inst_cleanCompile() {
comp_clean
inst_compile
}
function inst_allInOne() {
inst_configureOS
inst_updateRepo
inst_compile
dbasm_import true true true
}
function inst_getVersionBranch() {
local res="master"
local v="not-defined"
local MODULE_MAJOR=0
local MODULE_MINOR=0
local MODULE_PATCH=0
local MODULE_SPECIAL=0;
local ACV_MAJOR=0
local ACV_MINOR=0
local ACV_PATCH=0
local ACV_SPECIAL=0;
local curldata=$(curl -f --silent -H 'Cache-Control: no-cache' "$1" || echo "{}")
local parsed=$(echo "$curldata" | "$AC_PATH_DEPS/jsonpath/JSONPath.sh" -b '$.compatibility.*.[version,branch]')
semverParseInto "$ACORE_VERSION" ACV_MAJOR ACV_MINOR ACV_PATCH ACV_SPECIAL
if [[ ! -z "$parsed" ]]; then
readarray -t vers < <(echo "$parsed")
local idx
res="none"
# since we've the pair version,branch alternated in not associative and one-dimensional
# array, we've to simulate the association with length/2 trick
for idx in `seq 0 $((${#vers[*]}/2-1))`; do
semverParseInto "${vers[idx*2]}" MODULE_MAJOR MODULE_MINOR MODULE_PATCH MODULE_SPECIAL
if [[ $MODULE_MAJOR -eq $ACV_MAJOR && $MODULE_MINOR -le $ACV_MINOR ]]; then
res="${vers[idx*2+1]}"
v="${vers[idx*2]}"
fi
done
fi
echo "$v" "$res"
}
function inst_module_search {
local res="$1"
local idx=0;
if [ -z "$1" ]; then
echo "Type what to search or leave blank for full list"
read -p "Insert name: " res
fi
local search="+$res"
echo "Searching $res..."
echo "";
readarray -t MODS < <(curl --silent "https://api.github.com/search/repositories?q=org%3Aazerothcore${search}+fork%3Atrue+topic%3Acore-module+sort%3Astars&type=" \
| "$AC_PATH_DEPS/jsonpath/JSONPath.sh" -b '$.items.*.name')
while (( ${#MODS[@]} > idx )); do
mod="${MODS[idx++]}"
read v b < <(inst_getVersionBranch "https://raw.githubusercontent.com/azerothcore/$mod/master/acore-module.json")
if [[ "$b" != "none" ]]; then
echo "-> $mod (tested with AC version: $v)"
else
echo "-> $mod (no revision available for AC v$AC_VERSION, it could not work!)"
fi
done
echo "";
echo "";
}
function inst_module_install {
local res
if [ -z "$1" ]; then
echo "Type the name of the module to install"
read -p "Insert name: " res
else
res="$1"
fi
read v b < <(inst_getVersionBranch "https://raw.githubusercontent.com/azerothcore/$res/master/acore-module.json")
if [[ "$b" != "none" ]]; then
Joiner:add_repo "https://github.com/azerothcore/$res" "$res" "$b" && echo "Done, please re-run compiling and db assembly. Read instruction on module repository for more information"
else
echo "Cannot install $res module: it doesn't exists or no version compatible with AC v$ACORE_VERSION are available"
fi
echo "";
echo "";
}
function inst_module_update {
local res;
local _tmp;
local branch;
local p;
if [ -z "$1" ]; then
echo "Type the name of the module to update"
read -p "Insert name: " res
else
res="$1"
fi
_tmp=$PWD
if [ -d "$J_PATH_MODULES/$res/" ]; then
read v b < <(inst_getVersionBranch "https://raw.githubusercontent.com/azerothcore/$res/master/acore-module.json")
cd "$J_PATH_MODULES/$res/"
# use current branch if something wrong with json
if [[ "$v" == "none" || "$v" == "not-defined" ]]; then
b=`git rev-parse --abbrev-ref HEAD`
fi
Joiner:upd_repo "https://github.com/azerothcore/$res" "$res" "$b" && echo "Done, please re-run compiling and db assembly" || echo "Cannot update"
cd $_tmp
else
echo "Cannot update! Path doesn't exist"
fi;
echo "";
echo "";
}
function inst_module_remove {
if [ -z "$1" ]; then
echo "Type the name of the module to remove"
read -p "Insert name: " res
else
res="$1"
fi
Joiner:remove "$res" && echo "Done, please re-run compiling" || echo "Cannot remove"
echo "";
echo "";
}
function inst_simple_restarter {
echo "Running $1 ..."
bash "$AC_PATH_APPS/startup-scripts/simple-restarter" "$AC_BINPATH_FULL" "$1"
echo
#disown -a
#jobs -l
}
function inst_download_client_data {
local path="$AC_BINPATH_FULL"
echo "Downloading client data in: $path/data.zip ..."
curl -L https://github.com/wowgaming/client-data/releases/download/v7/data.zip > "$path/data.zip" \
&& unzip -o "$path/data.zip" -d "$path/" && rm "$path/data.zip"
}

View File

@ -0,0 +1,38 @@
[[ ${INSTALLER_GUARDYVAR:-} -eq 1 ]] && return || readonly INSTALLER_GUARDYVAR=1 # include it once
CURRENT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd )
source "$CURRENT_PATH/../../bash_shared/includes.sh"
AC_PATH_INSTALLER="$AC_PATH_APPS/installer"
J_VER_REQ="v0.8.3"
J_PATH="$AC_PATH_APPS/joiner"
J_PATH_MODULES="$AC_PATH_MODULES"
#install/update and include joiner
if [ ! -d "$J_PATH/.git" ]; then
git clone https://github.com/azerothcore/joiner "$J_PATH" -b master
git --git-dir="$J_PATH/.git/" --work-tree="$J_PATH/" reset --hard "$J_VER_REQ"
else
# legacy code, with new rev of joiner the update process is internally handled
_cur_branch=`git --git-dir="$J_PATH/.git/" --work-tree="$J_PATH/" rev-parse --abbrev-ref HEAD`
_cur_ver=`git --git-dir="$J_PATH/.git/" --work-tree="$J_PATH/" name-rev --tags --name-only $_cur_branch`
if [ "$_cur_ver" != "$J_VER_REQ" ]; then
git --git-dir="$J_PATH/.git" --work-tree="$J_PATH/" rev-parse && git --git-dir="$J_PATH/.git" --work-tree="$J_PATH/" fetch --tags origin master --quiet
git --git-dir="$J_PATH/.git/" --work-tree="$J_PATH/" reset --hard "$J_VER_REQ"
fi
fi
source "$J_PATH/joiner.sh"
if [ -f "$AC_PATH_INSTALLER/config.sh" ]; then
source "$AC_PATH_INSTALLER/config.sh" # should overwrite previous
fi
source "$AC_PATH_APPS/compiler/includes/includes.sh"
source "$AC_PATH_APPS/db_assembler/includes/includes.sh"
source "$AC_PATH_DEPS/semver_bash/semver.sh"
source "$AC_PATH_INSTALLER/includes/functions.sh"

View File

@ -0,0 +1,5 @@
sudo apt-get update
sudo apt-get install -y git cmake make gcc g++ clang libmysqlclient-dev \
libssl1.0-dev libbz2-dev libreadline-dev libncurses-dev \
mysql-server libace-6.* libace-dev curl unzip

View File

@ -0,0 +1,6 @@
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew install openssl readline cmake ace coreutils bash bash-completion md5sha1sum curl unzip

View File

@ -0,0 +1,24 @@
UBUNTU_VERSION=$(lsb_release -sr);
sudo apt-get update
if [[ $CONTINUOUS_INTEGRATION ]]; then
sudo apt-get -y install build-essential libtool make cmake cmake-data clang openssl libgoogle-perftools-dev \
libssl-dev libmysqlclient-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev libace-dev mysql-client \
libncurses5-dev
else
case $UBUNTU_VERSION in
"14.04")
sudo apt-get -y install build-essential libtool make cmake cmake-data gcc g++ clang openssl libgoogle-perftools-dev \
libssl-dev libmysqlclient-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev libace-dev mysql-server libncurses-dev \
curl unzip
;;
*)
sudo apt-get install -y git cmake make gcc g++ clang libmysqlclient-dev \
libssl-dev libbz2-dev libreadline-dev libncurses-dev \
mysql-server libace-6.* libace-dev curl unzip
;;
esac
fi

View File

@ -0,0 +1,17 @@
echo "WARNING: Installer Script for Windows is not fully supported yet. Work in progress.."
echo "!!README!!: Please install openssl and mysql libraries manually following our wiki"
# install chocolatey before
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
# install automatically following packages:
# cmake
# git
# microsoft-build-tools
# mysql 5.6
choco install -y --skip-checksums cmake git git.install microsoft-build-tools
choco install -y --skip-checksums mysql --version 5.6.12
echo "!!README!!: Please remember to install openssl and mysql libraries manually following our wiki"

93
apps/installer/main.sh Normal file
View File

@ -0,0 +1,93 @@
#!/usr/bin/env bash
CURRENT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CURRENT_PATH/includes/includes.sh"
PS3='[Please enter your choice]: '
options=(
"init (i): First Installation" # 1
"install-deps (d): Configure OS dep" # 2
"pull (u): Update Repository" # 3
"reset (r): Reset & Clean Repository" # 4
"compiler (c): Run compiler tool" # 5
"db-assembler (a): Run db assembler tool" # 6
"module-search (ms): Module Search by keyword" # 7
"module-install (mi): Module Install by name" # 8
"module-update (mu): Module Update by name" # 9
"module-remove: (mr): Module Remove by name" # 10
"client-data: (gd): download client data from github repository (beta)" # 11
"run-worldserver (rw): execute a simple restarter for worldserver" # 12
"run-authserver (ra): execute a simple restarter for authserver" # 13
"quit: Exit from this menu" # 14
)
function _switch() {
_reply="$1"
_opt="$2"
case $_reply in
""|"i"|"init"|"1")
inst_allInOne
;;
""|"d"|"install-deps"|"2")
inst_configureOS
;;
""|"u"|"pull"|"3")
inst_updateRepo
;;
""|"r"|"reset"|"4")
inst_resetRepo
;;
""|"c"|"compiler"|"5")
bash "$AC_PATH_APPS/compiler/compiler.sh" $_opt
;;
""|"a"|"db-assembler"|"6")
bash "$AC_PATH_APPS/db_assembler/db_assembler.sh" $_opt
;;
""|"ms"|"module-search"|"7")
inst_module_search "$_opt"
;;
""|"mi"|"module-install"|"8")
inst_module_install "$_opt"
;;
""|"mu"|"module-update"|"9")
inst_module_update "$_opt"
;;
""|"mr"|"module-remove"|"10")
inst_module_remove "$_opt"
;;
""|"gd"|"client-data"|"11")
inst_download_client_data
;;
""|"rw"|"run-worldserver"|"12")
inst_simple_restarter worldserver
;;
""|"ra"|"run-authserver"|"13")
inst_simple_restarter authserver
;;
""|"quit"|"14")
echo "Goodbye!"
exit
;;
""|"--help")
echo "Available commands:"
printf '%s\n' "${options[@]}"
;;
*) echo "invalid option, use --help option for the commands list";;
esac
}
while true
do
# run option directly if specified in argument
[ ! -z $1 ] && _switch $@ # old method: "${options[$cmdopt-1]}"
[ ! -z $1 ] && exit 0
echo "==== ACORE DASHBOARD ===="
select opt in "${options[@]}"
do
_switch $REPLY
break
done
done

View File

@ -0,0 +1,50 @@
# enable/disable GDB execution
export GDB_ENABLED=0
# [optional] gdb file
# default: gdb.txt
export GDB=""
# directory where binary are stored
export BINPATH=""
# Put here the pid you configured on your worldserver.conf file
# needed when GDB_ENABLED=1
export SERVERPID=""
# path to configuration file (including the file name)
# ex: /home/user/azerothcore/etc/worldserver.conf
export CONFIG=""
# path of log files
# needed by restarter to store its logs
export LOGS_PATH="";
# exec name
# ex: worldserver
export SERVERBIN=""
# prefix name for log files
# to avoid collision with other restarters
export LOG_PREFIX_NAME=""
# [optional] name of screen service
# if no specified, screen util won't be used
export SCREEN_NAME=""
# [optional] overwrite default screen options: -A -m -d -S
# WARNING: if you are running it under a systemd service
# please do not remove -m -d arguments from screen if are you using it,
# or keep WITH_CONSOLE=0 .
# otherwise the journald-logging system will take 100% of CPU slowing
# down the whole machine. It's because a systemd service should have
# low console output.
export SCREEN_OPTIONS=""
# enable/disable it to show the output
# within console, if disable the output will be redirect to
# logging files
#
export WITH_CONSOLE=0

View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
PATH_RUNENGINE="./"
source $PATH_RUNENGINE/run-engine
# you must create your conf
# copying conf.sh.dist
# and renaming as below
source ./conf-auth.sh
restarter

View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
PATH_RUNENGINE="./"
source $PATH_RUNENGINE/run-engine
# you must create your conf
# copying conf.sh.dist
# and renaming as below
source ./conf-world.sh
restarter

View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
PATH_RUNENGINE="./"
source $PATH_RUNENGINE/run-engine
# you must create your conf
# copying conf.sh.dist
# and renaming as below
source ./conf-auth.sh
starter

View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
PATH_RUNENGINE="./"
source $PATH_RUNENGINE/run-engine
# you must create your conf
# copying conf.sh.dist
# and renaming as below
source ./conf-world.sh
starter

View File

@ -0,0 +1,113 @@
export RUN_ENGINE_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# load default conf
if [ -e "$RUN_ENGINE_PATH/conf.dist" ]; then
source "$RUN_ENGINE_PATH/conf.sh.dist"
fi
function finish {
if [ ! -z "$SCREEN_NAME" ]; then
screen -X -S "$SCREEN_NAME" quit
fi
}
# disabled for now, but could be useful if we want
# shutdown the process if restarter crashes for some reason
# trap finish EXIT
function configureFiles() {
TRACE_BEGIN_STRING="SIGSEGV"
TRACE_FILE="$LOGS_PATH/"$LOG_PREFIX_NAME"_trace.log"
ERR_FILE="$LOGS_PATH/"$LOG_PREFIX_NAME"_error.log"
SYSLOG="$LOGS_PATH/"$LOG_PREFIX_NAME"_system.log"
SYSERR="$LOGS_PATH/"$LOG_PREFIX_NAME"_system.err"
LINKS_FILE="$LOGS_PATH/"$LOG_PREFIX_NAME"_crash_links.link"
}
function checkStatus() {
local ret=1
# wipe do : destroy old screens + ls
#screen -wipe
#if screen -ls $1 | grep -q "No Sockets found"
#then
# return 0
#fi
local gdbres=$(pgrep -f "gdb -x $GDB --batch $SERVERBIN")
if [[ $GDB_ENABLED -eq 1 && ! -z $gdbres ]]; then
return 1
fi
#
# This is a specific check for Azeroth Core in case of screen failure
# It is possible since same binary file cannot be launched with same configuration file
# This is an extra check
#
local binres=$(pgrep -f "$SERVERBIN -c $CONFIG")
if [ ! -z $binres ]; then
return 1
fi
return 0
}
function run() {
echo $1
if [ ! -z $1 ]; then
local OPTIONS="-A -m -d -S"
if [ ! -z "$SCREEN_OPTIONS" ]; then
OPTIONS=$SCREEN_OPTIONS
fi
echo "> Starting with screen ( screen $OPTIONS )"
screen $OPTIONS $1 "$RUN_ENGINE_PATH/starter" $2 $3 "$4" "$5" "$6" $7
else
$RUN_ENGINE_PATH/starter $2 $3 "$4" "$5" "$6" $7
fi
}
function starter() {
cd $BINPATH
mkdir -p "$LOGS_PATH"
configureFiles
run "$SCREEN_NAME" "$SERVERBIN" "$GDB" "$CONFIG" "$SYSLOG" "$SYSERR" "$GDB_ENABLED"
}
function restarter() {
cd $BINPATH
mkdir -p "$LOGS_PATH"
configureFiles
if [ ! -f $TRACE_FILE ]; then
touch $TRACE_FILE
fi
while :
do
if checkStatus $SCREEN_NAME; then
DATE=$(date)
echo "Restarting $SCREEN_NAME Core blizz($DATE)"
if [ $GDB_ENABLED -eq 1 ]; then
echo "GDB enabled"
grep -B 10 -A 1800 "$TRACE_BEGIN_STRING" "$SYSLOG" >> "$TRACE_FILE"
cat "$SYSERR" > "$ERR_FILE"
run "$SCREEN_NAME" "$SERVERBIN" "$GDB" "$CONFIG" "$SYSLOG" "$SYSERR" 1
fi
if [ $GDB_ENABLED -eq 0 ]; then
echo "GDB disabled"
run "$SCREEN_NAME" "$SERVERBIN" null "$CONFIG" null null 0
fi
fi
sleep 10
done
}

View File

@ -0,0 +1,53 @@
#!/usr/bin/env bash
#PARAMETER 1: directory
#PARAMETER 2: binary file
_bin_path=$1
_bin_file=$2
_instant_crash_cnt=0
_total_crashes=0
trap 'echo "va bene"' SIGHUP
while true
do
if [ ! -f "$_bin_path/$_bin_file" ]; then
echo "$_bin_path/$_bin_file doesn't exists!"
exit 0
fi
STARTING_TIME=$(date +%s)
cd "$_bin_path" && "./$_bin_file" # &>/dev/null;
_exit_code=$?
echo "exit code: $_exit_code"
# stop restarter on SIGKILL (disabled for now)
# 128 + 9 (SIGKILL)
#if [ $_exit_code -eq 137 ]; then
# echo "$_bin_file has been killed"
# exit 0
#fi
echo "$_bin_file crashed (?), restarting..."
ENDING_TIME=$(date +%s)
DIFFERENCE=$(( $ENDING_TIME - $STARTING_TIME ))
((_total_crashes++))
echo "$_bin_file Crashed after $DIFFERENCE seconds, total crashes: $_total_crashes"
if [ $DIFFERENCE -lt 10 ]; then
# increment instant crash if runtime is lower than 10 seconds
((_instant_crash_cnt++))
else
_instant_crash_cnt=0 # reset count
fi
if [ $_instant_crash_cnt -gt 5 ]; then
echo "$_bin_file Restarter exited. Infinite crash loop prevented. Please check your system"
exit 0
fi
done

View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
GDB_FILE="$2"
CONFIG="$3"
SYSLOG="$4"
SYSERR="$5"
GDB_ENABLED="$6"
if [ $GDB_ENABLED -eq 1 ]; then
echo "set logging on" > "$GDB_FILE"
echo "set debug timestamp" >> "$GDB_FILE"
echo "run -c $3" >> "$GDB_FILE"
echo "bt" >> "$GDB_FILE"
[ ! -f "$SYSLOG" ] && touch "$SYSLOG"
[ ! -f "$SYSERR" ] && touch "$SYSERR"
if [ $WITH_CONSOLE -eq 0 ]; then
gdb -x $GDB_FILE --batch $1 >> "$SYSLOG" 2>> "$SYSERR"
else
echo "> Console enabled"
gdb -x $GDB_FILE --batch $1 > >(tee ${SYSLOG}) 2> >(tee ${SYSERR} >&2)
fi
elif [ $GDB_ENABLED -eq 0 ]; then
"./$1" -c "$CONFIG"
fi

7
bin/README.md Normal file
View File

@ -0,0 +1,7 @@
All bash script here must be compatible with following environments:
- *linux*: bash 4.x
- *windows*: git for windows 2.9.3
- *osx*

5
bin/acore Normal file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/acore-installer"

5
bin/acore-compiler Normal file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/../apps/compiler/compiler.sh"

5
bin/acore-db-asm Normal file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/../apps/db_assembler/db_assembler.sh"

5
bin/acore-db-export Normal file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/../apps/db_exporter/db_export.sh"

5
bin/acore-db-pendings Normal file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/../apps/db_pendings/import.sh"

9
bin/acore-docker-build Normal file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
docker build -t acbuild -f docker/build/Dockerfile .
docker run \
-v /$(pwd)/docker/build/cache:/azerothcore/build \
-v /$(pwd)/docker/worldserver/bin:/binworldserver \
-v /$(pwd)/docker/authserver/bin:/binauthserver \
acbuild

View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
docker build --build-arg ENABLE_SCRIPTS=0 -t acbuild -f docker/build/Dockerfile .
docker run \
-v /$(pwd)/docker/build/cache:/azerothcore/build \
-v /$(pwd)/docker/worldserver/bin:/binworldserver \
-v /$(pwd)/docker/authserver/bin:/binauthserver \
acbuild

View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
cp src/server/worldserver/worldserver.conf.dist docker/worldserver/etc/worldserver.conf.dist
cp src/server/authserver/authserver.conf.dist docker/authserver/etc/authserver.conf.dist
cp docker/worldserver/etc/worldserver.conf.dockerdist docker/worldserver/etc/worldserver.conf
cp docker/authserver/etc/authserver.conf.dockerdist docker/authserver/etc/authserver.conf

View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
sudo rm -rf ./docker/build/cache/CMakeFiles
sudo rm -rf ./docker/build/cache/deps
sudo rm -rf ./docker/build/cache/src
sudo rm ./docker/build/cache/*.cmake
sudo rm ./docker/build/cache/*.txt
sudo rm ./docker/build/cache/*.h
sudo rm ./docker/build/cache/*.cpp
sudo rm ./docker/build/cache/Makefile

5
bin/acore-installer Normal file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env bash
CUR_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$CUR_PATH/../apps/installer/main.sh"

18
conf/dist/config.cmake vendored Normal file
View File

@ -0,0 +1,18 @@
option(SERVERS "Build worldserver and authserver" 1)
option(SCRIPTS "Build core with scripts included" 1)
option(UNIT_TESTS "Build unit tests" 0)
option(TOOLS "Build map/vmap/mmap extraction/assembler tools" 0)
option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
option(WITH_WARNINGS "Show all warnings during compile" 0)
option(WITH_COREDEBUG "Include additional debug-code in core" 0)
option(WITH_PERFTOOLS "Enable compilation with gperftools libraries included" 0)
option(WITH_MESHEXTRACTOR "Build meshextractor (alpha)" 0)
option(WITHOUT_GIT "Disable the GIT testing routines" 0)
option(ENABLE_EXTRAS "Set to 0 to disable extra features optimizing performances" 1)
option(ENABLE_VMAP_CHECKS "Enable Checks relative to DisableMgr system on vmap" 1)
option(ENABLE_EXTRA_LOGS "Enable extra log functions that can be CPU intensive" 0)
# Source tree in IDE
set(WITH_SOURCE_TREE "hierarchical" CACHE STRING "Build the source tree for IDE's.")
set_property(CACHE WITH_SOURCE_TREE PROPERTY STRINGS no flat hierarchical)

183
conf/dist/config.sh vendored Normal file
View File

@ -0,0 +1,183 @@
# absolute root path of your azerothcore repository
# It should not be modified if you don't really know what you're doing
SRCPATH="$AC_PATH_ROOT"
# absolute path where build files must be stored
BUILDPATH="$AC_PATH_ROOT/var/build/obj"
# absolute path where binary files must be stored
BINPATH="$AC_PATH_ROOT/env/dist"
# bash fills it by default with your os type. No need to change it.
# Change it if you really know what you're doing.
# OSTYPE=""
# When using linux, our installer automatically get information about your distro
# using lsb_release. If your distro is not supported but it's based on ubuntu or debian,
# please change it to one of these values.
#OSDISTRO="ubuntu"
# absolute path where config. files must be stored
# default: the system will use binpath by default
# CONFDIR="$AC_PATH_ROOT/env/dist/etc/"
##############################################
#
# COMPILER_CONFIGURATIONS
#
##############################################
# Set preferred compilers.
# To use gcc (not suggested) instead of clang change in:
# CCOMPILERC="/usr/bin/gcc"
# CCOMPILERCXX="/usr/bin/g++"
#
CCOMPILERC="/usr/bin/clang"
CCOMPILERCXX="/usr/bin/clang++"
# how many thread must be used for compilation ( leave zero to use all available )
MTHREADS=0
# enable/disable warnings during compilation
CWARNINGS=ON
# enable/disable some debug informations ( it's not a debug compilation )
CDEBUG=OFF
# specify compilation type
CTYPE=Release
# compile scripts
CSCRIPTS=ON
# compile unit tests
CUNIT_TESTS=OFF
# compile server
CSERVERS=ON
# compile tools
CTOOLS=OFF
# use precompiled headers ( fatest compilation but not optimized if you change headers often )
CSCRIPTPCH=ON
CCOREPCH=ON
# Skip specific modules from compilation (cmake reconfigure needed)
# use semicolon ; to separate modules
CDISABLED_AC_MODULES=""
# you can add your custom definitions here ( -D )
# example: CCUSTOMOPTIONS=" -DWITH_PERFTOOLS=ON -DENABLE_EXTRA_LOGS=ON"
#
CCUSTOMOPTIONS=""
##############################################
#
# DB ASSEMBLER / EXPORTER CONFIGURATIONS
#
##############################################
#
# Basically you don't have to edit it
# but if you have another database you can add it here
# and create relative confiugurations below
#
DATABASES=(
"AUTH"
"CHARACTERS"
"WORLD"
)
OUTPUT_FOLDER="$AC_PATH_ROOT/env/dist/sql/"
####### BACKUP
# Set to true if you want to backup your azerothcore databases before importing the SQL with the db_assembler
# Do not forget to stop your database software (mysql) before doing so
BACKUP_ENABLE=false
BACKUP_FOLDER="$AC_PATH_ROOT/env/dist/sql/backup/"
#######
# FULL DB
DB_AUTH_PATHS=(
$SRCPATH"/data/sql/base/db_auth/"
)
DB_CHARACTERS_PATHS=(
$SRCPATH"/data/sql/base/db_characters"
)
DB_WORLD_PATHS=(
$SRCPATH"/data/sql/base/db_world/"
)
# UPDATES
DB_AUTH_UPDATES_PATHS=(
$SRCPATH"/data/sql/updates/db_auth/"
$SRCPATH"/data/sql/updates/pending_db_auth/"
)
DB_CHARACTERS_UPDATES_PATHS=(
$SRCPATH"/data/sql/updates/db_characters/"
$SRCPATH"/data/sql/updates/pending_db_characters/"
)
DB_WORLD_UPDATES_PATHS=(
$SRCPATH"/data/sql/updates/db_world/"
$SRCPATH"/data/sql/updates/pending_db_world/"
)
# CUSTOM
DB_AUTH_CUSTOM_PATHS=(
$SRCPATH"/data/sql/custom/db_auth/"
)
DB_CHARACTERS_CUSTOM_PATHS=(
$SRCPATH"/data/sql/custom/db_characters/"
)
DB_WORLD_CUSTOM_PATHS=(
$SRCPATH"/data/sql/custom/db_world/"
)
##############################################
#
# DB EXPORTER/IMPORTER CONFIGURATIONS
#
##############################################
#
# Skip import of base sql files to avoid
# table dropping
#
DB_SKIP_BASE_IMPORT_IF_EXISTS=true
#
# Example:
# "C:/Program Files/MySQL/MySQL Server 5.6/bin/mysql.exe"
# "/usr/bin/mysql"
# "mysql"
#
DB_MYSQL_EXEC="mysql"
DB_MYSQL_DUMP_EXEC="mysqldump"
DB_AUTH_CONF="MYSQL_USER='acore'; \
MYSQL_PASS='acore'; \
MYSQL_HOST='localhost';\
"
DB_CHARACTERS_CONF="MYSQL_USER='acore'; \
MYSQL_PASS='acore'; \
MYSQL_HOST='localhost';\
"
DB_WORLD_CONF="MYSQL_USER='acore'; \
MYSQL_PASS='acore'; \
MYSQL_HOST='localhost';\
"
DB_AUTH_NAME="acore_auth"
DB_CHARACTERS_NAME="acore_characters"
DB_WORLD_NAME="acore_world"

View File

@ -0,0 +1,116 @@
{
[1] ACE_Future::ready() race in WorldSession::ProcessQueryCallbacks(), a lock is used anyway in ACE_Future::get()/set()
Helgrind:Race
...
fun:_ZN14ACE_Future_RepIN7Trinity7AutoPtrI17PreparedResultSet16ACE_Thread_MutexEEE3setERKS4_R10ACE_FutureIS4_E
fun:_ZN10ACE_FutureIN7Trinity7AutoPtrI17PreparedResultSet16ACE_Thread_MutexEEE3setERKS4_
fun:_ZN21PreparedStatementTask7ExecuteEv
}
{
[1] ACE_Future::ready() race in WorldSession::ProcessQueryCallbacks(), a lock is used anyway in ACE_Future::get()/set()
Helgrind:Race
...
fun:_ZN14ACE_Future_RepIP14SQLQueryHolderE3setERKS1_R10ACE_FutureIS1_E
fun:_ZN10ACE_FutureIP14SQLQueryHolderE3setERKS1_
fun:_ZN18SQLQueryHolderTask7ExecuteEv
}
{
[2] ACE_Future::ready() race in WorldSession::ProcessQueryCallbacks(), a lock is used anyway in ACE_Future::get()/set()
Helgrind:Race
...
fun:_ZNK14ACE_Future_RepIP14SQLQueryHolderE5readyEv
fun:_ZNK10ACE_FutureIP14SQLQueryHolderE5readyEv
fun:_ZN12WorldSession21ProcessQueryCallbacksEv
}
{
[3] ACE_Future::attach()/detach() false positive in WorldSession::HandleCharEnumOpcode()
Helgrind:Race
...
fun:_ZN14ACE_Future_RepIN7Trinity7AutoPtrI17PreparedResultSet16ACE_Thread_MutexEEE6attachERPS5_
}
{
[4] ACE_Future::get() race in WorldSession::ProcessQueryCallbacks() , a lock is used anyway in ACE_Future::get()/set(), the only case when this is a race is if the same ACE_Future is reused by another thread
Helgrind:Race
...
fun:_ZNK14ACE_Future_RepIP14SQLQueryHolderE3getERS1_P14ACE_Time_Value
fun:_ZNK10ACE_FutureIP14SQLQueryHolderE3getERS1_P14ACE_Time_Value
fun:_ZN12WorldSession21ProcessQueryCallbacksEv
}
{
[4] ACE_Future::get() race in WorldSession::ProcessQueryCallbacks() , a lock is used anyway in ACE_Future::get()/set(), the only case when this is a race is if the same ACE_Future is reused by another thread
Helgrind:Race
...
fun:_ZNK10ACE_FutureIN7Trinity7AutoPtrI17PreparedResultSet16ACE_Thread_MutexEEE5readyEv
fun:_ZN12WorldSession21ProcessQueryCallbacksEv
}
{
[5] Race in WorldSession::ProcessQueryCallbacks(), added ASSERT(!m_result.ready())
Helgrind:Race
...
fun:_ZN6Player10LoadFromDBEjP14SQLQueryHolder
fun:_ZN12WorldSession17HandlePlayerLoginEP16LoginQueryHolder
fun:_ZN12WorldSession21ProcessQueryCallbacksEv
}
{
[5] Race in WorldSession::ProcessQueryCallbacks(), added ASSERT(!m_result.ready())
Helgrind:Race
...
fun:_ZN14SQLQueryHolder17GetPreparedResultEm
fun:_ZN12WorldSession17HandlePlayerLoginEP16LoginQueryHolder
fun:_ZN12WorldSession21ProcessQueryCallbacksEv
}
{
[5] Race in WorldSession::ProcessQueryCallbacks(), added ASSERT(!m_result.ready())
Helgrind:Race
...
fun:_ZN12WorldSession15LoadAccountDataEN7Trinity7AutoPtrI17PreparedResultSet16ACE_Thread_MutexEEj
fun:_ZN12WorldSession17HandlePlayerLoginEP16LoginQueryHolder
fun:_ZN12WorldSession21ProcessQueryCallbacksEv
}
{
[5] Race in WorldSession::ProcessQueryCallbacks(), added ASSERT(!m_result.ready())
Helgrind:Race
...
fun:_ZNK17PreparedResultSet5FetchEv
fun:_ZN12WorldSession17HandlePlayerLoginEP16LoginQueryHolder
fun:_ZN12WorldSession21ProcessQueryCallbacksEv
}
{
[5] Race in WorldSession::ProcessQueryCallbacks(), added ASSERT(!m_result.ready())
Helgrind:Race
...
fun:_ZNK5Field9GetUInt32Ev
fun:_ZN12WorldSession17HandlePlayerLoginEP16LoginQueryHolder
fun:_ZN12WorldSession21ProcessQueryCallbacksEv
}
{
[5] Race in WorldSession::ProcessQueryCallbacks(), added ASSERT(!m_result.ready())
Helgrind:Race
...
fun:_ZNK5Field8GetUInt8Ev
fun:_ZN12WorldSession17HandlePlayerLoginEP16LoginQueryHolder
fun:_ZN12WorldSession21ProcessQueryCallbacksEv
}
{
[6] False positive of possible race about ACE_Strong_Bound_Ptr
Helgrind:Race
...
fun:_ZN17PreparedResultSetD1Ev
fun:_ZN20ACE_Strong_Bound_PtrI17PreparedResultSet16ACE_Thread_MutexED1Ev
fun:_ZN7Trinity7AutoPtrI17PreparedResultSet16ACE_Thread_MutexED1Ev
fun:_ZN12WorldSession17HandlePlayerLoginEP16LoginQueryHolder
fun:_ZN12WorldSession21ProcessQueryCallbacksEv
}
{
[7] Race condition on bool in ACE, ignore
Helgrind:Race
fun:_ZN11WorldSocket12handle_closeEim
fun:_ZN20ACE_Dev_Poll_Reactor16remove_handler_iEimP17ACE_Event_Handler
}
{
[7] Race condition on bool in ACE, ignore
Helgrind:Race
fun:_ZNK11WorldSocket8IsClosedEv
fun:_ZN12WorldSession6UpdateEjR12PacketFilter
fun:_ZN5World14UpdateSessionsEj
}

View File

@ -0,0 +1,3 @@
CREATE TABLE `auth_db_version` (
`2016_07_09_00` BIT(1) DEFAULT NULL
) ENGINE=MYISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Last applied sql update to DB';

View File

@ -0,0 +1 @@
ALTER TABLE auth_db_version CHANGE COLUMN 2016_07_09_00 2016_07_09_01 bit;

View File

@ -0,0 +1,16 @@
ALTER TABLE auth_db_version CHANGE COLUMN 2016_07_09_01 2016_07_10_00 bit;
DROP TABLE IF EXISTS `autobroadcast`;
CREATE TABLE `autobroadcast` (
`realmid` int(10) NOT NULL,
`id` int(11) NOT NULL AUTO_INCREMENT,
`weight` tinyint(3) DEFAULT 1,
`text` longtext NOT NULL,
PRIMARY KEY (`id`, `realmid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE `autobroadcast`
CHANGE `realmid` `realmid` INT(11) NOT NULL DEFAULT '-1',
CHANGE `id` `id` TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
CHANGE `weight` `weight` TINYINT(3) UNSIGNED DEFAULT '1',
ENGINE=INNODB;

View File

@ -0,0 +1,6 @@
ALTER TABLE auth_db_version CHANGE COLUMN 2016_07_10_00 2016_08_25_00 bit;
--
-- Do not remove this file when we archive sql under this folder
-- it is needed for pending sql importer
--

View File

@ -0,0 +1,13 @@
ALTER TABLE auth_db_version CHANGE COLUMN 2016_08_25_00 2016_08_25_01 bit;
RENAME TABLE `auth_db_version` TO `version_db_auth`;
ALTER TABLE `version_db_auth`
ADD COLUMN `sql_rev` VARCHAR(100) NOT NULL FIRST,
ADD COLUMN `required_rev` VARCHAR(100) NULL AFTER `sql_rev`,
ADD PRIMARY KEY (`sql_rev`),
ENGINE=INNODB;
ALTER TABLE `version_db_auth` ADD CONSTRAINT `required` FOREIGN KEY (`required_rev`) REFERENCES `version_db_auth`(`sql_rev`);

View File

@ -0,0 +1,13 @@
START TRANSACTION;
ALTER TABLE version_db_auth CHANGE COLUMN 2016_08_25_01 2016_09_04_00 bit;
CREATE TABLE `logs` (
`time` int(10) unsigned NOT NULL,
`realm` int(10) unsigned NOT NULL,
`type` varchar(250) NOT NULL,
`level` tinyint(3) unsigned NOT NULL DEFAULT '0',
`string` text CHARACTER SET latin1
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
COMMIT;

View File

@ -0,0 +1,3 @@
CREATE TABLE `characters_db_version` (
`2016_07_09_00` BIT(1) DEFAULT NULL
) ENGINE=MYISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Last applied sql update to DB';

View File

@ -0,0 +1 @@
ALTER TABLE characters_db_version CHANGE COLUMN 2016_07_09_00 2016_07_09_01 bit;

View File

@ -0,0 +1,28 @@
ALTER TABLE characters_db_version CHANGE COLUMN 2016_07_09_01 2016_07_10_00 bit;
CREATE TABLE IF NOT EXISTS `pvpstats_battlegrounds` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`winner_faction` tinyint(4) NOT NULL,
`bracket_id` tinyint(3) unsigned NOT NULL,
`type` tinyint(3) unsigned NOT NULL,
`date` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `pvpstats_players` (
`battleground_id` bigint(20) unsigned NOT NULL,
`character_guid` int(10) unsigned NOT NULL,
`winner` bit(1) NOT NULL,
`score_killing_blows` mediumint(8) unsigned NOT NULL,
`score_deaths` mediumint(8) unsigned NOT NULL,
`score_honorable_kills` mediumint(8) unsigned NOT NULL,
`score_bonus_honor` mediumint(8) unsigned NOT NULL,
`score_damage_done` mediumint(8) unsigned NOT NULL,
`score_healing_done` mediumint(8) unsigned NOT NULL,
`attr_1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`attr_2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`attr_3` mediumint(8) unsigned NOT NULL DEFAULT '0',
`attr_4` mediumint(8) unsigned NOT NULL DEFAULT '0',
`attr_5` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`battleground_id`,`character_guid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

View File

@ -0,0 +1,25 @@
ALTER TABLE characters_db_version CHANGE COLUMN 2016_07_10_00 2016_07_30_00 bit;
CREATE TABLE IF NOT EXISTS `gm_ticket` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '0 open, 1 closed, 2 character deleted',
`playerGuid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier of ticket creator',
`name` varchar(12) NOT NULL COMMENT 'Name of ticket creator',
`description` text NOT NULL,
`createTime` int(10) unsigned NOT NULL DEFAULT '0',
`mapId` smallint(5) unsigned NOT NULL DEFAULT '0',
`posX` float NOT NULL DEFAULT '0',
`posY` float NOT NULL DEFAULT '0',
`posZ` float NOT NULL DEFAULT '0',
`lastModifiedTime` int(10) unsigned NOT NULL DEFAULT '0',
`closedBy` int(10) unsigned NOT NULL DEFAULT '0',
`assignedTo` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'GUID of admin to whom ticket is assigned',
`comment` text NOT NULL,
`response` text NOT NULL,
`completed` tinyint(3) unsigned NOT NULL DEFAULT '0',
`escalated` tinyint(3) unsigned NOT NULL DEFAULT '0',
`viewed` tinyint(3) unsigned NOT NULL DEFAULT '0',
`needMoreHelp` tinyint(3) unsigned NOT NULL DEFAULT '0',
`resolvedBy` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'GUID of GM who resolved the ticket',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10572 DEFAULT CHARSET=utf8 COMMENT='Player System';

View File

@ -0,0 +1,35 @@
ALTER TABLE characters_db_version CHANGE COLUMN 2016_07_30_00 2016_08_08_00 bit;
CREATE TABLE IF NOT EXISTS `battleground_deserters` (
`guid` INT(10) UNSIGNED NOT NULL COMMENT 'characters.guid',
`type` TINYINT(3) UNSIGNED NOT NULL COMMENT 'type of the desertion',
`datetime` DATETIME NOT NULL COMMENT 'datetime of the desertion'
);
CREATE TABLE IF NOT EXISTS `pvpstats_battlegrounds` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`winner_faction` tinyint(4) NOT NULL,
`bracket_id` tinyint(3) unsigned NOT NULL,
`type` tinyint(3) unsigned NOT NULL,
`date` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8298 DEFAULT CHARSET=latin1;
CREATE TABLE IF NOT EXISTS `pvpstats_players` (
`battleground_id` bigint(20) unsigned NOT NULL,
`character_guid` int(10) unsigned NOT NULL,
`winner` bit(1) NOT NULL,
`score_killing_blows` mediumint(8) unsigned NOT NULL,
`score_deaths` mediumint(8) unsigned NOT NULL,
`score_honorable_kills` mediumint(8) unsigned NOT NULL,
`score_bonus_honor` mediumint(8) unsigned NOT NULL,
`score_damage_done` mediumint(8) unsigned NOT NULL,
`score_healing_done` mediumint(8) unsigned NOT NULL,
`attr_1` mediumint(8) unsigned NOT NULL DEFAULT '0',
`attr_2` mediumint(8) unsigned NOT NULL DEFAULT '0',
`attr_3` mediumint(8) unsigned NOT NULL DEFAULT '0',
`attr_4` mediumint(8) unsigned NOT NULL DEFAULT '0',
`attr_5` mediumint(8) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`battleground_id`,`character_guid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

View File

@ -0,0 +1,47 @@
ALTER TABLE characters_db_version CHANGE COLUMN 2016_08_08_00 2016_08_12_00 bit;
-- `character_aura`
ALTER TABLE `character_aura`
CHANGE `caster_guid` `casterGuid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier',
CHANGE `item_guid` `itemGuid` bigint(20) unsigned NOT NULL DEFAULT '0',
CHANGE `effect_mask` `effectMask` tinyint(3) unsigned NOT NULL DEFAULT '0',
CHANGE `recalculate_mask` `recalculateMask` tinyint(3) unsigned NOT NULL DEFAULT '0',
CHANGE `stackcount` `stackCount` tinyint(3) unsigned NOT NULL DEFAULT '1',
CHANGE `maxduration` `maxDuration` int(11) NOT NULL DEFAULT '0',
CHANGE `remaintime` `remainTime` int(11) NOT NULL DEFAULT '0',
CHANGE `remaincharges` `remainCharges` tinyint(3) unsigned NOT NULL DEFAULT '0';
-- `character_glyphs`
ALTER TABLE `character_glyphs`
CHANGE `spec` `talentGroup` tinyint(3) unsigned NOT NULL DEFAULT '0';
-- `characters`
ALTER TABLE `characters`
CHANGE `speccount` `talentGroupsCount` tinyint(3) unsigned NOT NULL DEFAULT '1',
CHANGE `activespec` `activeTalentGroup` tinyint(3) unsigned NOT NULL DEFAULT '0';
-- `gm_subsurveys` -> `gm_subsurvey`
RENAME TABLE `gm_subsurveys` TO `gm_subsurvey`;
ALTER TABLE `gm_subsurvey`
CHANGE `subsurveyId` `questionId` int(10) unsigned NOT NULL DEFAULT '0',
CHANGE `rank` `answer` int(10) unsigned NOT NULL DEFAULT '0',
CHANGE `comment` `answerComment` text NOT NULL;
-- `gm_surveys` -> `gm_survey`
RENAME TABLE `gm_surveys` TO `gm_survey`;
ALTER TABLE `gm_survey`
CHANGE `overallComment` `comment` longtext NOT NULL;
-- `groups`
ALTER TABLE `groups`
CHANGE `raiddifficulty` `raidDifficulty` tinyint(3) unsigned NOT NULL DEFAULT '0';
-- `pet_aura`
ALTER TABLE `pet_aura`
CHANGE `caster_guid` `casterGuid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Full Global Unique Identifier',
CHANGE `effect_mask` `effectMask` tinyint(3) unsigned NOT NULL DEFAULT '0',
CHANGE `recalculate_mask` `recalculateMask` tinyint(3) unsigned NOT NULL DEFAULT '0',
CHANGE `stackcount` `stackCount` tinyint(3) unsigned NOT NULL DEFAULT '1',
CHANGE `maxduration` `maxDuration` int(11) NOT NULL DEFAULT '0',
CHANGE `remaintime` `remainTime` int(11) NOT NULL DEFAULT '0',
CHANGE `remaincharges` `remainCharges` tinyint(3) unsigned NOT NULL DEFAULT '0';

View File

@ -0,0 +1,7 @@
-- uncomment and fix following line at next revision / updates archivation
-- ALTER TABLE auth_db_version CHANGE COLUMN xxxx_xx_xx_xx xxxx_xx_xx_xx bit;
--
-- Do not remove this file when we archive sql under this folder
-- it is needed for pending sql importer
--

View File

@ -0,0 +1,4 @@
ALTER TABLE characters_db_version CHANGE COLUMN 2016_08_12_00 2016_08_15_00 bit;
ALTER TABLE `channels`
ADD `ownership` tinyint(3) unsigned NOT NULL DEFAULT '1' AFTER `announce`;

View File

@ -0,0 +1,12 @@
ALTER TABLE characters_db_version CHANGE COLUMN 2016_08_15_00 2016_08_25_00 bit;
RENAME TABLE `characters_db_version` TO `version_db_characters`;
ALTER TABLE `version_db_characters`
ADD COLUMN `sql_rev` VARCHAR(100) NOT NULL FIRST,
ADD COLUMN `required_rev` VARCHAR(100) NULL AFTER `sql_rev`,
ADD PRIMARY KEY (`sql_rev`),
ENGINE=INNODB;
ALTER TABLE `version_db_characters` ADD CONSTRAINT `required` FOREIGN KEY (`required_rev`) REFERENCES `version_db_characters`(`sql_rev`);

View File

@ -0,0 +1,3 @@
CREATE TABLE `world_db_version` (
`2016_07_09_00` BIT(1) DEFAULT NULL
) ENGINE=MYISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Last applied sql update to DB';

View File

@ -0,0 +1 @@
ALTER TABLE world_db_version CHANGE COLUMN 2016_07_09_00 2016_07_09_01 bit;

View File

@ -0,0 +1,4 @@
ALTER TABLE world_db_version CHANGE COLUMN 2016_07_09_01 2016_07_10_00 bit;
DELETE FROM `item_template` WHERE `entry` = 34833;
INSERT INTO `item_template` (`entry`, `class`, `subclass`, `SoundOverrideSubclass`, `name`, `displayid`, `Quality`, `Flags`, `FlagsExtra`, `BuyCount`, `BuyPrice`, `SellPrice`, `InventoryType`, `AllowableClass`, `AllowableRace`, `ItemLevel`, `RequiredLevel`, `RequiredSkill`, `RequiredSkillRank`, `requiredspell`, `requiredhonorrank`, `RequiredCityRank`, `RequiredReputationFaction`, `RequiredReputationRank`, `maxcount`, `stackable`, `ContainerSlots`, `StatsCount`, `stat_type1`, `stat_value1`, `stat_type2`, `stat_value2`, `stat_type3`, `stat_value3`, `stat_type4`, `stat_value4`, `stat_type5`, `stat_value5`, `stat_type6`, `stat_value6`, `stat_type7`, `stat_value7`, `stat_type8`, `stat_value8`, `stat_type9`, `stat_value9`, `stat_type10`, `stat_value10`, `ScalingStatDistribution`, `ScalingStatValue`, `dmg_min1`, `dmg_max1`, `dmg_type1`, `dmg_min2`, `dmg_max2`, `dmg_type2`, `armor`, `holy_res`, `fire_res`, `nature_res`, `frost_res`, `shadow_res`, `arcane_res`, `delay`, `ammo_type`, `RangedModRange`, `spellid_1`, `spelltrigger_1`, `spellcharges_1`, `spellppmRate_1`, `spellcooldown_1`, `spellcategory_1`, `spellcategorycooldown_1`, `spellid_2`, `spelltrigger_2`, `spellcharges_2`, `spellppmRate_2`, `spellcooldown_2`, `spellcategory_2`, `spellcategorycooldown_2`, `spellid_3`, `spelltrigger_3`, `spellcharges_3`, `spellppmRate_3`, `spellcooldown_3`, `spellcategory_3`, `spellcategorycooldown_3`, `spellid_4`, `spelltrigger_4`, `spellcharges_4`, `spellppmRate_4`, `spellcooldown_4`, `spellcategory_4`, `spellcategorycooldown_4`, `spellid_5`, `spelltrigger_5`, `spellcharges_5`, `spellppmRate_5`, `spellcooldown_5`, `spellcategory_5`, `spellcategorycooldown_5`, `bonding`, `description`, `PageText`, `LanguageID`, `PageMaterial`, `startquest`, `lockid`, `Material`, `sheath`, `RandomProperty`, `RandomSuffix`, `block`, `itemset`, `MaxDurability`, `area`, `Map`, `BagFamily`, `TotemCategory`, `socketColor_1`, `socketContent_1`, `socketColor_2`, `socketContent_2`, `socketColor_3`, `socketContent_3`, `socketBonus`, `GemProperties`, `RequiredDisenchantSkill`, `ArmorDamageModifier`, `duration`, `ItemLimitCategory`, `HolidayId`, `ScriptName`, `DisenchantID`, `FoodType`, `minMoneyLoot`, `maxMoneyLoot`, `flagsCustom`, `VerifiedBuild`) VALUES (34833, 12, 0, 0, 'Unlit Torches', 7290, 1, 2, 0, 1, 0, 0, 0, -1, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45671, 0, 0, 0, 5000, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, -1, 0, -1, 4, '', 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, 12340);

View File

@ -0,0 +1,90 @@
ALTER TABLE world_db_version CHANGE COLUMN 2016_07_10_00 2016_07_10_01 bit;
/* Spawn missing Midsummer bonfire */
SET @STARTGUID := 268968;
DELETE FROM `gameobject` WHERE guid = @STARTGUID+0;
DELETE FROM `gameobject` WHERE guid = @STARTGUID+1;
/* Ironforge */
INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES (@STARTGUID+0, 181371, 0, 1, 1, -4699.790039, -1222.770020, 501.658997, -1.378810, 0, 0, 0, 0, 300, 0, 1, 0);
/* Shattrath */
INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES (@STARTGUID+1, 181371, 530, 1, 1, -1747.849976, 5326.290039, -12.428100, -3.019420, 0, 0, 0, 0, 300, 0, 1, 0);
/* Add missing Midsummer creature */
SET @STARTGUID := 248565;
DELETE FROM `creature` WHERE `guid` BETWEEN @STARTGUID+00 AND @STARTGUID+29;
DELETE FROM `game_event_creature` WHERE `guid` BETWEEN @STARTGUID+00 AND @STARTGUID+29;
INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES
(@STARTGUID+0, 32801, 571, 1, 1, 4131.279, 5394.604, 26.09047, 3.595378, 120, 0, 0), -- 32801
(@STARTGUID+1, 32809, 571, 1, 1, 4454.667, 5623.537, 56.91562, 4.13643, 120, 0, 0), -- 32809
(@STARTGUID+2, 32810, 571, 1, 1, 5499.812, 4878.976, -197.8652, 3.176499, 120, 0, 0), -- 32810
(@STARTGUID+3, 32802, 571, 1, 1, 5360.002, 4834.393, -196.3981, 5.550147, 120, 0, 0), -- 32802
(@STARTGUID+4, 32811, 571, 1, 1, 3762.387, 1481.287, 92.8882, 3.438299, 120, 0, 0), -- 32811
(@STARTGUID+5, 32803, 571, 1, 1, 3936.924, -595.4437, 241.1534, 5.951573, 120, 0, 0), -- 32803
(@STARTGUID+6, 32812, 571, 1, 1, 2586.682, -4337.068, 276.0698, 4.13643, 120, 0, 0), -- 32812
(@STARTGUID+7, 32804, 571, 1, 1, 2466.965, -4892.675, 262.5474, 2.303835, 120, 0, 0), -- 32804
(@STARTGUID+8, 32813, 571, 1, 1, 3376.009, -2124.778, 124.664, 0.1396263, 120, 0, 0), -- 32813
(@STARTGUID+9, 32805, 571, 1, 1, 3400.944, -2890.375, 201.4968, 2.303835, 120, 0, 0), -- 32805
(@STARTGUID+10, 32814, 571, 1, 1, 6150.945, -1023.05, 408.3642, 1.43117, 120, 0, 0), -- 32814
(@STARTGUID+11, 32806, 571, 1, 1, 6087.442, -1105.523, 418.2672, 1.099557, 120, 0, 0), -- 32806
(@STARTGUID+12, 32815, 571, 1, 1, 5536.516, -733.7185, 149.6217, 3.124139, 120, 0, 0), -- 32815
(@STARTGUID+13, 32807, 571, 1, 1, 5141.776, -685.0027, 170.2738, 5.951573, 120, 0, 0), -- 32807
(@STARTGUID+14, 32816, 571, 1, 1, 5280.307, -2766.146, 292.5019, 2.303835, 120, 0, 0), -- 32816
(@STARTGUID+15, 32808, 571, 1, 1, 5627.932, -2616.493, 292.5019, 1.518436, 120, 0, 0), -- 32808
(@STARTGUID+16, 25892, 0, 1, 1, -8258.798, -2618.704, 133.3752, 1.343904, 120, 0, 0), -- 25892
(@STARTGUID+17, 25899, 1, 1, 1, -4391.495, 2187.865, 12.22644, 5.864306, 120, 0, 0), -- 25899
(@STARTGUID+18, 25936, 1, 1, 1, -2321.744, -619.7491, -9.089149, 5.67232, 120, 0, 0), -- 25936
(@STARTGUID+19, 25888, 530, 1, 1, -4219.219, -12310.55, 2.439188, 5.934119, 120, 0, 0), -- 25888
(@STARTGUID+20, 25891, 530, 1, 1, -2234.83, -11895.94, 26.62421, 4.694936, 120, 0, 0), -- 25891
(@STARTGUID+21, 25907, 530, 1, 1, -2998.854, 4164.042, 5.169014, 0.5934119, 120, 0, 0), -- 25907
(@STARTGUID+22, 25938, 530, 1, 1, -3067.278, 2387.903, 62.19349, 3.368485, 120, 0, 0), -- 25938
(@STARTGUID+23, 25905, 530, 1, 1, -3951.305, 2045.65, 95.14804, 4.520403, 120, 0, 0), -- 25905
(@STARTGUID+24, 25912, 530, 1, 1, 193.7309, 6016.713, 22.73373, 6.161012, 120, 0, 0), -- 25912
(@STARTGUID+25, 25903, 530, 1, 1, -2517.064, 7555.085, -1.793157, 5.375614, 120, 0, 0), -- 25903
(@STARTGUID+26, 25889, 530, 1, 1, 2024.906, 6590.532, 135.3214, 5.934119, 120, 0, 0), -- 25889
(@STARTGUID+27, 25926, 530, 1, 1, 2286.707, 6137.618, 136.3056, 1.570796, 120, 0, 0), -- 25926
(@STARTGUID+28, 25913, 530, 1, 1, 3127.551, 3743.148, 141.7706, 6.161012, 120, 0, 0), -- 25913
(@STARTGUID+29, 25918, 530, 1, 1, 2917.222, 3693.411, 143.7703, 2.932153, 120, 0, 0); -- 25918
INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES
(1, @STARTGUID+00),
(1, @STARTGUID+01),
(1, @STARTGUID+02),
(1, @STARTGUID+03),
(1, @STARTGUID+04),
(1, @STARTGUID+05),
(1, @STARTGUID+06),
(1, @STARTGUID+07),
(1, @STARTGUID+08),
(1, @STARTGUID+09),
(1, @STARTGUID+10),
(1, @STARTGUID+11),
(1, @STARTGUID+12),
(1, @STARTGUID+13),
(1, @STARTGUID+14),
(1, @STARTGUID+15),
(1, @STARTGUID+16),
(1, @STARTGUID+17),
(1, @STARTGUID+18),
(1, @STARTGUID+19),
(1, @STARTGUID+20),
(1, @STARTGUID+21),
(1, @STARTGUID+22),
(1, @STARTGUID+23),
(1, @STARTGUID+24),
(1, @STARTGUID+25),
(1, @STARTGUID+26),
(1, @STARTGUID+27),
(1, @STARTGUID+28),
(1, @STARTGUID+29);
/* Delete some double spawn creature of midsummer fire festival */
DELETE FROM `creature` WHERE `guid`=86358 AND `id`=25915;
DELETE FROM `creature` WHERE `guid`=86387 AND `id`=25920;
DELETE FROM `creature` WHERE `guid`=86241 AND `id`=25887;
DELETE FROM `creature` WHERE `guid`=86327 AND `id`=25914;
DELETE FROM `creature` WHERE `guid`=86376 AND `id`=25916;
DELETE FROM `creature` WHERE `guid`=86426 AND `id`=25921;
DELETE FROM `creature` WHERE `guid`=86165 AND `id`=26123;
DELETE FROM `creature` WHERE `guid`=202863 AND `id`=25975;

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