From 785cb86c6a145b99d8aa2cfb075a7e1a93dbcd70 Mon Sep 17 00:00:00 2001 From: QAston Date: Fri, 29 Jan 2010 19:08:42 +0100 Subject: [PATCH] *Fix build with GCC, thanks to Brian. --HG-- branch : trunk rename : sql/updates/7234_world_spell_ranks.sql => sql/updates/7236_world_spell_ranks.sql --- ..._world_spell_ranks.sql => 7236_world_spell_ranks.sql} | 9 +++++++++ src/game/SpellMgr.cpp | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) rename sql/updates/{7234_world_spell_ranks.sql => 7236_world_spell_ranks.sql} (99%) diff --git a/sql/updates/7234_world_spell_ranks.sql b/sql/updates/7236_world_spell_ranks.sql similarity index 99% rename from sql/updates/7234_world_spell_ranks.sql rename to 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> 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>::iterator itr = rankChain.begin() ; itr!= rankChain.end(); ++itr) + for (std::list >::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>::iterator itr = rankChain.begin(); + std::list >::iterator itr = rankChain.begin(); do { int32 addedSpell = itr->first;