WurstStdlib2 icon indicating copy to clipboard operation
WurstStdlib2 copied to clipboard

Add all spell events to ClosureEvents

Open WareditorGit opened this issue 5 years ago • 14 comments

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.

WareditorGit avatar May 08 '19 09:05 WareditorGit

@Krypt0n What about pushing BetterCast here?

Donach avatar May 08 '19 10:05 Donach

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.

Krypt0n avatar May 08 '19 10:05 Krypt0n

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.

WareditorGit avatar May 08 '19 11:05 WareditorGit

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.

Krypt0n avatar May 08 '19 11:05 Krypt0n

@Krypt0n ❓ 😄

Frotty avatar Nov 04 '19 17:11 Frotty

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.

Krypt0n avatar Nov 06 '19 18:11 Krypt0n

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?

Frotty avatar Nov 06 '19 19:11 Frotty

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.

Krypt0n avatar Nov 15 '19 14:11 Krypt0n

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

Frotty avatar Nov 15 '19 15:11 Frotty

Everything...

Donach avatar Nov 15 '19 22:11 Donach

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

Krypt0n avatar Nov 17 '19 00:11 Krypt0n

Everything...

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

Frotty avatar Nov 17 '19 08:11 Frotty

@WareditorGit is this still valid?

Cokemonkey11 avatar Apr 05 '21 15:04 Cokemonkey11

yes

Frotty avatar Apr 06 '21 20:04 Frotty