* 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.
* It was wasting CPU power as cell-level locking is not needed.
* Future multithreading will be on map-level.
* CellLock was just a 'proxy' between Cell and CellPair and in some cases carried redundant data.
* Some minor cleanup in Cell::Visit/Map::Visit.
Not send MOVEMENTFLAG_FORWARD (even if expected). As result npc will not run in same position when npc becomes visible at client side.
Signed-off-by: NoFantasy <nofantasy@nf.no>
* Re-number enums by function groups and use where possible new defined masks in code instead raw enum |-lists.
* Avoid use movement generator generic state markers like UNIT_STAT_CONFUSED for mark movement stoped.
Add special shadow UNIT_STAT_CONFUSED_MOVE/etc states for like use.
UNIT_STAT_CONFUSED in like case will be safe expect use for normal checks confused state presence
And UNIT_STAT_CONFUSED_MOVE for check real move in this state
This should help the poor homeless that does not have a database defined home at evade (such as "wild summon" without owner).
Signed-off-by: NoFantasy <nofantasy@nf.no>
also don't divide money loot for players who are not inside the
same map..
and player shouldn't be able to reclaim his corpse if it isn't in same map
and some other related cleanups
Tracking of class and profession trainer should then work as expected client side, but database still need to apply flag values based on trainer function.
Signed-off-by: NoFantasy <nofantasy@nf.no>
* If object still in world at delete
* If object still listed in client update queue
Possible with this crash reports will more informative and let find porblem.
use an extra function for setfeigndeath()
like it's done with setfeared already..
allow to apply feigndeath on creatures too
avoid moving of creatures with feign death applied
and start attacking last victim when feigndeath disappears