mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
feat(Core/Conf): Miss Chance Multiplier (#10873)
This commit is contained in:
@@ -3009,11 +3009,18 @@ SpellMissInfo Unit::MagicSpellHitResult(Unit* victim, SpellInfo const* spellInfo
|
||||
thisLevel = std::max<int32>(thisLevel, spellInfo->SpellLevel);
|
||||
int32 levelDiff = int32(victim->getLevelForTarget(this)) - thisLevel;
|
||||
|
||||
int32 MISS_CHANCE_MULTIPLIER = sWorld->getRate(
|
||||
int32 MISS_CHANCE_MULTIPLIER;
|
||||
if (sWorld->getBoolConfig(CONFIG_MISS_CHANCE_MULTIPLIER_ONLY_FOR_PLAYERS) && GetTypeId() != TYPEID_PLAYER) // keep it as it was originally (7 and 11)
|
||||
{
|
||||
MISS_CHANCE_MULTIPLIER = victim->GetTypeId() == TYPEID_PLAYER ? 7 : 11;
|
||||
}
|
||||
else
|
||||
{
|
||||
MISS_CHANCE_MULTIPLIER = sWorld->getRate(
|
||||
victim->GetTypeId() == TYPEID_PLAYER
|
||||
? RATE_MISS_CHANCE_MULTIPLIER_TARGET_PLAYER
|
||||
: RATE_MISS_CHANCE_MULTIPLIER_TARGET_CREATURE
|
||||
);
|
||||
: RATE_MISS_CHANCE_MULTIPLIER_TARGET_CREATURE);
|
||||
}
|
||||
|
||||
// Base hit chance from attacker and victim levels
|
||||
int32 modHitChance = levelDiff < 3
|
||||
|
||||
Reference in New Issue
Block a user