diff options
author | Yehonal <yehonal.azeroth@gmail.com> | 2016-09-24 14:47:29 +0200 |
---|---|---|
committer | Yehonal <yehonal.azeroth@gmail.com> | 2016-09-24 14:47:29 +0200 |
commit | aaffa82040f2c051a7fe6295271fdbd0f3f9aab5 (patch) | |
tree | 007475ad121d4be294152c25b75507b3f50b7f8a | |
parent | b5d6eab68f8df927497012ea2cb0fc08ec27a730 (diff) | |
parent | 431704c7e2cf6fd351fcc9e25facae97fe7f6d67 (diff) |
Merge branch 'master' of https://github.com/azerothcore/azerothcore-wotlk
-rw-r--r-- | data/sql/updates/pending_db_world/rev_1473583129228647885.sql | 178 | ||||
-rw-r--r-- | src/game/Battlegrounds/BattlegroundMgr.cpp | 2 | ||||
-rw-r--r-- | src/game/DungeonFinding/LFGMgr.cpp | 7 | ||||
-rw-r--r-- | src/game/Globals/ObjectMgr.cpp | 64 | ||||
-rw-r--r-- | src/game/Spells/SpellMgr.cpp | 33 |
5 files changed, 233 insertions, 51 deletions
diff --git a/data/sql/updates/pending_db_world/rev_1473583129228647885.sql b/data/sql/updates/pending_db_world/rev_1473583129228647885.sql new file mode 100644 index 0000000000..45a25f2166 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1473583129228647885.sql @@ -0,0 +1,178 @@ +INSERT INTO version_db_world(`sql_rev`) VALUES ('1473583129228647885'); + +-- areatrigger_teleport +ALTER TABLE `areatrigger_teleport` +CHANGE `id` `ID` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `name` `Name` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL; + +-- battleground_template +ALTER TABLE `battleground_template` +CHANGE `id` `ID` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0'; + +-- creature_equip_template +ALTER TABLE `creature_equip_template` +CHANGE `entry` `CreatureID` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `id` `ID` TINYINT(3) UNSIGNED NOT NULL DEFAULT '1', +CHANGE `itemEntry1` `ItemID1` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `itemEntry2` `ItemID2` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `itemEntry3` `ItemID3` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0'; + +-- creature_formations +ALTER TABLE `creature_formations` +CHANGE `leaderGUID` `leaderGUID` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `memberGUID` `memberGUID` INT(10) UNSIGNED NOT NULL DEFAULT '0'; + +-- creature_model_info +ALTER TABLE `creature_model_info` +CHANGE `modelid` `DisplayID` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `bounding_radius` `BoundingRadius` FLOAT NOT NULL DEFAULT '0', +CHANGE `combat_reach` `CombatReach` FLOAT NOT NULL DEFAULT '0', +CHANGE `gender` `Gender` TINYINT(3) UNSIGNED NOT NULL DEFAULT '2', +CHANGE `modelid_other_gender` `DisplayID_Other_Gender` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0'; + +-- gameobject_template +ALTER TABLE `gameobject_template` +CHANGE `data0` `Data0` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data1` `Data1` INT(11) NOT NULL DEFAULT '0', +CHANGE `data2` `Data2` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data3` `Data3` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data4` `Data4` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data5` `Data5` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data6` `Data6` INT(11) NOT NULL DEFAULT '0', +CHANGE `data7` `Data7` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data8` `Data8` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data9` `Data9` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data10` `Data10` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data11` `Data11` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data12` `Data12` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data13` `Data13` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data14` `Data14` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data15` `Data15` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data16` `Data16` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data17` `Data17` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data18` `Data18` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data19` `Data19` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data20` `Data20` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data21` `Data21` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data22` `Data22` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data23` `Data23` INT(10) UNSIGNED NOT NULL DEFAULT '0'; + +-- lfg_entrances -> lfg_dungeon_template +RENAME TABLE `lfg_entrances` TO `lfg_dungeon_template`; + +-- npc_text +ALTER TABLE `npc_text` +CHANGE `prob0` `Probability0` FLOAT NOT NULL DEFAULT '0', +CHANGE `prob1` `Probability1` FLOAT NOT NULL DEFAULT '0', +CHANGE `prob2` `Probability2` FLOAT NOT NULL DEFAULT '0', +CHANGE `prob3` `Probability3` FLOAT NOT NULL DEFAULT '0', +CHANGE `prob4` `Probability4` FLOAT NOT NULL DEFAULT '0', +CHANGE `prob5` `Probability5` FLOAT NOT NULL DEFAULT '0', +CHANGE `prob6` `Probability6` FLOAT NOT NULL DEFAULT '0', +CHANGE `prob7` `Probability7` FLOAT NOT NULL DEFAULT '0'; + +-- npc_trainer +ALTER TABLE `npc_trainer` +CHANGE `entry` `ID` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `spell` `SpellID` MEDIUMINT(8) NOT NULL DEFAULT '0', +CHANGE `spellcost` `MoneyCost` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `reqskill` `ReqSkillLine` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `reqskillvalue` `ReqSkillRank` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `reqlevel` `ReqLevel` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0'; + +-- page_text +ALTER TABLE `page_text` +CHANGE `entry` `ID` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `text` `Text` LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, +CHANGE `next_page` `NextPageID` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `VerifiedBuild` `VerifiedBuild` SMALLINT(5) NULL DEFAULT '0'; + +-- player_xp_for_level +ALTER TABLE `player_xp_for_level` +CHANGE `lvl` `Level` TINYINT(3) UNSIGNED NOT NULL, +CHANGE `xp_for_next_level` `Experience` INT(10) UNSIGNED NOT NULL; + +-- points_of_interest +ALTER TABLE `points_of_interest` +CHANGE `entry` `ID` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `x` `PositionX` FLOAT NOT NULL DEFAULT '0', +CHANGE `y` `PositionY` FLOAT NOT NULL DEFAULT '0', +CHANGE `icon` `Icon` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `flags` `Flags` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `data` `Data` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `icon_name` `Name` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; + +-- quest_poi +ALTER TABLE `quest_poi` +CHANGE `questId` `QuestID` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `objIndex` `ObjectiveIndex` INT(11) NOT NULL DEFAULT '0', +CHANGE `mapid` `MapID` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `FloorId` `Floor` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `unk3` `Priority` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `unk4` `Flags` INT(10) UNSIGNED NOT NULL DEFAULT '0'; + +-- quest_poi_points +ALTER TABLE `quest_poi_points` +CHANGE `questId` `QuestID` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `id` `Idx1` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `idx` `Idx2` INT(10) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `x` `X` INT(11) NOT NULL DEFAULT '0', +CHANGE `y` `Y` INT(11) NOT NULL DEFAULT '0'; + +-- quest_template +ALTER TABLE `quest_template` +CHANGE `Id` `ID` mediumint(8) unsigned NOT NULL DEFAULT '0', +CHANGE `Level` `QuestLevel` smallint(3) NOT NULL DEFAULT '1', +CHANGE `ZoneOrSort` `QuestSortID` smallint(6) NOT NULL DEFAULT '0', +CHANGE `Type` `QuestType` smallint(5) unsigned NOT NULL DEFAULT '0', +CHANGE `SuggestedPlayers` `SuggestedGroupNum` tinyint(3) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardTitleId` `RewardTitle` tinyint(3) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardItemId1` `RewardItem1` mediumint(8) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardItemId2` `RewardItem2` mediumint(8) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardItemId3` `RewardItem3` mediumint(8) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardItemId4` `RewardItem4` mediumint(8) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardItemCount1` `RewardAmount1` smallint(5) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardItemCount2` `RewardAmount2` smallint(5) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardItemCount3` `RewardAmount3` smallint(5) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardItemCount4` `RewardAmount4` smallint(5) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardChoiceItemId1` `RewardChoiceItemID1` mediumint(8) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardChoiceItemId2` `RewardChoiceItemID2` mediumint(8) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardChoiceItemId3` `RewardChoiceItemID3` mediumint(8) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardChoiceItemId4` `RewardChoiceItemID4` mediumint(8) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardChoiceItemId5` `RewardChoiceItemID5` mediumint(8) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardChoiceItemId6` `RewardChoiceItemID6` mediumint(8) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardChoiceItemCount1` `RewardChoiceItemQuantity1` smallint(5) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardChoiceItemCount2` `RewardChoiceItemQuantity2` smallint(5) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardChoiceItemCount3` `RewardChoiceItemQuantity3` smallint(5) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardChoiceItemCount4` `RewardChoiceItemQuantity4` smallint(5) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardChoiceItemCount5` `RewardChoiceItemQuantity5` smallint(5) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardChoiceItemCount6` `RewardChoiceItemQuantity6` smallint(5) unsigned NOT NULL DEFAULT '0', +CHANGE `RewardFactionId1` `RewardFactionID1` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'faction id from Faction.dbc in this case', +CHANGE `RewardFactionId2` `RewardFactionID2` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'faction id from Faction.dbc in this case', +CHANGE `RewardFactionId3` `RewardFactionID3` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'faction id from Faction.dbc in this case', +CHANGE `RewardFactionId4` `RewardFactionID4` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'faction id from Faction.dbc in this case', +CHANGE `RewardFactionId5` `RewardFactionID5` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'faction id from Faction.dbc in this case', +CHANGE `RewardFactionValueId1` `RewardFactionValue1` mediumint(8) NOT NULL DEFAULT '0', +CHANGE `RewardFactionValueId2` `RewardFactionValue2` mediumint(8) NOT NULL DEFAULT '0', +CHANGE `RewardFactionValueId3` `RewardFactionValue3` mediumint(8) NOT NULL DEFAULT '0', +CHANGE `RewardFactionValueId4` `RewardFactionValue4` mediumint(8) NOT NULL DEFAULT '0', +CHANGE `RewardFactionValueId5` `RewardFactionValue5` mediumint(8) NOT NULL DEFAULT '0', +CHANGE `RewardFactionValueIdOverride1` `RewardFactionOverride1` mediumint(8) NOT NULL DEFAULT '0', +CHANGE `RewardFactionValueIdOverride2` `RewardFactionOverride2` mediumint(8) NOT NULL DEFAULT '0', +CHANGE `RewardFactionValueIdOverride3` `RewardFactionOverride3` mediumint(8) NOT NULL DEFAULT '0', +CHANGE `RewardFactionValueIdOverride4` `RewardFactionOverride4` mediumint(8) NOT NULL DEFAULT '0', +CHANGE `RewardFactionValueIdOverride5` `RewardFactionOverride5` mediumint(8) NOT NULL DEFAULT '0', +CHANGE `Title` `LogTitle` text, +CHANGE `Objectives` `LogDescription` text, +CHANGE `Details` `QuestDescription` text, +CHANGE `CompletedText` `QuestCompletionLog` text; + +-- spell_target_position +ALTER TABLE `spell_target_position` +CHANGE `id` `ID` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Identifier', +CHANGE `effIndex` `EffectIndex` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `target_map` `MapID` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', +CHANGE `target_position_x` `PositionX` FLOAT NOT NULL DEFAULT '0', +CHANGE `target_position_y` `PositionY` FLOAT NOT NULL DEFAULT '0', +CHANGE `target_position_z` `PositionZ` FLOAT NOT NULL DEFAULT '0', +CHANGE `target_orientation` `Orientation` FLOAT NOT NULL DEFAULT '0'; diff --git a/src/game/Battlegrounds/BattlegroundMgr.cpp b/src/game/Battlegrounds/BattlegroundMgr.cpp index f513cfd9ac..26928303d9 100644 --- a/src/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/game/Battlegrounds/BattlegroundMgr.cpp @@ -571,7 +571,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds() { uint32 oldMSTime = getMSTime(); // 0 1 2 3 4 5 6 7 8 9 10 11 - QueryResult result = WorldDatabase.Query("SELECT id, MinPlayersPerTeam, MaxPlayersPerTeam, MinLvl, MaxLvl, AllianceStartLoc, AllianceStartO, HordeStartLoc, HordeStartO, StartMaxDist, Weight, ScriptName FROM battleground_template"); + QueryResult result = WorldDatabase.Query("SELECT ID, MinPlayersPerTeam, MaxPlayersPerTeam, MinLvl, MaxLvl, AllianceStartLoc, AllianceStartO, HordeStartLoc, HordeStartO, StartMaxDist, Weight, ScriptName FROM battleground_template"); if (!result) { diff --git a/src/game/DungeonFinding/LFGMgr.cpp b/src/game/DungeonFinding/LFGMgr.cpp index 034fc91825..497eeeee7c 100644 --- a/src/game/DungeonFinding/LFGMgr.cpp +++ b/src/game/DungeonFinding/LFGMgr.cpp @@ -182,11 +182,12 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */) } // Fill teleport locations from DB - QueryResult result = WorldDatabase.Query("SELECT dungeonId, position_x, position_y, position_z, orientation FROM lfg_entrances"); + // 0 1 2 3 4 + QueryResult result = WorldDatabase.Query("SELECT dungeonId, position_x, position_y, position_z, orientation FROM lfg_dungeon_template"); if (!result) { - sLog->outError(">> Loaded 0 lfg entrance positions. DB table `lfg_entrances` is empty!"); + sLog->outError(">> Loaded 0 lfg entrance positions. DB table `lfg_dungeon_template` is empty!"); return; } @@ -199,7 +200,7 @@ void LFGMgr::LoadLFGDungeons(bool reload /* = false */) LFGDungeonContainer::iterator dungeonItr = LfgDungeonStore.find(dungeonId); if (dungeonItr == LfgDungeonStore.end()) { - sLog->outError("table `lfg_entrances` contains coordinates for wrong dungeon %u", dungeonId); + sLog->outError("table `lfg_dungeon_template` contains coordinates for wrong dungeon %u", dungeonId); continue; } diff --git a/src/game/Globals/ObjectMgr.cpp b/src/game/Globals/ObjectMgr.cpp index ec5ec59271..92de260af6 100644 --- a/src/game/Globals/ObjectMgr.cpp +++ b/src/game/Globals/ObjectMgr.cpp @@ -1132,8 +1132,8 @@ void ObjectMgr::LoadEquipmentTemplates() { uint32 oldMSTime = getMSTime(); - // 0 1 2 3 4 - QueryResult result = WorldDatabase.Query("SELECT entry, id, itemEntry1, itemEntry2, itemEntry3 FROM creature_equip_template"); + // 0 1 2 3 4 + QueryResult result = WorldDatabase.Query("SELECT CreatureID, ID, ItemID1, ItemID2, ItemID3 FROM creature_equip_template"); if (!result) { @@ -1271,7 +1271,8 @@ void ObjectMgr::LoadCreatureModelInfo() { uint32 oldMSTime = getMSTime(); - QueryResult result = WorldDatabase.Query("SELECT modelid, bounding_radius, combat_reach, gender, modelid_other_gender FROM creature_model_info"); + // 0 1 2 3 4 + QueryResult result = WorldDatabase.Query("SELECT DisplayID, BoundingRadius, CombatReach, Gender, DisplayID_Other_Gender FROM creature_model_info"); if (!result) { @@ -3687,7 +3688,7 @@ void ObjectMgr::LoadPlayerInfo() _playerXPperLevel[level] = 0; // 0 1 - QueryResult result = WorldDatabase.Query("SELECT lvl, xp_for_next_level FROM player_xp_for_level"); + QueryResult result = WorldDatabase.Query("SELECT Level, Experience FROM player_xp_for_level"); if (!result) { @@ -3853,26 +3854,26 @@ void ObjectMgr::LoadQuests() mExclusiveQuestGroups.clear(); QueryResult result = WorldDatabase.Query("SELECT " - //0 1 2 3 4 5 6 7 8 9 10 11 12 - "Id, Method, Level, MinLevel, MaxLevel, ZoneOrSort, Type, SuggestedPlayers, LimitTime, RequiredClasses, RequiredRaces, RequiredSkillId, RequiredSkillPoints, " + //0 1 2 3 4 5 6 7 8 9 10 11 12 + "ID, Method, QuestLevel, MinLevel, MaxLevel, QuestSortID, QuestType, SuggestedGroupNum, LimitTime, RequiredClasses, RequiredRaces, RequiredSkillId, RequiredSkillPoints, " // 13 14 15 16 17 18 19 20 "RequiredFactionId1, RequiredFactionId2, RequiredFactionValue1, RequiredFactionValue2, RequiredMinRepFaction, RequiredMaxRepFaction, RequiredMinRepValue, RequiredMaxRepValue, " // 21 22 23 24 25 26 27 28 29 30 31 "PrevQuestId, NextQuestId, ExclusiveGroup, NextQuestIdChain, RewardXPId, RewardOrRequiredMoney, RewardMoneyMaxLevel, RewardSpell, RewardSpellCast, RewardHonor, RewardHonorMultiplier, " // 32 33 34 35 36 37 38 39 40 41 42 - "RewardMailTemplateId, RewardMailDelay, SourceItemId, SourceItemCount, SourceSpellId, Flags, SpecialFlags, RewardTitleId, RequiredPlayerKills, RewardTalents, RewardArenaPoints, " - // 43 44 45 46 47 48 49 50 - "RewardItemId1, RewardItemId2, RewardItemId3, RewardItemId4, RewardItemCount1, RewardItemCount2, RewardItemCount3, RewardItemCount4, " - // 51 52 53 54 55 56 57 58 59 60 61 62 - "RewardChoiceItemId1, RewardChoiceItemId2, RewardChoiceItemId3, RewardChoiceItemId4, RewardChoiceItemId5, RewardChoiceItemId6, RewardChoiceItemCount1, RewardChoiceItemCount2, RewardChoiceItemCount3, RewardChoiceItemCount4, RewardChoiceItemCount5, RewardChoiceItemCount6, " - // 63 64 65 66 67 68 69 70 71 72 - "RewardFactionId1, RewardFactionId2, RewardFactionId3, RewardFactionId4, RewardFactionId5, RewardFactionValueId1, RewardFactionValueId2, RewardFactionValueId3, RewardFactionValueId4, RewardFactionValueId5, " + "RewardMailTemplateId, RewardMailDelay, SourceItemId, SourceItemCount, SourceSpellId, Flags, SpecialFlags, RewardTitle, RequiredPlayerKills, RewardTalents, RewardArenaPoints, " + // 43 44 45 46 47 48 49 50 + "RewardItem1, RewardItem2, RewardItem3, RewardItem4, RewardAmount1, RewardAmount2, RewardAmount3, RewardAmount4, " + // 51 52 53 54 55 56 57 58 59 60 61 62 + "RewardChoiceItemID1, RewardChoiceItemID2, RewardChoiceItemID3, RewardChoiceItemID4, RewardChoiceItemID5, RewardChoiceItemID6, RewardChoiceItemQuantity1, RewardChoiceItemQuantity2, RewardChoiceItemQuantity3, RewardChoiceItemQuantity4, RewardChoiceItemQuantity5, RewardChoiceItemQuantity6, " + // 63 64 65 66 67 68 69 70 71 72 + "RewardFactionID1, RewardFactionID2, RewardFactionID3, RewardFactionID4, RewardFactionID5, RewardFactionValue1, RewardFactionValue2, RewardFactionValue3, RewardFactionValue4, RewardFactionValue5, " // 73 74 75 76 77 - "RewardFactionValueIdOverride1, RewardFactionValueIdOverride2, RewardFactionValueIdOverride3, RewardFactionValueIdOverride4, RewardFactionValueIdOverride5, " + "RewardFactionOverride1, RewardFactionOverride2, RewardFactionOverride3, RewardFactionOverride4, RewardFactionOverride5, " // 78 79 80 81 "PointMapId, PointX, PointY, PointOption, " - // 82 83 84 85 86 87 88 - "Title, Objectives, Details, EndText, OfferRewardText, RequestItemsText, CompletedText, " + // 82 83 84 85 86 87 88 + "LogTitle, LogDescription, QuestDescription, EndText, OfferRewardText, RequestItemsText, QuestCompletionLog, " // 89 90 91 92 93 94 95 96 "RequiredNpcOrGo1, RequiredNpcOrGo2, RequiredNpcOrGo3, RequiredNpcOrGo4, RequiredNpcOrGoCount1, RequiredNpcOrGoCount2, RequiredNpcOrGoCount3, RequiredNpcOrGoCount4, " // 97 98 99 100 101 102 103 104 @@ -5103,8 +5104,8 @@ void ObjectMgr::LoadPageTexts() { uint32 oldMSTime = getMSTime(); - // 0 1 2 - QueryResult result = WorldDatabase.Query("SELECT entry, text, next_page FROM page_text"); + // 0 1 2 + QueryResult result = WorldDatabase.Query("SELECT ID, Text, NextPageID FROM page_text"); if (!result) { @@ -6073,8 +6074,9 @@ void ObjectMgr::LoadAreaTriggerTeleports() _areaTriggerStore.clear(); // need for reload case - // 0 1 2 3 4 5 - QueryResult result = WorldDatabase.Query("SELECT id, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM areatrigger_teleport"); + // 0 1 2 3 4 5 + QueryResult result = WorldDatabase.Query("SELECT ID, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM areatrigger_teleport"); + if (!result) { sLog->outString(">> Loaded 0 area trigger teleport definitions. DB table `areatrigger_teleport` is empty."); @@ -6528,9 +6530,9 @@ void ObjectMgr::LoadGameObjectTemplate() // 0 1 2 3 4 5 6 7 8 9 10 11 12 QueryResult result = WorldDatabase.Query("SELECT entry, type, displayId, name, IconName, castBarCaption, unk1, faction, flags, size, questItem1, questItem2, questItem3, " // 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 - "questItem4, questItem5, questItem6, data0, data1, data2, data3, data4, data5, data6, data7, data8, data9, data10, data11, data12, " + "questItem4, questItem5, questItem6, Data0, Data1, Data2, Data3, Data4, Data5, Data6, Data7, Data8, Data9, Data10, Data11, Data12, " // 29 30 31 32 33 34 35 36 37 38 39 40 41 - "data13, data14, data15, data16, data17, data18, data19, data20, data21, data22, data23, AIName, ScriptName " + "Data13, Data14, Data15, Data16, Data17, Data18, Data19, Data20, Data21, Data22, Data23, AIName, ScriptName " "FROM gameobject_template"); if (!result) @@ -7147,8 +7149,8 @@ void ObjectMgr::LoadPointsOfInterest() uint32 count = 0; - // 0 1 2 3 4 5 6 - QueryResult result = WorldDatabase.Query("SELECT entry, x, y, icon, flags, data, icon_name FROM points_of_interest"); + // 0 1 2 3 4 5 6 + QueryResult result = WorldDatabase.Query("SELECT ID, PositionX, PositionY, Icon, Flags, Data, Name FROM points_of_interest"); if (!result) { @@ -7195,8 +7197,8 @@ void ObjectMgr::LoadQuestPOI() uint32 count = 0; - // 0 1 2 3 4 5 6 7 - QueryResult result = WorldDatabase.Query("SELECT questId, id, objIndex, mapid, WorldMapAreaId, FloorId, unk3, unk4 FROM quest_poi order by questId"); + // 0 1 2 3 4 5 6 7 + QueryResult result = WorldDatabase.Query("SELECT QuestID, id, ObjectiveIndex, MapID, WorldMapAreaId, Floor, Priority, Flags FROM quest_poi order by QuestID"); if (!result) { @@ -7205,8 +7207,8 @@ void ObjectMgr::LoadQuestPOI() return; } - // 0 1 2 3 - QueryResult points = WorldDatabase.Query("SELECT questId, id, x, y FROM quest_poi_points ORDER BY questId DESC, idx"); + // 0 1 2 3 + QueryResult points = WorldDatabase.Query("SELECT QuestID, Idx1, X, Y FROM quest_poi_points ORDER BY QuestID DESC, Idx2"); std::vector<std::vector<std::vector<QuestPOIPoint> > > POIs; @@ -8258,9 +8260,9 @@ void ObjectMgr::LoadTrainerSpell() // For reload case _cacheTrainerSpellStore.clear(); - QueryResult result = WorldDatabase.Query("SELECT b.entry, a.spell, a.spellcost, a.reqskill, a.reqskillvalue, a.reqlevel FROM npc_trainer AS a " - "INNER JOIN npc_trainer AS b ON a.entry = -(b.spell) " - "UNION SELECT * FROM npc_trainer WHERE spell > 0"); + QueryResult result = WorldDatabase.Query("SELECT b.ID, a.SpellID, a.MoneyCost, a.ReqSkillLine, a.ReqSkillRank, a.ReqLevel FROM npc_trainer AS a " + "INNER JOIN npc_trainer AS b ON a.ID = -(b.SpellID) " + "UNION SELECT * FROM npc_trainer WHERE SpellID > 0"); if (!result) { diff --git a/src/game/Spells/SpellMgr.cpp b/src/game/Spells/SpellMgr.cpp index ac230191d0..850eb6c1ff 100644 --- a/src/game/Spells/SpellMgr.cpp +++ b/src/game/Spells/SpellMgr.cpp @@ -742,7 +742,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellInfo const* spellProto, Spell } if (procFlags & PROC_FLAG_TAKEN_PERIODIC) - { + { if (procExtra & PROC_EX_INTERNAL_HOT) { /// No aura that only has PROC_FLAG_TAKEN_PERIODIC can proc from a HOT. @@ -1132,7 +1132,7 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32 // team that controls the workshop in the specified area uint32 team = bf->GetData(newArea); - + if (team == TEAM_HORDE) return spellId == 56618; else if (team == TEAM_ALLIANCE) @@ -1454,8 +1454,9 @@ void SpellMgr::LoadSpellTargetPositions() mSpellTargetPositions.clear(); // need for reload case - // 0 1 2 3 4 5 6 - QueryResult result = WorldDatabase.Query("SELECT id, effIndex, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM spell_target_position"); + // 0 1 2 3 4 5 6 + QueryResult result = WorldDatabase.Query("SELECT ID, EffectIndex, MapID, PositionX, PositionY, PositionZ, Orientation FROM spell_target_position"); + if (!result) { sLog->outString(">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty."); @@ -3236,7 +3237,7 @@ void SpellMgr::LoadDbcDataCorrections() case 63137: // Force Cast (HACK: Target shouldn't be changed; summon position should be untied from spell destination) spellInfo->EffectImplicitTargetA[EFFECT_0] = TARGET_DEST_DB; break; - case 53096: // Quetz'lun's Judgment + case 53096: // Quetz'lun's Judgment case 70743: // AoD Special case 70614: // AoD Special - Vegard spellInfo->MaxAffectedTargets = 1; @@ -3554,7 +3555,7 @@ void SpellMgr::LoadDbcDataCorrections() case 53407: case 53408: spellInfo->FacingCasterFlags |= SPELL_FACING_FLAG_INFRONT; - break;*/ + break;*/ // Seal of Light trigger case 20167: spellInfo->spellLevel = 0; @@ -3675,7 +3676,7 @@ void SpellMgr::LoadDbcDataCorrections() spellInfo->AttributesEx3 |= SPELL_ATTR3_IGNORE_HIT_RESULT; break; // Cobra Strikes - case 53257: + case 53257: spellInfo->procCharges = 2; spellInfo->StackAmount = 0; break; @@ -4496,7 +4497,7 @@ void SpellMgr::LoadDbcDataCorrections() ////////////////////////////////////////// ////////// Gundrak ////////////////////////////////////////// - // Moorabi - Transformation + // Moorabi - Transformation case 55098: spellInfo->InterruptFlags |= SPELL_INTERRUPT_FLAG_INTERRUPT; break; @@ -4511,7 +4512,7 @@ void SpellMgr::LoadDbcDataCorrections() ////////////////////////////////////////// ////////// AHN'KAHET: THE OLD KINGDOM - ////////////////////////////////////////// + ////////////////////////////////////////// // Vanish case 55964: spellInfo->Effect[1] = 0; @@ -4520,7 +4521,7 @@ void SpellMgr::LoadDbcDataCorrections() ////////////////////////////////////////// ////////// DRAK'THARON KEEP - ////////////////////////////////////////// + ////////////////////////////////////////// // Trollgore - Summon Drakkari Invader case 49456: case 49457: @@ -4530,7 +4531,7 @@ void SpellMgr::LoadDbcDataCorrections() ////////////////////////////////////////// ////////// UTGARDE PINNACLE - ////////////////////////////////////////// + ////////////////////////////////////////// // Paralyse case 48278: // Awaken subboss @@ -4545,7 +4546,7 @@ void SpellMgr::LoadDbcDataCorrections() ////////////////////////////////////////// ////////// UTGARDE KEEP - ////////////////////////////////////////// + ////////////////////////////////////////// // Skarvald, Charge case 43651: spellInfo->rangeIndex = 13; // 0-50000yd @@ -4582,7 +4583,7 @@ void SpellMgr::LoadDbcDataCorrections() ////////////////////////////////////////// ////////// AZJOL'NERUB - ////////////////////////////////////////// + ////////////////////////////////////////// // Krik'thir - Mind Flay case 52586: @@ -4609,7 +4610,7 @@ void SpellMgr::LoadDbcDataCorrections() ////////// OBSIDIAN SANCTUM ////////////////////////////////////////// // Lava Strike damage - case 57697: + case 57697: spellInfo->EffectImplicitTargetA[0] = TARGET_DEST_DEST; break; // Lava Strike trigger @@ -4839,7 +4840,7 @@ void SpellMgr::LoadDbcDataCorrections() break; // Cosmic Smash (Algalon the Observer) case 62311: - case 64596: + case 64596: spellInfo->AttributesEx2 |= SPELL_ATTR2_CAN_TARGET_NOT_IN_LOS; spellInfo->EffectRadiusIndex[0] = 12; // 100yd spellInfo->rangeIndex = 13; // 50000yd @@ -6308,4 +6309,4 @@ void SpellMgr::LoadDbcDataCorrections() sLog->outString(">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime)); sLog->outString(); -}
\ No newline at end of file +} |