mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Core/Protocol: Fix struct and make use of CMSG_UPDATE_PROJECTILE_POSITION.
This commit is contained in:
@@ -650,13 +650,22 @@ void WorldSession::HandleUpdateProjectilePosition(WorldPacket& recvPacket)
|
||||
uint8 castCount;
|
||||
float x, y, z; // Position of missile hit
|
||||
|
||||
recvPacket.readPackGUID(casterGuid);
|
||||
recvPacket >> casterGuid;
|
||||
recvPacket >> spellId;
|
||||
recvPacket >> castCount;
|
||||
recvPacket >> x;
|
||||
recvPacket >> y;
|
||||
recvPacket >> z;
|
||||
|
||||
Unit* caster = ObjectAccessor::GetUnit(*_player, casterGuid);
|
||||
Spell* spell = caster ? caster->FindCurrentSpellBySpellId(spellId) : NULL;
|
||||
if (spell && spell->m_targets.HasDst())
|
||||
{
|
||||
Position pos = *spell->m_targets.GetDstPos();
|
||||
pos.Relocate(x, y, z);
|
||||
spell->m_targets.ModDst(pos);
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_SET_PROJECTILE_POSITION, 21);
|
||||
data << uint64(casterGuid);
|
||||
data << uint8(castCount);
|
||||
|
||||
@@ -1248,8 +1248,8 @@ enum Opcodes
|
||||
SMSG_CALENDAR_CLEAR_PENDING_ACTION = 0x4BB,
|
||||
SMSG_EQUIPMENT_SET_LIST = 0x4BC, // equipment manager list?
|
||||
CMSG_EQUIPMENT_SET_SAVE = 0x4BD,
|
||||
CMSG_UPDATE_PROJECTILE_POSITION = 0x4BE, // uint64 caster, uint32 spellId, uint8 castId, vector3 position
|
||||
SMSG_SET_PROJECTILE_POSITION = 0x4BF, // uint64 caster, uint8 castId, vector3 position
|
||||
CMSG_UPDATE_PROJECTILE_POSITION = 0x4BE,
|
||||
SMSG_SET_PROJECTILE_POSITION = 0x4BF,
|
||||
SMSG_TALENTS_INFO = 0x4C0,
|
||||
CMSG_LEARN_PREVIEW_TALENTS = 0x4C1,
|
||||
CMSG_LEARN_PREVIEW_TALENTS_PET = 0x4C2,
|
||||
|
||||
Reference in New Issue
Block a user