Postby Leodagan » Fri May 20, 2016 7:49 am
With Current Implementation of CanCastInCombat you don't have much choice...
Either you implement a subclass of the GamePlayer Class with the method CanCastInCombat() overridden with your own checks...
Or you need to override your SpellHandler method CheckBeginCast() to add specific checks for in Combat case (you may have to completely copy/paste the method from SpellHandler to edit this part only... depends on the Spell you're trying to implement...)
If you want to use cast in combat behavior easily on any spell type you'll have to create a new GamePlayer subclass and register it as a default class to handle in-game player...
You can't directly subclass base SpellHandler in GameServerScript and force other spells to rely on your implementation rather than core one because they are already hardcoded to subclass core SpellHandler on build time...
With GSS only you can create a new GamePlayer implementation or override Spell Types but only one by one...