Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #74 from Takenbacon/patch-1
Browse files Browse the repository at this point in the history
Corrected block player field
  • Loading branch information
SkyFire committed Feb 12, 2014
2 parents 73e09e0 + dca3f6b commit 4e9d6bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/server/game/Entities/Unit/StatSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ void Player::UpdateBlockPercentage()

value = value < 0.0f ? 0.0f : value;
}
SetStatFloatValue(PLAYER_FIELD_PLAYER_FLAGS, value);
SetStatFloatValue(PLAYER_FIELD_BLOCK_PERCENTAGE, value);
}

void Player::UpdateCritPercentage(WeaponAttackType attType)
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Entities/Unit/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2634,7 +2634,7 @@ float Unit::GetUnitBlockChance() const
{
Item* tmpitem = player->GetUseableItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND);
if (tmpitem && !tmpitem->IsBroken())
return GetFloatValue(PLAYER_FIELD_PLAYER_FLAGS);
return GetFloatValue(PLAYER_FIELD_BLOCK_PERCENTAGE);
}
// is player but has no block ability or no not broken shield equipped
return 0.0f;
Expand Down

0 comments on commit 4e9d6bc

Please sign in to comment.