Commit graph

134 commits

Author SHA1 Message Date
VladimirMangos
dde16bc48c [11126] Rewrite InstanceSaveMgr related code.
* 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
2011-02-10 05:20:56 +03:00
zergtmn
c9fc5727fc [11070] Correct meaning of one field in MSG_MOVE_TELEPORT_ACK packet 2011-01-25 22:45:36 +05:00
VladimirMangos
784c0ca781 [11017] Finaly restore non-crashing non-in-world logout.
For example at close client with far teleport loading screen.
2011-01-16 20:38:48 +03:00
VladimirMangos
0c19c2c6a2 [11015] Prevent crash at player far teleport landing to nonexisten battleground instance.
Teleport back in like case or to homebind in bad case.
2011-01-16 00:31:41 +03:00
VladimirMangos
bf0ecf6e71 [10947] Update copyright notice for 2011 year. 2011-01-01 20:33:43 +03:00
Ambal
b11820593c [10924] Send time diff between Update() calls for object - should help with mob respawn on inactive grids etc. Based on patches by VladimirMangos and cipherCOM. All issues from previous patches should be finally fixed now.
Signed-off-by: Ambal <pogrebniak@gala.net>
2010-12-27 22:27:20 +02:00
maly32167
1fef606dd8 [10839] At far teleport fail retunr player to source point instead homebind.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2010-12-08 06:48:27 +03:00
VladimirMangos
ce7b98c45e [10799] Add GetGuidStr() short call for GetObjectGuid().GetString() and use it. 2010-12-01 09:56:13 +03:00
VladimirMangos
cc0655a402 [10782] Use Team enum types in all appropriate cases and catches bug in result fix.
* 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.
2010-11-25 01:11:17 +03:00
VladimirMangos
10273fa38a [10732] Not send session fields as args into HandleMoverRelocation/VerifyMovementInfo.
Also mark args as constant where expected in this functions.
2010-11-18 06:12:15 +03:00
Ambal
f67d89f109 [10727] Map system re-engineered. Special thanks to Blueboy for tests.
Signed-off-by: Ambal <pogrebniak@gala.net>
2010-11-16 21:08:28 +02:00
VladimirMangos
a32d68febd [10671] Convert some Unit owner/etc guids to ObjectGuid way. 2010-11-01 13:19:50 +03:00
SilverIce
1370ead743 [10659] Fixed mistake in [10653] that causes player to fall from the transport at teleporting to another map 2010-10-31 12:15:32 +02:00
SilverIce
1871cf977f [10653] Implemented MSG_MOVE_KNOCK_BACK opcode
* 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
2010-10-28 05:48:43 +03:00
VladimirMangos
54d991ef3a [10469] Rename some opcode handler to better follow used naming style 2010-09-11 14:38:22 +04:00
VladimirMangos
72414ad03b [10450] Skip wrong guid movement packets.
Also fix src/game/SharedDefines.h line ends corrupted in prev. commit. :/
2010-09-06 18:35:03 +04:00
VladimirMangos
09b03b470e [10402] Use ObjectGuid in packets and fix some uint32 guids cases. 2010-08-23 12:37:11 +04:00
Lynx3d
01d326b90d [10202] Rename isInFlight() to IsTaxiFlying() and UNIT_STAT_IN_FLIGHT to UNIT_STAT_TAXI_FLIGHT.
Also add IsFreeFlying() function to Player class.
2010-07-17 02:06:28 +02:00
VladimirMangos
e88a718c5d [10094] Extract instance reset scheduler from InstanceSaveMgr
Reset scheduler code not need explicit access to instance saves,
and no reson mix it with instance save managment code in single class
2010-06-22 04:40:33 +04:00
VladimirMangos
2326292981 [10059] Cleanup in Player::m_mover uses
* 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
2010-06-15 03:50:52 +04:00
VladimirMangos
722135b326 [9838] More log filters and macro uses.
* LogFilter_Weather
* LogFilter_PeriodicAffects
* LogFilter_PlayerMoves
* LogFilter_SQLText
* LogFilter_AIAndMovegens
* LogFilter_PlayerStats
2010-05-05 18:46:10 +04:00
VladimirMangos
9e356f10c9 [9806] Fixed player loading to transport.
Bug exist already some time but possible hide by another code way work or
client change maybe.
2010-04-29 17:25:13 +04:00
SilverIce
6ab55fa09e [9796] Controlled unit should be a source of movement packets, not player-controller.
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>
2010-04-26 14:02:41 +04:00
XTZGZoReX
34e56c9978 [9641] Fix typo; IN_MILISECONDS -> IN_MILLISECONDS. 2010-03-30 14:44:57 +02:00
VladimirMangos
b658b25ff8 [9618] More use ObjectGuid in spell/etc code 2010-03-25 13:59:46 +03:00
VladimirMangos
ab7840a591 [9580] Add ObjectGuid const& Object::GetObjectGuid() and restore build. 2010-03-13 17:35:47 +03:00
Iron
37f733221d [9560] Fixes possible runtime crash added by 9551
Signed-off-by: AlexDereka <dereka.alex@gmail.com>
2010-03-10 10:12:49 +03:00
VladimirMangos
c8fd454a79 [9551] Add and use PackedGuid wrapper.
Also
* use more wide bytebuff << >> operators for objects
* use at read packet faisl alsways exception way instead some time used bool results.
2010-03-08 20:23:16 +03:00
VladimirMangos
73eeac234f [9454] Fixed some time existed multi-map taxi problem.
Interrupt taxi movegen at far teleport time with remove related state.
Far teleport triggered code not expect this state set.
2010-02-26 00:48:10 +03:00
AlexDereka
ccfd42bf3e [9381] Fixed some compile warnings. 2010-02-14 18:16:07 +03:00
tomrus88
b85417df73 Movement packets cleanup. 2010-02-01 17:03:04 +03:00
VladimirMangos
eaecc467d5 [9212] Implement pet speed synchronization with owner only for follow mode.
* This allow pet use own speed (and all speed affects appiedto pet itself) in combat.
* Apply this speed synhronization to minipets/guardians also.
* Also rename Unit::SetSpeed to SetSpeedRate as more close to real functionality.
2010-01-19 03:56:26 +03:00
VladimirMangos
e1d0c1cdba [9209] Finish synchonization walk mode for pets.
* Re-sync at follow mode switches
* Support sync for creature pets

Also
* Attempt fix build at *nix
* Drop unused unut state mask with typo in name.
2010-01-18 14:35:19 +03:00
VladimirMangos
2e9bf5ad6a [9197] More propertly update walk mode for player pets.
* Use AddMonsterMoveFlag instead SetMonsterMoveFlags for set walk-mode
* Apply walk/run mode to all copntrolled units (except totems).
* Synchronize walk/run mode at pet creating/loading.
2010-01-17 07:51:00 +03:00
NoFantasy
12096177e2 [9171] Update pet and minipet monster move flag at player toggle walk/run
Signed-off-by: NoFantasy <nofantasy@nf.no>
2010-01-13 14:52:59 +01:00
VladimirMangos
fe6e2e1746 [9122] Updated copyright notice for new year.
Also fix some lost in past cases.
2010-01-08 00:02:21 +03:00
VladimirMangos
e8e5bbddea [9104] Avoid send reset warning to map/difficulty cases without fixed reset time. 2010-01-02 20:49:53 +03:00
VladimirMangos
2d7441b5a1 [8974] Increase z limit for at transport coordinates for bettr support big height lifts. 2009-12-12 05:41:01 +03:00
VladimirMangos
a2bb655501 [8965] Implement quit command for close RA connection.
World only in RA comandline.
2009-12-10 19:20:59 +03:00
VladimirMangos
ed7d561597 [8963] Make bindpoint field private and add required functions for use. 2009-12-10 12:22:17 +03:00
balrok
ba835f1d30 [8960] fix crash introduced with 8805
or actualy i didn't introduce a new crash there.. the old crash
just changed a bit..
after we force the player to logout without valid mapcoords the player wasn't in
world anymore and through that Getplayer()->GetMap()->RemoveFromWorld()
caused a crash..

i changed now the error handling inside farteleport there.. instead of forcing
a logout without saving, i just port him to his homebind
which will be much nicer

(minor cleanup with the other homebind teleportation.. we don't need to check
for the error there.. homebind realy should be a valid coord)
2009-12-09 22:57:28 +01:00
VladimirMangos
37ba6623bb [8828] Independent instance reset time for different difficulties.
* Store reset time for map/difficulty pairs.
* Use DBC data for reset time and max players instead `instance_template` fields (dropped)
  for each existed map/difficulty pair.
* Fix some "heroic" related checks in spells/etc.
2009-11-18 10:08:41 +03:00
balrok
6199396b69 [8821] removed some redundant player->SaveToDB calls
SaveToDB will already be called at "SpawnCorpseBones"
so no need to do this twice
2009-11-15 20:08:57 +01:00
balrok
eb94d78761 [8805] fix freeze with repeatingly calls at logout + HandleMoveWorldportAckOpcode
starts in WorldSession::logout inside while(isTeleportedFar)...

through coord won't get ever valid there - it will call
itself all the time
2009-11-11 15:27:23 +01:00
XTZGZoReX
0734adb746 [8789] Rename several singleton macros to use more consistent names.
* objmgr -> sObjectMgr
 * spellmgr -> sSpellMgr
 * WaypointMgr -> sWaypointMgr
 * poolhandler -> sPoolMgr
 * objaccessor -> sObjectAccessor
 * mapmgr -> sMapMgr
 * sInstanceSaveManager -> sInstanceSaveMgr
 * ticketmgr -> sTicketMgr
 * CreatureEAI_Mgr -> sEventAIMgr
 * auctionmgr -> sAuctionMgr
 * achievementmgr -> sAchievementMgr
2009-11-08 12:11:34 +01:00
XTZGZoReX
dc725ad6b8 [8785] Use macro instead of explicit call to singleton Instance().
* For: ObjectAccessor, MapManager.
2009-11-08 03:54:41 +01:00
XTZGZoReX
1f23884757 Don't use singleton to access static functions.
* This affects especially ObjectMgr functions:
   - GetCreatureInfo
   - GetGameObjectInfo
   - GetInstanceTemplate
   These are in fact static functions.
2009-11-08 03:54:27 +01:00
VladimirMangos
b942616ded [8710] Make vehicle guid counter per-map local.
Also update/drop/move to Map some dependent functions.
2009-10-22 17:43:41 +04:00
VladimirMangos
308439a335 [8601] Fixed some movement *_ACK packets structure after switch. 2009-10-08 16:02:28 +04:00
VladimirMangos
a9af7f2b1c Use reset time for normal/heroic from new DBC. Improve basic support for raid difficalties. 2009-10-06 02:12:02 +04:00