Table of Contents

Information

Media

Resources

Prerequisites

Dependencies

sudo dnf install bzip2-devel gcc-c++ clang cmake git-core boost boost-devel readline-devel zlib-ng-compat-devel openssl-devel mariadb-devel

Mold Linker

sudo dnf install 'mold'
sudo update-alternatives --config 'ld'
ls -la '/etc/alternatives/ld'

Download Source

cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/trinity-335/src' && git clone --branch '3.3.5' --depth '1' --recurse-submodules 'https://github.com/TrinityCore/TrinityCore.git' ~/'Projects/trinity-335/src' && sync

Databases

mariadb -u 'root' -p
CREATE DATABASE authserver;
CREATE DATABASE characters;
CREATE DATABASE worldserver;
CREATE USER 'authserver'@'localhost' IDENTIFIED BY 'x';
CREATE USER 'characters'@'localhost' IDENTIFIED BY 'x';
CREATE USER 'worldserver'@'localhost' IDENTIFIED BY 'x';
GRANT ALL PRIVILEGES ON authserver.* to 'authserver'@'localhost';
GRANT ALL PRIVILEGES ON characters.* to 'characters'@'localhost';
GRANT ALL PRIVILEGES ON worldserver.* to 'worldserver'@'localhost';
FLUSH PRIVILEGES;
EXIT

Initial Compile

rm -Rf ~/'Projects/trinity-335/build' ~/'Projects/trinity-335/run' && mkdir -p ~/'Projects/trinity-335/build' ~/'Projects/trinity-335/run' && cd ~/'Projects/trinity-335/build' && cmake ~/'Projects/trinity-335/src' -DCMAKE_INSTALL_PREFIX=~/'Projects/trinity-335/run' -DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++' -DCMAKE_BUILD_TYPE='Release' -DWITHOUT_METRICS='1' -DTOOLS='1' && sync && make --jobs=$(nproc) install && sync

Update

git -C ~/'Projects/trinity-335/src' pull origin '3.3.5' && cd ~/'Projects/trinity-335/build' && cmake ~/'Projects/trinity-335/src' -DCMAKE_INSTALL_PREFIX=~/'Projects/trinity-335/run' -DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++' -DCMAKE_BUILD_TYPE='Release' -DWITHOUT_METRICS='1' -DTOOLS='1' && sync && make --jobs=$(nproc) install && cp -v --remove-destination ~/'Projects/trinity-335/run/etc/authserver.conf.dist' ~/'Projects/trinity-335/run/etc/authserver.conf' && cp -v --remove-destination ~/'Projects/trinity-335/run/etc/worldserver.conf.dist' ~/'Projects/trinity-335/run/etc/worldserver.conf' && sync

Clean Compile

rm -Rf ~/'Projects/trinity-335/build' && mkdir -p ~/'Projects/trinity-335/build'

Content

DBCs, Maps, and Cameras

cp --force ~/'Projects/trinity-335/run/bin/mapextractor' ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && cd ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && rm -Rf 'dbc' 'maps' 'Cameras' && ./'mapextractor' -f '0' && sync

VMaps

Extract

cp --force ~/'Projects/trinity-335/run/bin/vmap4extractor' ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && cd ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && rm -Rf 'Buildings' && ./'vmap4extractor' -l && sync

Assemble

cp --force ~/'Projects/trinity-335/run/bin/vmap4assembler' ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && cd ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && rm -Rf 'vmaps' && mkdir -p 'vmaps' && ./'vmap4assembler' 'Buildings' 'vmaps' && sync

MMaps

cp --force ~/'Projects/trinity-335/run/bin/mmaps_generator' ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && cd ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && rm -Rf 'mmaps' && mkdir -p 'mmaps' && ./'mmaps_generator' --bigBaseUnit 'true' --threads $(nproc) && sync

Move Files

cd ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && mv --force 'dbc' 'maps' 'Cameras' 'vmaps' 'mmaps' ~/'Projects/trinity-335/run/bin' && rm -f 'mapextractor' 'vmap4extractor' 'vmap4assembler' 'mmaps_generator' && cd ~ && sync

Check Files

ls --directory ~/'Projects/trinity-335/run/bin/dbc' ~/'Projects/trinity-335/run/bin/maps' ~/'Projects/trinity-335/run/bin/Cameras' ~/'Projects/trinity-335/run/bin/vmaps' ~/'Projects/trinity-335/run/bin/mmaps'
gio open ~/'Projects/trinity-335/run/bin/'

Clean-up

cd ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/' && rm -Rf 'Buildings' 'mapextractor' 'vmap4extractor' 'vmap4assembler' 'mmaps_generator' 'WoWDL.lnk' && cd ~ && sync
gio open ~/'.wine/World of Warcraft 3.3.5/drive_c/Program Files/World of Warcraft 3.3.5a.12340'*'/'

World Database

TDB

rm -Rf ~/'Projects/trinity-335/run/bin/TDB_full_world_335.'*'.sql' && cd ~/'Projects/trinity-335/run/bin' && 7za x ~/'Downloads/TDB_full_world_335.'*'.7z' && cd ~

Settings

authserver

cp ~/'Projects/trinity-335/run/etc/authserver.conf.dist' ~/'Projects/trinity-335/run/etc/authserver.conf'
mkdir -p ~/'Projects/trinity-335/authserver.conf.d' && nano ~/'Projects/trinity-335/authserver.conf.d/localhost-authserver.conf'
[authserver]

# Connection
BindIP = "127.0.0.1"
LoginDatabaseInfo = ".;/var/lib/mysql/mysql.sock;authserver;x;authserver"
AllowLoggingIPAddressesInDatabase = 0

# Etc
RealmsStateUpdateDelay = 0
Updates.EnableDatabases = 1
Updates.CleanDeadRefMaxCount = -1

# End

worldserver

cp ~/'Projects/trinity-335/run/etc/worldserver.conf.dist' ~/'Projects/trinity-335/run/etc/worldserver.conf'
mkdir -p ~/'Projects/trinity-335/worldserver.conf.d' && nano ~/'Projects/trinity-335/worldserver.conf.d/localhost-worldserver.conf'
[worldserver]

# Connection
BindIP = "127.0.0.1"
LoginDatabaseInfo = ".;/var/lib/mysql/mysql.sock;authserver;x;authserver"
WorldDatabaseInfo = ".;/var/lib/mysql/mysql.sock;worldserver;x;worldserver"
CharacterDatabaseInfo = ".;/var/lib/mysql/mysql.sock;characters;x;characters"
AllowLoggingIPAddressesInDatabase = 0

# Server
HotSwap.Enabled = 0
HotSwap.EnableReCompiler = 0
FlashAtStart = 0
Server.LoginInfo = 1
Motd = "Welcome to your localhost server!"
AllowTickets = 0
Updates.CleanDeadRefMaxCount = -1

# Quests
Quests.LowLevelHideDiff = -1
Quests.HighLevelHideDiff = -1

# Character
GM.LoginState = 0
CharDelete.Method = 1
CharDelete.KeepDays = 0

# Protections
MaxOverspeedPings = 0
PacketSpoof.Policy = 0
ChatFakeMessagePreventing = 0
ChatFlood.MessageCount = 0

# End

Launch

cd ~/'Projects/trinity-335/run/bin' && ~/'Projects/trinity-335/run/bin/authserver' --config-dir ~/'Projects/trinity-335/authserver.conf.d'
cd ~/'Projects/trinity-335/run/bin' && ~/'Projects/trinity-335/run/bin/worldserver' --config-dir ~/'Projects/trinity-335/worldserver.conf.d'

Create GM Account

account create Espionage724 x
account set gmlevel Espionage724 3 -1
server shutdown 1

Scripts

Server Start

mkdir -p ~/'Projects/trinity-335/scripts' && nano ~/'Projects/trinity-335/scripts/tc-335-server-start.sh' && chmod +x ~/'Projects/trinity-335/scripts/tc-335-server-start.sh'
#!/bin/bash

cd ~/'Projects/trinity-335/run/bin'

ptyxis --standalone --title='WoW 3.3.5 localhost authserver — ' -- ~/'Projects/trinity-335/run/bin/authserver' --config-dir ~/'Projects/trinity-335/authserver.conf.d' &
ptyxis --standalone --title='WoW 3.3.5 localhost worldserver — ' -- ~/'Projects/trinity-335/run/bin/worldserver' --config-dir ~/'Projects/trinity-335/worldserver.conf.d'

# End
~/'Projects/trinity-335/scripts/tc-335-server-start.sh'

Update

mkdir -p ~/'Projects/trinity-335/scripts' && nano ~/'Projects/trinity-335/scripts/tc-335-server-update.sh' && chmod +x ~/'Projects/trinity-335/scripts/tc-335-server-update.sh'
#!/bin/bash

git -C ~/'Projects/trinity-335/src' pull origin '3.3.5'

cd ~/'Projects/trinity-335/build'
cmake ~/'Projects/trinity-335/src' -DCMAKE_INSTALL_PREFIX=~/'Projects/trinity-335/run' -DCMAKE_C_COMPILER='clang' -DCMAKE_CXX_COMPILER='clang++' -DCMAKE_BUILD_TYPE='Release' -DWITHOUT_METRICS='1' -DTOOLS='1'
make --jobs=$(nproc) install

cp -v --remove-destination ~/'Projects/trinity-335/run/etc/authserver.conf.dist' ~/'Projects/trinity-335/run/etc/authserver.conf'
cp -v --remove-destination ~/'Projects/trinity-335/run/etc/worldserver.conf.dist' ~/'Projects/trinity-335/run/etc/worldserver.conf'

sync
echo ''
read -n '1' -s -r -p 'WoW 3.3.5 localserver has been updated. Press any key to exit.'

# End
~/'Projects/trinity-335/scripts/tc-335-server-update.sh'

Database Back-up

mkdir -p ~/'Projects/trinity-335/scripts' && nano ~/'Projects/trinity-335/scripts/tc-335-save-backup.sh' && chmod +x ~/'Projects/trinity-335/scripts/tc-335-save-backup.sh'
#!/bin/bash

cd ~/'Downloads'
echo 'Root MariaDB user password prompts:'
echo ''
mariadb-dump -u 'root' -p --opt -r 'localserver-authserver-database-'$(date +%Y-%m-%d-%s)'.sql' 'authserver'
mariadb-dump -u 'root' -p --opt -r 'localserver-characters-database-'$(date +%Y-%m-%d-%s)'.sql' 'characters' 
sync
read -n '1' -s -r -p 'localserver databases have been dumped to Downloads. Press any key to exit.'

# End
~/'Projects/trinity-335/scripts/tc-335-save-backup.sh'

Character Data

Backup

cd ~/'Downloads' && mariadb-dump -u 'root' -p --opt -r 'localserver-authserver-database-'$(date +%Y-%m-%d-%s)'.sql' 'authserver'
cd ~/'Downloads' && mariadb-dump -u 'root' -p --opt -r 'localserver-characters-database-'$(date +%Y-%m-%d-%s)'.sql' 'characters'

Restore

authserver

mariadb --user='root' --password --execute='DROP DATABASE authserver'
mariadb --user='root' --password --execute='CREATE DATABASE authserver'
mariadb --user='root' --password 'authserver' < x

characters

mariadb --user='root' --password --execute='DROP DATABASE characters'
mariadb --user='root' --password --execute='CREATE DATABASE characters'
mariadb --user='root' --password 'characters' < x

Reapply Permissions

mariadb -u 'root' -p
GRANT ALL PRIVILEGES ON authserver.* to 'authserver'@'localhost';
GRANT ALL PRIVILEGES ON characters.* to 'characters'@'localhost';
FLUSH PRIVILEGES;
EXIT

Troubleshooting

ldd ~/'Projects/trinity-335/run/bin/worldserver'
readelf --string-dump='.comment' ~/'Projects/trinity-335/run/bin/worldserver'
3)
dbc folder 247/90.3 MB, maps folder 5744/557.6 MB, Cameras folder 14/34.8 KB
4)
vmaps folder 12501/1.3 GB
5)
mmaps folder 3635/1.6 GB