Thanks to Darkknight900 for pointing out!
Used this script on sql/ and src/: find . -iname *.h -o -iname *.cpp -o -iname *.inc -o -iname *.sql | xargs sed -i 's/\t/ /g'
The primary use are intended for items that teach spell, typically for primary/secondary tradeskills.
Condition is true when player does not know the spell already, has the needed corresponding skill (and skill level) and does not have the item already (when item is defined).
Signed-off-by: NoFantasy <nofantasy@nf.no>
This already checked at apply to creature but startup check more helpful for DB devs.
Also remove use single field structure use for store addon.auras data
Reserve at server startup some guods follow last used in static DB spawns guid
for creatures/gameobjects for use in .npc add/.gobject add commands.
This allow safe select guids not used in all map copies. Guids for temporary spawns
used from range frollow after reserved guids range.
This also let select new static spawns guids (added in game chat command) near to already used static guids.
So it let avoid gaps in static guids lists.
Amount reserved guids set in new GuidReserveSize.* config options.
This reverts commit 714d48a99e2ccc9404b34ebcfec50b2d8300fc46.
Additiona reserch show that no any know cases when data in RewChoiceItem* have gaps
except detected wrong data cases. So check good have in 3.x/2.x for better data intergrity checks.
* Direct store pool system dynamic data in sPoolMgr replaced by
shared pool system data object (for all non instanceable maps)
into WorldPersistentState, and own copies of pool system data
object in DungeonPersistentState/BattlegroundPersistentState.
This let have pools with object at many non-instanceable maps,
and single map pools with unique state for each instance.
* Avoid direct global grid data modify from pool system, and use for this also
recently added local for MapPersistentState grid spawn data.
* Implemented proper API for update pool system data in MapPersistentStates
from GameEvent system.
* Initialize pool system state at MapPersistendState creating.
For shared pool system state for non-instanceable maps initilized at first map state
creating.
Now pool system propertly work in instance also!
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>
* 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.
* 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.
* At game events table loading checked not only allowed event ids range but also event existance.
* Renamed CONDITION_ACTIVE_EVENT -> CONDITION_ACTIVE_GAME_EVENT
* Implemented new conditions:
- CONDITION_NOT_ACTIVE_GAME_EVENT
- CONDITION_ACTIVE_HOLIDAY
- CONDITION_NOT_ACTIVE_HOLIDAY
Recomended use holiday version where possible as more portable.
UPDATE YOUR CONFIGS!
Defaults:
LoginDatabaseConnections = 1
WorldDatabaseConnections = 1
CharacterDatabaseConnections = 1
If you are not using <mtmaps> patch do not change the default settings - this is useless. You can try following option in your MySQL config to squeeze even more performance from your DB:
[mysqld]
transaction-isolation = READ-COMMITTED
Great thanks to Undergarun, kero99 and selector for making tests and providing very useful feedback and DB statistics! Have fun :)
Signed-off-by: Ambal <pogrebniak@gala.net>
Also
* Use typename for mail item info vector.
* Include tools/characters_mail_items_cleanup.sql for cleanup lost mail items.
It also included as sql update part. Sql update also fix receiver for stored
in DB expired mail items.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>