Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] Hmmm, anyone ever encounter this ?? Is it Blizzlike? Client sends CMSG_CAST_SPELL with SpellId 600

[DiscordArchive] Hmmm, anyone ever encounter this ?? Is it Blizzlike? Client sends CMSG_CAST_SPELL with SpellId 600

[DiscordArchive] Hmmm, anyone ever encounter this ?? Is it Blizzlike? Client sends CMSG_CAST_SPELL with SpellId 600

rektbyfaith
Administrator
0
04-18-2023, 02:09 AM
#1
Archived author: HelloKitty • Posted: 2023-04-18T02:09:25.829000+00:00
Original source

Hmmm, anyone ever encounter this ?? Is it Blizzlike? Client sends CMSG_CAST_SPELL with SpellId 600 which is 600 - Power Word: Shield - (Rank 3) and the server responds with SMSG_CAST_FAILED containing SpellId 592 which is 592 - Power Word: Shield - (Rank 2) even though the Player knows Rank 3. Why does it send a cast result with the lower rank id? It seems related to the code in the cast packet handler that even has an interesting note: ```TODO: is this even necessary? client already seems to send correct rank for "standard" buffs```So 592 is Selected from GetAuraRankForLevel. However, this is possibly incorrect? Does Blizzard servers actually respond with a different id when a cast fails even though the spell would have maybe been downranked due to target level requirements when the result is SPELL_FAILED_BAD_TARGETS or something anyway?
[Image: 44f7d16d1c5668f0466ec3b515f3a99e.png?ex=...f91b3f0e0&]

[Image: 71f83feea929f44dd067bcadf6222b9c.png?ex=...d630b1bf8&]
rektbyfaith
04-18-2023, 02:09 AM #1

Archived author: HelloKitty • Posted: 2023-04-18T02:09:25.829000+00:00
Original source

Hmmm, anyone ever encounter this ?? Is it Blizzlike? Client sends CMSG_CAST_SPELL with SpellId 600 which is 600 - Power Word: Shield - (Rank 3) and the server responds with SMSG_CAST_FAILED containing SpellId 592 which is 592 - Power Word: Shield - (Rank 2) even though the Player knows Rank 3. Why does it send a cast result with the lower rank id? It seems related to the code in the cast packet handler that even has an interesting note: ```TODO: is this even necessary? client already seems to send correct rank for "standard" buffs```So 592 is Selected from GetAuraRankForLevel. However, this is possibly incorrect? Does Blizzard servers actually respond with a different id when a cast fails even though the spell would have maybe been downranked due to target level requirements when the result is SPELL_FAILED_BAD_TARGETS or something anyway?
[Image: 44f7d16d1c5668f0466ec3b515f3a99e.png?ex=...f91b3f0e0&]

[Image: 71f83feea929f44dd067bcadf6222b9c.png?ex=...d630b1bf8&]

rektbyfaith
Administrator
0
04-18-2023, 02:11 AM
#2
Archived author: HelloKitty • Posted: 2023-04-18T02:11:33.860000+00:00
Original source

If this is blizzlike behavior it makes it abit more challenging to handle spell cast failures based on a combination of their CastKey/Counter and Id since sometimes TC will respond with different ids .
rektbyfaith
04-18-2023, 02:11 AM #2

Archived author: HelloKitty • Posted: 2023-04-18T02:11:33.860000+00:00
Original source

If this is blizzlike behavior it makes it abit more challenging to handle spell cast failures based on a combination of their CastKey/Counter and Id since sometimes TC will respond with different ids .

rektbyfaith
Administrator
0
04-18-2023, 02:12 AM
#3
Archived author: HelloKitty • Posted: 2023-04-18T02:12:33.860000+00:00
Original source

But I guess maybe this couldn't happen under normal circumstances anyway because assumably the 335 client would select the correct rank to cast based on the same logic in SpellInfo::GetAuraRankForLevel according to that comment at least?
rektbyfaith
04-18-2023, 02:12 AM #3

Archived author: HelloKitty • Posted: 2023-04-18T02:12:33.860000+00:00
Original source

But I guess maybe this couldn't happen under normal circumstances anyway because assumably the 335 client would select the correct rank to cast based on the same logic in SpellInfo::GetAuraRankForLevel according to that comment at least?

rektbyfaith
Administrator
0
04-18-2023, 03:11 AM
#4
Archived author: HelloKitty • Posted: 2023-04-18T03:11:49.912000+00:00
Original source

Thank you for your insight <:owocat:486485371849277451> I hadn't tested this directly in the original 3.3.5 client but I suspected it might be possible for something like that to occur. For my own client, the GCD continued uncancelled in these cases. For 335 maybe what you described in the 1.12.1 client would occur but my first guess was the predicted GCD wouldn't cancel, similar to what occurred to my client. I thought about making a change like that to 335 TC to preserve the original spell id but since I wasn't sure this actually causes issues in the original client I opted to just support checking against ranks clientside... I figured one day I'd need to implement support for rank stuff anyway so might as well have done it now hehe. That yellow glow you describe sometimes even gets stuck on WOTLK Classic under some cases (not related to this), so not surprising. I think I took a screenshot of that happening to me the other day. The way I wrote that yellow highlighting though around spell icons for spells that are currently being cast I think wouldn't occur for me personally since I disable the highlight around spell icons whenever the local player's spell casting state changes and not by checking the spell cast failure id in those packets.
rektbyfaith
04-18-2023, 03:11 AM #4

Archived author: HelloKitty • Posted: 2023-04-18T03:11:49.912000+00:00
Original source

Thank you for your insight <:owocat:486485371849277451> I hadn't tested this directly in the original 3.3.5 client but I suspected it might be possible for something like that to occur. For my own client, the GCD continued uncancelled in these cases. For 335 maybe what you described in the 1.12.1 client would occur but my first guess was the predicted GCD wouldn't cancel, similar to what occurred to my client. I thought about making a change like that to 335 TC to preserve the original spell id but since I wasn't sure this actually causes issues in the original client I opted to just support checking against ranks clientside... I figured one day I'd need to implement support for rank stuff anyway so might as well have done it now hehe. That yellow glow you describe sometimes even gets stuck on WOTLK Classic under some cases (not related to this), so not surprising. I think I took a screenshot of that happening to me the other day. The way I wrote that yellow highlighting though around spell icons for spells that are currently being cast I think wouldn't occur for me personally since I disable the highlight around spell icons whenever the local player's spell casting state changes and not by checking the spell cast failure id in those packets.

rektbyfaith
Administrator
0
04-18-2023, 03:15 AM
#5
Archived author: HelloKitty • Posted: 2023-04-18T03:15:05.180000+00:00
Original source

Thankfully I tried to cast Power Word: Shield on a low level boar earlier or this bug may have remained undetected for me for awhile .
rektbyfaith
04-18-2023, 03:15 AM #5

Archived author: HelloKitty • Posted: 2023-04-18T03:15:05.180000+00:00
Original source

Thankfully I tried to cast Power Word: Shield on a low level boar earlier or this bug may have remained undetected for me for awhile .

Recently Browsing
 
Recently Browsing