[11645] Fixed work EffectSummonChangeItem, for example, for item. 17223

Also
* Move item comvert code from spell effect to new function.
* Some code style cleanups.
This commit is contained in:
VladimirMangos 2011-06-18 21:06:13 +04:00
parent 92e0b5941f
commit a97370a7f0
6 changed files with 113 additions and 108 deletions

View file

@ -493,8 +493,8 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data )
Item *it = pl->GetMItem(itemId);
ItemPosCountVec dest;
uint8 msg = _player->CanStoreItem( NULL_BAG, NULL_SLOT, dest, it, false );
if( msg == EQUIP_ERR_OK )
InventoryResult msg = _player->CanStoreItem( NULL_BAG, NULL_SLOT, dest, it, false );
if (msg == EQUIP_ERR_OK)
{
m->RemoveItem(itemId);
m->removedItems.push_back(itemId);
@ -771,8 +771,8 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data )
DETAIL_LOG("HandleMailCreateTextItem mailid=%u", mailId);
ItemPosCountVec dest;
uint8 msg = _player->CanStoreItem( NULL_BAG, NULL_SLOT, dest, bodyItem, false );
if( msg == EQUIP_ERR_OK )
InventoryResult msg = _player->CanStoreItem( NULL_BAG, NULL_SLOT, dest, bodyItem, false );
if (msg == EQUIP_ERR_OK)
{
m->checked = m->checked | MAIL_CHECK_MASK_COPIED;
m->state = MAIL_STATE_CHANGED;