Implement AreaLockStatus concept by rsa
Also drop basicly unneeded `areatrigger_teleport`.required_failed_text field.
This concept is still in testing phase, please feedback results of some glitches that might exist!
TODO: Use Player::GetAreaLockStatus or GetAreaTriggerLockStatus for other "CanEnter" checks as well.
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
Now safe allow this casts in like way after completed convertion to ObjectGuid use.
Also simplify code in result allowed auto cast to uint64.
Please _not_ add new uint64 storages (local and in structures) for guid values.
* Resurrect player _before_ enter to instance with corpse
* In case corpse in more deep instance teleport to corpse instance inner entrance.
* If by some reason player can't enter to corpse instance it will just resurrected before entrance.
Original patch and research done by Den.
* 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 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.
* Player's knockback movement now smooth and doesn't looks like teleporting
* Cleanup WorldSession::HandleMovementOpcodes, separated opcode specific and generic movement handlers code
* Handle Feign Death aura interrupting into more appropriate place
* Also fix triggered by related checks unread packet tail spam cases.
* Fix one case when expected death at fall controlled player
under ground has been possible avoided
Now movements of controlled unit are visible for nearby players,
even when controller too far from controlled unit
This new type of packet broadcasting used in HandleMovementOpcodes handler only,
maybe it can be used somewhere else.
(based on SilverIce's repo commit d2387ca)
Signed-off-by: VladimirMangos <vladimir@getmangos.com>