mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
fix(Core/Spell): Titan's Grip check if player has 2H and shield equipped (#16984)
* check if player has a 2H and shield equipped * null check item2 for shield * style whitespace * removed unnecessary logic * remove unnecessary brackets --------- Co-authored-by: ChrisCGalbraith <chriscgalbraith@gmai.com>
This commit is contained in:
committed by
GitHub
parent
11cc4c4326
commit
ae5bf57dba
@@ -528,8 +528,14 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
|
|||||||
Item* item1 = caster->ToPlayer()->GetWeaponForAttack(BASE_ATTACK);
|
Item* item1 = caster->ToPlayer()->GetWeaponForAttack(BASE_ATTACK);
|
||||||
Item* item2 = caster->ToPlayer()->GetWeaponForAttack(OFF_ATTACK);
|
Item* item2 = caster->ToPlayer()->GetWeaponForAttack(OFF_ATTACK);
|
||||||
|
|
||||||
if (item1 && item2 && (item1->GetTemplate()->InventoryType == INVTYPE_2HWEAPON || item2->GetTemplate()->InventoryType == INVTYPE_2HWEAPON))
|
if (!item2)
|
||||||
|
item2 = caster->ToPlayer()->GetShield();
|
||||||
|
|
||||||
|
if (item1 && item2
|
||||||
|
&& (item1->GetTemplate()->InventoryType == INVTYPE_2HWEAPON || item2->GetTemplate()->InventoryType == INVTYPE_2HWEAPON))
|
||||||
|
{
|
||||||
amount = -10;
|
amount = -10;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
amount = 0;
|
amount = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user