mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-26 23:26:23 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
@@ -119,14 +119,14 @@ void Vehicle::Reset(bool evading /*= false*/)
|
||||
if (_me->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (_usableSeatNum)
|
||||
_me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PLAYER_VEHICLE);
|
||||
_me->SetNpcFlag(UNIT_NPC_FLAG_PLAYER_VEHICLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
ApplyAllImmunities();
|
||||
InstallAllAccessories(evading);
|
||||
if (_usableSeatNum)
|
||||
_me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
|
||||
_me->SetNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
|
||||
}
|
||||
|
||||
if (GetBase()->GetTypeId() == TYPEID_UNIT)
|
||||
@@ -355,9 +355,9 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
|
||||
if (!_usableSeatNum)
|
||||
{
|
||||
if (_me->GetTypeId() == TYPEID_PLAYER)
|
||||
_me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PLAYER_VEHICLE);
|
||||
_me->RemoveNpcFlag(UNIT_NPC_FLAG_PLAYER_VEHICLE);
|
||||
else
|
||||
_me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
|
||||
_me->RemoveNpcFlag(UNIT_NPC_FLAG_SPELLCLICK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ void Vehicle::RemovePassenger(Unit* unit)
|
||||
unit->GetName(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUID().ToString(), (int32)seat->first);
|
||||
|
||||
if (seat->second.SeatInfo->CanEnterOrExit() && ++_usableSeatNum)
|
||||
_me->SetFlag(UNIT_NPC_FLAGS, (_me->GetTypeId() == TYPEID_PLAYER ? UNIT_NPC_FLAG_PLAYER_VEHICLE : UNIT_NPC_FLAG_SPELLCLICK));
|
||||
_me->SetNpcFlag((_me->GetTypeId() == TYPEID_PLAYER ? UNIT_NPC_FLAG_PLAYER_VEHICLE : UNIT_NPC_FLAG_SPELLCLICK));
|
||||
|
||||
// Remove UNIT_FLAG_NOT_SELECTABLE if passenger did not have it before entering vehicle
|
||||
if (seat->second.SeatInfo->m_flags & VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE && !seat->second.Passenger.IsUnselectable)
|
||||
|
||||
Reference in New Issue
Block a user