* 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.
* Added basic infrastructure for visibility update in case difference player and current view point.
Just for note: seletect additional arg way beacuse repeatable search object will slow but store pointer will not safe,
so use middle case: get view point pointer early as possible at visibility updates.
* Implement dynamic object and creature activisation while it's target of far sight spell effect
* Use this for SPELL_AURA_BIND_SIGHT, SPELL_AURA_FAR_SIGHT and SPELL_EFFECT_ADD_FARSIGHT.
* Note2: some spyglass like spells let look _around_ at long distance, this hard implement in current grid loading system
Without additional changes and not implemented (you will see empty area without creatures in likes case)
* Also fixed warning spam at CMSG_MOVE_SET_CAN_FLY_ACK receive by use proper packet sructure reading.
Also some code logic cleanups.
Changes let make more cleanups in base map access and other places,
but this chnages not inlcuded in patch.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* Store phase mask for creatures/gameobjects/corpse in DB
* Propertly set phase for summoned creatures/gameobjects/pets/corpses/spell related dynobjects
* Select proper phase for spawned creature/gameobjects and save it in DB
TODO: in game commands.
Including fix _SCallback for 3 params, triggred mode correct call for .cast back and .cast target.
Remove outdated code for support old 19421 (and ranks) implementation in client data.