Currently this functionality not used, but soon planned be used
in connection wiht map persistent state specific pool system data.
In different from grid spawn data stored in ObjectMgr and used for global
(comon for all map copies) spawns from DB data or from gameevent system,
map locla spawn data used for independet grid spawns like expected to be
for pool system case when it will work in full power in instances.
Maybe for something other, like script dependent "static" spawns
not dependent from grid load state.
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
In result typo new summoned/spawned GO can get unexpected
non-free guids with strange results dependent from load
status of related static GO spawn (low chance conflict in fact).
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
If mangos build for use Postgre SQL server
Queries from sql/postgre_compatibility_addon.sql must be used
at least one time for each mangos DB part stored in Postgre SQL server.
File constent based at article in http://janusz.slota.name/blog/
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This reverts commit 2e57df9f71330e278dbdf98b3f43d1d7bd5ec8d4.
* For original spells referecned in commit title:
Posible instead LoS check it must use outdoor check instaed ignore any LoS like checks.
* Main reason for revert second part check that in _addition_ to referecned spell let ~1200 spells ignore los
some from that have description ponting to need los check for its
* 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.
* Pool System for correct full power work in instance need implement
MapPersistentState local pool system state for instanceable maps.
Unit this not implemented pool system must avoid creating/despawn/touch
instance map objects. Currently this work because instance map object use
dynamic generated guids and "invisible" for Pool System, with explcitly forbiden
for it spawn directly new objects. Code changes add explicit checks for preserve
this way work for time when instance object will use static guids. When local pool
state storing in persistent state this protection checks will possible drop.
Non-instanced working cases converted in local map object search calls.
* GameEvent Systems currently have code that work correctly only with objects at
non-instanced maps by same reasons as Pool System. But in different Pool System
case game event activate/deactivate expected applied to _all_ object copies in all
existed instanceable map copies. Code modified for work in expected way.
Direct spawn disabled for instanceable maps until swith to static guids.
Despawn code will make affect only for non-instanceavble maps unit swithc to static guids as-is.
This is preserve current code working result.
* Convert last case usage global creature search in aura code to map local case.
Player case also possible not need now after including caster damage/heal mods
part to aura base damage/heal. In any cases player case preserved in old way work.
NOTE: this last places dependent from global creature/gameobject guid search so look like this
make possible start direct work to switch instances use static guids instead dynamic generated
* 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.
Pool system can't have mixed pool spawns at different maps
if one from map instanceable. In last case all pool spawns
must be at same instanceable maps for any pools that have
common mother pool.
Now this checked at server sartup.
* 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.
This will remove death persistent auras and AI does no longer need to remove any such auras at respawn manually (GM will still see the death persistent aura all until creature respawn).
Signed-off-by: NoFantasy <nofantasy@nf.no>