here are two things I figured out while testing something for the tutorial zone.
The training dummy loses health down to 10%, but it shouldn't lose any health at all.
Current:
- Code: Select all
public override int Health
{
get
{
return base.Health;
}
set
{
base.Health = Math.Max(1, value);
if (HealthPercent < 10)
{
base.Health = MaxHealth / 10;
}
}
}
- Code: Select all
public override int Health
{
get
{
return base.MaxHealth;
}
set
{
}
}
OnAttackedByEnemy does not update LastAttackTick correctly. This makes NPCs stop attacking the dummy after a few seconds.
Current:
- Code: Select all
public override void OnAttackedByEnemy(AttackData ad)
{
// put the dummy in combat mode to reduce regen times
LastAttackedByEnemyTickPvE = CurrentRegion.Time;
return;
}
- Code: Select all
public override void OnAttackedByEnemy(AttackData ad)
{
if (ad.IsHit)
{
if (ad.Attacker.Realm == 0 || this.Realm == 0)
{
LastAttackedByEnemyTickPvE = CurrentRegion.Time;
ad.Attacker.LastAttackTickPvE = CurrentRegion.Time;
}
else
{
LastAttackedByEnemyTickPvP = CurrentRegion.Time;
ad.Attacker.LastAttackTickPvP = CurrentRegion.Time;
}
}
}
