mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 21:04:26 +08:00
optimization
This commit is contained in:
parent
4ccc606878
commit
f4f4d7570f
@ -992,10 +992,12 @@ void Player::UpdateWeaponSkill(Unit* victim, WeaponAttackType attType, ObjectGui
|
||||
uint32 weapon_skill_gain = sWorld->getIntConfig(CONFIG_SKILL_GAIN_WEAPON);
|
||||
|
||||
Item* tmpitem = GetWeaponForAttack(attType, true);
|
||||
Item* item = GetItemByGuid(itemGuid);
|
||||
if (item && item != tmpitem && !item->IsBroken())
|
||||
ObjectGuid tmpitemGUID = tmpitem ? tmpitem->GetGUID() : ObjectGuid::Empty;
|
||||
if (itemGuid != ObjectGuid::Empty && itemGuid != tmpitemGUID)
|
||||
{
|
||||
tmpitem = item;
|
||||
Item* item = GetItemByGuid(itemGuid);
|
||||
if (item && !item->IsBroken())
|
||||
tmpitem = item;
|
||||
}
|
||||
|
||||
if (!tmpitem && attType == BASE_ATTACK)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user