From 219599b59cfbe98961f1288af3dceda4d2a3c745 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 18 Jan 2009 20:13:44 +0100 Subject: *Fixed CMakeLists *Remove not needed file --HG-- branch : trunk --- sql/updates/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql') diff --git a/sql/updates/CMakeLists.txt b/sql/updates/CMakeLists.txt index ef9a6927e30..13649ebd133 100644 --- a/sql/updates/CMakeLists.txt +++ b/sql/updates/CMakeLists.txt @@ -138,4 +138,6 @@ INSTALL(FILES 857_world_scripts.sql 863_world_scripts.sql 871_world.sql +884_world.sql +905_world_scripts.sql DESTINATION share/trinity/sql/updates) -- cgit v1.2.3 From a07f3af045d1aaa2152168c42739dd23705b6b2f Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Mon, 19 Jan 2009 17:38:03 +0100 Subject: *Merged db_version and script_db_version table in one table - by Zor --HG-- branch : trunk --- sql/updates/917_world.sql | 8 ++++++++ src/bindings/scripts/ScriptMgr.cpp | 4 ++-- .../serpent_shrine/boss_fathomlord_karathress.cpp | 2 +- src/game/World.cpp | 2 +- src/trinitycore/Master.cpp | 3 +++ 5 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 sql/updates/917_world.sql (limited to 'sql') diff --git a/sql/updates/917_world.sql b/sql/updates/917_world.sql new file mode 100644 index 00000000000..084091ec0af --- /dev/null +++ b/sql/updates/917_world.sql @@ -0,0 +1,8 @@ +CREATE TABLE `version` ( + `core_version` varchar(120) default NULL COMMENT 'Core revision dumped at startup.', + `db_version` varchar(120) default NULL COMMENT 'Version of world DB.', + `script_version` varchar(120) default NULL COMMENT 'Version of scripts DB.' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Version Notes'; +INSERT INTO version (core_version, db_version, script_version) VALUES ("",(SELECT version FROM db_version),(SELECT version FROM script_db_version)); +DROP TABLE IF EXISTS db_version; +DROP TABLE IF EXISTS script_db_version; \ No newline at end of file diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index d415e8adfbe..c39102a1d7a 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -630,7 +630,7 @@ void LoadDatabase() QueryResult *result; //Get Version information - result = TScriptDB.PQuery("SELECT version FROM script_db_version"); + result = TScriptDB.PQuery("SELECT script_version FROM version LIMIT 1"); if (result) { @@ -641,7 +641,7 @@ void LoadDatabase() }else { - error_log("TSCR: Missing `script_db_version` information."); + error_log("TSCR: Missing `version.script_version` information."); outstring_log(""); } diff --git a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp index c653ff23ca0..933b4c0361f 100644 --- a/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/src/bindings/scripts/scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -65,7 +65,7 @@ EndScriptData */ #define SPELL_WATER_BOLT_VOLLEY 38335 #define SPELL_TIDAL_SURGE 38358 #define SPELL_TIDAL_SURGE_FREEZE 38357 -#define SPELL_HEAL 41386 +#define SPELL_HEAL 38330 #define SPELL_SUMMON_CYCLONE 38337 #define SPELL_CYCLONE_CYCLONE 29538 diff --git a/src/game/World.cpp b/src/game/World.cpp index 219c656dcaf..6865421a326 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -3001,7 +3001,7 @@ void World::UpdateMaxSessionCounters() void World::LoadDBVersion() { - QueryResult* result = WorldDatabase.Query("SELECT version FROM db_version LIMIT 1"); + QueryResult* result = WorldDatabase.Query("SELECT db_version FROM version LIMIT 1"); if(result) { Field* fields = result->Fetch(); diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp index ed526f497c3..63c88807738 100644 --- a/src/trinitycore/Master.cpp +++ b/src/trinitycore/Master.cpp @@ -458,6 +458,9 @@ bool Master::_StartDB() ///- Clean the database before starting clearOnlineAccounts(); + ///- Insert version info into DB + WorldDatabase.PExecute("UPDATE `version` SET `core_version` = '%s'", _FULLVERSION); + sWorld.LoadDBVersion(); sLog.outString("Using %s", sWorld.GetDBVersion()); -- cgit v1.2.3 From f28fb06d711c03ca777d04b546f5eceff0ca46b5 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Mon, 19 Jan 2009 18:11:08 +0100 Subject: *Added another column for version table - by Zor --HG-- branch : trunk --- sql/updates/919_world.sql | 2 ++ sql/updates/CMakeLists.txt | 2 ++ src/trinitycore/Master.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 sql/updates/919_world.sql (limited to 'sql') diff --git a/sql/updates/919_world.sql b/sql/updates/919_world.sql new file mode 100644 index 00000000000..24267d49223 --- /dev/null +++ b/sql/updates/919_world.sql @@ -0,0 +1,2 @@ +ALTER TABLE version + ADD `core_revision` BIGINT UNSIGNED AFTER `core_version`; \ No newline at end of file diff --git a/sql/updates/CMakeLists.txt b/sql/updates/CMakeLists.txt index 13649ebd133..dc983f8c14d 100644 --- a/sql/updates/CMakeLists.txt +++ b/sql/updates/CMakeLists.txt @@ -140,4 +140,6 @@ INSTALL(FILES 871_world.sql 884_world.sql 905_world_scripts.sql +917_world.sql +919_world.sql DESTINATION share/trinity/sql/updates) diff --git a/src/trinitycore/Master.cpp b/src/trinitycore/Master.cpp index 63c88807738..938f1753c0b 100644 --- a/src/trinitycore/Master.cpp +++ b/src/trinitycore/Master.cpp @@ -459,7 +459,7 @@ bool Master::_StartDB() clearOnlineAccounts(); ///- Insert version info into DB - WorldDatabase.PExecute("UPDATE `version` SET `core_version` = '%s'", _FULLVERSION); + WorldDatabase.PExecute("UPDATE `version` SET `core_version` = '%s', `core_rev` = '%s'", _FULLVERSION, _REVISION); sWorld.LoadDBVersion(); -- cgit v1.2.3