Page 1 of 1
[committed] Fix Engage + Fix Spread Heal
PostPosted: Fri Jan 29, 2010 12:40 am
by Shursan
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

Re: Fix Engage + Fix Spread Heal
PostPosted: Fri Jan 29, 2010 1:46 am
by Shursan
it appears the engage effect doesn't work perfetly. loot another way to fix it.
Re: Fix Engage + Fix Spread Heal
PostPosted: Fri Jan 29, 2010 12:09 pm
by Graveen
Thank you Ysia ! i wait for your fix related to engage.
What is your server Ysia ?
Re: Fix Engage + Fix Spread Heal
PostPosted: Fri Jan 29, 2010 2:07 pm
by Shursan
Hi Graveen, my server Is Heimdall.
Re: Fix Engage + Fix Spread Heal
PostPosted: Sat Jan 30, 2010 8:43 pm
by Shursan
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 ?
Re: Fix Engage + Fix Spread Heal
PostPosted: Sat Jan 30, 2010 10:11 pm
by Phen
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.
Re: Fix Engage + Fix Spread Heal
PostPosted: Tue Feb 02, 2010 2:22 am
by Shursan
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.
Re: Fix Engage + Fix Spread Heal
PostPosted: Wed Feb 03, 2010 4:25 am
by Sand
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.
Re: Fix Engage + Fix Spread Heal
PostPosted: Wed Feb 03, 2010 6:12 am
by Phen
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.
Re: Fix Engage + Fix Spread Heal
PostPosted: Wed Feb 03, 2010 10:46 pm
by Shursan
ok it works in this sense

Re: Fix Engage + Fix Spread Heal
PostPosted: Thu Feb 04, 2010 4:07 am
by Sand
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.
Re: Fix Engage + Fix Spread Heal
PostPosted: Thu Feb 04, 2010 8:46 am
by Graveen
/summon Ysia to know if his changes are following this way.
Re: Fix Engage + Fix Spread Heal
PostPosted: Thu Feb 04, 2010 11:39 pm
by Shursan
- 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;
Re: [committed] Fix Engage + Fix Spread Heal
PostPosted: Tue Mar 02, 2010 11:42 pm
by Graveen
thank you, committed, soon in SVN