aboutsummaryrefslogtreecommitdiff
path: root/src/game/SkillDiscovery.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-07-30 10:55:13 +0800
committermegamage <none@none>2009-07-30 10:55:13 +0800
commit65f01ac67ca0c9cefb640db853bc9a67a67436c4 (patch)
treea87937648bab685ab7ceebf1d50e849aac119272 /src/game/SkillDiscovery.cpp
parent3926cb174b7a5ff98a69705092831a7111333377 (diff)
[8234] Implement support for explcit discovery spell 64323. Also better checks at loading. Author: VladimirMangos
--HG-- branch : trunk
Diffstat (limited to 'src/game/SkillDiscovery.cpp')
-rw-r--r--src/game/SkillDiscovery.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/game/SkillDiscovery.cpp b/src/game/SkillDiscovery.cpp
index de441168576..686fcf889b9 100644
--- a/src/game/SkillDiscovery.cpp
+++ b/src/game/SkillDiscovery.cpp
@@ -106,7 +106,9 @@ void LoadSkillDiscoveryTable()
{
if (reportedReqSpells.count(reqSkillOrSpell)==0)
{
- sLog.outErrorDb("Spell (ID: %u) not have have MECHANIC_DISCOVERY (28) value in Mechanic field in spell.dbc and not 100%% chance random discovery ability but listed for spellId %u (and maybe more) in `skill_discovery_template` table",reqSkillOrSpell,spellId);
+ sLog.outErrorDb("Spell (ID: %u) not have MECHANIC_DISCOVERY (28) value in Mechanic field in spell.dbc"
+ " and not 100%% chance random discovery ability but listed for spellId %u (and maybe more) in `skill_discovery_template` table",
+ reqSkillOrSpell,spellId);
reportedReqSpells.insert(reqSkillOrSpell);
}
continue;
@@ -145,6 +147,21 @@ void LoadSkillDiscoveryTable()
sLog.outString( ">> Loaded %u skill discovery definitions", count );
if(!ssNonDiscoverableEntries.str().empty())
sLog.outErrorDb("Some items can't be successfully discovered: have in chance field value < 0.000001 in `skill_discovery_template` DB table . List:\n%s",ssNonDiscoverableEntries.str().c_str());
+
+ // report about empty data for explicit discovery spells
+ for(uint32 spell_id = 1; spell_id < sSpellStore.GetNumRows(); ++spell_id)
+ {
+ SpellEntry const* spellEntry = sSpellStore.LookupEntry(spell_id);
+ if(!spellEntry)
+ continue;
+
+ // skip not explicit discovery spells
+ if (!IsExplicitDiscoverySpell(spellEntry))
+ continue;
+
+ if(SkillDiscoveryStore.find(spell_id)==SkillDiscoveryStore.end())
+ sLog.outErrorDb("Spell (ID: %u) is 100%% chance random discovery ability but not have data in `skill_discovery_template` table",spell_id);
+ }
}
uint32 GetExplicitDiscoverySpell(uint32 spellId, Player* player)