From 5df751a0aa3f24bba32cdc8c0dfe95201be7258b Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Tue, 15 May 2018 17:04:25 +0200 Subject: [PATCH 1/8] DB/Quest: Remove Deprecated Quests Closes #21940 --- sql/updates/world/3.3.5/2018_05_15_00_world_335.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_05_15_00_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_05_15_00_world_335.sql b/sql/updates/world/3.3.5/2018_05_15_00_world_335.sql new file mode 100644 index 0000000000..75cb960198 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_05_15_00_world_335.sql @@ -0,0 +1,5 @@ +-- +DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (4485,4486); +INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES +(1,4485,0,"","","Deprecated quest"), +(1,4486,0,"","","Deprecated quest"); From f2fed21500389d3e9144c94ba95f7f756f564dc8 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Tue, 15 May 2018 17:05:00 +0200 Subject: [PATCH 2/8] DB/Quest: Tome of Divinity (ID: 1641) Closes #21939 --- sql/updates/world/3.3.5/2018_05_15_01_world_335.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_05_15_01_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_05_15_01_world_335.sql b/sql/updates/world/3.3.5/2018_05_15_01_world_335.sql new file mode 100644 index 0000000000..3cb0398b92 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_05_15_01_world_335.sql @@ -0,0 +1,6 @@ +-- +-- Quest "Tome of Divinity (1641)" +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `SourceEntry`=1641; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(19,0,1641,0,0,14,0,2998,0,0,0,0,0,"","Quest 'Tome of Divinity (1641)' can only be taken if quest 'Tome of Divinity (2998)' is not taken"), +(19,0,1641,0,0,14,0,3681,0,0,0,0,0,"","Quest 'Tome of Divinity (1641)' can only be taken if quest 'Tome of Divinity (3681)' is not taken"); From 5a0812984a4b40ac24666226a3a814b071f1064b Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Tue, 15 May 2018 17:06:34 +0200 Subject: [PATCH 3/8] DB/Quest: The Test of Righteousness (Part 3) Closes #21938 --- .../world/3.3.5/2018_05_15_02_world_335.sql | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_05_15_02_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_05_15_02_world_335.sql b/sql/updates/world/3.3.5/2018_05_15_02_world_335.sql new file mode 100644 index 0000000000..866680f3dd --- /dev/null +++ b/sql/updates/world/3.3.5/2018_05_15_02_world_335.sql @@ -0,0 +1,28 @@ +-- +-- Jordan Stilwell +DELETE FROM `creature_text` WHERE `CreatureID`=6181; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(6181,0,0,"Let's get to work, $n!",12,0,100,1,0,0,2501,0,"Jordan Stilwell"), +(6181,1,0,"Here you are, $n.",12,0,100,1,0,0,2504,0,"Jordan Stilwell"); + +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=6181; +DELETE FROM `smart_scripts` WHERE `entryorguid`=6181 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (618100,618101) AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(6181,0,0,0,19,0,100,0,1806,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jordan Stilwell - On Quest 'The Test of Righteousness (Part 3)' Taken - Remove Npc Flag Questgiver"), +(6181,0,1,0,19,0,100,0,1806,0,0,0,53,0,6181,0,0,0,0,1,0,0,0,0,0,0,0,"Jordan Stilwell - On Quest 'The Test of Righteousness (Part 3)' Taken - Start Waypoint"), +(6181,0,2,0,19,0,100,0,1806,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jordan Stilwell - On Quest 'The Test of Righteousness (Part 3)' Taken - Say Line 0"), +(6181,0,3,0,40,0,100,0,1,6181,0,0,80,618100,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jordan Stilwell - On Waypoint 1 Reached - Run Script"), +(6181,0,4,0,40,0,100,0,2,6181,0,0,80,618101,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jordan Stilwell - On Waypoint 2 Reached - Run Script"), +(618100,9,0,0,0,0,100,0,0,0,0,0,54,23000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jordan Stilwell - On Script - Pause Waypoint"), +(618100,9,1,0,0,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.90077,"Jordan Stilwell - On Script - Set Orientation"), +(618100,9,2,0,0,0,100,0,1000,1000,0,0,17,233,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jordan Stilwell - On Script - Set Emote State 233"), +(618100,9,3,0,0,0,100,0,21000,21000,0,0,17,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jordan Stilwell - On Script - Set Emote State 0"), +(618101,9,0,0,0,0,100,0,1000,1000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,5.77704,"Jordan Stilwell - On Script - Set Orientation"), +(618101,9,1,0,0,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jordan Stilwell - On Script - Say Line 1"), +(618101,9,2,0,0,0,100,0,0,0,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Jordan Stilwell - On Script - Add Npc Flag Questgiver"); + +DELETE FROM `waypoints` WHERE `entry`=6181; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(6181,1,-5094.12,-786.116,495.226,""), +(6181,2,-5089.28,-782.95,495.279,""); From df538241aa76049c609a65150b22518eabe92de9 Mon Sep 17 00:00:00 2001 From: ZenoX92 Date: Tue, 15 May 2018 17:07:19 +0200 Subject: [PATCH 4/8] DB/Gossip: Quintis Jonespyre Closes #21937 --- sql/updates/world/3.3.5/2018_05_15_03_world_335.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_05_15_03_world_335.sql diff --git a/sql/updates/world/3.3.5/2018_05_15_03_world_335.sql b/sql/updates/world/3.3.5/2018_05_15_03_world_335.sql new file mode 100644 index 0000000000..ba503d00e4 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_05_15_03_world_335.sql @@ -0,0 +1,7 @@ +-- +-- Quintis Jonespyre --> Add Gossip Text +UPDATE `creature_template` SET `gossip_menu_id`=1922 WHERE `entry`=7879; + +DELETE FROM `gossip_menu_option` WHERE `MenuID`=1922; +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES +(1922,0,1,"I'd like to purchase more Tharlendris seeds.",4851,3,128,0,0,0,0,"",0,0); From 12acab2c6249f63ed7048031af521b4e5dac1aa3 Mon Sep 17 00:00:00 2001 From: Killyana Date: Wed, 16 May 2018 01:32:24 +0200 Subject: [PATCH 5/8] DB/Creature: Remove Wrong spawns --- sql/updates/world/3.3.5/2018_05_16_00_world.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/3.3.5/2018_05_16_00_world.sql diff --git a/sql/updates/world/3.3.5/2018_05_16_00_world.sql b/sql/updates/world/3.3.5/2018_05_16_00_world.sql new file mode 100644 index 0000000000..fc74a81d62 --- /dev/null +++ b/sql/updates/world/3.3.5/2018_05_16_00_world.sql @@ -0,0 +1,2 @@ +-- +DELETE FROM `creature` WHERE `id`=20782; From 74897818600d6bc7e2cdc38d114b537faa38d11c Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 20 May 2018 19:58:53 +0200 Subject: [PATCH 6/8] Core/DBLayer: Escape new mysql 8 keywords --- .../Implementation/CharacterDatabase.cpp | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/server/database/Database/Implementation/CharacterDatabase.cpp b/src/server/database/Database/Implementation/CharacterDatabase.cpp index ade729424c..ffcbd20eb3 100644 --- a/src/server/database/Database/Implementation/CharacterDatabase.cpp +++ b/src/server/database/Database/Implementation/CharacterDatabase.cpp @@ -104,10 +104,10 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_SEL_CHARACTER_HOMEBIND, "SELECT mapId, zoneId, posX, posY, posZ FROM character_homebind WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_SPELLCOOLDOWNS, "SELECT spell, item, time, categoryId, categoryEnd FROM character_spell_cooldown WHERE guid = ? AND time > UNIX_TIMESTAMP()", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_DECLINEDNAMES, "SELECT genitive, dative, accusative, instrumental, prepositional FROM character_declinedname WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_SEL_GUILD_MEMBER, "SELECT guildid, rank FROM guild_member WHERE guid = ?", CONNECTION_BOTH); + PrepareStatement(CHAR_SEL_GUILD_MEMBER, "SELECT guildid, `rank` FROM guild_member WHERE guid = ?", CONNECTION_BOTH); PrepareStatement(CHAR_SEL_GUILD_MEMBER_EXTENDED, "SELECT g.guildid, g.name, gr.rname, gr.rid, gm.pnote, gm.offnote " "FROM guild g JOIN guild_member gm ON g.guildid = gm.guildid " - "JOIN guild_rank gr ON g.guildid = gr.guildid AND gm.rank = gr.rid WHERE gm.guid = ?", CONNECTION_BOTH); + "JOIN guild_rank gr ON g.guildid = gr.guildid AND gm.`rank` = gr.rid WHERE gm.guid = ?", CONNECTION_BOTH); PrepareStatement(CHAR_SEL_CHARACTER_ACHIEVEMENTS, "SELECT achievement, date FROM character_achievement WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_CRITERIAPROGRESS, "SELECT criteria, counter, date FROM character_achievement_progress WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_SEL_CHARACTER_EQUIPMENTSETS, "SELECT setguid, setindex, name, iconname, ignore_mask, item0, item1, item2, item3, item4, item5, item6, item7, item8, " @@ -172,7 +172,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() // 0: string, 1: uint32 PrepareStatement(CHAR_UPD_GUILD_NAME, "UPDATE guild SET name = ? WHERE guildid = ?", CONNECTION_ASYNC); // 0: uint32, 1: uint32, 2: uint8, 4: string, 5: string - PrepareStatement(CHAR_INS_GUILD_MEMBER, "INSERT INTO guild_member (guildid, guid, rank, pnote, offnote) VALUES (?, ?, ?, ?, ?)", CONNECTION_ASYNC); + PrepareStatement(CHAR_INS_GUILD_MEMBER, "INSERT INTO guild_member (guildid, guid, `rank`, pnote, offnote) VALUES (?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_GUILD_MEMBER, "DELETE FROM guild_member WHERE guid = ?", CONNECTION_ASYNC); // 0: uint32 PrepareStatement(CHAR_DEL_GUILD_MEMBERS, "DELETE FROM guild_member WHERE guildid = ?", CONNECTION_ASYNC); // 0: uint32 // 0: uint32, 1: uint8, 3: string, 4: uint32, 5: uint32 @@ -201,7 +201,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_DEL_GUILD_EVENTLOGS, "DELETE FROM guild_eventlog WHERE guildid = ?", CONNECTION_ASYNC); // 0: uint32 PrepareStatement(CHAR_UPD_GUILD_MEMBER_PNOTE, "UPDATE guild_member SET pnote = ? WHERE guid = ?", CONNECTION_ASYNC); // 0: string, 1: uint32 PrepareStatement(CHAR_UPD_GUILD_MEMBER_OFFNOTE, "UPDATE guild_member SET offnote = ? WHERE guid = ?", CONNECTION_ASYNC); // 0: string, 1: uint32 - PrepareStatement(CHAR_UPD_GUILD_MEMBER_RANK, "UPDATE guild_member SET rank = ? WHERE guid = ?", CONNECTION_ASYNC); // 0: uint8, 1: uint32 + PrepareStatement(CHAR_UPD_GUILD_MEMBER_RANK, "UPDATE guild_member SET `rank` = ? WHERE guid = ?", CONNECTION_ASYNC); // 0: uint8, 1: uint32 PrepareStatement(CHAR_UPD_GUILD_MOTD, "UPDATE guild SET motd = ? WHERE guildid = ?", CONNECTION_ASYNC); // 0: string, 1: uint32 PrepareStatement(CHAR_UPD_GUILD_INFO, "UPDATE guild SET info = ? WHERE guildid = ?", CONNECTION_ASYNC); // 0: string, 1: uint32 PrepareStatement(CHAR_UPD_GUILD_LEADER, "UPDATE guild SET leaderguid = ? WHERE guildid = ?", CONNECTION_ASYNC); // 0: uint32, 1: uint32 @@ -311,7 +311,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_DEL_ARENA_TEAM_MEMBERS, "DELETE FROM arena_team_member WHERE arenaTeamId = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_ARENA_TEAM_CAPTAIN, "UPDATE arena_team SET captainGuid = ? WHERE arenaTeamId = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_ARENA_TEAM_MEMBER, "DELETE FROM arena_team_member WHERE arenaTeamId = ? AND guid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_UPD_ARENA_TEAM_STATS, "UPDATE arena_team SET rating = ?, weekGames = ?, weekWins = ?, seasonGames = ?, seasonWins = ?, rank = ? WHERE arenaTeamId = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_UPD_ARENA_TEAM_STATS, "UPDATE arena_team SET rating = ?, weekGames = ?, weekWins = ?, seasonGames = ?, seasonWins = ?, `rank` = ? WHERE arenaTeamId = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_ARENA_TEAM_MEMBER, "UPDATE arena_team_member SET personalRating = ?, weekGames = ?, weekWins = ?, seasonGames = ?, seasonWins = ? WHERE arenaTeamId = ? AND guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CHARACTER_ARENA_STATS, "DELETE FROM character_arena_stats WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_REP_CHARACTER_ARENA_STATS, "REPLACE INTO character_arena_stats (guid, slot, matchMakerRating) VALUES (?, ?, ?)", CONNECTION_ASYNC); @@ -388,16 +388,16 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_UPD_PETITION_NAME, "UPDATE petition SET name = ? WHERE petitionguid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_PETITION_SIGNATURE, "INSERT INTO petition_sign (ownerguid, petitionguid, playerguid, player_account) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_ACCOUNT_ONLINE, "UPDATE characters SET online = 0 WHERE account = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_INS_GROUP, "INSERT INTO groups (guid, leaderGuid, lootMethod, looterGuid, lootThreshold, icon1, icon2, icon3, icon4, icon5, icon6, icon7, icon8, groupType, difficulty, raidDifficulty, masterLooterGuid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); + PrepareStatement(CHAR_INS_GROUP, "INSERT INTO `groups` (guid, leaderGuid, lootMethod, looterGuid, lootThreshold, icon1, icon2, icon3, icon4, icon5, icon6, icon7, icon8, groupType, difficulty, raidDifficulty, masterLooterGuid) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_GROUP_MEMBER, "INSERT INTO group_member (guid, memberGuid, memberFlags, subgroup, roles) VALUES(?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_GROUP_MEMBER, "DELETE FROM group_member WHERE memberGuid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_GROUP_INSTANCE_PERM_BINDING, "DELETE FROM group_instance WHERE guid = ? AND instance = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_UPD_GROUP_LEADER, "UPDATE groups SET leaderGuid = ? WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_UPD_GROUP_TYPE, "UPDATE groups SET groupType = ? WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_UPD_GROUP_LEADER, "UPDATE `groups` SET leaderGuid = ? WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_UPD_GROUP_TYPE, "UPDATE `groups` SET groupType = ? WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_GROUP_MEMBER_SUBGROUP, "UPDATE group_member SET subgroup = ? WHERE memberGuid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_UPD_GROUP_MEMBER_FLAG, "UPDATE group_member SET memberFlags = ? WHERE memberGuid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_UPD_GROUP_DIFFICULTY, "UPDATE groups SET difficulty = ? WHERE guid = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_UPD_GROUP_RAID_DIFFICULTY, "UPDATE groups SET raiddifficulty = ? WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_UPD_GROUP_DIFFICULTY, "UPDATE `groups` SET difficulty = ? WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_UPD_GROUP_RAID_DIFFICULTY, "UPDATE `groups` SET raiddifficulty = ? WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_ALL_GM_TICKETS, "TRUNCATE TABLE gm_ticket", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_INVALID_SPELL_TALENTS, "DELETE FROM character_talent WHERE spell = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_INVALID_SPELL_SPELLS, "DELETE FROM character_spell WHERE spell = ?", CONNECTION_ASYNC); @@ -479,7 +479,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() PrepareStatement(CHAR_INS_CHAR_REPUTATION_BY_FACTION, "INSERT INTO character_reputation (guid, faction, standing, flags) VALUES (?, ?, ? , ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_ITEM_REFUND_INSTANCE, "DELETE FROM item_refund_instance WHERE item_guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_ITEM_REFUND_INSTANCE, "INSERT INTO item_refund_instance (item_guid, player_guid, paidMoney, paidExtendedCost) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); - PrepareStatement(CHAR_DEL_GROUP, "DELETE FROM groups WHERE guid = ?", CONNECTION_ASYNC); + PrepareStatement(CHAR_DEL_GROUP, "DELETE FROM `groups` WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_GROUP_MEMBER_ALL, "DELETE FROM group_member WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(CHAR_INS_CHAR_GIFT, "INSERT INTO character_gifts (guid, item_guid, entry, flags) VALUES (?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_INSTANCE_BY_INSTANCE, "DELETE FROM instance WHERE id = ?", CONNECTION_ASYNC); @@ -594,7 +594,7 @@ void CharacterDatabaseConnection::DoPrepareStatements() // Calendar PrepareStatement(CHAR_REP_CALENDAR_EVENT, "REPLACE INTO calendar_events (id, creator, title, description, type, dungeon, eventtime, flags, time2) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CALENDAR_EVENT, "DELETE FROM calendar_events WHERE id = ?", CONNECTION_ASYNC); - PrepareStatement(CHAR_REP_CALENDAR_INVITE, "REPLACE INTO calendar_invites (id, event, invitee, sender, status, statustime, rank, text) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); + PrepareStatement(CHAR_REP_CALENDAR_INVITE, "REPLACE INTO calendar_invites (id, event, invitee, sender, status, statustime, `rank`, text) VALUES (?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC); PrepareStatement(CHAR_DEL_CALENDAR_INVITE, "DELETE FROM calendar_invites WHERE id = ?", CONNECTION_ASYNC); // Pet From 001837092dab387335331986b6de956bf0f5ce99 Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 20 May 2018 20:05:01 +0200 Subject: [PATCH 7/8] rename files --- ...018_05_20_00_world_from_335_was_2018_05_15_00_world_335.sql} | 2 ++ ...018_05_20_01_world_from_335_was_2018_05_15_01_world_335.sql} | 2 ++ ...018_05_20_02_world_from_335_was_2018_05_15_02_world_335.sql} | 2 ++ ...018_05_20_03_world_from_335_was_2018_05_15_03_world_335.sql} | 2 ++ .../2018_05_20_04_world_from_335_was_2018_05_16_00_world.sql} | 0 5 files changed, 8 insertions(+) rename sql/updates/world/{3.3.5/2018_05_15_00_world_335.sql => 4.3.4/2018_05_20_00_world_from_335_was_2018_05_15_00_world_335.sql} (97%) rename sql/updates/world/{3.3.5/2018_05_15_01_world_335.sql => 4.3.4/2018_05_20_01_world_from_335_was_2018_05_15_01_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_05_15_02_world_335.sql => 4.3.4/2018_05_20_02_world_from_335_was_2018_05_15_02_world_335.sql} (99%) rename sql/updates/world/{3.3.5/2018_05_15_03_world_335.sql => 4.3.4/2018_05_20_03_world_from_335_was_2018_05_15_03_world_335.sql} (98%) rename sql/updates/world/{3.3.5/2018_05_16_00_world.sql => 4.3.4/2018_05_20_04_world_from_335_was_2018_05_16_00_world.sql} (100%) diff --git a/sql/updates/world/3.3.5/2018_05_15_00_world_335.sql b/sql/updates/world/4.3.4/2018_05_20_00_world_from_335_was_2018_05_15_00_world_335.sql similarity index 97% rename from sql/updates/world/3.3.5/2018_05_15_00_world_335.sql rename to sql/updates/world/4.3.4/2018_05_20_00_world_from_335_was_2018_05_15_00_world_335.sql index 75cb960198..e47d5747d5 100644 --- a/sql/updates/world/3.3.5/2018_05_15_00_world_335.sql +++ b/sql/updates/world/4.3.4/2018_05_20_00_world_from_335_was_2018_05_15_00_world_335.sql @@ -1,5 +1,7 @@ +/* -- DELETE FROM `disables` WHERE `sourceType`=1 AND `entry` IN (4485,4486); INSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES (1,4485,0,"","","Deprecated quest"), (1,4486,0,"","","Deprecated quest"); +*/ diff --git a/sql/updates/world/3.3.5/2018_05_15_01_world_335.sql b/sql/updates/world/4.3.4/2018_05_20_01_world_from_335_was_2018_05_15_01_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_05_15_01_world_335.sql rename to sql/updates/world/4.3.4/2018_05_20_01_world_from_335_was_2018_05_15_01_world_335.sql index 3cb0398b92..ba5dcd21fb 100644 --- a/sql/updates/world/3.3.5/2018_05_15_01_world_335.sql +++ b/sql/updates/world/4.3.4/2018_05_20_01_world_from_335_was_2018_05_15_01_world_335.sql @@ -1,6 +1,8 @@ +/* -- -- Quest "Tome of Divinity (1641)" DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=19 AND `SourceEntry`=1641; INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES (19,0,1641,0,0,14,0,2998,0,0,0,0,0,"","Quest 'Tome of Divinity (1641)' can only be taken if quest 'Tome of Divinity (2998)' is not taken"), (19,0,1641,0,0,14,0,3681,0,0,0,0,0,"","Quest 'Tome of Divinity (1641)' can only be taken if quest 'Tome of Divinity (3681)' is not taken"); +*/ diff --git a/sql/updates/world/3.3.5/2018_05_15_02_world_335.sql b/sql/updates/world/4.3.4/2018_05_20_02_world_from_335_was_2018_05_15_02_world_335.sql similarity index 99% rename from sql/updates/world/3.3.5/2018_05_15_02_world_335.sql rename to sql/updates/world/4.3.4/2018_05_20_02_world_from_335_was_2018_05_15_02_world_335.sql index 866680f3dd..f4774c6da8 100644 --- a/sql/updates/world/3.3.5/2018_05_15_02_world_335.sql +++ b/sql/updates/world/4.3.4/2018_05_20_02_world_from_335_was_2018_05_15_02_world_335.sql @@ -1,3 +1,4 @@ +/* -- -- Jordan Stilwell DELETE FROM `creature_text` WHERE `CreatureID`=6181; @@ -26,3 +27,4 @@ DELETE FROM `waypoints` WHERE `entry`=6181; INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES (6181,1,-5094.12,-786.116,495.226,""), (6181,2,-5089.28,-782.95,495.279,""); +*/ diff --git a/sql/updates/world/3.3.5/2018_05_15_03_world_335.sql b/sql/updates/world/4.3.4/2018_05_20_03_world_from_335_was_2018_05_15_03_world_335.sql similarity index 98% rename from sql/updates/world/3.3.5/2018_05_15_03_world_335.sql rename to sql/updates/world/4.3.4/2018_05_20_03_world_from_335_was_2018_05_15_03_world_335.sql index ba503d00e4..fe72291528 100644 --- a/sql/updates/world/3.3.5/2018_05_15_03_world_335.sql +++ b/sql/updates/world/4.3.4/2018_05_20_03_world_from_335_was_2018_05_15_03_world_335.sql @@ -1,3 +1,4 @@ +/* -- -- Quintis Jonespyre --> Add Gossip Text UPDATE `creature_template` SET `gossip_menu_id`=1922 WHERE `entry`=7879; @@ -5,3 +6,4 @@ UPDATE `creature_template` SET `gossip_menu_id`=1922 WHERE `entry`=7879; DELETE FROM `gossip_menu_option` WHERE `MenuID`=1922; INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, `BoxBroadcastTextID`, `VerifiedBuild`) VALUES (1922,0,1,"I'd like to purchase more Tharlendris seeds.",4851,3,128,0,0,0,0,"",0,0); +*/ diff --git a/sql/updates/world/3.3.5/2018_05_16_00_world.sql b/sql/updates/world/4.3.4/2018_05_20_04_world_from_335_was_2018_05_16_00_world.sql similarity index 100% rename from sql/updates/world/3.3.5/2018_05_16_00_world.sql rename to sql/updates/world/4.3.4/2018_05_20_04_world_from_335_was_2018_05_16_00_world.sql From f8ac80d4b640468abf003bcc6fe6781bf127bfcb Mon Sep 17 00:00:00 2001 From: Aokromes Date: Sun, 20 May 2018 23:28:18 +0200 Subject: [PATCH 8/8] Core/DBLayer: Escape more keywords --- .../database/Database/Implementation/WorldDatabase.cpp | 2 +- src/server/game/Calendar/CalendarMgr.cpp | 4 ++-- src/server/game/Globals/ObjectMgr.cpp | 6 +++--- src/server/game/Guilds/GuildMgr.cpp | 4 ++-- src/server/game/Spells/SpellMgr.cpp | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/server/database/Database/Implementation/WorldDatabase.cpp b/src/server/database/Database/Implementation/WorldDatabase.cpp index 2d41ffd015..e81f6d2307 100644 --- a/src/server/database/Database/Implementation/WorldDatabase.cpp +++ b/src/server/database/Database/Implementation/WorldDatabase.cpp @@ -77,7 +77,7 @@ void WorldDatabaseConnection::DoPrepareStatements() PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPT_ID_BY_GUID, "SELECT id FROM waypoint_scripts WHERE guid = ?", CONNECTION_SYNCH); PrepareStatement(WORLD_DEL_CREATURE, "DELETE FROM creature WHERE guid = ?", CONNECTION_ASYNC); PrepareStatement(WORLD_SEL_COMMANDS, "SELECT name, permission, help FROM command", CONNECTION_SYNCH); - PrepareStatement(WORLD_SEL_CREATURE_TEMPLATE, "SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, femaleName, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, exp_unk, faction, npcflag, speed_walk, speed_run, scale, rank, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, 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, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, HoverHeight, HealthModifier, HealthModifierExtra, ManaModifier, ManaModifierExtra, ArmorModifier, DamageModifier, ExperienceModifier, RacialLeader, movementId, RegenHealth, mechanic_immune_mask, spell_school_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = ?", CONNECTION_SYNCH); + PrepareStatement(WORLD_SEL_CREATURE_TEMPLATE, "SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, modelid4, name, femaleName, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, exp_unk, faction, npcflag, speed_walk, speed_run, scale, `rank`, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, 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, PetSpellDataId, VehicleId, mingold, maxgold, AIName, MovementType, InhabitType, HoverHeight, HealthModifier, HealthModifierExtra, ManaModifier, ManaModifierExtra, ArmorModifier, DamageModifier, ExperienceModifier, RacialLeader, movementId, RegenHealth, mechanic_immune_mask, spell_school_immune_mask, flags_extra, ScriptName FROM creature_template WHERE entry = ?", CONNECTION_SYNCH); PrepareStatement(WORLD_SEL_WAYPOINT_SCRIPT_BY_ID, "SELECT guid, delay, command, datalong, datalong2, dataint, x, y, z, o FROM waypoint_scripts WHERE id = ?", CONNECTION_SYNCH); PrepareStatement(WORLD_SEL_ITEM_TEMPLATE_BY_NAME, "SELECT entry FROM item_template WHERE name = ?", CONNECTION_SYNCH); PrepareStatement(WORLD_SEL_CREATURE_BY_ID, "SELECT guid FROM creature WHERE id = ?", CONNECTION_SYNCH); diff --git a/src/server/game/Calendar/CalendarMgr.cpp b/src/server/game/Calendar/CalendarMgr.cpp index d34b7c87e3..a744084261 100644 --- a/src/server/game/Calendar/CalendarMgr.cpp +++ b/src/server/game/Calendar/CalendarMgr.cpp @@ -96,8 +96,8 @@ void CalendarMgr::LoadFromDB() count = 0; oldMSTime = getMSTime(); - // 0 1 2 3 4 5 6 7 - if (QueryResult result = CharacterDatabase.Query("SELECT id, event, invitee, sender, status, statustime, rank, text FROM calendar_invites")) + // 0 1 2 3 4 5 6 7 + if (QueryResult result = CharacterDatabase.Query("SELECT id, event, invitee, sender, status, statustime, `rank`, text FROM calendar_invites")) do { Field* fields = result->Fetch(); diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index cb5484b961..673647a3d3 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -431,8 +431,8 @@ void ObjectMgr::LoadCreatureTemplates() QueryResult result = WorldDatabase.Query("SELECT entry, difficulty_entry_1, difficulty_entry_2, difficulty_entry_3, KillCredit1, KillCredit2, modelid1, modelid2, modelid3, " // 9 10 11 12 13 14 15 16 17 18 19 20 21 22 "modelid4, name, femaleName, subname, IconName, gossip_menu_id, minlevel, maxlevel, exp, exp_unk, faction, npcflag, speed_walk, speed_run, " - // 23 24 25 26 27 28 29 30 31 32 - "scale, rank, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, " + // 23 24 25 26 27 28 29 30 31 32 + "scale, `rank`, dmgschool, BaseAttackTime, RangeAttackTime, BaseVariance, RangeVariance, unit_class, unit_flags, unit_flags2, " // 33 34 35 36 37 38 "dynamicflags, family, trainer_type, trainer_class, trainer_race, type, " // 39 40 41 42 43 44 45 46 47 48 49 @@ -3450,7 +3450,7 @@ void ObjectMgr::LoadPlayerInfo() { uint32 oldMSTime = getMSTime(); - QueryResult result = WorldDatabase.PQuery("SELECT raceMask, classMask, skill, rank FROM playercreateinfo_skills"); + QueryResult result = WorldDatabase.PQuery("SELECT raceMask, classMask, skill, `rank` FROM playercreateinfo_skills"); if (!result) { diff --git a/src/server/game/Guilds/GuildMgr.cpp b/src/server/game/Guilds/GuildMgr.cpp index 2315dd893e..4ee5f4cf4f 100644 --- a/src/server/game/Guilds/GuildMgr.cpp +++ b/src/server/game/Guilds/GuildMgr.cpp @@ -208,8 +208,8 @@ void GuildMgr::LoadGuilds() CharacterDatabase.DirectExecute("DELETE gm FROM guild_member gm LEFT JOIN guild g ON gm.guildId = g.guildId WHERE g.guildId IS NULL"); CharacterDatabase.DirectExecute("DELETE gm FROM guild_member_withdraw gm LEFT JOIN guild_member g ON gm.guid = g.guid WHERE g.guid IS NULL"); - // 0 1 2 3 4 5 6 7 8 9 10 - QueryResult result = CharacterDatabase.Query("SELECT gm.guildid, gm.guid, rank, pnote, offnote, w.tab0, w.tab1, w.tab2, w.tab3, w.tab4, w.tab5, " + // 0 1 2 3 4 5 6 7 8 9 10 + QueryResult result = CharacterDatabase.Query("SELECT gm.guildid, gm.guid, `rank`, pnote, offnote, w.tab0, w.tab1, w.tab2, w.tab3, w.tab4, w.tab5, " // 11 12 13 14 15 16 17 18 19 "w.tab6, w.tab7, w.money, c.name, c.level, c.class, c.zone, c.account, c.logout_time " "FROM guild_member gm " diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index a143cfa579..4b6372acc3 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -861,7 +861,7 @@ void SpellMgr::LoadSpellRanks() uint32 oldMSTime = getMSTime(); // 0 1 2 - QueryResult result = WorldDatabase.Query("SELECT first_spell_id, spell_id, rank from spell_ranks ORDER BY first_spell_id, rank"); + QueryResult result = WorldDatabase.Query("SELECT first_spell_id, spell_id, `rank` from spell_ranks ORDER BY first_spell_id, rank"); if (!result) {