From 121a33dd2f35149e09c3ae5930f494c9cddd5317 Mon Sep 17 00:00:00 2001 From: SylvaniaCore deploy Date: Wed, 17 Jun 2026 09:02:33 +0000 Subject: [PATCH] chore(sylvania): artefacts - SQL spawn Klauss, scripts ops (reconcile/rollback), README du fork --- sql/sylvania/klauss_npc_20260617.sql | 24 ++++++++++++++++++++++++ sylvania/README.md | 23 +++++++++++++++++++++++ sylvania/scripts/ROLLBACK.sh.example | 17 +++++++++++++++++ sylvania/scripts/reconcile_schema.sh | 21 +++++++++++++++++++++ 4 files changed, 85 insertions(+) create mode 100644 sql/sylvania/klauss_npc_20260617.sql create mode 100644 sylvania/README.md create mode 100755 sylvania/scripts/ROLLBACK.sh.example create mode 100755 sylvania/scripts/reconcile_schema.sh diff --git a/sql/sylvania/klauss_npc_20260617.sql b/sql/sylvania/klauss_npc_20260617.sql new file mode 100644 index 0000000..9e07c7b --- /dev/null +++ b/sql/sylvania/klauss_npc_20260617.sql @@ -0,0 +1,24 @@ +-- Klauss : PNJ selecteur de taux d XP perso (entry 1000000) - custom SylvaniaCore +-- Script C++ associe = npc_rate_xp_modifier (src/server/scripts/Custom/custom_npcs.cpp) +-- A appliquer sur la base world. +DELETE FROM creature_template_locale WHERE entry=1000000; +DELETE FROM creature WHERE id=1000000; +DELETE FROM creature_template WHERE entry=1000000; +/*M!999999\- enable the sandbox mode */ +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid1`, `modelid2`, `modelid3`, `modelid4`, `name`, `femaleName`, `subname`, `TitleAlt`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `HealthScalingExpansion`, `RequiredExpansion`, `VignetteID`, `faction`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `dmgschool`, `BaseAttackTime`, `RangeAttackTime`, `BaseVariance`, `RangeVariance`, `unit_class`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `family`, `trainer_type`, `trainer_class`, `trainer_race`, `type`, `type_flags`, `type_flags2`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `spell5`, `spell6`, `spell7`, `spell8`, `VehicleId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `HoverHeight`, `HealthModifier`, `HealthModifierExtra`, `ManaModifier`, `ManaModifierExtra`, `ArmorModifier`, `DamageModifier`, `ExperienceModifier`, `RacialLeader`, `movementId`, `RegenHealth`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`, `VerifiedBuild`) VALUES (1000000,0,0,0,0,0,38804,0,0,0,'Klauss','','Sélecteur de taux d\'expérience',NULL,NULL,0,110,110,0,0,0,35,1,1,1.14286,1,0,0,0,0,1,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,3,1,1,1,1,1,1,1,1,0,0,1,0,0,'npc_rate_xp_modifier',0); +/*M!999999\- enable the sandbox mode */ +INSERT INTO `creature_template_locale` (`entry`, `locale`, `Name`, `NameAlt`, `Title`, `TitleAlt`, `VerifiedBuild`) VALUES (1000000,'frFR','Klauss',NULL,'Sélecteur de taux d\'expérience',NULL,26972); +/*M!999999\- enable the sandbox mode */ +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `ScriptName`, `movementmode`, `VerifiedBuild`) VALUES (280001396,1000000,1,6453,5691,'0',0,0,0,-1,0,0,-1153.59,-5267.43,0.763088,2.87955,300,0,0,8633,0,0,0,0,0,0,0,'',0,0); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `ScriptName`, `movementmode`, `VerifiedBuild`) VALUES (280001395,1000000,530,6455,3431,'0',0,0,0,-1,0,0,10357.8,-6368.57,35.9875,1.87208,300,0,0,8633,0,0,0,0,0,0,0,'',0,0); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `ScriptName`, `movementmode`, `VerifiedBuild`) VALUES (280001394,1000000,0,1519,1519,'0',0,0,0,-1,0,0,-8779.12,339.722,107.296,1.42917,300,0,0,8633,0,0,0,0,0,0,0,'',0,0); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `ScriptName`, `movementmode`, `VerifiedBuild`) VALUES (280001393,1000000,0,1,5495,'0',0,0,0,-1,0,0,-4989.09,873.428,274.454,5.81047,300,0,0,8633,0,0,0,0,0,0,0,'',0,0); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `ScriptName`, `movementmode`, `VerifiedBuild`) VALUES (280001392,1000000,1,6451,363,'0',0,0,0,-1,0,0,-606.172,-4253.31,38.9558,3.46951,300,0,0,8633,0,0,0,0,0,0,0,'',0,0); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `ScriptName`, `movementmode`, `VerifiedBuild`) VALUES (280001391,1000000,1,6450,188,'0',0,0,0,-1,0,0,10335,831.334,1326.18,2.80606,300,0,0,8633,0,0,0,0,0,0,0,'',0,0); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `ScriptName`, `movementmode`, `VerifiedBuild`) VALUES (280001390,1000000,0,6176,132,'0',0,0,0,-1,0,0,-6213.36,329.844,383.725,3.26726,300,0,0,8633,0,0,0,0,0,0,0,'',0,0); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `ScriptName`, `movementmode`, `VerifiedBuild`) VALUES (280001389,1000000,0,6170,9,'0',0,0,0,-1,0,0,-8927.84,-138.888,81.8979,1.51659,300,0,0,8633,0,0,0,0,0,0,0,'',0,0); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `ScriptName`, `movementmode`, `VerifiedBuild`) VALUES (280001388,1000000,0,6454,5692,'0',0,0,0,-1,0,0,1704.79,1711.78,135.383,3.76056,300,0,0,8633,0,0,0,0,0,0,0,'',0,0); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `ScriptName`, `movementmode`, `VerifiedBuild`) VALUES (280001387,1000000,1,6452,221,'0',0,0,0,-1,0,0,-2923.58,-244.042,60.0228,5.05796,300,0,0,8633,0,0,0,0,0,0,0,'',0,0); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `ScriptName`, `movementmode`, `VerifiedBuild`) VALUES (280001386,1000000,609,4298,4342,'0',0,0,696,-1,0,0,2366.03,-5678.52,425.938,2.42295,300,0,0,8633,0,0,0,0,0,0,0,'',0,0); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `ScriptName`, `movementmode`, `VerifiedBuild`) VALUES (280001385,1000000,530,6456,3526,'0',0,0,0,-1,0,0,-3973.12,-13925.9,100.626,6.152,300,0,0,8633,0,0,0,0,0,0,0,'',0,0); +INSERT INTO `creature` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnDifficulties`, `phaseUseFlags`, `PhaseId`, `PhaseGroup`, `terrainSwapMap`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `unit_flags2`, `unit_flags3`, `dynamicflags`, `ScriptName`, `movementmode`, `VerifiedBuild`) VALUES (280001397,1000000,1,1637,5170,'0',0,0,0,-1,0,0,1609.09,-4389.5,20.319,3.3398,300,0,0,8633,0,0,0,0,0,0,0,'',0,0); diff --git a/sylvania/README.md b/sylvania/README.md new file mode 100644 index 0000000..4338116 --- /dev/null +++ b/sylvania/README.md @@ -0,0 +1,23 @@ +# SylvaniaCore + +Fork de **DestinyCore** (WoW Legion 7.3.5.26972) pour le serveur "La Legende de Sylvania". + +- Base upstream : DestinyCore master @2d631f4e (remote `upstream`). +- Customs conserves : Klauss (taux XP perso x1-7, gossip FR), Solocraft, Solo LFG (natifs DestinyCore + config). +- PlayerBots : DESACTIVES (pbotall=0 + gardes code) - serveur blizzlike sans bots. + +## Correctifs SylvaniaCore (commits dedies) +1. Compat build MariaDB (CR_INVALID_CONN_HANDLE). +2. Desactivation PlayerBots + fix crash issue #56 (file BG/arene). +3. Fix cadavre orphelin (blocage esprit guerisseur apres reset d instance). +4. Klauss (entry 1000000) - voir sql/sylvania/klauss_npc_*.sql pour le spawn. + +## Config worldserver requise +pbot = 0 ; pbotall = 0 ; Solocraft.Enable = 1 ; SoloLFG.Enable = 1 ; SoloLFG.Announce = 1 + +## Donnees client +maps/vmaps/mmaps/dbc extraits du client 7.3.5.26972 (compatibles, pas de re-extraction). + +## scripts/ +- reconcile_schema.sh : synchro additive de schema (golden -> cible) pour migrer auth/characters. +- ROLLBACK.sh.example : modele de rollback blue-green (adapter les chemins). diff --git a/sylvania/scripts/ROLLBACK.sh.example b/sylvania/scripts/ROLLBACK.sh.example new file mode 100755 index 0000000..eef2b3b --- /dev/null +++ b/sylvania/scripts/ROLLBACK.sh.example @@ -0,0 +1,17 @@ +#!/bin/bash +# ROLLBACK vers ArgusCore (ancien stack intact, bases auth/characters/world figees). +set -x +touch /home/ubuntu/scripts/world-watchdog.disabled /home/ubuntu/scripts/bnet-watchdog.disabled +tmux kill-session -t world 2>/dev/null; pkill -f 'dc-server/bin/worldserver' 2>/dev/null +pkill -x bnetserver 2>/dev/null; sleep 4 +# restaurer watchdogs ArgusCore +[ -f /home/ubuntu/scripts/world-watchdog.sh.arguscore ] && cp /home/ubuntu/scripts/world-watchdog.sh.arguscore /home/ubuntu/scripts/world-watchdog.sh +[ -f /home/ubuntu/scripts/bnet-watchdog.sh.arguscore ] && cp /home/ubuntu/scripts/bnet-watchdog.sh.arguscore /home/ubuntu/scripts/bnet-watchdog.sh +# restaurer site +[ -f /var/www/html/config/secrets.php.precutover ] && sudo cp /var/www/html/config/secrets.php.precutover /var/www/html/config/secrets.php +# relancer ANCIEN stack +cd /home/ubuntu/server/bin && setsid ./bnetserver > /home/ubuntu/bnet.log 2>&1 < /dev/null & +tmux new-session -d -s world "cd /home/ubuntu/server/bin && ./worldserver 2>&1 | tee -a /home/ubuntu/world.log" +# reactiver watchdogs (ArgusCore) +rm -f /home/ubuntu/scripts/world-watchdog.disabled /home/ubuntu/scripts/bnet-watchdog.disabled +echo "ROLLBACK fait : ArgusCore relance, site repointe, watchdogs ArgusCore ON." diff --git a/sylvania/scripts/reconcile_schema.sh b/sylvania/scripts/reconcile_schema.sh new file mode 100755 index 0000000..4cb42e2 --- /dev/null +++ b/sylvania/scripts/reconcile_schema.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# reconcile_schema.sh +# Ajoute au TARGET les tables et colonnes presentes dans GOLDEN mais absentes (additif, non destructif). +G="$1"; T="$2" +Q(){ sudo mysql -N -e "$1"; } +# Tables golden absentes du target -> creation (structure seule) +for tbl in $(Q "SELECT table_name FROM information_schema.tables WHERE table_schema='$G' AND table_type='BASE TABLE' AND table_name NOT IN (SELECT table_name FROM information_schema.tables WHERE table_schema='$T')"); do + echo " + TABLE $tbl" + sudo mysqldump --no-data --no-tablespaces "$G" "$tbl" | grep -ivE '^[[:space:]]*(USE|CREATE DATABASE|DROP DATABASE)' | sudo mysql "$T" +done +# Colonnes golden (tables communes) absentes du target -> ALTER ADD +Q "SELECT c.table_name,c.column_name,c.column_type,c.is_nullable,c.extra + FROM information_schema.columns c + WHERE c.table_schema='$G' + AND c.table_name IN (SELECT table_name FROM information_schema.tables WHERE table_schema='$T') + AND NOT EXISTS (SELECT 1 FROM information_schema.columns t WHERE t.table_schema='$T' AND t.table_name=c.table_name AND t.column_name=c.column_name)" \ +| while IFS=$'\t' read tbl col ctype isnull extra; do + nullsql="NULL"; [ "$isnull" = "NO" ] && nullsql="NOT NULL DEFAULT 0" + echo " + COLONNE $tbl.$col ($ctype)" + sudo mysql "$T" -e "ALTER TABLE \`$tbl\` ADD COLUMN \`$col\` $ctype $nullsql $extra" 2>&1 | grep -v '^$' || true +done