mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-25 04:22:26 +00:00
Logging to MeleeMitigation [skip ci]
This commit is contained in:
parent
3b23477139
commit
c927fec803
@ -59,7 +59,8 @@ RogueCritThrowingChance = 25;
|
|||||||
RogueDeadlyStrikeChance = 80;
|
RogueDeadlyStrikeChance = 80;
|
||||||
RogueDeadlyStrikeMod = 2;
|
RogueDeadlyStrikeMod = 2;
|
||||||
|
|
||||||
-- Source Function: Mob::GetMeleeMitigation()
|
-- Source Function: Mob::MeleeMitigation()
|
||||||
|
-- Partial: Rest happens in DoMeleeMitigation
|
||||||
function MeleeMitigation(e)
|
function MeleeMitigation(e)
|
||||||
e.IgnoreDefault = true;
|
e.IgnoreDefault = true;
|
||||||
|
|
||||||
@ -478,6 +479,22 @@ function DoMeleeMitigation(defender, attacker, hit, opts)
|
|||||||
local weight = 0.0;
|
local weight = 0.0;
|
||||||
local monkweight = MonkACBonusWeight;
|
local monkweight = MonkACBonusWeight;
|
||||||
|
|
||||||
|
eq.debug(
|
||||||
|
string.format("[%s] [Mob::MeleeMitigation] Stability Bonuses | AA [%i] Item [%i] Spell [%i]",
|
||||||
|
e.self:GetCleanName(),
|
||||||
|
aabonuses:CombatStability(),
|
||||||
|
itembonuses:CombatStability(),
|
||||||
|
spellbonuses:CombatStability()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
eq.debug(
|
||||||
|
string.format("[%s] [Mob::MeleeMitigation] Soft Cap [%i]",
|
||||||
|
e.self:GetCleanName(),
|
||||||
|
softcap
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
if defender:IsClient() then
|
if defender:IsClient() then
|
||||||
armor, shield_ac = GetRawACNoShield(defender);
|
armor, shield_ac = GetRawACNoShield(defender);
|
||||||
weight = defender:CastToClient():CalcCurrentWeight() / 10;
|
weight = defender:CastToClient():CalcCurrentWeight() / 10;
|
||||||
@ -582,12 +599,29 @@ function DoMeleeMitigation(defender, attacker, hit, opts)
|
|||||||
attack_rating = (attacker:GetATK() + (attacker:GetSkill(Skill.Offense) * 1.345) + ((attacker:GetSTR() - 66) * 0.9));
|
attack_rating = (attacker:GetATK() + (attacker:GetSkill(Skill.Offense) * 1.345) + ((attacker:GetSTR() - 66) * 0.9));
|
||||||
end
|
end
|
||||||
|
|
||||||
|
eq.debug(
|
||||||
|
string.format("[%s] [Mob::MeleeMitigation] Attack Rating [%02f] Mitigation Rating [%02f] Damage [%i] MinDmg [%i]",
|
||||||
|
e.self:GetCleanName(),
|
||||||
|
mitigation_rating,
|
||||||
|
attack_rating,
|
||||||
|
hit_damage_done,
|
||||||
|
hit.min_damage
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
hit.damage_done = GetMeleeMitDmg(defender, attacker, hit.damage_done, hit.min_damage, mitigation_rating, attack_rating);
|
hit.damage_done = GetMeleeMitDmg(defender, attacker, hit.damage_done, hit.min_damage, mitigation_rating, attack_rating);
|
||||||
|
|
||||||
if hit.damage_done < 0 then
|
if hit.damage_done < 0 then
|
||||||
hit.damage_done = 0;
|
hit.damage_done = 0;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
eq.debug(
|
||||||
|
string.format("[%s] [Mob::MeleeMitigation] Final Damage [%i]",
|
||||||
|
e.self:GetCleanName(),
|
||||||
|
hit.damage_done
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
return hit;
|
return hit;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -522,6 +522,16 @@ void Mob::MeleeMitigation(Mob *attacker, int32 &damage, int32 minhit, ExtraAttac
|
|||||||
float aa_mit = (aabonuses.CombatStability + itembonuses.CombatStability +
|
float aa_mit = (aabonuses.CombatStability + itembonuses.CombatStability +
|
||||||
spellbonuses.CombatStability) / 100.0f;
|
spellbonuses.CombatStability) / 100.0f;
|
||||||
|
|
||||||
|
Log.Out(
|
||||||
|
Logs::General,
|
||||||
|
Logs::Combat,
|
||||||
|
"[%s] [Mob::MeleeMitigation] Stability Bonuses | AA [%i] Item [%i] Spell [%i] ",
|
||||||
|
GetCleanName(),
|
||||||
|
aabonuses.CombatStability,
|
||||||
|
itembonuses.CombatStability,
|
||||||
|
spellbonuses.CombatStability
|
||||||
|
);
|
||||||
|
|
||||||
if (RuleB(Combat, UseIntervalAC)) {
|
if (RuleB(Combat, UseIntervalAC)) {
|
||||||
float softcap = (GetSkill(EQEmu::skills::SkillDefense) + GetLevel()) *
|
float softcap = (GetSkill(EQEmu::skills::SkillDefense) + GetLevel()) *
|
||||||
RuleR(Combat, SoftcapFactor) * (1.0 + aa_mit);
|
RuleR(Combat, SoftcapFactor) * (1.0 + aa_mit);
|
||||||
@ -637,6 +647,17 @@ void Mob::MeleeMitigation(Mob *attacker, int32 &damage, int32 minhit, ExtraAttac
|
|||||||
|
|
||||||
attack_rating = attacker->mod_attack_rating(attack_rating, this);
|
attack_rating = attacker->mod_attack_rating(attack_rating, this);
|
||||||
|
|
||||||
|
Log.Out(
|
||||||
|
Logs::General,
|
||||||
|
Logs::Combat,
|
||||||
|
"[%s] [Mob::MeleeMitigation] Attack Rating [%.2f] Mitigation Rating [%.2f] Damage [%i] MinDmg [%i]",
|
||||||
|
GetCleanName(),
|
||||||
|
attack_rating,
|
||||||
|
mitigation_rating,
|
||||||
|
damage,
|
||||||
|
minhit
|
||||||
|
);
|
||||||
|
|
||||||
damage = GetMeleeMitDmg(attacker, damage, minhit, mitigation_rating, attack_rating);
|
damage = GetMeleeMitDmg(attacker, damage, minhit, mitigation_rating, attack_rating);
|
||||||
} else {
|
} else {
|
||||||
////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////
|
||||||
@ -697,6 +718,14 @@ void Mob::MeleeMitigation(Mob *attacker, int32 &damage, int32 minhit, ExtraAttac
|
|||||||
|
|
||||||
if (damage < 0)
|
if (damage < 0)
|
||||||
damage = 0;
|
damage = 0;
|
||||||
|
|
||||||
|
Log.Out(
|
||||||
|
Logs::General,
|
||||||
|
Logs::Combat,
|
||||||
|
"[%s] [Mob::MeleeMitigation] Final Damage [%i]",
|
||||||
|
GetCleanName(),
|
||||||
|
damage
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is called when the Mob is the one being hit
|
// This is called when the Mob is the one being hit
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user