[9507] Implement SPELL_EFFECT_RESTORE_ITEM_CHARGES

Also it application in special case of item 5513 and similar.
This commit is contained in:
VladimirMangos 2010-03-03 05:58:36 +03:00
parent d775eea9a4
commit 4c4629e861
11 changed files with 105 additions and 3 deletions

View file

@ -179,6 +179,15 @@ bool Bag::IsEmpty() const
return true;
}
Item* Bag::GetItemByEntry( uint32 item ) const
{
for(uint32 i = 0; i < GetBagSize(); ++i)
if (m_bagslot[i] && m_bagslot[i]->GetEntry() == item)
return m_bagslot[i];
return NULL;
}
uint32 Bag::GetItemCount( uint32 item, Item* eItem ) const
{
Item *pItem;