Core/Players: Fixed base hit chance initialization for players

This commit is contained in:
Shauren
2023-07-15 22:06:56 +02:00
parent ab33f35bb5
commit 1f8eddc4f0
2 changed files with 7 additions and 12 deletions

View File

@@ -157,6 +157,10 @@ Player::Player(WorldSession* session) : Unit(true), m_sceneMgr(this)
m_session = session;
m_modMeleeHitChance = 7.5f;
m_modRangedHitChance = 7.5f;
m_modSpellHitChance = 15.0f;
m_ingametime = 0;
m_sharedQuestId = 0;

View File

@@ -355,18 +355,9 @@ Unit::Unit(bool isWorldObject) :
m_floatStatNegBuff = { };
m_attacking = nullptr;
if (GetTypeId() == TYPEID_PLAYER)
{
m_modMeleeHitChance = 7.5f;
m_modRangedHitChance = 7.5f;
m_modSpellHitChance = 15.0f;
}
else
{
m_modMeleeHitChance = 0.0f;
m_modRangedHitChance = 0.0f;
m_modSpellHitChance = 0.0f;
}
m_modMeleeHitChance = 0.0f;
m_modRangedHitChance = 0.0f;
m_modSpellHitChance = 0.0f;
m_baseSpellCritChance = 5;
m_speed_rate.fill(1.0f);