mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-03 11:12:25 +00:00
Add logging to Mob::CheckHitChance [skip ci]
This commit is contained in:
parent
690621268b
commit
0b790342e7
@ -75,7 +75,7 @@ function MeleeMitigation(e)
|
|||||||
e.hit.base_damage
|
e.hit.base_damage
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
e.hit.damage_done = 2 * e.hit.base_damage * GetDamageTable(e.self, e.hit.skill) / 100;
|
e.hit.damage_done = 2 * e.hit.base_damage * GetDamageTable(e.self, e.hit.skill) / 100;
|
||||||
e.hit = DoMeleeMitigation(e.self, e.other, e.hit, e.opts);
|
e.hit = DoMeleeMitigation(e.self, e.other, e.hit, e.opts);
|
||||||
|
|
||||||
@ -221,6 +221,16 @@ function CheckHitChance(e)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local tohit_roll = Random.Real(0, 100);
|
local tohit_roll = Random.Real(0, 100);
|
||||||
|
|
||||||
|
eq.debug(
|
||||||
|
string.format("[%s] [Mob::CheckHitChance] Chance [%i] ToHitRoll [%i] Hit? [%t]",
|
||||||
|
e.self:GetCleanName(),
|
||||||
|
chancetohit,
|
||||||
|
tohit_roll,
|
||||||
|
(tohit_roll <= chancetohit)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if (tohit_roll <= chancetohit) then
|
if (tohit_roll <= chancetohit) then
|
||||||
e.ReturnValue = true;
|
e.ReturnValue = true;
|
||||||
else
|
else
|
||||||
|
|||||||
@ -305,6 +305,16 @@ bool Mob::CheckHitChance(Mob* other, EQEmu::skills::SkillType skillinuse, int Ha
|
|||||||
|
|
||||||
float tohit_roll = zone->random.Real(0, 100);
|
float tohit_roll = zone->random.Real(0, 100);
|
||||||
|
|
||||||
|
Log.Out(
|
||||||
|
Logs::General,
|
||||||
|
Logs::Combat,
|
||||||
|
"[%s] [Mob::CheckHitChance] Chance [%i] ToHitRoll [%i] Hit? [%s]",
|
||||||
|
GetCleanName(),
|
||||||
|
chancetohit,
|
||||||
|
tohit_roll,
|
||||||
|
(tohit_roll <= chancetohit) ? "true" : "false"
|
||||||
|
);
|
||||||
|
|
||||||
Log.Out(Logs::Detail, Logs::Attack, "Final hit chance: %.2f%%. Hit roll %.2f", chancetohit, tohit_roll);
|
Log.Out(Logs::Detail, Logs::Attack, "Final hit chance: %.2f%%. Hit roll %.2f", chancetohit, tohit_roll);
|
||||||
|
|
||||||
return(tohit_roll <= chancetohit);
|
return(tohit_roll <= chancetohit);
|
||||||
|
|||||||
11
zone/mob.cpp
11
zone/mob.cpp
@ -4603,11 +4603,16 @@ int16 Mob::GetCritDmgMob(uint16 skill)
|
|||||||
int critDmg_mod = 0;
|
int critDmg_mod = 0;
|
||||||
|
|
||||||
// All skill dmg mod + Skill specific
|
// All skill dmg mod + Skill specific
|
||||||
critDmg_mod += itembonuses.CritDmgMob[EQEmu::skills::HIGHEST_SKILL + 1] + spellbonuses.CritDmgMob[EQEmu::skills::HIGHEST_SKILL + 1] + aabonuses.CritDmgMob[EQEmu::skills::HIGHEST_SKILL + 1] +
|
critDmg_mod += itembonuses.CritDmgMob[EQEmu::skills::HIGHEST_SKILL + 1] +
|
||||||
itembonuses.CritDmgMob[skill] + spellbonuses.CritDmgMob[skill] + aabonuses.CritDmgMob[skill];
|
spellbonuses.CritDmgMob[EQEmu::skills::HIGHEST_SKILL + 1] +
|
||||||
|
aabonuses.CritDmgMob[EQEmu::skills::HIGHEST_SKILL + 1] +
|
||||||
|
itembonuses.CritDmgMob[skill] +
|
||||||
|
spellbonuses.CritDmgMob[skill] +
|
||||||
|
aabonuses.CritDmgMob[skill];
|
||||||
|
|
||||||
if(critDmg_mod < -100)
|
if (critDmg_mod < -100) {
|
||||||
critDmg_mod = -100;
|
critDmg_mod = -100;
|
||||||
|
}
|
||||||
|
|
||||||
return critDmg_mod;
|
return critDmg_mod;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user