Slow Spellhander

Share files with other Dawn of Light users

Moderator: Support Team

Slow Spellhander

Postby dargon » Thu Aug 31, 2017 11:02 am

http://darkageofcamelot.com/content/112 ... atch-notes

This spellhandler is not perfect. While it cannot be broken via combat, and has no immunity, it still interrupts. I welcome anyone to help me fix the interrupt problem, though i will continue to figure it out on my own.
A new crowd control effect referred to as ‘Slow’ is introduced:

Targets affected by Slow have their movement speed reduced, both in and out of combat.
Slow effects do not have an associated immunity timer after the effect ends. A target can be continuously slowed.
Slow stacks on top of any root or snare effect currently on the target - in a sense strengthening the power of the current root or snare.
Slows do not break on damage and do not have an associated immunity timer after its effect ends.
The strength of the slow lasts its full duration. It does not weaken as the remaining duration lowers.
Targets that are root or snare immune can still be slowed.
Slow effects do not interrupt on their own.
Attachments
SlowSpellhandler.cs
Updated and working as intended!
(5.05 KiB) Downloaded 181 times
Last edited by dargon on Thu Sep 21, 2017 8:30 pm, edited 1 time in total.
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Slow Spellhander

Postby HunabKu » Fri Sep 01, 2017 5:33 am

Nice !
"C'est l'ignorance qui apporte le chaos, pas la connaissance."
Scarlett Johansson dans "Lucy" de Luc Besson
-------------------------------------------------------------------------------
"Ignorance brings chaos, not knowledge."
Scarlett Johansson on "Lucy" by Luc Besson
User avatar
HunabKu
Developer
 
Posts: 1905
Joined: Sat Jun 18, 2011 4:48 am

Re: Slow Spellhander

Postby PlanarChaosRvrtwo » Mon Sep 04, 2017 7:20 am

Well there diffrent methods to fix it write a new spellhandler for that spell that ignore damage or you could make it pulsing spell that tick all 0,1 seconds so is effectivly allways online but that would be an dirty fix.
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: Slow Spellhander

Postby dargon » Thu Sep 07, 2017 5:02 am

@PlanarChaosRvrtwo It works perfectly as far as not breaking on damage, but the only issue with this script still is that it shouldn't interrupt the player that it is affecting. Though currently not a major issue, I do hope to figure it out, as I would like to try to make live-like updates to as many classes as I can, and this will be a feature that will be required in that step.
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Slow Spellhander

Postby PlanarChaosRvrtwo » Thu Sep 07, 2017 5:08 am

Whooops missunderstood it^^

Well i guess the problem is then how the effect is added to player then..
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: Slow Spellhander

Postby dargon » Thu Sep 07, 2017 5:12 am

indeed. I plan to look around, I'm pretty sure speed warp doesn't interrupt ;) Maybe I can get some leads there haha
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Slow Spellhander

Postby PlanarChaosRvrtwo » Thu Sep 07, 2017 8:51 am

What about dont use spell handlers and let speed warp nodes changing the region ability (if you get what i mean) around itself that force an speed of xy and also throw a NULL spell on the players with delve text for players to let em know what happen.

Cause infact players cant see diffrence!!

That for speed warp^^

And to the new snare effect you recognized to put disease and root together to get the result you want?
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: Slow Spellhander

Postby Batlas » Tue Sep 12, 2017 6:29 am

Maybe I misunderstand the issue here, but wouldn't the simplest solution to the matter be to create a flag on the spell to check whether or not the spell interrupts the user and set said flag to false for this situation? Obviously would require some changes to the casting code, but it would solve this issue relatively quickly.
[22:29] <Arms> someones having sex upstairs -.-
[22:30] <Arms> bbl

[21:16] <Angie> do /me
[21:16] <Batlas> roflmao
[21:16] <Dalaaji> haha
[21:16] <Batlas> wow that came out bad
[21:16] <Angie> wow
[21:16] <Angie> that so came out bad
Batlas
Support Team
 
Posts: 1707
Joined: Sun Mar 21, 2004 3:11 am

Re: Slow Spellhander

Postby PlanarChaosRvrtwo » Tue Sep 12, 2017 8:37 am

Interruption only check on casting if caster is interrupted not the spell duration those stuff is located in spellhandler.
That is why you should look into em.
DOL dint only gaved me the data to start my server,
it also gaved me 16 amazing years with nice peeps,
and now its on me to return the favor.
User avatar
PlanarChaosRvrtwo
Database Team
 
Posts: 517
Joined: Thu Jul 07, 2016 6:21 am

Re: Slow Spellhander

Postby Batlas » Tue Sep 12, 2017 11:31 pm

I'm not the OP, but my point to spells not being able to interrupt players like slow as per Dargons post was a pretty simple solution.


Inside spellhandler you have a flag, let's call it canInterupt for sake of the argument. You set this flag to false for slow.

Then inside gameliving

go to :

public virtual void StartInterruptTimer(int duration, AttackData.eAttackType attackType, GameLiving attacker)

and add something like if(attackType.AttackType == "Spell" && !attackType.SpellHandler.canInterrupt){
InterruptTime = 0;
InterruptAction = 0;
return;
}

This way regardless of what the spell does, it won't interrupt the target. Would probably need to be tweaked to work properly, but the general idea is pretty straight forward. Though admittedly, I have no idea whether or not debuffs/slows should or shouldn't rupt a caster. It's been a while since I've really played one.
[22:29] <Arms> someones having sex upstairs -.-
[22:30] <Arms> bbl

[21:16] <Angie> do /me
[21:16] <Batlas> roflmao
[21:16] <Dalaaji> haha
[21:16] <Batlas> wow that came out bad
[21:16] <Angie> wow
[21:16] <Angie> that so came out bad
Batlas
Support Team
 
Posts: 1707
Joined: Sun Mar 21, 2004 3:11 am

Re: Slow Spellhander

Postby ontheDOL » Sun Sep 17, 2017 5:51 am

thanks dargon for the handler.
I havent actually tried, but i think for the interrupt problem, i believe it is called in the "OnEffectStart" method. You call the "base" method of UnbreakableSpeedDecreaseSpellHandler which has a calls the interrupt check
Code: Select all
effect.Owner.StartInterruptTimer(effect.Owner.SpellInterruptDuration, AttackData.eAttackType.Spell, Caster);
you could get rid of the base call and just add all the logic from the derived classes and leave out this line for the interrupt check (there is also logic in Spellhandler.cs from this same method so include that too)
- Unty -
Model Showroom and DOL guides
http://losojos-001-site1.btempurl.com
User avatar
ontheDOL
Developer
 
Posts: 311
Joined: Fri May 20, 2016 4:21 am
Location: Australian abroad

Re: Slow Spellhander

Postby Batlas » Sun Sep 17, 2017 7:51 pm

ontheDOL,

Thanks, that made me look a bit deeper into the core. I originally, and incorrectly, assumed that all attacks came through the makeattack function in gameliving, which fires the interrupt timer as the last call of the method. Upon further research, your way is the correct way to implement the interrupt fix.

Thanks,

Batlas
[22:29] <Arms> someones having sex upstairs -.-
[22:30] <Arms> bbl

[21:16] <Angie> do /me
[21:16] <Batlas> roflmao
[21:16] <Dalaaji> haha
[21:16] <Batlas> wow that came out bad
[21:16] <Angie> wow
[21:16] <Angie> that so came out bad
Batlas
Support Team
 
Posts: 1707
Joined: Sun Mar 21, 2004 3:11 am

Re: Slow Spellhander

Postby dargon » Thu Sep 21, 2017 8:04 pm

im going to take a look now, thanks everyone for your help!
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Slow Spellhander

Postby dargon » Thu Sep 21, 2017 8:31 pm

ontheDOL was right on the money! the spell seems to be working as intended now, and original post has been updated with the updated handler! thanks everyone for your help and support, those who gave suggestions to the issues are thanked in the comments for everyone to know the support!
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm


Return to “%s” User Files

Who is online

Users browsing this forum: No registered users and 1 guest