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>
* IsInWorld used to prevent return unexpected not in world objects.
* Delayed operations need to process its in world state.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* Call it from Map::AddObjectToRemoveList and remove now not needed explcit calls
* Create Gameobject version to make GO with owner more safe for remove
This will prevent delayd owner access from gameobject destructor
in time remove list proccessing and fix possible related problems
with crosslinked pointers.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Many in world gameobject that unexpected daspawned before must now work in more expected way.
In tests i not found any damage to bg gameobject work, and at least this restore expected work for non-bg dorrs//buttons broken
after half-year ago patch (that has been reverted partly in this commit)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
* Fixed update absent in ".gobject turn" command
* Propetly set rotation fields for summoned objects
* Check rotation/coordinates fields values at server loading
* Fixed creature/gameobject save from game (used in commands code only)
* Implement .modify phase (for player), .npc setphase (for creature/pet), .gobject phase (for gameobjects) commands
for set phasemask of selected object. In player/pet case temporary until in game phase switch/re-login/GM-mode change.
In creature/gameobject case change saved in DB.
* Add to .gps output phasemask value print. Allow use .gps command with creature/gameobject shift-link
(work for objects loaded in game in command time).
* 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.
* Use WorldObject phase mask field instead explicit aura scan. This allow have phase for any world objects.
* Add phase checks to packet broadcasters/object searchers. This let correctly work say/yell/area
and multi/random target spells/aggro assistance in phased areas or target selection.
* In GM-mode character presense (see and visible) in all phases except normal visibility efects including GM-visibility.
TODO: summoned objects phase set base at owner phase, load phase mask for creatures/gameobjects from DB, in game commands.
Fixed work all Huter traps target selection
More check in ObjectAccessor::Get Object
More generic work 22 TARGET_CASTER_COORDINATES target type
Signed-off-by: DiSlord <dislord@nomail.com>