aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectMgr.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-24 12:16:12 -0500
committermegamage <none@none>2009-05-24 12:16:12 -0500
commit09b386a78621d177b28df24ca9e13ee25e6d042b (patch)
treed7e68d961d693034b0dfd4ecb027194cdc824d61 /src/game/ObjectMgr.cpp
parentaa67033cc71c536f4d0f4c1cf6d6444d48103371 (diff)
[7886] Drop use table `petcreateinfo_spell`
This is first commit in chain for remove oudated and not used pet functionality. * Use instead dropped table CreatureSpellData.dbc if creature_template.PetSpellDataId set (mostly hunter pets) * Use creature_template.spellN if not set creature_template.PetSpellDataId (mostly different summon creatures) * Fixed bug with not removing from action bar spell icon for not ranked unlearned spells. Note: summoned controllable creatures without PetSpellDataId must have expected spells in spellN feilds for creature_template. [7887] Drop pet spell teaching code, including field in character_pet. Author: VladimirMangos --HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r--src/game/ObjectMgr.cpp84
1 files changed, 0 insertions, 84 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 87e7d10bdcb..d7337fadd77 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -3747,90 +3747,6 @@ void ObjectMgr::LoadQuestLocales()
sLog.outString( ">> Loaded %lu Quest locale strings", (unsigned long)mQuestLocaleMap.size() );
}
-void ObjectMgr::LoadPetCreateSpells()
-{
- QueryResult *result = WorldDatabase.Query("SELECT entry, Spell1, Spell2, Spell3, Spell4 FROM petcreateinfo_spell");
- if(!result)
- {
- barGoLink bar( 1 );
- bar.step();
-
- sLog.outString();
- sLog.outString( ">> Loaded 0 pet create spells" );
- sLog.outErrorDb("`petcreateinfo_spell` table is empty!");
- return;
- }
-
- uint32 count = 0;
-
- barGoLink bar( result->GetRowCount() );
-
- mPetCreateSpell.clear();
-
- do
- {
- Field *fields = result->Fetch();
- bar.step();
-
- uint32 creature_id = fields[0].GetUInt32();
-
- if(!creature_id)
- {
- sLog.outErrorDb("Creature id %u listed in `petcreateinfo_spell` not exist.",creature_id);
- continue;
- }
-
- CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(creature_id);
- if(!cInfo)
- {
- sLog.outErrorDb("Creature id %u listed in `petcreateinfo_spell` not exist.",creature_id);
- continue;
- }
-
- PetCreateSpellEntry PetCreateSpell;
-
- bool have_spell = false;
- bool have_spell_db = false;
- for(int i = 0; i < 4; i++)
- {
- PetCreateSpell.spellid[i] = fields[i + 1].GetUInt32();
-
- if(!PetCreateSpell.spellid[i])
- continue;
-
- have_spell_db = true;
-
- SpellEntry const* i_spell = sSpellStore.LookupEntry(PetCreateSpell.spellid[i]);
- if(!i_spell)
- {
- sLog.outErrorDb("Spell %u listed in `petcreateinfo_spell` does not exist",PetCreateSpell.spellid[i]);
- PetCreateSpell.spellid[i] = 0;
- continue;
- }
-
- have_spell = true;
- }
-
- if(!have_spell_db)
- {
- sLog.outErrorDb("Creature %u listed in `petcreateinfo_spell` have only 0 spell data, why it listed?",creature_id);
- continue;
- }
-
- if(!have_spell)
- continue;
-
- mPetCreateSpell[creature_id] = PetCreateSpell;
- ++count;
- }
- while (result->NextRow());
-
- delete result;
-
- sLog.outString();
- sLog.outString( ">> Loaded %u pet create spells", count );
-}
-
void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename)
{
if(sWorld.IsScriptScheduled()) // function don't must be called in time scripts use.