aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2012_12_20_03_world_conditions.sql (renamed from sql/updates/world/2012_12_20_00_world_conditions (2).sql)0
-rw-r--r--sql/updates/world/2012_12_27_00_world_orgrims_hammer.sql75
-rw-r--r--sql/updates/world/2012_12_27_01_world_locales_quest.sql1
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp2
-rw-r--r--src/server/game/Spells/SpellMgr.cpp64
5 files changed, 108 insertions, 34 deletions
diff --git a/sql/updates/world/2012_12_20_00_world_conditions (2).sql b/sql/updates/world/2012_12_20_03_world_conditions.sql
index f07b18ed2e4..f07b18ed2e4 100644
--- a/sql/updates/world/2012_12_20_00_world_conditions (2).sql
+++ b/sql/updates/world/2012_12_20_03_world_conditions.sql
diff --git a/sql/updates/world/2012_12_27_00_world_orgrims_hammer.sql b/sql/updates/world/2012_12_27_00_world_orgrims_hammer.sql
new file mode 100644
index 00000000000..a7c8af76fa0
--- /dev/null
+++ b/sql/updates/world/2012_12_27_00_world_orgrims_hammer.sql
@@ -0,0 +1,75 @@
+-- Orgrimms Hammer questline
+-- The Broken Front (13228)
+UPDATE `quest_template` SET `PrevQuestId`=13224 WHERE `id`=13228;
+-- Get To Ymirheim! (13293)
+UPDATE `quest_template` SET `PrevQuestId`=13224 WHERE `id`=13293;
+-- Slaves To Saronite (13302)
+UPDATE `quest_template` SET `PrevQuestId`=13224 WHERE `id`=13302;
+-- Mind Tricks (13308)
+UPDATE `quest_template` SET `PrevQuestId`=13224 WHERE `id`=13308;
+-- Blood of The Chosen (13330)
+UPDATE `quest_template` SET `PrevQuestId`=13224 WHERE `id`=13330;
+-- Joining the Assault (13340)
+UPDATE `quest_template` SET `PrevQuestId`=13224 WHERE `id`=13340;
+-- Assault by Air (13310)
+UPDATE `quest_template` SET `PrevQuestId`=13340 WHERE `id`=13310;
+-- Assault by Ground (13301)
+UPDATE `quest_template` SET `PrevQuestId`=13340 WHERE `id`=13301;
+-- Avenge Me! (13230)
+UPDATE `quest_template` SET `PrevQuestId`=13228 WHERE `id`=13230;
+-- Make Them Pay! (13234)
+UPDATE `quest_template` SET `PrevQuestId`=13228 WHERE `id`=13234;
+-- Good for Something? (13238)
+UPDATE `quest_template` SET `PrevQuestId`=13228 WHERE `id`=13238;
+-- Volatility - daily (13261)
+UPDATE `quest_template` SET `PrevQuestId`=13239 WHERE `id`=13261;
+-- Green Technology (13379)
+UPDATE `quest_template` SET `PrevQuestId`=13239 WHERE `id`=13379;
+-- Riding the Wavelength: The Bombardment (13406)
+UPDATE `quest_template` SET `PrevQuestId`=13373 WHERE `id`=13406;
+-- Total Ohmage: The Valley of Lost Hope! (13376)
+UPDATE `quest_template` SET `PrevQuestId`=13373 WHERE `id`=13376;
+-- Takes one to know One (13260)
+UPDATE `quest_template` SET `PrevQuestId`=13228 WHERE `id`=13260;
+-- That's Abominable! (13264)
+UPDATE `quest_template` SET `PrevQuestId`=13237 WHERE `id`=13264;
+-- Against The Giants (13277)
+UPDATE `quest_template` SET `PrevQuestId`=13237 WHERE `id`=13277;
+-- Neutralizing the Plague (13281)
+UPDATE `quest_template` SET `PrevQuestId`=13279 WHERE `id`=13281;
+-- That's Abominable! - daily (13276)
+UPDATE `quest_template` SET `PrevQuestId`=13264 WHERE `id`=13276;
+-- Sneak Preview (13351)
+UPDATE `quest_template` SET `PrevQuestId`=13264 WHERE `id`=13351;
+-- Chain of Command (13354)
+UPDATE `quest_template` SET `PrevQuestId`=13351 WHERE `id`=13354;
+-- Cannot Reproduce (13355)
+UPDATE `quest_template` SET `PrevQuestId`=13351 WHERE `id`=13355;
+-- Retest Now - daily (13357)
+UPDATE `quest_template` SET `PrevQuestId`=13356 WHERE `id`=13357;
+-- Drag and Drop (13352)
+UPDATE `quest_template` SET `PrevQuestId`=13351 WHERE `id`=13352;
+-- Drag and Drop - daily (13353)
+UPDATE `quest_template` SET `PrevQuestId`=13352 WHERE `id`=13353;
+-- Not A Bug (13358)
+UPDATE `quest_template` SET `PrevQuestId`=13352 WHERE `id`=13358;
+-- Not A Bug - daily (13365)
+UPDATE `quest_template` SET `PrevQuestId`=13358 WHERE `id`=13365;
+-- Need More Info (13366)
+UPDATE `quest_template` SET `PrevQuestId`=13352 WHERE `id`=13366;
+-- No Rest For The Wicked (13367)
+UPDATE `quest_template` SET `PrevQuestId`=13366,`NextQuestId`=13312,`ExclusiveGroup`=-13306 WHERE `id`=13367;
+-- No Rest for the Wicked - daily (13368)
+UPDATE `quest_template` SET `PrevQuestId`=13367 WHERE `id`=13368;
+-- Raise the Barricades (13306)
+UPDATE `quest_template` SET `PrevQuestId`=13366,`NextQuestId`=13312,`ExclusiveGroup`=-13306 WHERE `id`=13306;
+-- Blinding the Eyes in the Sky (13313)
+UPDATE `quest_template` SET `PrevQuestId`=13306 WHERE `id`=13313;
+-- The Ironwall Rampart (13312)
+UPDATE `quest_template` SET `NextQuestId`=13329,`ExclusiveGroup`=-13307 WHERE `id`=13312;
+-- Bloodspattered Banners (13307)
+UPDATE `quest_template` SET `PrevQuestId`=13306,`NextQuestId`=13329,`ExclusiveGroup`=-13307 WHERE `id`=13307;
+-- Shatter the Shard (13328)
+UPDATE `quest_template` SET `PrevQuestId`=13329 WHERE `id`=13328;
+-- The Guardians of Corp'rethar (13316)
+UPDATE `quest_template` SET `PrevQuestId`=13329 WHERE `id`=13316;
diff --git a/sql/updates/world/2012_12_27_01_world_locales_quest.sql b/sql/updates/world/2012_12_27_01_world_locales_quest.sql
new file mode 100644
index 00000000000..047f8bb499f
--- /dev/null
+++ b/sql/updates/world/2012_12_27_01_world_locales_quest.sql
@@ -0,0 +1 @@
+ALTER TABLE `locales_quest` CHANGE `entry` `Id` mediumint(8) unsigned NOT NULL DEFAULT '0';
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
index fcde96079e1..5865ef67a78 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -4306,7 +4306,7 @@ void ObjectMgr::LoadQuestLocales()
_questLocaleStore.clear(); // need for reload case
- QueryResult result = WorldDatabase.Query("SELECT entry, "
+ QueryResult result = WorldDatabase.Query("SELECT Id, "
"Title_loc1, Details_loc1, Objectives_loc1, OfferRewardText_loc1, RequestItemsText_loc1, EndText_loc1, CompletedText_loc1, ObjectiveText1_loc1, ObjectiveText2_loc1, ObjectiveText3_loc1, ObjectiveText4_loc1, "
"Title_loc2, Details_loc2, Objectives_loc2, OfferRewardText_loc2, RequestItemsText_loc2, EndText_loc2, CompletedText_loc2, ObjectiveText1_loc2, ObjectiveText2_loc2, ObjectiveText3_loc2, ObjectiveText4_loc2, "
"Title_loc3, Details_loc3, Objectives_loc3, OfferRewardText_loc3, RequestItemsText_loc3, EndText_loc3, CompletedText_loc3, ObjectiveText1_loc3, ObjectiveText2_loc3, ObjectiveText3_loc3, ObjectiveText4_loc3, "
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index d166c6f9ebf..9714e2bc09b 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -1836,14 +1836,14 @@ void SpellMgr::LoadSpellProcs()
int32 spellId = fields[0].GetInt32();
bool allRanks = false;
- if (spellId <=0)
+ if (spellId < 0)
{
allRanks = true;
spellId = -spellId;
}
- SpellInfo const* spellEntry = GetSpellInfo(spellId);
- if (!spellEntry)
+ SpellInfo const* spellInfo = GetSpellInfo(spellId);
+ if (!spellInfo)
{
sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` does not exist", spellId);
continue;
@@ -1851,9 +1851,9 @@ void SpellMgr::LoadSpellProcs()
if (allRanks)
{
- if (GetFirstSpellInChain(spellId) != uint32(spellId))
+ if (spellInfo->GetFirstRankSpell()->Id != uint32(spellId))
{
- sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` is not first rank of spell.", fields[0].GetInt32());
+ sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` is not first rank of spell.", spellId);
continue;
}
}
@@ -1876,79 +1876,77 @@ void SpellMgr::LoadSpellProcs()
baseProcEntry.cooldown = uint32(cooldown);
baseProcEntry.charges = fields[14].GetUInt32();
- while (true)
+ while (spellInfo)
{
- if (mSpellProcMap.find(spellId) != mSpellProcMap.end())
+ if (mSpellProcMap.find(spellInfo->Id) != mSpellProcMap.end())
{
- sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` has duplicate entry in the table", spellId);
+ sLog->outError(LOG_FILTER_SQL, "Spell %u listed in `spell_proc` has duplicate entry in the table", spellInfo->Id);
break;
}
SpellProcEntry procEntry = SpellProcEntry(baseProcEntry);
// take defaults from dbcs
if (!procEntry.typeMask)
- procEntry.typeMask = spellEntry->ProcFlags;
+ procEntry.typeMask = spellInfo->ProcFlags;
if (!procEntry.charges)
- procEntry.charges = spellEntry->ProcCharges;
+ procEntry.charges = spellInfo->ProcCharges;
if (!procEntry.chance && !procEntry.ratePerMinute)
- procEntry.chance = float(spellEntry->ProcChance);
+ procEntry.chance = float(spellInfo->ProcChance);
// validate data
if (procEntry.schoolMask & ~SPELL_SCHOOL_MASK_ALL)
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `schoolMask` set: %u", spellId, procEntry.schoolMask);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `schoolMask` set: %u", spellInfo->Id, procEntry.schoolMask);
if (procEntry.spellFamilyName && (procEntry.spellFamilyName < 3 || procEntry.spellFamilyName > 17 || procEntry.spellFamilyName == 14 || procEntry.spellFamilyName == 16))
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellFamilyName` set: %u", spellId, procEntry.spellFamilyName);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellFamilyName` set: %u", spellInfo->Id, procEntry.spellFamilyName);
if (procEntry.chance < 0)
{
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `chance` field", spellId);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `chance` field", spellInfo->Id);
procEntry.chance = 0;
}
if (procEntry.ratePerMinute < 0)
{
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `ratePerMinute` field", spellId);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `ratePerMinute` field", spellInfo->Id);
procEntry.ratePerMinute = 0;
}
if (cooldown < 0)
{
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `cooldown` field", spellId);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has negative value in `cooldown` field", spellInfo->Id);
procEntry.cooldown = 0;
}
if (procEntry.chance == 0 && procEntry.ratePerMinute == 0)
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `chance` and `ratePerMinute` values defined, proc will not be triggered", spellId);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `chance` and `ratePerMinute` values defined, proc will not be triggered", spellInfo->Id);
if (procEntry.charges > 99)
{
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has too big value in `charges` field", spellId);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has too big value in `charges` field", spellInfo->Id);
procEntry.charges = 99;
}
if (!procEntry.typeMask)
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `typeMask` value defined, proc will not be triggered", spellId);
- if (procEntry.spellTypeMask & ~PROC_SPELL_PHASE_MASK_ALL)
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellTypeMask` set: %u", spellId, procEntry.spellTypeMask);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `typeMask` value defined, proc will not be triggered", spellInfo->Id);
+ if (procEntry.spellTypeMask & ~PROC_SPELL_TYPE_MASK_ALL)
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellTypeMask` set: %u", spellInfo->Id, procEntry.spellTypeMask);
if (procEntry.spellTypeMask && !(procEntry.typeMask & (SPELL_PROC_FLAG_MASK | PERIODIC_PROC_FLAG_MASK)))
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellTypeMask` value defined, but it won't be used for defined `typeMask` value", spellId);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellTypeMask` value defined, but it won't be used for defined `typeMask` value", spellInfo->Id);
if (!procEntry.spellPhaseMask && procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK)
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `spellPhaseMask` value defined, but it's required for defined `typeMask` value, proc will not be triggered", spellId);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u doesn't have `spellPhaseMask` value defined, but it's required for defined `typeMask` value, proc will not be triggered", spellInfo->Id);
if (procEntry.spellPhaseMask & ~PROC_SPELL_PHASE_MASK_ALL)
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellPhaseMask` set: %u", spellId, procEntry.spellPhaseMask);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `spellPhaseMask` set: %u", spellInfo->Id, procEntry.spellPhaseMask);
if (procEntry.spellPhaseMask && !(procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK))
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellPhaseMask` value defined, but it won't be used for defined `typeMask` value", spellId);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `spellPhaseMask` value defined, but it won't be used for defined `typeMask` value", spellInfo->Id);
if (procEntry.hitMask & ~PROC_HIT_MASK_ALL)
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `hitMask` set: %u", spellId, procEntry.hitMask);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has wrong `hitMask` set: %u", spellInfo->Id, procEntry.hitMask);
if (procEntry.hitMask && !(procEntry.typeMask & TAKEN_HIT_PROC_FLAG_MASK || (procEntry.typeMask & DONE_HIT_PROC_FLAG_MASK && (!procEntry.spellPhaseMask || procEntry.spellPhaseMask & (PROC_SPELL_PHASE_HIT | PROC_SPELL_PHASE_FINISH)))))
- sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `hitMask` value defined, but it won't be used for defined `typeMask` and `spellPhaseMask` values", spellId);
+ sLog->outError(LOG_FILTER_SQL, "`spell_proc` table entry for spellId %u has `hitMask` value defined, but it won't be used for defined `typeMask` and `spellPhaseMask` values", spellInfo->Id);
- mSpellProcMap[spellId] = procEntry;
+ mSpellProcMap[spellInfo->Id] = procEntry;
if (allRanks)
- {
- spellId = GetNextSpellInChain(spellId);
- spellEntry = GetSpellInfo(spellId);
- }
+ spellInfo = spellInfo->GetNextRankSpell();
else
break;
}
++count;
- } while (result->NextRow());
+ }
+ while (result->NextRow());
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}