Also clarify context for remove ghost auras place after set alive state.
This let get more expected results at remove ghost speed aura.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Visual appearance depend on model animation capability.
In addition, change stand state for creature at enter combat when creature has custom stand state.
Signed-off-by: NoFantasy <nofantasy@nf.no>
Thanks to Qsa prepare for mangos.
Note: single unsure case: is block chance must be show or set to 0 in shield disarm time.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This reverts commit 8dd3e4b31a31bb6dfc4d9fb51b1b7e67bad4ca16.
This is impossible crash case. Creature object can't be created without creatureInfo != NULL
So crash source can be only result wrong calling ClearInCombat() for deleted or NULL creature.
Also implement skip spell effects redirecting if magnet target can't be
targeted by this spell effect base at spell effect target data requirements.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
There's just too much garbage in dbc...
Should restore some damage school based talents broken with [10830],
hopefully without excessively triggering other spells again that shouldn't.
Specailly example Aura::HandleModCharm code where old code
call RemoveSpellsCausingAura or (a) dead and not called,
or (b) will remove aura self at call.
* Added safe for aura holder context version of RemoveSpellsCausingAura
* Cleanup old simple RemoveSpellsCausingAura code also.
Now only spells that actually deal damage or heal will trigger
when neither SpellFamilyName nor ProcEx & PROC_EX_EX_TRIGGER_ALWAYS are set.
Before, setting a SchoolMask would override this check, causing many bogus procs.
* Move SPELLFAMILY_* to DBCEnums.h and name it as SpellFamily
* Use enum in Unit::GetAura, move family mask code to new SpellEntry helper function.
* Avoid all auras scan in search of triggred spell for 20243.
at_same_transport already include player checks at assign and
it move to common if make 3 distance cases exactly same.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Affect any pet that are not being controlled (minipet/guardian/protector) and will also apply to pets owned by another creature.
Signed-off-by: NoFantasy <nofantasy@nf.no>
Original patch provided by Wojta
Note: From patch excluded talent 44543 and ranks stacking code.
It look like need another implemention different from suggested,
or at least more research.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
In patch added enum IgnoreUnitState and related checks now more cheating protected.
* Also remove redundant zone/area args for zone/area update function like UpdateZoneDependentAuras.
* Merge Player::*AllControlledUnits functions to Unit version with replace option args by mask arg.
* Unit::*AllControlledUnits guardian iteration make working with internal unsummon call suport for guardians case.
Also move related code to Unit and allow summon minipets by creatures.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Also fix creature's totems unsummon at owner remove from world.
Thanks to insider42 for prepering patch for mangos repo.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Also added loading check for redundant ap/ap_dot data in table.
* Merge Player::RemovePet and Pet::Remove function code to Pet::Unsummon
This let be sure that in all cases all required steps doen. For example this fix
creature's guardians propertly remove from guardians list.
* Add new pet save mode PET_SAVE_REAGENTS as replacement PET_SAVE_NOT_IN_SLOT+true-arg stable pair in old function args
This will avoid use reagent save arg with wrong different save modes.
* Fixed recently added code with absent check for re-summon protector pet call.