Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] So, this might be either a bug in TC or blizzard and the client being weird:

[DiscordArchive] So, this might be either a bug in TC or blizzard and the client being weird:

[DiscordArchive] So, this might be either a bug in TC or blizzard and the client being weird:

rektbyfaith
Administrator
0
04-15-2022, 11:54 AM
#1
Archived author: Slumber • Posted: 2022-04-15T11:54:03.945000+00:00
Original source

So, this might be either a bug in TC or blizzard and the client being weird:
according to blizzard tooltip, hit rating->hit chance is depending on enemy level.

Yet, when I trace the process of melee hit chance calculation this happens:
```float Unit::MeleeSpellMissChance(Unit const* victim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const``` modifies hit chance by ``` missChance -= m_modMeleeHitChance``` which is a flat value.

```void Player::UpdateMeleeHitChances()``` calculates ```m_modMeleeHitChance``` from ```Player::GetRatingBonusValue``` which calls ```GetRatingMultiplier(cr)```

```float Player::GetRatingMultiplier(CombatRating cr)```only depends on player level. So in the whole process of modifying the hit chance, the hit rating is only calculated into a player level dependant constant which is applied. The enemy level is only considered for the skill value, not for the hit ratings as far as I can tell.

I modified the function to even disregard the player level (setting it to constant 60). So where would the 39% the client displays even come from? All other hover effects seem server based, is hit rating client based? Or is my whole tracing of how hit chance is calculated flawed?
[Image: unknown.png?ex=690c8c5b&is=690b3adb&hm=7...91219a1b9&]
rektbyfaith
04-15-2022, 11:54 AM #1

Archived author: Slumber • Posted: 2022-04-15T11:54:03.945000+00:00
Original source

So, this might be either a bug in TC or blizzard and the client being weird:
according to blizzard tooltip, hit rating->hit chance is depending on enemy level.

Yet, when I trace the process of melee hit chance calculation this happens:
```float Unit::MeleeSpellMissChance(Unit const* victim, WeaponAttackType attType, int32 skillDiff, uint32 spellId) const``` modifies hit chance by ``` missChance -= m_modMeleeHitChance``` which is a flat value.

```void Player::UpdateMeleeHitChances()``` calculates ```m_modMeleeHitChance``` from ```Player::GetRatingBonusValue``` which calls ```GetRatingMultiplier(cr)```

```float Player::GetRatingMultiplier(CombatRating cr)```only depends on player level. So in the whole process of modifying the hit chance, the hit rating is only calculated into a player level dependant constant which is applied. The enemy level is only considered for the skill value, not for the hit ratings as far as I can tell.

I modified the function to even disregard the player level (setting it to constant 60). So where would the 39% the client displays even come from? All other hover effects seem server based, is hit rating client based? Or is my whole tracing of how hit chance is calculated flawed?
[Image: unknown.png?ex=690c8c5b&is=690b3adb&hm=7...91219a1b9&]

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)