Update IsExplicitDiscoverySpell/IsLootCraftingSpell and related code. by Vladimir.
--HG-- branch : trunk
This commit is contained in:
1 parent
cdec48b9ef
commit
45e750148a
2 files changed
+17
-11
No files matched your search
@@ -3125,20 +3125,24 @@ void Spell::EffectCreateItem2(uint32 i)
|
||||
|
||||
uint32 item_id = m_spellInfo->EffectItemType[i];
|
||||
|
||||
DoCreateItem(i, item_id);
|
||||
if (item_id)
|
||||
DoCreateItem(i, item_id);
|
||||
|
||||
// special case: fake item replaced by generate using spell_loot_template
|
||||
if (IsLootCraftingSpell(m_spellInfo))
|
||||
{
|
||||
if (!player->HasItemCount(item_id, 1))
|
||||
return;
|
||||
if (item_id)
|
||||
{
|
||||
if (!player->HasItemCount(item_id, 1))
|
||||
return;
|
||||
|
||||
// remove reagent
|
||||
uint32 count = 1;
|
||||
player->DestroyItemCount(item_id, count, true);
|
||||
// remove reagent
|
||||
uint32 count = 1;
|
||||
player->DestroyItemCount(item_id, count, true);
|
||||
|
||||
// create some random items
|
||||
player->AutoStoreLoot(m_spellInfo->Id, LootTemplates_Spell);
|
||||
// create some random items
|
||||
player->AutoStoreLoot(m_spellInfo->Id, LootTemplates_Spell);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user