mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[10957] Implement auras SPELL_AURA_MOD_DISARM_OFFHAND (254) and SPELL_AURA_MOD_DISARM_RANGED (278).
Thanks to Qsa prepare for mangos. Note: single unsure case: is block chance must be show or set to 0 in shield disarm time. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
883e88fad5
commit
4fe41fb335
9 changed files with 76 additions and 30 deletions
|
|
@ -353,6 +353,9 @@ void Unit::Update( uint32 update_diff, uint32 p_time )
|
|||
|
||||
bool Unit::haveOffhandWeapon() const
|
||||
{
|
||||
if (!IsUseEquipedWeapon(OFF_ATTACK))
|
||||
return false;
|
||||
|
||||
if(GetTypeId() == TYPEID_PLAYER)
|
||||
return ((Player*)this)->GetWeaponForAttack(OFF_ATTACK,true,true);
|
||||
else
|
||||
|
|
@ -3327,7 +3330,7 @@ float Unit::GetUnitBlockChance() const
|
|||
if(GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Player const* player = (Player const*)this;
|
||||
if(player->CanBlock() )
|
||||
if(player->CanBlock() && player->IsUseEquipedWeapon(OFF_ATTACK))
|
||||
{
|
||||
Item *tmpitem = player->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
|
||||
if(tmpitem && !tmpitem->IsBroken() && tmpitem->GetProto()->Block)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue