refactor(Core): SendDirectMessage (#23230)
This commit is contained in:
parent
b737fc8b59
commit
a1c8e0f221
57 changed files with 236 additions and 236 deletions
|
|
@ -240,7 +240,7 @@ void Object::SendUpdateToPlayer(Player* player)
|
|||
|
||||
BuildCreateUpdateBlockForPlayer(&upd, player);
|
||||
upd.BuildPacket(packet);
|
||||
player->GetSession()->SendPacket(&packet);
|
||||
player->SendDirectMessage(&packet);
|
||||
}
|
||||
|
||||
void Object::BuildValuesUpdateBlockForPlayer(UpdateData* data, Player* target)
|
||||
|
|
@ -272,7 +272,7 @@ void Object::DestroyForPlayer(Player* target, bool onDeath) const
|
|||
{
|
||||
WorldPacket data(SMSG_ARENA_UNIT_DESTROYED, 8);
|
||||
data << GetGUID();
|
||||
target->GetSession()->SendPacket(&data);
|
||||
target->SendDirectMessage(&data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -282,7 +282,7 @@ void Object::DestroyForPlayer(Player* target, bool onDeath) const
|
|||
//! If the following bool is true, the client will call "void CGUnit_C::OnDeath()" for this object.
|
||||
//! OnDeath() does for eg trigger death animation and interrupts certain spells/missiles/auras/sounds...
|
||||
data << uint8(onDeath ? 1 : 0);
|
||||
target->GetSession()->SendPacket(&data);
|
||||
target->SendDirectMessage(&data);
|
||||
}
|
||||
|
||||
[[nodiscard]] int32 Object::GetInt32Value(uint16 index) const
|
||||
|
|
@ -2065,7 +2065,7 @@ void WorldObject::SendPlayMusic(uint32 Music, bool OnlySelf)
|
|||
WorldPacket data(SMSG_PLAY_MUSIC, 4);
|
||||
data << Music;
|
||||
if (OnlySelf && IsPlayer())
|
||||
this->ToPlayer()->GetSession()->SendPacket(&data);
|
||||
ToPlayer()->SendDirectMessage(&data);
|
||||
else
|
||||
SendMessageToSet(&data, true); // ToSelf ignored in this case
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue