* 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>
* Use Set* names for cases when function replace old value by new (instead Add*)
* Prevent hidden MailDraft copy create becase if draft have items its can't be just shared
and need preoprtly cloned, but item close is high price operation (guid use, DB tiuched and etc)
So this must be explictly operation. In next commits will be added clone function for this.
* Some MailDraft overwrite by assign cases rewrited to more clean way.
Thanks to Qsa prepare for mangos.
Note: single unsure case: is block chance must be show or set to 0 in shield disarm time.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
Race can also be creature race and needed for future implementation of spells.
RACE_UNDEAD_PLAYER renamed to more proper RACE_UNDEAD
Signed-off-by: NoFantasy <nofantasy@nf.no>
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>
Fix some bugs when all uint32 field modified instead byte parts.
In some cases added byte way set/get but code line itself need additinal reserch/fix
for use correctness in line pos.
* Always use QuestStatus data for current counters set
This let be sure that that we not have non sync values in client view and server state.
* Remove some access functions for quest update fields that expected to be only updated/set.
* Fixed wrong arenaid use at leave arena queue.
* Fixed memory lost and etc at not virtual EndBattleground call
* Fixed crash at arena join with fake data from client.
* Code cleanups.
* Not exclude trainer flags for client for pet trainers.
* Not report error for pet trianers empty spell lists.
TODO:
* Add check for redundent trainer spell data for pet trainers at server startup
* Need hide train gossip option for pet trainers, but currently without it gossip
window not open for pet trainer by some unknown reason.