hi,
i was looking through honor virtue code and found an issue (not tested at demise, tested on lastest runuo at home).
problem is that damage from poison is not added to total damage and it messes final calculation.
so if you honor mob and kill it mostly by poison (in ideal case deal only 1 damage another way) you get much more virtue points than you should have (possibly like 100k from one mob).
if you deal dmg only by poison there is a division by zero that leads to +Infinity points, ater conversion to int -2147483648, capped to 1
Honor.cs, line 259
should be
i was looking through honor virtue code and found an issue (not tested at demise, tested on lastest runuo at home).
problem is that damage from poison is not added to total damage and it messes final calculation.
so if you honor mob and kill it mostly by poison (in ideal case deal only 1 damage another way) you get much more virtue points than you should have (possibly like 100k from one mob).
if you deal dmg only by poison there is a division by zero that leads to +Infinity points, ater conversion to int -2147483648, capped to 1
Honor.cs, line 259
Code:
public void OnTargetDamaged( Mobile from, int amount )
{
if ( m_FirstHit == FirstHit.NotDelivered )
m_FirstHit = FirstHit.Delivered;
if ( m_Poisoned )
{
m_HonorDamage += amount * 0.8;
m_Poisoned = false; // Reset the flag
return;
}
m_TotalDamage += amount;
...
should be
Code:
public void OnTargetDamaged( Mobile from, int amount )
{
if ( m_FirstHit == FirstHit.NotDelivered )
m_FirstHit = FirstHit.Delivered;
m_TotalDamage += amount;
if ( m_Poisoned )
{
m_HonorDamage += amount * 0.8;
m_Poisoned = false; // Reset the flag
return;
}
...