Page 1 of 3

[committed] GameTrainingDummy fixes

PostPosted: Tue Apr 13, 2010 4:42 pm
by Are
Hi there,

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;
}
}
}
Fixed:
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;
}
Fixed:
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;
}
}
}
The patch file fixes this problems :).

Re: GameTrainingDummy fixes

PostPosted: Tue Apr 13, 2010 8:45 pm
by Graveen
Hi Are,

Did this behaviour is suitable for the training dummy in MagMell too ?

Thank you for the contribution ! :)

Re: GameTrainingDummy fixes

PostPosted: Tue Apr 13, 2010 9:57 pm
by Tolakram
These dummies are for the tutorial zones and work just like them, last I tested. Their health reduces to a small amount and then stays there. What dummies are you comparing too?

Re: GameTrainingDummy fixes

PostPosted: Wed Apr 14, 2010 6:20 am
by Are
These dummies are for the tutorial zones and work just like them, last I tested. Their health reduces to a small amount and then stays there. What dummies are you comparing too?
hmmm... The dummys from the Alb tutorial zone from Pendragon. I'll test that again later this day. Thanks for the info :)

Re: GameTrainingDummy fixes

PostPosted: Wed Apr 14, 2010 8:52 am
by Are
Did this behaviour is suitable for the training dummy in MagMell too ?
Can you tell me, where those dummys are located exactly? I'll search them too and do the same tests :).

Re: GameTrainingDummy fixes

PostPosted: Wed Apr 14, 2010 8:59 am
by Graveen
They are in magmell near the nightshade trainer; external side of a building

Re: GameTrainingDummy fixes

PostPosted: Wed Apr 14, 2010 10:32 am
by Tolakram
Tutorial dummies are in the starting keep, level 1 - 5, lined up against the wall as you come out the door.

Re: GameTrainingDummy fixes

PostPosted: Wed Apr 14, 2010 11:13 am
by Are
Tutorial dummies are in the starting keep, level 1 - 5, lined up against the wall as you come out the door.
Yes, I tested with this guys. But I'll to the tests again, to see if they are really loosing healthpercent.
Image

Edit: Ohhh you are talking about the Dummys you have to hit for the quests in the Tutorial zone (Youtube Link). Maybe they act a little different then the dummys I was talking about. Interesting...

They are in magmell near the nightshade trainer; external side of a building
Thx, that should help me finding them :).

Re: GameTrainingDummy fixes

PostPosted: Wed Apr 14, 2010 11:28 am
by Graveen
Are, if i speak about them, this is simply because afaik they are the only Dummy class in the code so i simply don't want your changes got side effect on them ;)

TYVM for the work :)

Re: GameTrainingDummy fixes

PostPosted: Wed Apr 14, 2010 11:37 am
by Are
Yes, I understood that :). I Just didn't know, that there were dummy mobs outside of the tutorial zone :P.

Re: GameTrainingDummy fixes

PostPosted: Wed Apr 14, 2010 5:09 pm
by Are
We have different Dummy types!

This is the dummy in front of the keep in the tutorial zone (Quest dummy):
Image
This mob is loosing HP down to 0%

This dummy is located to the right side of the keep in the tutorial zone:
Image
This mob is not loosing any HP

This dummy is located in Mag Mell:
Image
This mob is not loosing any HP


So, I think it would make sense to make GameTrainingDummy an abstract class and say him wether he looses HP or not? Or what do you think?

Re: GameTrainingDummy fixes

PostPosted: Wed Apr 14, 2010 5:34 pm
by Graveen
I rather see a flag in the constructor, *if* this is the only change (and i guess it is) but...

Not sure about what i'll say, but let me explain exactly the point i have in mind: the training Dummy in magmell is often used to check the cap of styles, unstyled etc... If we can only see this because the training dummy is loosing hp, then it is interesting to keep this behaviour.

In the case the damage cap (if you are 50 and training dummy is 1 ofc) is displayed in the log file, having the training dummy with hps set to w/e we want is not a problem. It is not necessary to create an abstract class nor using a bool IsLoosingHp in the constructor to set this (while the work of setting an IsLoosingHP is so easy that we could handle it).

Re: GameTrainingDummy fixes

PostPosted: Wed Apr 14, 2010 6:46 pm
by Tolakram
You know what? We have that flags column in the mob table ... let's use it for this! :)

Re: GameTrainingDummy fixes

PostPosted: Wed Apr 14, 2010 6:50 pm
by Aredhel
/smells a "Brownfield" application :)

Re: GameTrainingDummy fixes

PostPosted: Wed Apr 14, 2010 7:01 pm
by Are
You know what? We have that flags column in the mob table ... let's use it for this! :)
Hm, thats a nice idea.