Merge pull request #2 from EQEmu/master

Update
This commit is contained in:
regneq 2020-01-28 15:36:23 -08:00 committed by GitHub
commit f880663528
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 34 additions and 22 deletions

View File

@ -1,26 +1,18 @@
language: cpp language: cpp
compiler: gcc compiler: gcc
dist: trusty dist: bionic
before_install: addons:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test apt:
- sudo apt-get update -qq packages:
- mkdir $HOME/usr - libmysqlclient-dev
- export PATH="$HOME/usr/bin:$PATH" - libperl-dev
- wget https://cmake.org/files/v3.11/cmake-3.11.2-Linux-x86_64.sh - libboost-dev
- chmod +x cmake-3.11.2-Linux-x86_64.sh - liblua5.1-0-dev
- ./cmake-3.11.2-Linux-x86_64.sh --prefix=$HOME/usr --exclude-subdir --skip-license - zlib1g-dev
- uuid-dev
- libssl-dev
install:
- sudo apt-get install -qq g++-7
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90
- sudo apt-get install libmysqlclient-dev
- sudo apt-get install libperl-dev
- sudo apt-get install libboost-dev
- sudo apt-get install liblua5.1-0-dev
- sudo apt-get install zlib1g-dev
- sudo apt-get install uuid-dev
- sudo apt-get install libssl-dev
script: script:
- cmake -G "Unix Makefiles" -DEQEMU_BUILD_TESTS=ON -DEQEMU_ENABLE_BOTS=ON -DEQEMU_BUILD_LOGIN=ON - cmake -G "Unix Makefiles" -DEQEMU_BUILD_TESTS=ON -DEQEMU_ENABLE_BOTS=ON -DEQEMU_BUILD_LOGIN=ON
- make -j2 - make -j2

View File

@ -371,6 +371,7 @@ bool Database::DeleteCharacter(char *character_name) {
UPDATE UPDATE
character_data character_data
SET SET
name = SUBSTRING(CONCAT(name, '-deleted-', UNIX_TIMESTAMP()), 1, 64),
deleted_at = NOW() deleted_at = NOW()
WHERE WHERE
id = '{}' id = '{}'

View File

@ -34,7 +34,7 @@
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt * Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
*/ */
#define CURRENT_BINARY_DATABASE_VERSION 9146 #define CURRENT_BINARY_DATABASE_VERSION 9147
#ifdef BOTS #ifdef BOTS
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9026 #define CURRENT_BINARY_BOTS_DATABASE_VERSION 9026

View File

@ -2216,11 +2216,18 @@ sub get_bots_db_version {
} }
sub bots_db_management { sub bots_db_management {
my $world_path = "world";
if (-e "bin/world") {
$world_path = "bin/world";
}
#::: Get Binary DB version
if ($OS eq "Windows") { if ($OS eq "Windows") {
@db_version = split(': ', `world db_version`); @db_version = split(': ', `$world_path db_version`);
} }
if ($OS eq "Linux") { if ($OS eq "Linux") {
@db_version = split(': ', `./world db_version`); @db_version = split(': ', `./$world_path db_version`);
} }
#::: Main Binary Database version #::: Main Binary Database version

View File

@ -0,0 +1,12 @@
-- Run this to un-reserve deleted characters
UPDATE
character_data
SET
name = SUBSTRING(
CONCAT(name, '-deleted-', UNIX_TIMESTAMP()),
1,
64
)
WHERE
deleted_at IS NOT NULL
AND name NOT LIKE '%-deleted-%';