diff options
author | thenecromancer <none@none> | 2010-01-13 11:16:38 +0100 |
---|---|---|
committer | thenecromancer <none@none> | 2010-01-13 11:16:38 +0100 |
commit | ea4e25f3aaa10efeacf0849bcb1583ad78ee2b28 (patch) | |
tree | 9873402e58eb955e2db047f0c31b2760df32d019 /src/game/Unit.h | |
parent | db24e2927c0a67576011692ef8c2f8150da9425f (diff) |
Implement vehicles created by player mounts.
Original idea by Elmaster, packet research by Wrong, ty.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.h')
-rw-r--r-- | src/game/Unit.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/Unit.h b/src/game/Unit.h index cd15a902660..3c558c225a7 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -631,6 +631,7 @@ enum NPCFlags UNIT_NPC_FLAG_STABLEMASTER = 0x00400000, // 100% UNIT_NPC_FLAG_GUILD_BANKER = 0x00800000, // cause client to send 997 opcode UNIT_NPC_FLAG_SPELLCLICK = 0x01000000, // cause client to send 1015 opcode (spell click), dynamic, set at loading and don't must be set in DB + UNIT_NPC_FLAG_PLAYER_VEHICLE = 0x02000000, // players with mounts that have vehicle data should have it set UNIT_NPC_FLAG_GUARD = 0x10000000, // custom flag for guards UNIT_NPC_FLAG_OUTDOORPVP = 0x20000000, // custom flag for outdoor pvp creatures }; @@ -1272,7 +1273,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject bool IsMounted() const { return HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT ); } uint32 GetMountID() const { return GetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID); } - void Mount(uint32 mount); + void Mount(uint32 mount, uint32 vehicleId=0); void Unmount(); uint16 GetMaxSkillValueForLevel(Unit const* target = NULL) const { return (target ? getLevelForTarget(target) : getLevel()) * 5; } @@ -1913,6 +1914,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject bool IsAIEnabled, NeedChangeAI; MovementInfo m_movementInfo; bool CreateVehicleKit(uint32 id); + void RemoveVehicleKit(); Vehicle *GetVehicleKit()const { return m_vehicleKit; } Vehicle *GetVehicle() const { return m_vehicle; } bool IsOnVehicle(const Unit *unit) const { return m_vehicle && m_vehicle == unit->GetVehicleKit(); } |