mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[10958] Rename function to CanUseEquippedWeapon
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
4fe41fb335
commit
b3076146fc
6 changed files with 9 additions and 9 deletions
|
|
@ -353,7 +353,7 @@ void Unit::Update( uint32 update_diff, uint32 p_time )
|
|||
|
||||
bool Unit::haveOffhandWeapon() const
|
||||
{
|
||||
if (!IsUseEquipedWeapon(OFF_ATTACK))
|
||||
if (!CanUseEquippedWeapon(OFF_ATTACK))
|
||||
return false;
|
||||
|
||||
if(GetTypeId() == TYPEID_PLAYER)
|
||||
|
|
@ -3330,7 +3330,7 @@ float Unit::GetUnitBlockChance() const
|
|||
if(GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Player const* player = (Player const*)this;
|
||||
if(player->CanBlock() && player->IsUseEquipedWeapon(OFF_ATTACK))
|
||||
if(player->CanBlock() && player->CanUseEquippedWeapon(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