mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8234] Implement support for explcit discovery spell 64323. Also better checks at loading.
This commit is contained in:
parent
dce0941511
commit
ae2f25ce64
4 changed files with 23 additions and 3 deletions
|
|
@ -104,7 +104,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;
|
||||
|
|
@ -143,6 +145,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)
|
||||
|
|
|
|||
|
|
@ -5036,6 +5036,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
|||
case 61177: // Northrend Inscription Research
|
||||
case 61288: // Minor Inscription Research
|
||||
case 61756: // Northrend Inscription Research (FAST QA VERSION)
|
||||
case 64323: // Book of Glyph Mastery
|
||||
{
|
||||
if(m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -155,7 +155,9 @@ inline bool IsElementalShield(SpellEntry const *spellInfo)
|
|||
|
||||
inline bool IsExplicitDiscoverySpell(SpellEntry const *spellInfo)
|
||||
{
|
||||
return spellInfo->Effect[0]==SPELL_EFFECT_CREATE_RANDOM_ITEM && spellInfo->Effect[1]==SPELL_EFFECT_SCRIPT_EFFECT;
|
||||
return spellInfo->Effect[0] == SPELL_EFFECT_CREATE_RANDOM_ITEM
|
||||
&& spellInfo->Effect[1] == SPELL_EFFECT_SCRIPT_EFFECT
|
||||
|| spellInfo->Id == 64323; // Book of Glyph Mastery (Effect0==SPELL_EFFECT_SCRIPT_EFFECT without any other data)
|
||||
}
|
||||
|
||||
inline bool IsLootCraftingSpell(SpellEntry const *spellInfo)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8233"
|
||||
#define REVISION_NR "8234"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue