aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/7236_world_spell_ranks.sql (renamed from sql/updates/7234_world_spell_ranks.sql)9
-rw-r--r--src/game/SpellMgr.cpp6
2 files changed, 12 insertions, 3 deletions
diff --git a/sql/updates/7234_world_spell_ranks.sql b/sql/updates/7236_world_spell_ranks.sql
index ee69cb2d51c..be09c258163 100644
--- a/sql/updates/7234_world_spell_ranks.sql
+++ b/sql/updates/7236_world_spell_ranks.sql
@@ -1,3 +1,12 @@
+DROP TABLE IF EXISTS `spell_ranks`;
+CREATE TABLE `spell_ranks` (
+ `first_spell_id` INT UNSIGNED NOT NULL DEFAULT 0,
+ `spell_id` INT UNSIGNED NOT NULL DEFAULT 0,
+ `rank` TINYINT UNSIGNED NOT NULL DEFAULT 0,
+ PRIMARY KEY (`first_spell_id`, `rank`),
+ UNIQUE (`spell_id`)
+) ENGINE=MYISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Spell Rank Data';
+
INSERT INTO spell_ranks (`first_spell_id`, `spell_id`, `rank`) VALUES
-- Abomination's Might
(53137, 53137, 1),
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index eea1971c029..e1792787b02 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -3256,7 +3256,7 @@ void SpellMgr::LoadSpellRanks()
do
{
// spellid, rank
- std::list<std::pair<int32, int32>> rankChain;
+ std::list < std::pair < int32, int32 > > rankChain;
int32 currentSpell = -1;
int32 lastSpell = -1;
@@ -3299,7 +3299,7 @@ void SpellMgr::LoadSpellRanks()
int32 curRank = 0;
bool valid = true;
// check spells in chain
- for (std::list<std::pair<int32, int32>>::iterator itr = rankChain.begin() ; itr!= rankChain.end(); ++itr)
+ for (std::list<std::pair<int32, int32> >::iterator itr = rankChain.begin() ; itr!= rankChain.end(); ++itr)
{
SpellEntry const * spell = sSpellStore.LookupEntry(itr->first);
if (!spell)
@@ -3320,7 +3320,7 @@ void SpellMgr::LoadSpellRanks()
continue;
int32 prevRank = 0;
// insert the chain
- std::list<std::pair<int32, int32>>::iterator itr = rankChain.begin();
+ std::list<std::pair<int32, int32> >::iterator itr = rankChain.begin();
do
{
int32 addedSpell = itr->first;