Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
bash
2025-10-01 12:16:44 +02:00
committed by GitHub
5 changed files with 22 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
-- DB update 2025_09_30_02 -> 2025_10_01_00
-- Update gameobject '186957' with sniffed values
-- updated spawns
DELETE FROM `gameobject` WHERE (`id` IN (186957)) AND (`guid` IN (65654));
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `VerifiedBuild`, `Comment`) VALUES
(65654, 186957, 571, 0, 0, 1, 1, 514.50347900390625, -5936.9287109375, 313.857574462890625, 3.141527414321899414, -0.02631568908691406, 0.036975860595703125, 0.998969078063964843, 0.001006617560051381, 120, 255, 0, "", 48632, NULL);

View File

@@ -0,0 +1,2 @@
-- DB update 2025_10_01_00 -> 2025_10_01_01
UPDATE `gameobject` SET `position_x` = 5716.26, `position_y` = -4369.34, `position_z` = 385.885 WHERE `guid` = 99747 AND `id` = 190739;

View File

@@ -343,6 +343,14 @@ Updates.AllowRehash = 1
Updates.CleanDeadRefMaxCount = 3
#
# Updates.ExceptionShutdownDelay
# Description: Time (in milliseconds) to wait before shutting down after a fatal exception (e.g. failed SQL update).
# Default: 10000 - 10 seconds
# 0 - Disabled (immediate shutdown)
Updates.ExceptionShutdownDelay = 10000
#
###################################################################################################

View File

@@ -576,9 +576,14 @@ void DBUpdater<T>::ApplyFile(DatabaseWorkerPool<T>& pool, std::string const& hos
path.generic_string(), pool.GetConnectionInfo()->database);
if (!sConfigMgr->isDryRun())
{
if (uint32 delay = sConfigMgr->GetOption<uint32>("Updates.ExceptionShutdownDelay", 10000))
std::this_thread::sleep_for(Milliseconds(delay));
throw UpdateException("update failed");
}
}
}
template class AC_DATABASE_API DBUpdater<LoginDatabaseConnection>;
template class AC_DATABASE_API DBUpdater<WorldDatabaseConnection>;

View File

@@ -137,10 +137,7 @@ public:
// Make sure we don't pass double quotes into the SQL query. Otherwise it causes a MySQL error
std::string str = name.data(); // Making subtractions to the last character does not with in string_view
if (str.front() == '"')
str = str.substr(1);
if (str.back() == '"')
str = str.substr(0, str.size() - 1);
WorldDatabase.EscapeString(str);
QueryResult result = WorldDatabase.Query("SELECT entry FROM creature_template WHERE name = \"{}\" LIMIT 1", str);
if (!result)