feat(Core/Conf): Miss Chance Multiplier (#10873)
This commit is contained in:
parent
eb3b803970
commit
0e35b681fb
4 changed files with 19 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue