Use spell_loot_table for item creating in case SPELL_EFFECT_CREATE_ITEM_2 (157) and itemType==0

This commit is contained in:
VladimirMangos 2009-02-06 06:00:01 +03:00
parent 118eb563b5
commit f94377622e
6 changed files with 30 additions and 6 deletions

View file

@ -19413,7 +19413,7 @@ void Player::InitRunes()
SetFloatValue(PLAYER_RUNE_REGEN_1 + i, 0.1f);
}
void Player::AutoStoreLootItem(uint8 bag, uint8 slot, uint32 loot_id, LootStore const& store)
bool Player::AutoStoreLootItem(uint8 bag, uint8 slot, uint32 loot_id, LootStore const& store)
{
Loot loot;
loot.FillLoot (loot_id,store,this);
@ -19430,7 +19430,8 @@ void Player::AutoStoreLootItem(uint8 bag, uint8 slot, uint32 loot_id, LootStore
if(msg != EQUIP_ERR_OK)
return;
StoreNewItem (dest,lootItem->itemid,true,lootItem->randomPropertyId);
if(Item* pItem = StoreNewItem (dest,lootItem->itemid,true,lootItem->randomPropertyId))
SendNewItem(pItem, lootItem->count, true, true);
}
uint32 Player::CalculateTalentsPoints() const