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:
Machiavelli
2011-01-25 08:04:47 +01:00
parent 6dbae56f57
commit 17971acddb
3 changed files with 9 additions and 3 deletions
@@ -24531,3 +24531,10 @@ 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
@@ -2281,6 +2281,7 @@ class Player : public Unit, public GridObject<Player>
void SendCinematicStart(uint32 CinematicSequenceId);
void SendMovieStart(uint32 MovieId);
void SendClearFocus(Unit* target);
/*********************************************************/
/*** INSTANCE SYSTEM ***/