mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 03:12:09 +01:00
Core/EventProcessor: Wait for non deletable events to get deletable.
* Immediate deletion caused issues with the SpellEvent, so we delete it at one of the next update ticks now. * Only affects the unforced cancellation of events. * Ref #16675
This commit is contained in:
@@ -238,7 +238,7 @@ void Vehicle::RemoveAllPassengers()
|
||||
while (!_pendingJoinEvents.empty())
|
||||
{
|
||||
VehicleJoinEvent* e = _pendingJoinEvents.front();
|
||||
e->to_Abort = true;
|
||||
e->ScheduleAbort();
|
||||
e->Target = eventVehicle;
|
||||
_pendingJoinEvents.pop_front();
|
||||
}
|
||||
@@ -429,7 +429,7 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
|
||||
|
||||
if (seat == Seats.end()) // no available seat
|
||||
{
|
||||
e->to_Abort = true;
|
||||
e->ScheduleAbort();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -441,7 +441,7 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
|
||||
seat = Seats.find(seatId);
|
||||
if (seat == Seats.end())
|
||||
{
|
||||
e->to_Abort = true;
|
||||
e->ScheduleAbort();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -704,7 +704,7 @@ void Vehicle::RemovePendingEventsForSeat(int8 seatId)
|
||||
{
|
||||
if ((*itr)->Seat->first == seatId)
|
||||
{
|
||||
(*itr)->to_Abort = true;
|
||||
(*itr)->ScheduleAbort();
|
||||
_pendingJoinEvents.erase(itr++);
|
||||
}
|
||||
else
|
||||
@@ -729,7 +729,7 @@ void Vehicle::RemovePendingEventsForPassenger(Unit* passenger)
|
||||
{
|
||||
if ((*itr)->Passenger == passenger)
|
||||
{
|
||||
(*itr)->to_Abort = true;
|
||||
(*itr)->ScheduleAbort();
|
||||
_pendingJoinEvents.erase(itr++);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -478,7 +478,7 @@ void Aura::_Remove(AuraRemoveMode removeMode)
|
||||
|
||||
if (m_dropEvent)
|
||||
{
|
||||
m_dropEvent->to_Abort = true;
|
||||
m_dropEvent->ScheduleAbort();
|
||||
m_dropEvent = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user