public int GetStress(Creature other)
{
// Get NPC stress and last change date
var stress = other.Vars.Perm["npc_stress_" + this.Name] ?? 0;
var change = other.Vars.Perm["npc_stress_change_" + this.Name];
// Reduce stress by 1 each minute
if (change != null && stress > 0)
{
TimeSpan diff = DateTime.Now - change;
stress = Math.Max(0, stress - Math.Floor(diff.TotalMinutes));
}
return (int)stress;
}