This can be used for some tick number dependent aura effects.
Also in some cases impossible claculate tickes count pass,
for example for infinity duration auras.
All effect target modes start from client provided target data
so all its must be used for checking explicit target modes.
For example exist spells that have as first effect SELF non-explicit target mode.
but in same time negative to explicit target.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Also add caching IsHostileTo/IsFriendlyTo for avoid recall this not fast functions.
* Not unsummon warlock pets at logout.
* Prevent overwrite current saved pet at save secondary pet (with temporary unsummoned first).
This possible at arena for example.
* Not fixed: in char list at login pet don't must be show with character if character saved at mount in game.
Not critical and maybe not need fix as feature ;)
* No unsummon temporary pet at non-fly mounting.
* Implement client side disable pet's action bar for mountted owner time
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* implement server side action disabled case (action bar modify, aggro reaction and autocast)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Also remove wrong masks from talent 53486 and ranks.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
To update a creatures distance to it's target without creating a new movement generator. Note it can only be used where creature is using TargetedMovementGenerator.
Signed-off-by: NoFantasy <nofantasy@nf.no>
Function will return a cast result, with fail reasons if spell can not be casted (can be used to take alternative action). Please note this is not a full list of cast fail errors/reasons, but will cover a few basic errors that may occur.
The virtual function CanCastSpell() may be adjusted for custom needs from script library if not the default is sufficient.
Signed-off-by: NoFantasy <nofantasy@nf.no>
This will prevent case when expansion set to high for supported client
in config and account have also too high expansion setting.
Client in like case receive too high expnasion and reject connection
because it think that have not installed expansion for connection account.
This possible for example for account case when single realmd used for
diff client versions and account have high expansion setting for most
recent client support. And in same time mamngos.conf for specific realm
have wrong Expansion value.
Like spell will placed in unit event list for cast at next tick or later dependent from cast timer.
Before all triggered spell ignore cast time and casted explcitly from related cast caller code.
This must fix some spell work like 17086 in damage apply time part and also in preventing possible
stack overflow because this spell triggering by chain 19 spell casts from each other.
This also exclude from triggered arg of CastSpell function meaning that this cast will instant alsways.
So triggred arg now meaning only that this seppl casted nit from player side and then not send
in some cases cast info to client if not vosula effect expected.