Skip to content

Commit

Permalink
[10180] Implement ITEM_FLAGS_NO_EQUIP_COOLDOWN support.
Browse files Browse the repository at this point in the history
Also server side check for ITEM_FLAGS_INDESTRUCTIBLE
  • Loading branch information
VladimirMangos committed Jul 11, 2010
1 parent 71ca6d5 commit f595ea8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/game/ItemHandler.cpp
Expand Up @@ -260,6 +260,13 @@ void WorldSession::HandleDestroyItemOpcode( WorldPacket & recv_data )
return;
}

// checked at client side and not have server side appropriate error output
if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_INDESTRUCTIBLE))
{
_player->SendEquipError( EQUIP_ERR_CANT_DROP_SOULBOUND, NULL, NULL );
return;
}

if(count)
{
uint32 i_count = count;
Expand Down
3 changes: 3 additions & 0 deletions src/game/Player.cpp
Expand Up @@ -19576,6 +19576,9 @@ void Player::SendInstanceResetWarning( uint32 mapid, Difficulty difficulty, uint

void Player::ApplyEquipCooldown( Item * pItem )
{
if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_NO_EQUIP_COOLDOWN))
return;

for(int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
{
_Spell const& spellData = pItem->GetProto()->Spells[i];
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10179"
#define REVISION_NR "10180"
#endif // __REVISION_NR_H__

0 comments on commit f595ea8

Please sign in to comment.