Core/Players: Implement generic SendClearFocus instead of magic SMSG_BREAK_PACKET randomly in the middle of code. Also preallocate correct size for packed guid.
This commit is contained in:
@@ -24531,3 +24531,10 @@ void Player::_SaveInstanceTimeRestrictions(SQLTransaction& trans)
|
|||||||
trans->Append(stmt);
|
trans->Append(stmt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Player::SendClearFocus(Unit* target)
|
||||||
|
{
|
||||||
|
WorldPacket data(SMSG_BREAK_TARGET, target->GetPackGUID().size());
|
||||||
|
data.append(target->GetPackGUID());
|
||||||
|
GetSession()->SendPacket(&data);
|
||||||
|
}
|
||||||
@@ -2281,6 +2281,7 @@ class Player : public Unit, public GridObject<Player>
|
|||||||
|
|
||||||
void SendCinematicStart(uint32 CinematicSequenceId);
|
void SendCinematicStart(uint32 CinematicSequenceId);
|
||||||
void SendMovieStart(uint32 MovieId);
|
void SendMovieStart(uint32 MovieId);
|
||||||
|
void SendClearFocus(Unit* target);
|
||||||
|
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
/*** INSTANCE SYSTEM ***/
|
/*** INSTANCE SYSTEM ***/
|
||||||
|
|||||||
@@ -16411,9 +16411,7 @@ void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId, AuraApplication const * a
|
|||||||
WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
|
WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
|
||||||
thisPlr->GetSession()->SendPacket(&data);
|
thisPlr->GetSession()->SendPacket(&data);
|
||||||
|
|
||||||
data.Initialize(SMSG_BREAK_TARGET, 7);
|
thisPlr->SendClearFocus(vehicle->GetBase());
|
||||||
data.append(vehicle->GetBase()->GetPackGUID());
|
|
||||||
thisPlr->GetSession()->SendPacket(&data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SetControlled(true, UNIT_STAT_ROOT);
|
SetControlled(true, UNIT_STAT_ROOT);
|
||||||
|
|||||||
Reference in New Issue
Block a user