mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/Protocol: Process CMSG_UPDATE_MISSILE_TRAJECTORY packets
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
#include "GameObjectAI.h"
|
||||
#include "Group.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "Spell.h"
|
||||
|
||||
void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data)
|
||||
{
|
||||
@@ -1714,3 +1715,47 @@ void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket)
|
||||
|
||||
_player->SetPendingBind(0, 0);
|
||||
}
|
||||
|
||||
void WorldSession::HandleUpdateMissileTrajectory(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_UPDATE_MISSILE_TRAJECTORY");
|
||||
|
||||
uint64 guid;
|
||||
uint32 spellId;
|
||||
float elevation, speed;
|
||||
float curX, curY, curZ;
|
||||
float targetX, targetY, targetZ;
|
||||
uint8 moveStop;
|
||||
|
||||
recvPacket >> guid >> spellId >> elevation >> speed;
|
||||
recvPacket >> curX >> curY >> curZ;
|
||||
recvPacket >> targetX >> targetY >> targetZ;
|
||||
recvPacket >> moveStop;
|
||||
|
||||
Unit* caster = ObjectAccessor::GetUnit(*_player, guid);
|
||||
Spell* spell = caster ? caster->GetCurrentSpell(CURRENT_CHANNELED_SPELL) : NULL;
|
||||
if (!spell || spell->m_spellInfo->Id != spellId || !spell->m_targets.HasDst())
|
||||
{
|
||||
recvPacket.rfinish();
|
||||
return;
|
||||
}
|
||||
|
||||
Position pos = *spell->m_targets.GetSrcPos();
|
||||
pos.Relocate(curX, curY, curZ);
|
||||
spell->m_targets.ModSrc(pos);
|
||||
|
||||
pos = *spell->m_targets.GetDstPos();
|
||||
pos.Relocate(targetX, targetY, targetZ);
|
||||
spell->m_targets.ModDst(pos);
|
||||
|
||||
spell->m_targets.SetElevation(elevation);
|
||||
spell->m_targets.SetSpeed(speed);
|
||||
|
||||
if (moveStop)
|
||||
{
|
||||
uint32 opcode;
|
||||
recvPacket >> opcode;
|
||||
recvPacket.SetOpcode(opcode);
|
||||
HandleMovementOpcodes(recvPacket);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1148,7 +1148,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
|
||||
/*0x45F*/ { "CMSG_CALENDAR_EVENT_INVITE_NOTES", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
|
||||
/*0x460*/ { "SMSG_CALENDAR_EVENT_INVITE_NOTES", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
|
||||
/*0x461*/ { "SMSG_CALENDAR_EVENT_INVITE_NOTES_ALERT", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
|
||||
/*0x462*/ { "CMSG_UPDATE_MISSILE_TRAJECTORY", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
|
||||
/*0x462*/ { "CMSG_UPDATE_MISSILE_TRAJECTORY", STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, &WorldSession::HandleUpdateMissileTrajectory },
|
||||
/*0x463*/ { "SMSG_UPDATE_ACCOUNT_DATA_COMPLETE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
|
||||
/*0x464*/ { "SMSG_TRIGGER_MOVIE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_ServerSide },
|
||||
/*0x465*/ { "CMSG_COMPLETE_MOVIE", STATUS_NEVER, PROCESS_INPLACE, &WorldSession::Handle_NULL },
|
||||
|
||||
@@ -785,6 +785,7 @@ class WorldSession
|
||||
void HandleResetInstancesOpcode(WorldPacket& recv_data);
|
||||
void HandleHearthAndResurrect(WorldPacket& recv_data);
|
||||
void HandleInstanceLockResponse(WorldPacket& recvPacket);
|
||||
void HandleUpdateMissileTrajectory(WorldPacket& recvPacket);
|
||||
|
||||
// Looking for Dungeon/Raid
|
||||
void HandleLfgSetCommentOpcode(WorldPacket& recv_data);
|
||||
|
||||
Reference in New Issue
Block a user