aboutsummaryrefslogtreecommitdiff
path: root/src/server/database/Database
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-03-04 13:52:20 +0100
committerShauren <shauren.trinity@gmail.com>2025-03-04 13:52:20 +0100
commit29e032707686b18bbcce7029e8dd2eaa6606f6d4 (patch)
treec12b9ee11cf55e9c2dce2723e801c2267f93634c /src/server/database/Database
parent75c8c477d8b1ff8ae45c0954794a0f053af88fa5 (diff)
Core/Players: Implement warband scene collection
Diffstat (limited to 'src/server/database/Database')
-rw-r--r--src/server/database/Database/Implementation/HotfixDatabase.cpp8
-rw-r--r--src/server/database/Database/Implementation/HotfixDatabase.h4
-rw-r--r--src/server/database/Database/Implementation/LoginDatabase.cpp5
-rw-r--r--src/server/database/Database/Implementation/LoginDatabase.h4
4 files changed, 21 insertions, 0 deletions
diff --git a/src/server/database/Database/Implementation/HotfixDatabase.cpp b/src/server/database/Database/Implementation/HotfixDatabase.cpp
index f9adad39d00..d0a47a6ba82 100644
--- a/src/server/database/Database/Implementation/HotfixDatabase.cpp
+++ b/src/server/database/Database/Implementation/HotfixDatabase.cpp
@@ -2009,6 +2009,14 @@ void HotfixDatabaseConnection::DoPrepareStatements()
PREPARE_MAX_ID_STMT(HOTFIX_SEL_VIGNETTE, "SELECT MAX(ID) + 1 FROM vignette", CONNECTION_SYNCH);
PREPARE_LOCALE_STMT(HOTFIX_SEL_VIGNETTE, "SELECT ID, Name_lang FROM vignette_locale WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
+ // WarbandScene.db2
+ PrepareStatement(HOTFIX_SEL_WARBAND_SCENE, "SELECT Name, Description, Source, PositionX, PositionY, PositionZ, LookAtX, LookAtY, LookAtZ, ID, "
+ "MapID, Fov, TimeOfDay, Flags, SoundAmbienceID, Quality, TextureKit, DefaultScenePriority, SourceType FROM warband_scene"
+ " WHERE (`VerifiedBuild` > 0) = ?", CONNECTION_SYNCH);
+ PREPARE_MAX_ID_STMT(HOTFIX_SEL_WARBAND_SCENE, "SELECT MAX(ID) + 1 FROM warband_scene", CONNECTION_SYNCH);
+ PREPARE_LOCALE_STMT(HOTFIX_SEL_WARBAND_SCENE, "SELECT ID, Name_lang, Description_lang, Source_lang FROM warband_scene_locale"
+ " WHERE (`VerifiedBuild` > 0) = ? AND locale = ?", CONNECTION_SYNCH);
+
// WmoAreaTable.db2
PrepareStatement(HOTFIX_SEL_WMO_AREA_TABLE, "SELECT AreaName, ID, WmoID, NameSetID, WmoGroupID, SoundProviderPref, SoundProviderPrefUnderwater, "
"AmbienceID, UwAmbience, ZoneMusic, UwZoneMusic, IntroSound, UwIntroSound, AreaTableID, Flags FROM wmo_area_table"
diff --git a/src/server/database/Database/Implementation/HotfixDatabase.h b/src/server/database/Database/Implementation/HotfixDatabase.h
index 1a7d158cdd7..f713884f6cb 100644
--- a/src/server/database/Database/Implementation/HotfixDatabase.h
+++ b/src/server/database/Database/Implementation/HotfixDatabase.h
@@ -1161,6 +1161,10 @@ enum HotfixDatabaseStatements : uint32
HOTFIX_SEL_VIGNETTE_MAX_ID,
HOTFIX_SEL_VIGNETTE_LOCALE,
+ HOTFIX_SEL_WARBAND_SCENE,
+ HOTFIX_SEL_WARBAND_SCENE_MAX_ID,
+ HOTFIX_SEL_WARBAND_SCENE_LOCALE,
+
HOTFIX_SEL_WMO_AREA_TABLE,
HOTFIX_SEL_WMO_AREA_TABLE_MAX_ID,
HOTFIX_SEL_WMO_AREA_TABLE_LOCALE,
diff --git a/src/server/database/Database/Implementation/LoginDatabase.cpp b/src/server/database/Database/Implementation/LoginDatabase.cpp
index d67e753041f..f9cb219af61 100644
--- a/src/server/database/Database/Implementation/LoginDatabase.cpp
+++ b/src/server/database/Database/Implementation/LoginDatabase.cpp
@@ -191,6 +191,11 @@ void LoginDatabaseConnection::DoPrepareStatements()
PrepareStatement(LOGIN_SEL_BNET_TRANSMOG_ILLUSIONS, "SELECT blobIndex, illusionMask FROM battlenet_account_transmog_illusions WHERE battlenetAccountId = ? ORDER BY blobIndex DESC", CONNECTION_ASYNC);
PrepareStatement(LOGIN_INS_BNET_TRANSMOG_ILLUSIONS, "INSERT INTO battlenet_account_transmog_illusions (battlenetAccountId, blobIndex, illusionMask) VALUES (?, ?, ?) "
"ON DUPLICATE KEY UPDATE illusionMask = illusionMask | VALUES(illusionMask)", CONNECTION_ASYNC);
+ PrepareStatement(LOGIN_SEL_BNET_WARBAND_SCENES, "SELECT warbandSceneId, isFavorite, hasFanfare FROM battlenet_account_warband_scenes WHERE battlenetAccountId = ?", CONNECTION_ASYNC);
+ PrepareStatement(LOGIN_INS_BNET_WARBAND_SCENE, "INSERT INTO battlenet_account_warband_scenes (battlenetAccountId, warbandSceneId, isFavorite, hasFanfare) VALUES (?, ?, ?, ?) "
+ "ON DUPLICATE KEY UPDATE isFavorite = VALUES(isFavorite)", CONNECTION_ASYNC);
+ PrepareStatement(LOGIN_UPD_BNET_WARBAND_SCENE, "UPDATE battlenet_account_warband_scenes SET isFavorite = ?, hasFanfare = ? WHERE battlenetAccountId = ? AND warbandSceneId = ?", CONNECTION_ASYNC);
+ PrepareStatement(LOGIN_DEL_BNET_WARBAND_SCENE, "DELETE FROM battlenet_account_warband_scenes WHERE battlenetAccountId = ? AND warbandSceneId = ?", CONNECTION_ASYNC);
}
LoginDatabaseConnection::LoginDatabaseConnection(MySQLConnectionInfo& connInfo, ConnectionFlags connectionFlags) : MySQLConnection(connInfo, connectionFlags)
diff --git a/src/server/database/Database/Implementation/LoginDatabase.h b/src/server/database/Database/Implementation/LoginDatabase.h
index e03fd277e02..7b70d063cb3 100644
--- a/src/server/database/Database/Implementation/LoginDatabase.h
+++ b/src/server/database/Database/Implementation/LoginDatabase.h
@@ -176,6 +176,10 @@ enum LoginDatabaseStatements : uint32
LOGIN_DEL_BNET_ITEM_FAVORITE_APPEARANCE,
LOGIN_SEL_BNET_TRANSMOG_ILLUSIONS,
LOGIN_INS_BNET_TRANSMOG_ILLUSIONS,
+ LOGIN_SEL_BNET_WARBAND_SCENES,
+ LOGIN_INS_BNET_WARBAND_SCENE,
+ LOGIN_UPD_BNET_WARBAND_SCENE,
+ LOGIN_DEL_BNET_WARBAND_SCENE,
MAX_LOGINDATABASE_STATEMENTS
};