Update IsExplicitDiscoverySpell/IsLootCraftingSpell and related code. by Vladimir.
--HG-- branch : trunk
This commit is contained in:
@@ -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