Add basic support for NPCs on transports; DB data required.

Currently no support for combat while the transport is in motion.
Based on a patch by Socolin.
Fixes issue #168

--HG--
branch : trunk
This commit is contained in:
silinoron
2010-07-30 21:54:46 -07:00
parent b3bca2743e
commit 71b1c781e3
15 changed files with 320 additions and 88 deletions
+5
View File
@@ -43,6 +43,7 @@
#include "zlib.h"
#include "ScriptMgr.h"
#include "LFGMgr.h"
#include "Transport.h"
/// WorldSession constructor
WorldSession::WorldSession(uint32 id, WorldSocket *sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale) :
@@ -729,6 +730,10 @@ void WorldSession::ReadMovementInfo(WorldPacket &data, MovementInfo *mi)
data >> mi->t_o;
data >> mi->t_time;
data >> mi->t_seat;
if(mi->x != mi->t_x)
if(GetPlayer()->GetTransport())
GetPlayer()->GetTransport()->UpdatePosition(mi);
}
if ((mi->flags & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING)) || (mi->unk1 & 0x20))