mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +01:00
*Correctly show spellclick flag for vehicles and creatures with info in spellclick table.
--HG-- branch : trunk
This commit is contained in:
@@ -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