[committed] Fix Engage + Fix Spread Heal

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

[committed] Fix Engage + Fix Spread Heal

Postby Shursan » Fri Jan 29, 2010 12:40 am

Hi,
There's a problem actually when a player engage a mob or player, when the engage effect is started, he was immediatly removed due to an error in the code.

And for Spread Heal there's normally affected bye Disease, only if the caster is diseased, the spread don't really heal ther member group.

There's a source in french forum here : http://forums.jeuxonline.info/showthread.php?t=335267
sorry only find that in french :)
Attachments
Spread Heal Fix Disease.patch
(1.01 KiB) Downloaded 11 times
Fix Engage Ability.patch
(1.02 KiB) Downloaded 15 times
Origins/Genesis Administrator
Shursan
Server Representative
 
Posts: 376
Joined: Mon Jun 22, 2009 8:25 pm
Location: France

Re: Fix Engage + Fix Spread Heal

Postby Shursan » Fri Jan 29, 2010 1:46 am

it appears the engage effect doesn't work perfetly. loot another way to fix it.
Origins/Genesis Administrator
Shursan
Server Representative
 
Posts: 376
Joined: Mon Jun 22, 2009 8:25 pm
Location: France

Re: Fix Engage + Fix Spread Heal

Postby Graveen » Fri Jan 29, 2010 12:09 pm

Thank you Ysia ! i wait for your fix related to engage.

What is your server Ysia ?
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: Fix Engage + Fix Spread Heal

Postby Shursan » Fri Jan 29, 2010 2:07 pm

Hi Graveen, my server Is Heimdall.
Origins/Genesis Administrator
Shursan
Server Representative
 
Posts: 376
Joined: Mon Jun 22, 2009 8:25 pm
Location: France

Re: Fix Engage + Fix Spread Heal

Postby Shursan » Sat Jan 30, 2010 8:43 pm

ok seems to work now, i want to know if that's normal if a player is not in attack mode, the engage effect is stopped ?
Origins/Genesis Administrator
Shursan
Server Representative
 
Posts: 376
Joined: Mon Jun 22, 2009 8:25 pm
Location: France

Re: Fix Engage + Fix Spread Heal

Postby Phen » Sat Jan 30, 2010 10:11 pm

Engage should toggle on/off when used. If player gets out of attack mode Engage stop. If player uses a style while Engaging engage will stop as well.
Phen
Storm GM
 
Posts: 674
Joined: Thu Jun 12, 2008 12:55 am
Yahoo Messenger: KerzedSoul@yahoo.com

Re: Fix Engage + Fix Spread Heal

Postby Shursan » Tue Feb 02, 2010 2:22 am

OK seems to work more correct now i think, the reel problem is a code, if (!m_owner.AttackState)
one part of code make this possible only if target is not null
Code: Select all
if (target == null)
{
player.Out.SendMessage("Vous ne pouvez engager qu'une cible hostile envers vous.", eChatType.CT_System, eChatLoc.CL_SystemWindow);
return;
}
Another part make it impossible if you're not in attack mode
Code: Select all
if (!m_owner.AttackState)
{
m_owner. StartAttack(m_engageTarget);
if (m_owner is GamePlayer)
(m_owner as GamePlayer).Out.SendAttackMode(true);
etc..
}
and another make it impossible within a timer of 5 sec (if you have make one or two taunt on the mob)

It's verry difficult to make this possible by this way because generally tank taunt before engage, after they can't engage ... because :
if he attack --> timer
if don't attack (wait timer end for exemple) --> not in attackstat and can't engage
if they make player in attackstate with no mob selected --> can't engage
if selecte a mob after make it in attackstate, there's just a short period before the first hit for engage. (i have tested, verry hard :)

with the patch, all works fine i think.
Attachments
Patch Engage.patch
(2.7 KiB) Downloaded 15 times
Origins/Genesis Administrator
Shursan
Server Representative
 
Posts: 376
Joined: Mon Jun 22, 2009 8:25 pm
Location: France

Re: Fix Engage + Fix Spread Heal

Postby Sand » Wed Feb 03, 2010 4:25 am

You should be able to taunt (spell taunt) and not break the engage stance, the engage does stop working until the mob is no longer in "being attacked" mode.

Basically should be able to put yourself in engage mode and only break engage mode when you make a mele attack, run out of endo, or cancel the effect.

The things that make engage stop working is the mob being below 75% health or you attacking mob with insta cast spells.

I forget atm whether other people attacking mob stops engage from working but again it would only the improved blocking it should not actually break the stance.
Sand
Server Team
 
Posts: 1375
Joined: Sat May 17, 2008 2:05 am

Re: Fix Engage + Fix Spread Heal

Postby Phen » Wed Feb 03, 2010 6:12 am

Engage is only active until your target takes damage. If you damage a target and decide to Engage it within 10 seconds(or combat timer) Engage will fail.
Phen
Storm GM
 
Posts: 674
Joined: Thu Jun 12, 2008 12:55 am
Yahoo Messenger: KerzedSoul@yahoo.com

Re: Fix Engage + Fix Spread Heal

Postby Shursan » Wed Feb 03, 2010 10:46 pm

ok it works in this sense :)
Origins/Genesis Administrator
Shursan
Server Representative
 
Posts: 376
Joined: Mon Jun 22, 2009 8:25 pm
Location: France

Re: Fix Engage + Fix Spread Heal

Postby Sand » Thu Feb 04, 2010 4:07 am

Engage is only active until your target takes damage. If you damage a target and decide to Engage it within 10 seconds(or combat timer) Engage will fail.
It fails in sense that it don't work for 10 seconds but you still go into engage mode, you just receive a message saying they have taken damage and can't be engaged right now until that timer expires and engage then starts working again. Point is you don't have to hit engage again.

I know this because of doing the ml7 encounter with the big snake guy that grows in level, where the best way to do the encounter is to do a quick taunt then engage, once you enter engage mode, you might take a few hits before engage effect actually kicks in but they don't hurt much when he is a lower level and if the tank is a paly or valk then they heal themselves to help cement agro on them.
Sand
Server Team
 
Posts: 1375
Joined: Sat May 17, 2008 2:05 am

Re: Fix Engage + Fix Spread Heal

Postby Graveen » Thu Feb 04, 2010 8:46 am

/summon Ysia to know if his changes are following this way.
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: Fix Engage + Fix Spread Heal

Postby Shursan » Thu Feb 04, 2010 11:39 pm

Code: Select all
/// <summary>
/// Starts a melee or ranged attack on a given target.
/// </summary>
/// <param name="attackTarget">The object to attack.</param>
public virtual void StartAttack(GameObject attackTarget)
{
// Aredhel: Let the brain handle this, no need to call StartAttack
// if the body can't do anything anyway.
if (IsIncapacitated)
return;

if (IsEngaging)
CancelEngageEffect();
No changes about that, code is in GameLiving.cs
And for the cancel if player do a style, it's in StyleProcessor, no changes needed.
Code: Select all
/// <summary>
/// Tries to queue a new style in the player's style queue.
/// Takes care of all conditions like setting backup styles and
/// canceling styles if the style was queued already.
/// </summary>
/// <param name="living">The living to execute the style</param>
/// <param name="style">The style to execute</param>
public static void TryToUseStyle(GameLiving living, Style style)
{
if (living.IsEngaging)
{
// cancel engage effect if exist
EngageEffect effect = (EngageEffect)living.EffectList.GetOfType(typeof(EngageEffect));
if (effect != null)
effect.Cancel(false);
}
}
In fact, i think the only last errors was that :
Code: Select all
public virtual bool CastSpell(GameLiving targetObject)
{
Caster.Notify(GameLivingEvent.CastStarting, m_caster, new CastingEventArgs(this));

if (Caster.IsEngaging)
{
EngageEffect effect = (EngageEffect)Caster.EffectList.GetOfType(typeof(EngageEffect));

if (effect != null)
effect.Cancel(false);
}
}
the taunt cone spell (Armsman, Hero, and Warrior) can be casted and don't break the engage effect ?

And for the duration before engage after mob takedamage
Code: Select all
/// <summary>
/// wait 5 sec to engage after attack
/// </summary>
public const int ENGAGE_ATTACK_DELAY_TICK = 5000;
Origins/Genesis Administrator
Shursan
Server Representative
 
Posts: 376
Joined: Mon Jun 22, 2009 8:25 pm
Location: France

Re: [committed] Fix Engage + Fix Spread Heal

Postby Graveen » Tue Mar 02, 2010 11:42 pm

thank you, committed, soon in SVN
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


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 0 guests