mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-28 12:52:25 +01:00
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.x
This commit is contained in:
@@ -100,7 +100,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
|
||||
return;
|
||||
}
|
||||
|
||||
sLog->outDetail("WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, castCount: %u, spellId: %u, Item: %u, glyphIndex: %u, data length = %i", bagIndex, slot, castCount, spellId, pItem->GetEntry(), glyphIndex, (uint32)recvPacket.size());
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, castCount: %u, spellId: %u, Item: %u, glyphIndex: %u, data length = %i", bagIndex, slot, castCount, spellId, pItem->GetEntry(), glyphIndex, (uint32)recvPacket.size());
|
||||
|
||||
ItemTemplate const* proto = pItem->GetTemplate();
|
||||
if (!proto)
|
||||
@@ -176,7 +176,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
|
||||
|
||||
void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
sLog->outDetail("WORLD: CMSG_OPEN_ITEM packet, data length = %i", (uint32)recvPacket.size());
|
||||
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_OPEN_ITEM packet, data length = %i", (uint32)recvPacket.size());
|
||||
|
||||
Player* pUser = _player;
|
||||
|
||||
@@ -669,13 +669,16 @@ void WorldSession::HandleUpdateProjectilePosition(WorldPacket& recvPacket)
|
||||
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);
|
||||
}
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
Spell* spell = caster->FindCurrentSpellBySpellId(spellId);
|
||||
if (!spell || !spell->m_targets.HasDst())
|
||||
return;
|
||||
|
||||
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);
|
||||
@@ -683,5 +686,5 @@ void WorldSession::HandleUpdateProjectilePosition(WorldPacket& recvPacket)
|
||||
data << float(x);
|
||||
data << float(y);
|
||||
data << float(z);
|
||||
SendPacket(&data);
|
||||
caster->SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user