*Correctly show spellclick flag for vehicles and creatures with info in spellclick table.
--HG-- branch : trunk
This commit is contained in:
1 parent
30adb32d53
commit
a8dbf8904c
7 files changed
+20
-17
No files matched your search
@@ -24,7 +24,6 @@
|
||||
#include "Util.h"
|
||||
#include "WorldPacket.h"
|
||||
|
||||
#include "Chat.h"
|
||||
#include "CreatureAI.h"
|
||||
#include "ZoneScript.h"
|
||||
|
||||
@@ -85,6 +84,11 @@ void Vehicle::setDeathState(DeathState s) // overwrite vir
|
||||
}
|
||||
RemoveAllPassengers();
|
||||
}
|
||||
else if(s == JUST_ALIVED)
|
||||
{
|
||||
if(m_usableSeatNum)
|
||||
SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
|
||||
}
|
||||
Creature::setDeathState(s);
|
||||
}
|
||||
|
||||
@@ -244,13 +248,9 @@ bool Vehicle::AddPassenger(Unit *unit, int8 seatId)
|
||||
GetPositionZ() + unit->m_movementInfo.t_z,
|
||||
GetOrientation());
|
||||
|
||||
unit->GetMotionMaster()->MoveIdle(MOTION_SLOT_IDLE);
|
||||
|
||||
WorldPacket data;
|
||||
if(unit->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
//ChatHandler(player).PSendSysMessage("Enter seat %u %u", veSeat->m_ID, seat->first);
|
||||
|
||||
if(seat->first == 0 && seat->second.seatInfo->IsUsable()) // not right
|
||||
SetCharmedBy(unit, CHARM_TYPE_VEHICLE);
|
||||
|
||||
|
||||
Reference in new issue
Block a user