* damage - different direct damage calculation tracing
* combat - combat state updates, roll attack result and etc
* spell_cast - spell cast progress and aura apply
TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER expected seelction friendly targets
for spell caster around spell caster (so ignore original caster faction).
This meaning that for begative spell also selected friendly targets for
spell caster object.
* Move and rename MAX_REAGENTS to DBC Strcuture.h.
It used only afore access to SpellEntry field and so part of strcuture definition.
* Add MAX_SPELL_TOTEMS and MAX_SPELL_TOTEM_CATEGORIES for same reasons, and use in code.
(based on 400's commit 0f37423)
(based on 400's commit 636cfef)
(based on 400's commit 0bbe3a7)
(based on 400's commit ce86b56)
(based on 400's commit b74c6a8)
* Spell::GetCastingObject must be use for selection visual/point cast,
not for friend/enemy checks. Add extanded GetAffectiveCasterObject
for proper provide for referecned checks wild gameobject casted case.
* Also support chain damage spells casted by gameobjects.
Unit may be not selectable, but spell may be expected to target this unit in any case.
Mostly known problem with npc->npc spells and dummy/triggered spells from AI side.
Signed-off-by: NoFantasy <nofantasy@nf.no>
* Add IsHostileTo/IsFriendlyTo and implement expected way checks for diff. world object types.
For controlled object check redirected to specific owner, for wild gameobject base at gameobject faction.
If faction not set expected to be hostile to anyone.
* Update grid searchers to be usable with world object instead only unit case.
Some grid searches lost redundent second object arg, AnyAoETargetUnitInObjectRangeCheck lost hitHidden arg
(for hitHidden==true case added new AnyAoEVisibleTargetUnitInObjectRangeCheck)
* Updated grid searchers used with gameobject area casts now.
Note: Gameobject area spell cast animation will still wrong show around cast triggering target instead
center around gameobject.
* In case gameobject aura apply to target for restored use target itself as caster because
we not have currently another way apply aura form wild gameobject.
Some items with negative by defaul charges not expected to be deletedt at no charges.
In past this fixed by using positive charges amount in like cases in different from
expected negative value. Adding new field for avoid this.