void WorldSession::HandleUpdateProjectilePosition(WorldPacket& recv_data) { uint64_t casterGuid; // guid of the caster uint32_t spellId; // spell ID of casted spell uint8_t castCount; // count how many times it is/was cast float x, y, z; // missile hit position casterGuid = recv_data.unpackGUID(); recv_data >> spellId; recv_data >> castCount; recv_data >> x; recv_data >> y; recv_data >> z; LogDebugFlag(LF_OPCODE, "Recieved spell: %u, count: %i, position: x(%f) y(%f) z(%f)", spellId, castCount, x, y, z); SpellInfo* spell = Spell::checkAndReturnSpellEntry(spellId); if (!spell || spell->ai_target_type == TARGET_FLAG_DEST_LOCATION) return; WorldPacket data(SMSG_SET_PROJECTILE_POSITION, 21); data << uint64_t(casterGuid); data << uint8_t(castCount); data << float(x); data << float(y); data << float(z); SendPacket(&data); }
void WorldSession::HandleAchievmentQueryOpcode( WorldPacket & recv_data ) { CHECK_INWORLD_RETURN; uint64 guid = recv_data.unpackGUID(); // Get the inspectee's GUID Player* pTarget = objmgr.GetPlayer((uint32)guid); if(!pTarget) { return; } #ifdef ENABLE_ACHIEVEMENTS pTarget->GetAchievementMgr().SendAllAchievementData(GetPlayer()); #endif }