Core/Vehicles: Send proper GUID in SMSG_BREAK_TARGET packet when an unit enters vehicle

This commit is contained in:
Shauren
2011-02-19 22:50:09 +01:00
parent c0b29fd0ad
commit 7ac891717c
4 changed files with 11 additions and 10 deletions
@@ -24515,10 +24515,3 @@ void Player::_SaveInstanceTimeRestrictions(SQLTransaction& trans)
trans->Append(stmt);
}
}
void Player::SendClearFocus(Unit* target)
{
WorldPacket data(SMSG_BREAK_TARGET, target->GetPackGUID().size());
data.append(target->GetPackGUID());
GetSession()->SendPacket(&data);
}
-1
View File
@@ -2280,7 +2280,6 @@ class Player : public Unit, public GridObject<Player>
void SendCinematicStart(uint32 CinematicSequenceId);
void SendMovieStart(uint32 MovieId);
void SendClearFocus(Unit* target);
/*********************************************************/
/*** INSTANCE SYSTEM ***/
+9 -2
View File
@@ -16461,10 +16461,10 @@ void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId, AuraApplication const * a
{
WorldPacket data(SMSG_ON_CANCEL_EXPECTED_RIDE_VEHICLE_AURA, 0);
thisPlr->GetSession()->SendPacket(&data);
thisPlr->SendClearFocus(vehicle->GetBase());
}
SendClearTarget();
SetControlled(true, UNIT_STAT_ROOT);
//movementInfo is set in AddPassenger
//packets are sent in AddPassenger
@@ -16843,6 +16843,13 @@ uint32 Unit::GetRemainingDotDamage(uint64 caster, uint32 spellId, uint8 effectIn
return amount;
}
void Unit::SendClearTarget()
{
WorldPacket data(SMSG_BREAK_TARGET, GetPackGUID().size());
data.append(GetPackGUID());
SendMessageToSet(&data, false);
}
void CharmInfo::SetIsCommandAttack(bool val)
{
m_isCommandAttack = val;
+2
View File
@@ -1507,6 +1507,8 @@ class Unit : public WorldObject
void SendRemoveFromThreatListOpcode(HostileReference* pHostileReference);
void SendThreatListUpdate();
void SendClearTarget();
void BuildHeartBeatMsg(WorldPacket *data) const;
bool isAlive() const { return (m_deathState == ALIVE); };