diff options
Diffstat (limited to 'src')
-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 |
4 files changed, 55 insertions, 51 deletions
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 +} |