Update IsExplicitDiscoverySpell/IsLootCraftingSpell and related code. by Vladimir.

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2010-04-11 11:24:05 +04:00
parent cdec48b9ef
commit 45e750148a
2 changed files with 17 additions and 11 deletions
+5 -3
View File
@@ -281,7 +281,8 @@ inline bool IsElementalShield(SpellEntry const *spellInfo)
inline bool IsExplicitDiscoverySpell(SpellEntry const *spellInfo)
{
return ((spellInfo->Effect[0] == SPELL_EFFECT_CREATE_RANDOM_ITEM
return (((spellInfo->Effect[0] == SPELL_EFFECT_CREATE_RANDOM_ITEM
|| spellInfo->Effect[0] == SPELL_EFFECT_CREATE_ITEM_2)
&& spellInfo->Effect[1] == SPELL_EFFECT_SCRIPT_EFFECT)
|| spellInfo->Id == 64323); // Book of Glyph Mastery (Effect0 == SPELL_EFFECT_SCRIPT_EFFECT without any other data)
}
@@ -289,8 +290,9 @@ inline bool IsExplicitDiscoverySpell(SpellEntry const *spellInfo)
inline bool IsLootCraftingSpell(SpellEntry const *spellInfo)
{
return (spellInfo->Effect[0] == SPELL_EFFECT_CREATE_RANDOM_ITEM ||
// different random cards from Inscription (121 == Virtuoso Inking Set category)
(spellInfo->Effect[0] == SPELL_EFFECT_CREATE_ITEM_2 && spellInfo->TotemCategory[0] == 121));
// different random cards from Inscription (121==Virtuoso Inking Set category) r without explicit item
(spellInfo->Effect[0] == SPELL_EFFECT_CREATE_ITEM_2 &&
(spellInfo->TotemCategory[0] != 0 || spellInfo->EffectItemType[0]==0)));
}
bool IsHigherHankOfSpell(uint32 spellId_1,uint32 spellId_2);