wurstscript / WurstStdlib2

WurstScript Standard Library Version 2
Apache License 2.0
55 stars 53 forks source link

Add all spell events to ClosureEvents #235

Open WareditorGit opened 5 years ago

WareditorGit commented 5 years ago

It would be useful to have all those events in ClosureEvents: EVENT_PLAYER_UNIT_SPELL_CHANNEL EVENT_PLAYER_UNIT_SPELL_CAST EVENT_PLAYER_UNIT_SPELL_EFFECT EVENT_PLAYER_UNIT_SPELL_FINISH EVENT_PLAYER_UNIT_SPELL_ENDCAST

Issue is that onCast is used for the EVENT_PLAYER_UNIT_SPELL_EFFECT event so we would have to find different names. After a conversation with @Frotty we came up with (in order): onChannel, onStart, onCast, onFinish and onEnd. Would be nice to have some feedback/suggestions before doing the PR.

Donach commented 5 years ago

@Krypt0n What about pushing BetterCast here?

Krypt0n commented 5 years ago

Ok so we have some enhanced casting System here, called "BetterCast" which handles several closure events, while using a preset ability (based on channel) which does mostly nothing but handling cooldown and manacost check. Current usable events:

OnBegin        
OnFail         
OnPreCast      
OnCastStart    
OnCastUpdate   
OnCastTick     
OnCastEnd      
OnEffect       
OnChannelStart 
OnChannelUpdate
OnChannelTick  
OnChannelEnd   
OnEnd          

Could do some adaptions and hotdoc, and might prepare it for stdlib, would need some polishing as well I guess. Still want to do some mayor improvements, thanks to PTR1.31, and also wanna make it triggerable with CustomUI. It has some Castbar/Channelbar, which should then also be updated to new frame functions.

//edit: Bettercast also features "Pushback" and "Interrupt" events.

WareditorGit commented 5 years ago

Using a preset ability for all those features might be out of the scope of a standard library or at least this package because it goes beyond the goals of ClosureEvents and makes backward compatibility tricky (though that's for @Frotty to decide). In my opinion, it should be included in a seperate package that is built using ClosureEvents.

Krypt0n commented 5 years ago

Well not for that issues I guess, more as some additional Util. Just reacted on my ping so far. But could take contribute the the PR, as i got some exp with that topic general.

Frotty commented 4 years ago

@Krypt0n ❓ 😄

Krypt0n commented 4 years ago

Yeah sup, well I was planning to reworked the system, and the thing is scale it a bit higher and that is not dooable by plain wc3 natives. So it will no run with my Custom UI API which is also WIP, and that is way to much for stdlib tbh.

So I won't pass it. But If still wanted @WareditorGit I can put my BetterCast code which uses native abilities somewhere so it can be used as basis.

Frotty commented 4 years ago

Yeah sup, well I was planning to reworked the system, and the thing is scale it a bit higher and that is not dooable by plain wc3 natives.

What?

Krypt0n commented 4 years ago

As I said. Its not done, and I pause that, cause working now on a Custom UI API, which will be required for the CastingSystem as it does fit all requirements with using, normal wc3 native abilities and triggers.

Frotty commented 4 years ago

I don't see how UI is related to adding spell events

Donach commented 4 years ago

Everything...

Krypt0n commented 4 years ago

Its basically the essence, cause without custom UI you can no clearing trigger spells that nicely and freely without interacting with units orders etc.

Frotty commented 4 years ago

Everything...

No. And then as @Krypt0n already said, this isn't stdlib material. This ticket is simply about adding spell events,

Cokemonkey11 commented 3 years ago

@WareditorGit is this still valid?

Frotty commented 3 years ago

yes