View Single Post
06/12/23, 01:57 AM   #9
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 5,000
just use the mentioned scenes and events then.
At crafting scene hidden: Start cp changes with your whatever delay. Set a variable to savedvars: cp change needed.

Playery_deactivated: set an addon local prevention variable to true (will reset automatically to false then as you reliadui/zone).
In every situation where the cps should be changed check if the prevention variable is false, else do nothing! Just register the next event to check when cp changes could be done, see below.

Player_activated: check for SavedVars variable cp change needed. If true, change cps and reset sv variable to false.

And für all other cp charges without zoning just start it 10s after crafting scene hidden state.
Use event_player_combat_state and if you are in combat then set the same prevention variable as above.

If the prevention variable is true just delay the cp change again, depending on the current state: in combat, zoning, other things that block cp change) use the appropriate events (comvat state, player activated, crafting station interact end,..) to start the cp change check again. And do not add any "do very 10sc times where not needed and events and scenesmfragments hidden state should be enough and the correct" do now "triggers.

Last edited by Baertram : 06/12/23 at 02:05 AM.
  Reply With Quote