mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 14:46:24 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
8
.github/workflows/docker_build.yml
vendored
8
.github/workflows/docker_build.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
||||
sudo rm -rf /opt/ghc
|
||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
||||
docker --version
|
||||
docker-compose --version
|
||||
docker compose --version
|
||||
|
||||
# TODO: make it work
|
||||
# - uses: whoan/docker-build-with-cache-action@v5
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
# DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }}
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && steps.extract_branch.outputs.branch == 'master'
|
||||
run: |
|
||||
docker-compose --profile dev --profile local push
|
||||
docker compose --profile dev --profile local push
|
||||
|
||||
- name: Cache
|
||||
uses: actions/cache@v2
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
export DOCKER_USER_ID=$(id -u)
|
||||
export DOCKER_GROUP_ID=$(id -u)
|
||||
./acore.sh docker prod:build
|
||||
docker-compose run --no-deps --name build ac-build echo "image created"
|
||||
docker compose run --no-deps --name build ac-build echo "image created"
|
||||
docker cp build:/azerothcore/var/ccache var/docker/
|
||||
echo "ccache exported"
|
||||
|
||||
@@ -107,4 +107,4 @@ jobs:
|
||||
# DOCKER_IMAGE_TAG: ${{ steps.extract_branch.outputs.branch }}
|
||||
if: github.repository == 'azerothcore/azerothcore-wotlk' && steps.extract_branch.outputs.branch == 'master'
|
||||
run: |
|
||||
docker-compose --profile prod push
|
||||
docker compose --profile prod push
|
||||
|
||||
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -36,7 +36,7 @@
|
||||
"externalConsole": true,
|
||||
"pipeTransport": {
|
||||
"debuggerPath": "/usr/bin/gdb",
|
||||
"pipeProgram": "docker-compose",
|
||||
"pipeProgram": "docker compose",
|
||||
"pipeArgs": [
|
||||
"exec", "-T", "ac-worldserver", "sh", "-c"
|
||||
],
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
Input,
|
||||
Select,
|
||||
} from "https://deno.land/x/cliffy@v0.25.2/prompt/mod.ts";
|
||||
import * as semver from "https://deno.land/std@0.159.0/semver/mod.ts";
|
||||
|
||||
const program = new Command();
|
||||
|
||||
@@ -13,6 +14,8 @@ const env = {
|
||||
BUILDKIT_INLINE_CACHE: "1",
|
||||
};
|
||||
|
||||
const MIN_COMPOSE_VERSION = "2.0.0";
|
||||
|
||||
program
|
||||
.name("acore.sh docker")
|
||||
.description("Shell scripts for docker")
|
||||
@@ -21,43 +24,48 @@ program
|
||||
shellCommandFactory(
|
||||
"start:app",
|
||||
"Startup the authserver and worldserver apps",
|
||||
["docker-compose --profile app up"],
|
||||
env,
|
||||
["docker compose --profile app up"],
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"start:app:d",
|
||||
"Startup the authserver and worldserver apps in detached mode",
|
||||
["docker-compose --profile app up -d"],
|
||||
env,
|
||||
["docker compose --profile app up -d"],
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory("build", "Build the authserver and worldserver", [
|
||||
"docker-compose --profile local build --parallel",
|
||||
"docker image prune -f",
|
||||
"docker-compose run --rm ac-build bash apps/docker/docker-build-dev.sh",
|
||||
], env);
|
||||
shellCommandFactory(
|
||||
"build",
|
||||
"Build the authserver and worldserver",
|
||||
[
|
||||
"docker compose --profile local build --parallel",
|
||||
"docker image prune -f",
|
||||
"docker compose run --rm ac-build bash apps/docker/docker-build-dev.sh",
|
||||
],
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"build:nocache",
|
||||
"Build the authserver and worldserver without docker cache",
|
||||
[
|
||||
"docker-compose --profile local build --no-cache --parallel",
|
||||
"docker compose --profile local build --no-cache --parallel",
|
||||
"docker image prune -f",
|
||||
"docker-compose run --rm ac-build bash apps/docker/docker-build-dev.sh",
|
||||
"docker compose run --rm ac-build bash apps/docker/docker-build-dev.sh",
|
||||
],
|
||||
env,
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"build:compile",
|
||||
"Run the compilation process only, without rebuilding all docker images",
|
||||
[
|
||||
"docker-compose build --parallel ac-build",
|
||||
"docker compose build --parallel ac-build",
|
||||
"docker image prune -f",
|
||||
"docker-compose run --rm ac-build bash apps/docker/docker-build-dev.sh",
|
||||
"docker compose run --rm ac-build bash apps/docker/docker-build-dev.sh",
|
||||
],
|
||||
env,
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
@@ -65,78 +73,75 @@ shellCommandFactory(
|
||||
"Clean build files",
|
||||
[
|
||||
"docker image prune -f",
|
||||
`docker-compose run --rm ac-build bash acore.sh compiler clean`,
|
||||
`docker compose run --rm ac-build bash acore.sh compiler clean`,
|
||||
],
|
||||
env,
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"client-data",
|
||||
"Download client data inside the ac-data volume",
|
||||
["docker-compose run --rm ac-build bash acore.sh client-data"],
|
||||
env,
|
||||
["docker compose run --rm ac-build bash acore.sh client-data"],
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"dev:up",
|
||||
"Start the dev server container in background",
|
||||
["docker-compose up -d ac-dev-server"],
|
||||
env,
|
||||
["docker compose up -d ac-dev-server"],
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"dev:build",
|
||||
"Build using the dev server, it uses volumes to compile which can be faster on linux & WSL",
|
||||
["docker-compose run --rm ac-dev-server bash acore.sh compiler build"],
|
||||
env,
|
||||
["docker compose run --rm ac-dev-server bash acore.sh compiler build"],
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"dev:dash [args...]",
|
||||
"Execute acore dashboard within a running ac-dev-server",
|
||||
["docker-compose run --rm ac-dev-server bash acore.sh"],
|
||||
env,
|
||||
["docker compose run --rm ac-dev-server bash acore.sh"],
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"dev:shell [args...]",
|
||||
"Open an interactive shell within the dev server",
|
||||
[
|
||||
"docker-compose up -d ac-dev-server",
|
||||
"docker-compose exec ac-dev-server bash",
|
||||
"docker compose up -d ac-dev-server",
|
||||
"docker compose exec ac-dev-server bash",
|
||||
],
|
||||
env,
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"prod:build",
|
||||
"Build producion services",
|
||||
[
|
||||
"docker-compose --profile prod build --parallel",
|
||||
"docker image prune -f",
|
||||
],
|
||||
env,
|
||||
["docker compose --profile prod build --parallel", "docker image prune -f"],
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"prod:pull",
|
||||
"Pull production services from the remote registry",
|
||||
["docker-compose --profile prod pull"],
|
||||
env,
|
||||
["docker compose --profile prod pull"],
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"prod:up",
|
||||
"Start production services (foreground)",
|
||||
["docker-compose --profile prod-app up"],
|
||||
env,
|
||||
["docker compose --profile prod-app up"],
|
||||
env
|
||||
);
|
||||
|
||||
shellCommandFactory(
|
||||
"prod:up:d",
|
||||
"Start production services (background)",
|
||||
["docker-compose --profile prod-app up -d"],
|
||||
env,
|
||||
["docker compose --profile prod-app up -d"],
|
||||
env
|
||||
);
|
||||
|
||||
program
|
||||
@@ -145,7 +150,7 @@ program
|
||||
.action(async (service: string | undefined) => {
|
||||
const { run } = Deno;
|
||||
|
||||
let command = `docker-compose ps`;
|
||||
let command = `docker compose ps`;
|
||||
|
||||
if (service) {
|
||||
command = `${command} ${service}`;
|
||||
@@ -196,8 +201,8 @@ program
|
||||
|
||||
console.log(
|
||||
ink.colorize(
|
||||
"<yellow>NOTE: you can detach from a container and leave it running using the CTRL-p CTRL-q key sequence.</yellow>",
|
||||
),
|
||||
"<yellow>NOTE: you can detach from a container and leave it running using the CTRL-p CTRL-q key sequence.</yellow>"
|
||||
)
|
||||
);
|
||||
|
||||
cmd = command.split(" ");
|
||||
@@ -219,22 +224,6 @@ program
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
// Handle it however you like
|
||||
// e.g. display usage
|
||||
while (true) {
|
||||
if (Deno.args.length === 0) {
|
||||
program.outputHelp();
|
||||
const command = await Input.prompt({
|
||||
message: "Enter the command:",
|
||||
});
|
||||
console.log(command);
|
||||
await program.parseAsync(command.split(" "));
|
||||
} else {
|
||||
await program.parseAsync(Deno.args);
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param name
|
||||
@@ -246,24 +235,20 @@ function shellCommandFactory(
|
||||
name: string,
|
||||
description: string,
|
||||
commands: string[],
|
||||
env?: { [key: string]: string },
|
||||
env?: { [key: string]: string }
|
||||
): Command {
|
||||
return program
|
||||
.command(name)
|
||||
.description(
|
||||
`${description}. Command: \n"${
|
||||
ink.colorize(
|
||||
`<green>${commands.join(" && ")}</green>`,
|
||||
)
|
||||
}"\n`,
|
||||
`${description}. Command: \n"${ink.colorize(
|
||||
`<green>${commands.join(" && ")}</green>`
|
||||
)}"\n`
|
||||
)
|
||||
.action(async (args: string[] | undefined) => {
|
||||
const { run } = Deno;
|
||||
|
||||
for (const command of commands) {
|
||||
console.log(
|
||||
ink.colorize(`<green>>>>>> Running: ${command}</green>`),
|
||||
);
|
||||
console.log(ink.colorize(`<green>>>>>> Running: ${command}</green>`));
|
||||
|
||||
const cmd = command.split(" ");
|
||||
|
||||
@@ -281,11 +266,67 @@ function shellCommandFactory(
|
||||
|
||||
if (!status.success) {
|
||||
throw new Error(`Failed with error: ${status.code}, however,
|
||||
it's not related to this Deno script directly. An error occurred within
|
||||
the script called by the command itself`);
|
||||
it's not related to this Deno script directly. An error occurred within
|
||||
the script called by the command itself`);
|
||||
}
|
||||
|
||||
shellCmd.close();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async function checkDockerVersion() {
|
||||
const { run } = Deno;
|
||||
const dockerVerCmd = run({
|
||||
cmd: ["docker", "compose", "version"],
|
||||
cwd: process.cwd(),
|
||||
env: { ...process.env, ...env },
|
||||
stdout: "piped",
|
||||
});
|
||||
|
||||
const output = await dockerVerCmd.output();
|
||||
const status = await dockerVerCmd.status();
|
||||
const outStr = new TextDecoder().decode(output);
|
||||
|
||||
if (!status.success) {
|
||||
return 'not installed?'
|
||||
}
|
||||
|
||||
const version = outStr.split(" ").pop()?.trim();
|
||||
|
||||
if (!version) return version;
|
||||
|
||||
if (!semver.gte(version, MIN_COMPOSE_VERSION)) {
|
||||
return version;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
async function main() {
|
||||
// Handle it however you like
|
||||
// e.g. display usage
|
||||
while (true) {
|
||||
const version = await checkDockerVersion();
|
||||
if (version !== true) {
|
||||
console.error(
|
||||
ink.colorize(`<red>ERROR: Your docker compose version (${version}) must be higher or equal to ${MIN_COMPOSE_VERSION}. Please install the new version of docker compose and try again</red>`)
|
||||
);
|
||||
return false
|
||||
}
|
||||
|
||||
if (Deno.args.length === 0) {
|
||||
program.outputHelp();
|
||||
const command = await Input.prompt({
|
||||
message: "Enter the command:",
|
||||
});
|
||||
console.log(command);
|
||||
await program.parseAsync(command.split(" "));
|
||||
} else {
|
||||
await program.parseAsync(Deno.args);
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
2
conf/dist/env.docker
vendored
2
conf/dist/env.docker
vendored
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Create a .env file in the root folder and use the following
|
||||
# variables to configure your docker-compose
|
||||
# variables to configure your docker compose
|
||||
#
|
||||
|
||||
DOCKER_AC_ENV_FILE=
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
DELETE FROM `gameobject` WHERE `id`=180917;
|
||||
SET @OGUID :=18017;
|
||||
DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @GUID+39;
|
||||
DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+39;
|
||||
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES
|
||||
(@OGUID+0, 180917, 530, 3430, 3460, 1, 1, 8881.802734375, -5735.43359375, 0.117886997759342193, 4.607671737670898437, 0, 0, -0.74314403533935546, 0.669131457805633544, 30, 255, 1, 0), -- 180917 (Area: 3460 - Difficulty: 0)
|
||||
(@OGUID+1, 180917, 530, 3430, 3460, 1, 1, 8742.2236328125, -5697.8486328125, 0.245764002203941345, 1.570795774459838867, 0, 0, 0.707106590270996093, 0.707106947898864746, 30, 255, 1, 0), -- 180917 (Area: 3460 - Difficulty: 0)
|
||||
|
||||
2
data/sql/updates/db_world/2022_10_18_00.sql
Normal file
2
data/sql/updates/db_world/2022_10_18_00.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
-- DB update 2022_10_17_02 -> 2022_10_18_00
|
||||
UPDATE `item_template` SET `Flags`=`Flags`&~2048 WHERE `entry` = 17962;
|
||||
82983
data/sql/updates/db_world/2022_10_19_00.sql
Normal file
82983
data/sql/updates/db_world/2022_10_19_00.sql
Normal file
File diff suppressed because it is too large
Load Diff
@@ -18,6 +18,8 @@ x-cache-from: &cache-from
|
||||
x-ac-shared-conf: &ac-shared-conf
|
||||
<<: *networks
|
||||
working_dir: /azerothcore
|
||||
environment:
|
||||
AC_DISABLE_INTERACTIVE: "1"
|
||||
depends_on:
|
||||
ac-database:
|
||||
condition: service_healthy
|
||||
|
||||
@@ -228,11 +228,13 @@ BaseLocation DBUpdater<T>::GetBaseLocationType()
|
||||
template<class T>
|
||||
bool DBUpdater<T>::Create(DatabaseWorkerPool<T>& pool)
|
||||
{
|
||||
LOG_WARN("sql.updates", "Database \"{}\" does not exist, do you want to create it? [yes (default) / no]: ",
|
||||
pool.GetConnectionInfo()->database);
|
||||
LOG_WARN("sql.updates", "Database \"{}\" does not exist", pool.GetConnectionInfo()->database);
|
||||
|
||||
if (!sConfigMgr->isDryRun())
|
||||
const char* interactiveOpt = std::getenv("AC_DISABLE_INTERACTIVE");
|
||||
|
||||
if (!sConfigMgr->isDryRun() && std::strcmp(interactiveOpt, "1") != 0)
|
||||
{
|
||||
std::cout << "Do you want to create it? [yes (default) / no]:" << std::endl;
|
||||
std::string answer;
|
||||
std::getline(std::cin, answer);
|
||||
if (!answer.empty() && !(answer.substr(0, 1) == "y"))
|
||||
@@ -559,7 +561,6 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
|
||||
|
||||
auto env = boost::process::environment();
|
||||
|
||||
|
||||
// Invokes a mysql process which doesn't leak credentials to logs
|
||||
int const ret = Acore::StartProcess(DBUpdaterUtil::GetCorrectedMySQLExecutable(), args,
|
||||
"sql.updates", "", true, env);
|
||||
|
||||
@@ -11296,7 +11296,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
||||
|
||||
// Homebind
|
||||
WorldPacket data(SMSG_BINDPOINTUPDATE, 5 * 4);
|
||||
data << m_homebindX << m_homebindY << m_homebindZ << m_homebindO;
|
||||
data << m_homebindX << m_homebindY << m_homebindZ;
|
||||
data << (uint32) m_homebindMapId;
|
||||
data << (uint32) m_homebindAreaId;
|
||||
GetSession()->SendPacket(&data);
|
||||
|
||||
Reference in New Issue
Block a user