[committed] GameTrainingDummy fixes

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

[committed] GameTrainingDummy fixes

Postby Are » Tue Apr 13, 2010 4:42 pm

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 :).
Attachments
trainingdummy.patch
No Health loss and correct LastAttackTick update
(1.27 KiB) Downloaded 12 times
User avatar
Are
DOL Acolyte
 
Posts: 106
Joined: Mon Mar 26, 2007 7:43 pm
Location: Germany

Re: GameTrainingDummy fixes

Postby Graveen » Tue Apr 13, 2010 8:45 pm

Hi Are,

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

Thank you for the contribution ! :)
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: GameTrainingDummy fixes

Postby Tolakram » Tue Apr 13, 2010 9:57 pm

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?
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: GameTrainingDummy fixes

Postby Are » Wed Apr 14, 2010 6:20 am

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 :)
User avatar
Are
DOL Acolyte
 
Posts: 106
Joined: Mon Mar 26, 2007 7:43 pm
Location: Germany

Re: GameTrainingDummy fixes

Postby Are » Wed Apr 14, 2010 8:52 am

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 :).
User avatar
Are
DOL Acolyte
 
Posts: 106
Joined: Mon Mar 26, 2007 7:43 pm
Location: Germany

Re: GameTrainingDummy fixes

Postby Graveen » Wed Apr 14, 2010 8:59 am

They are in magmell near the nightshade trainer; external side of a building
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: GameTrainingDummy fixes

Postby Tolakram » Wed Apr 14, 2010 10:32 am

Tutorial dummies are in the starting keep, level 1 - 5, lined up against the wall as you come out the door.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: GameTrainingDummy fixes

Postby Are » Wed Apr 14, 2010 11:13 am

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 :).
User avatar
Are
DOL Acolyte
 
Posts: 106
Joined: Mon Mar 26, 2007 7:43 pm
Location: Germany

Re: GameTrainingDummy fixes

Postby Graveen » Wed Apr 14, 2010 11:28 am

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 :)
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: GameTrainingDummy fixes

Postby Are » Wed Apr 14, 2010 11:37 am

Yes, I understood that :). I Just didn't know, that there were dummy mobs outside of the tutorial zone :P.
User avatar
Are
DOL Acolyte
 
Posts: 106
Joined: Mon Mar 26, 2007 7:43 pm
Location: Germany

Re: GameTrainingDummy fixes

Postby Are » Wed Apr 14, 2010 5:09 pm

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?
User avatar
Are
DOL Acolyte
 
Posts: 106
Joined: Mon Mar 26, 2007 7:43 pm
Location: Germany

Re: GameTrainingDummy fixes

Postby Graveen » Wed Apr 14, 2010 5:34 pm

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).
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12661
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: GameTrainingDummy fixes

Postby Tolakram » Wed Apr 14, 2010 6:46 pm

You know what? We have that flags column in the mob table ... let's use it for this! :)
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: GameTrainingDummy fixes

Postby Aredhel » Wed Apr 14, 2010 6:50 pm

/smells a "Brownfield" application :)
User avatar
Aredhel
Inactive Staff Member
 
Posts: 1024
Joined: Sat Apr 14, 2007 1:49 pm
Location: Germany

Re: GameTrainingDummy fixes

Postby Are » Wed Apr 14, 2010 7:01 pm

You know what? We have that flags column in the mob table ... let's use it for this! :)
Hm, thats a nice idea.
User avatar
Are
DOL Acolyte
 
Posts: 106
Joined: Mon Mar 26, 2007 7:43 pm
Location: Germany


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest