mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[9227] More wide check item looting state at item operations.
Move some checks from packet handlers to Player::Can functions Patch base at idea suggested originally by zhenya.
This commit is contained in:
parent
4e6befc43d
commit
4995a6d298
5 changed files with 104 additions and 102 deletions
|
|
@ -150,13 +150,6 @@ void WorldSession::HandleAutoEquipItemOpcode( WorldPacket & recv_data )
|
|||
if( !pSrcItem )
|
||||
return; // only at cheat
|
||||
|
||||
if(pSrcItem->m_lootGenerated) // prevent swap looting item
|
||||
{
|
||||
//best error message found for attempting to swap while looting
|
||||
_player->SendEquipError( EQUIP_ERR_CANT_DO_RIGHT_NOW, pSrcItem, NULL );
|
||||
return;
|
||||
}
|
||||
|
||||
uint16 dest;
|
||||
uint8 msg = _player->CanEquipItem( NULL_SLOT, dest, pSrcItem, !pSrcItem->IsBag() );
|
||||
if( msg != EQUIP_ERR_OK )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue