Also allow play emote on Player when player is source.
Gameobject may be source of script but are only allowed as searcher for creature when defined.
Signed-off-by: NoFantasy <nofantasy@nf.no>
This fixes the problem, that creatures, added at grid loading, do not start attack each other
More shedule -> schedule fixes added, removed unused Map::PlayerRelocationNotify function
You need to update your config file, new "Visibility.RelocationLowerLimit" and "Visibility.AIRelocationNotifyDelay' options added
Special thanks to Ambal for code hints and advices
Thanks to Undergarun and kero99 for making tests
Now any creatures/gameobjects loaded base at DB data
in non-instanceable/instanceable maps always have same guid
as in DB data.
* Also remove useless by same reasons MaNGOS::GameObjectWithDbGUIDCheck
* Creature/GameObject guid generators moved to Map
* For avoid wrong not converted cases generic function in ObjectMgr has been replaced by
specilized guid generation function like sObjectMgr.GeneratePlayerLowGuid().
This let catch all cases that need update in custom code or scripts.
* Drop many ObjectAcessor.h now dead code. This is also make mangos more thread safe.
* Restore one more time unix build broken in prev. commits.
Note: many cases when something not wotk in instance but work in continents
possible magicly start work after this commit. For example, some gm commands.
From large systems that need more chnages for start work in full power in instances
can be referecned pool/gamevent system. Last need just small hacks drop changes but
in will addded in independent commit.
* Map Persistent noe have direct pointer back to map if map loaded.
That let simplify some code and avoid map search.
* Crash showup in result changes in code logic related to reset processing.
* Also fix more old bug with reset normal dungeon with not loaded map.
* Reverse MapPersistentState::HasRespawnTimes and MapPersistentState::HasBounds() results
to expected for function names and update related calls.
Thanks to Schmoozerd for help in research problem.
* For better fit name to related map type class InstanceMap renamed -> DungeonMap.
This clarify usage Instanceable()/IsDungeon() because BG/Arenas maps also instanceable maps.
* InstanceSave have many code related to only DungeonMap case, so it replaced by 3 new classes:
- MapPersistentState as base class, used for non-instanceable maps (continents and some other) (!Instenceable())
- DungeonPersistentState subclass of MapPersistentState, used for DungeonMap states (IsDungoen())
- BattlegroundPersistentState subclass of MapPersistentState, used for BattlegroundMap states (IsBattleGroundOrArena())
Now all dungeon resets code moved to subclass and all player/gpoup bound functions/structures also use it.
* Map::GetInstanceSave renamed to Map::GetPersistentState and DungeonMap have specialized version
return DungeonPersistentState (same pointer in fact with proper subcalss type)
* InstanceResetScheduler renamed to DungeonResetScheduler
* Fixed bug with not unloaded InstanceSave for BGs/ArenasPartly.
This bug introduced with recent InstanceSave creating for all maps.
* Avoid save respawn data to DB for BGs/Arenas.
No reason save to DB because BGs/Arenas reset at map unload.
* Always create InstanceSave for Map without recheck suggested data integrity.
Map::GetInstanceSave expected always return != NULL value.
* New table added for non-instanced maps (except BG/arena):
- `mangos`.`world_template` (script mapping to non instanced data)
- `characters`.`world` (saved script data string storage)
* InstancedData created for any map types including BGs/arenas, that allow have scripts
state for any maps, but BG/arena instance data not saved.
Note: Possible structures will renamed later for clarify apply to any type maps,
but avoid for now for simplify changes and hard affect to script library sources.
- Script library presence is now optional.
- Some script hooks have new names. Scripting libraries need to be adjusted accordingly.
Signed-off-by: zergtmn <zerg@myisp.com>
Typos show that in fact "working" has been result typos diabled state for relamd.
Cell-based way have not avoidable problems with case when object added to not active
long time Cell. If someone find more working sollution it can be readded ofc.
* Use anum instead raw uint8 type in args
* Fixed crash when gm at continent invite to group gm in instance
and then teleport to instance using .goname.
When group leader teleport to instance it must get group bind instead solo bind.
* In other semilar cases detection report error as before but replace solo by group bind instead
assert crash at enter to map.
In new version last update time stopred for specific Cell that store all world objects
placed in it. All objects of Cell updated (or not updated) in same time.
Original version provided by ciphercom.
This reverts commit 10784a8c7cc81c468b5411e973d36ecf31de9603.
Main reason: impossibility for me as commiter test problem and fix all corner cases problems.
* This fixes possible problems with Spell::FillAreaTargets(center of search should be (x,y) position, not spell caster's position)
* Cleanup Cell class, removed old and unused code
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.
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!