This reverts commit 10784a8c7cc81c468b5411e973d36ecf31de9603.
Main reason: impossibility for me as commiter test problem and fix all corner cases problems.
Now in case when creature/etc some tices not updates in result stay
in not active (no near players or active objects) cell some important
timers (corpse decay, summon timers, group loot expire, aura durations, etc) will
updates at real diff time from last prev. update call.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
For some systems added exclude use real diff time because current limitations
like move generators. So its stay use last tick diff and considered freeze and
skip all time while creature in not active map part.
Added ObjectGuid version Aura::GetCasterGuid()
But for prevent big problen with backporting AuraHolder
to mangos-0.12 in most cases still used old uint64 version
Aura::GetCasterGUID.
Recommended use new version where possible in clean way
as done for some cases in commit already.
Also other classes have been affected, due to the use of search&replace.
This will probably break some patches and 3rd party libraries, so make sure to update them if required.
Thanks to Phille for the original idea and patch!
As with similar GO's that are not interactable (gameobject_template.flags|4) as default, GO's of type 2 becomes active when player can take a quest (or deliver quest).
Signed-off-by: NoFantasy <nofantasy@nf.no>
When GO is active for quest, same as GO type 3.
Also add comments for future development of gameobject dynamic flags
Signed-off-by: NoFantasy <nofantasy@nf.no>
* Move selection allowed upper and lower heights for target point
into near point core function used for contact/close point selection.
Selection base at possibility target point searcher fly/swim(or walk by water bottom).
* Use vamp water level data so have proper water level in instances in movements.
* Use increased ground search distance for water level case.
In addition add use of UNIT_DYNFLAG_TAPPED_BY_PLAYER
Added check to see if creature is tapped for isAllowedToLoot()
Signed-off-by: NoFantasy <nofantasy@nf.no>
ASSERT hard use in predictable way because diff. 3rd party libs code
redefine it inf different ways and hard make sure that used in end
of mangos define version. This is real detected problem make some
expected assert checks ignored and so bugs not detected as expected from code.
In addition made related changes:
* Common.h header expected to be first include in any src/game/header except most simple cases.
* Related FILE.h header expected to be first include in FILE.cpp
* Fixed some absent includes and type forwards for safe build without PCH enabled.
* Avoid using MANGOS_ASSERT in src/framework code
Also
* Fixed some amount wrong uses low guids as full player guids.
* Add private without body ObjectGuid(uint32 const&) for catch wrong assigns low guids to ObjectGuid.
In some cases need assign "0" guid, then use ObjectGuid() instead.
* Fixed .pdump commands work.
There is no sense to do that for objects that not in world - those objects are unknown for clients
and their packets will be ignored
(based on SilverIce's repo commit 6305402)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
To reflect better what the function should actually return and also to clarify when used in misc calculations.
Signed-off-by: NoFantasy <nofantasy@nf.no>
also isActiveObject check moved to WorldObject - all worldobjects are inactive by default, excluding players
this is a final part of cameras implementation
(based on commit efc9623)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Also remove template-way code selection for object for Map::AddToActive/Map::RemoveFromActive.
This simplify function use from not Map code.
Now movements of controlled unit are visible for nearby players,
even when controller too far from controlled unit
This new type of packet broadcasting used in HandleMovementOpcodes handler only,
maybe it can be used somewhere else.
(based on SilverIce's repo commit d2387ca)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
True if mapid fit to called instance map id and instance script confirm success for some_id case.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Only one example (mostly) case converted to use it.
Need lot work for finally switch to class obly use, so old low-level defines still exist also (while used).
But some unused low-level defines dropped.