mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
tbc: fix SMSG_SPELL_START and SMSG_SPELL_GO for TBC 2.4.3
TBC 2.4.3 SMSG_SPELL_START and SMSG_SPELL_GO send full uint64 GUIDs for casterGuid/casterUnit and hit targets. WotLK uses packed (variable-length) GUIDs. Using readPackedGuid() on a full uint64 reads the first byte as the bitmask, consuming 1-8 wrong bytes, which shifts all subsequent fields (spellId, castFlags, castTime) and causes: - Cast bar to never show for the player's own spells - Sound effects to use the wrong spell ID - Hit/miss target tracking to be completely wrong Additionally, TBC SMSG_SPELL_GO lacks the WotLK timestamp field after castFlags. Add TbcPacketParsers::parseSpellStart and ::parseSpellGo using full GUIDs, add virtual base methods, and route both handlers through virtual dispatch.
This commit is contained in:
parent
921c83df2e
commit
0a6f88e8ad
3 changed files with 83 additions and 2 deletions
|
|
@ -12410,7 +12410,7 @@ static audio::SpellSoundManager::MagicSchool schoolMaskToMagicSchool(uint32_t ma
|
|||
|
||||
void GameHandler::handleSpellStart(network::Packet& packet) {
|
||||
SpellStartData data;
|
||||
if (!SpellStartParser::parse(packet, data)) return;
|
||||
if (!packetParsers_->parseSpellStart(packet, data)) return;
|
||||
|
||||
// If this is the player's own cast, start cast bar
|
||||
if (data.casterUnit == playerGuid && data.castTime > 0) {
|
||||
|
|
@ -12435,7 +12435,7 @@ void GameHandler::handleSpellStart(network::Packet& packet) {
|
|||
|
||||
void GameHandler::handleSpellGo(network::Packet& packet) {
|
||||
SpellGoData data;
|
||||
if (!SpellGoParser::parse(packet, data)) return;
|
||||
if (!packetParsers_->parseSpellGo(packet, data)) return;
|
||||
|
||||
// Cast completed
|
||||
if (data.casterUnit == playerGuid) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue