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.
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>
- Unit::CalculateSpellDuration split into two functions
- CalculateSpellDuration taking into account combo points and caster-side spell mods
- Unit::CalculateAuraDuration taking into account target-side spell mods
- Diminishing is now applied before duration reduction mods
- Implement saving per-effect periodic timers to DB (required for auras affected by haste)
This prevent lost detected achievement criteria update or have unexpected criteria update event
at character data loading like skills/spells/itemts/etc.
Achievment system state load by self not dependent from other character data (checked after
all data loading in CheckAllAchievementCriteria() call.
Note: spell 62105 are still considered to be negative, despite explicit exception added in IsPositiveEffect and will unexpectedly put caster in combat.
Signed-off-by: NoFantasy <nofantasy@nf.no>
Note: PostgreSQL does not have prepared statements implemented using native APIs.
Huge thanks to Undergarun, kero99 and Vinolentus.
Signed-off-by: Ambal <pogrebniak@gala.net>
For leak detection you can also use tools like Valgrind.
If you really want to use VLD you can revert this commit and remove the comments in MemoryLeaks.cpp and MemoryLeaks.h.
The VLD version which has been shipped with MaNGOS is *heavily* outdated and I thus suggest you to use a newer version of it, if you really plan to use it. You can find the newest version on github in its official repository: https://github.com/dmoulding/vld
* Some spells have StackAmount > 255, for example 22735, 54314
* In SMSG_AURA_UPDATE maximum stack amount is limited by 255
* Move duplicate code into SpellAuraHolder::BuildUpdatePacket function
* Cleanup some weird type casts in _LoadAuras
For non stacking auras preserve stack size 1 as auras created instead reset it to 0 at mnext load.
For client no difference in show and most non stacking auras not dependent from stack size value
at server side code, but any way set stack size to 0 can generate unexpected wrong caluclation results
in spell code.