Also updated base dodge and agility=>dodge conversion values for 3.2 and later
Base stats and percentage based talents/buffs are not affected by DR,
it basically prevents items and stat buffs becoming disproportionally
powerful in terms of survivability as characters approach 100% avoidance.
TODO: implement DR for chance to be missed from defense rating
- 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: PostgreSQL does not have prepared statements implemented using native APIs.
Huge thanks to Undergarun, kero99 and Vinolentus.
Signed-off-by: Ambal <pogrebniak@gala.net>
* 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.
Implemented generation mail template items at mails loading in case when
original mail send in time when receiver has been offline. Before like
receiver not receive items.
Small change in mail.has_items meaning. Now it set also in cases when items
generated for template but none items really added to mail. This not affect
mostly existed code work aceept case when mail with template loading.
This will make life easier for DB devs, as GOSSIP_OPTION_QUESTGIVER no longer need to be filled in to gossip_menu_option table.
Menu option with GOSSIP_OPTION_QUESTGIVER and conditions will work as before.
Signed-off-by: NoFantasy <nofantasy@nf.no>
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.
* 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.
Some non-passive spells autocasted at shapeshift but without fix
in case already active form at like spell learning it not has been casted
in different from passive similar spells.
This is fix apply dodge chance part of spell 17002 for described case.
* Fishing now prowide junk loot at fail skill check.
This can be disabled for old way work using SkillFail.Loot.Fishing option.
Junk loot expected to be listed in fishing_loot_template entry 0.
* Fishing can gain skill grow at skill fail check case.
Controlled by SkillFail.Gain.Fishing option.
* Fishing from fishing pool gameobject can't be fail.
Controlled by SkillFail.Possible.FishingPool
Also clarify context for remove ghost auras place after set alive state.
This let get more expected results at remove ghost speed aura.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>