* Some spells have StackAmount > 255, for example 22735, 54314
* In SMSG_AURA_UPDATE maximum stack amount is limited by 255
* Move duplicate code into SpellAuraHolder::BuildUpdatePacket function
* Cleanup some weird type casts in _LoadAuras
Only work different from old way: target creature despawned.
So if this not expected use .respawn to it in gm mode or area respawn.
Code simplification suggested originally by rsa.
* Fixed wrong visibility changes in some cases at .mod phase uses.
* Apply phase change to any owned units (not only pets as before).
It also will applied in more safe way for avoid unexpected lost owner at update.
* Check view point setting auras targets accessability not only at visibility change
but also at phase change.
* Replace SetVisibility(GetVisibility()) hack like calls.
This fixes the problem, that creatures, added at grid loading, do not start attack each other
More shedule -> schedule fixes added, removed unused Map::PlayerRelocationNotify function
You need to update your config file, new "Visibility.RelocationLowerLimit" and "Visibility.AIRelocationNotifyDelay' options added
Special thanks to Ambal for code hints and advices
Thanks to Undergarun and kero99 for making tests
* For better fit name to related map type class InstanceMap renamed -> DungeonMap.
This clarify usage Instanceable()/IsDungeon() because BG/Arenas maps also instanceable maps.
* InstanceSave have many code related to only DungeonMap case, so it replaced by 3 new classes:
- MapPersistentState as base class, used for non-instanceable maps (continents and some other) (!Instenceable())
- DungeonPersistentState subclass of MapPersistentState, used for DungeonMap states (IsDungoen())
- BattlegroundPersistentState subclass of MapPersistentState, used for BattlegroundMap states (IsBattleGroundOrArena())
Now all dungeon resets code moved to subclass and all player/gpoup bound functions/structures also use it.
* Map::GetInstanceSave renamed to Map::GetPersistentState and DungeonMap have specialized version
return DungeonPersistentState (same pointer in fact with proper subcalss type)
* InstanceResetScheduler renamed to DungeonResetScheduler
* Higher ranks are now automatically filled when not listed in spell_threat
* Added some loading checks to detect inconsistent data
Signed-off-by: Lynx3d <lynx3d@some-imaginary-isp.org>
Some spells have procCharges > 0 and in same time maxStack > 1. It's support has been implemented more year ago
but current way work with single aura from stack remove at proc always made some spells work wrongly
(7 spells (with ranks) in 3.3.5a). In fact only 3 spell (with ranks) need this "one from stack" way and
all form its have similarity: Its apply max stack from start and decrease stacks at proc hit.
Another prove for correctness this way: in 2.x exist single spell with charges and maxstack that expect full aura stack remove.
So implemented opposition way: normal aura proc remove always full aura holder stack.
Special 3 cases have overwrite code for work with stack in correct for its way.
Fixed work:
* items 31857 and 50259
* recipe 46027 effects.
* talent 63730 and ranks
Affected by code changes talents 51528 and 55166 tested and work.
Spell 34026 use similar decrease stack at hit but req. independent patch for full implemention, so not work.
Aura holder unlock called later by code.
This prevent unexpected real aura delete at early effect aura proccessing
and crash at next effect aura proccessing.
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.