mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7511] Fixed expertise update at items unequip/drop.
* Not attempt update at item move from slot in bag with equip-like slot number. * Update at item drop from bag.
This commit is contained in:
parent
ff48408dbb
commit
2885091dfe
2 changed files with 24 additions and 17 deletions
|
|
@ -10707,9 +10707,10 @@ void Player::RemoveItem( uint8 bag, uint8 slot, bool update )
|
|||
|
||||
// remove item dependent auras and casts (only weapon and armor slots)
|
||||
if(slot < EQUIPMENT_SLOT_END)
|
||||
{
|
||||
RemoveItemDependentAurasAndCasts(pItem);
|
||||
|
||||
// remove held enchantments
|
||||
// remove held enchantments, update expertise
|
||||
if ( slot == EQUIPMENT_SLOT_MAINHAND )
|
||||
{
|
||||
if (pItem->GetItemSuffixFactor())
|
||||
|
|
@ -10722,6 +10723,11 @@ void Player::RemoveItem( uint8 bag, uint8 slot, bool update )
|
|||
pItem->ClearEnchantment(PROP_ENCHANTMENT_SLOT_0);
|
||||
pItem->ClearEnchantment(PROP_ENCHANTMENT_SLOT_1);
|
||||
}
|
||||
|
||||
UpdateExpertise(BASE_ATTACK);
|
||||
}
|
||||
else if( slot == EQUIPMENT_SLOT_OFFHAND )
|
||||
UpdateExpertise(OFF_ATTACK);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -10742,11 +10748,6 @@ void Player::RemoveItem( uint8 bag, uint8 slot, bool update )
|
|||
pItem->SetSlot( NULL_SLOT );
|
||||
if( IsInWorld() && update )
|
||||
pItem->SendUpdateToPlayer( this );
|
||||
|
||||
if( slot == EQUIPMENT_SLOT_MAINHAND )
|
||||
UpdateExpertise(BASE_ATTACK);
|
||||
else if( slot == EQUIPMENT_SLOT_OFFHAND )
|
||||
UpdateExpertise(OFF_ATTACK);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -10831,6 +10832,12 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
|
|||
// remove item dependent auras and casts (only weapon and armor slots)
|
||||
RemoveItemDependentAurasAndCasts(pItem);
|
||||
|
||||
// update expertise
|
||||
if ( slot == EQUIPMENT_SLOT_MAINHAND )
|
||||
UpdateExpertise(BASE_ATTACK);
|
||||
else if( slot == EQUIPMENT_SLOT_OFFHAND )
|
||||
UpdateExpertise(OFF_ATTACK);
|
||||
|
||||
// equipment visual show
|
||||
SetVisibleItemSlot(slot,NULL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7510"
|
||||
#define REVISION_NR "7511"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue