Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] Hey, I am trying to figure out how spells know where they can be used... but I don't find anything.

[DiscordArchive] Hey, I am trying to figure out how spells know where they can be used... but I don't find anything.

[DiscordArchive] Hey, I am trying to figure out how spells know where they can be used... but I don't find anything.

Pages (2): Previous 1 2
rektbyfaith
Administrator
0
03-08-2023, 03:58 AM
#11
Archived author: Saty • Posted: 2023-03-08T03:58:25.236000+00:00
Original source

Does it do a string lookup or smth?
rektbyfaith
03-08-2023, 03:58 AM #11

Archived author: Saty • Posted: 2023-03-08T03:58:25.236000+00:00
Original source

Does it do a string lookup or smth?

rektbyfaith
Administrator
0
03-08-2023, 03:59 AM
#12
Archived author: HelloKitty • Posted: 2023-03-08T03:59:37.902000+00:00
Original source

I never looked too deeply into it so I'm unsure how the client does it, as in if it predicts it like it does other spell cast results without sending a packet, but in TC Spell::CheckCast checks if a Spell "RequiresSpellFocus" and then does a search for the focus target in Spell::SearchSpellFocus.
rektbyfaith
03-08-2023, 03:59 AM #12

Archived author: HelloKitty • Posted: 2023-03-08T03:59:37.902000+00:00
Original source

I never looked too deeply into it so I'm unsure how the client does it, as in if it predicts it like it does other spell cast results without sending a packet, but in TC Spell::CheckCast checks if a Spell "RequiresSpellFocus" and then does a search for the focus target in Spell::SearchSpellFocus.

rektbyfaith
Administrator
0
03-08-2023, 03:59 AM
#13
Archived author: HelloKitty • Posted: 2023-03-08T03:59:53.507000+00:00
Original source

But these strings would be used in the cast result packets.
rektbyfaith
03-08-2023, 03:59 AM #13

Archived author: HelloKitty • Posted: 2023-03-08T03:59:53.507000+00:00
Original source

But these strings would be used in the cast result packets.

rektbyfaith
Administrator
0
03-08-2023, 04:00 AM
#14
Archived author: HelloKitty • Posted: 2023-03-08T04:00:32.480000+00:00
Original source

You can see in Spell::WriteCastResultInfo for SPELL_FAILED_REQUIRES_SPELL_FOCUS it will send the focus id so the client can build the correct error message in red text.
rektbyfaith
03-08-2023, 04:00 AM #14

Archived author: HelloKitty • Posted: 2023-03-08T04:00:32.480000+00:00
Original source

You can see in Spell::WriteCastResultInfo for SPELL_FAILED_REQUIRES_SPELL_FOCUS it will send the focus id so the client can build the correct error message in red text.

rektbyfaith
Administrator
0
03-08-2023, 04:03 AM
#15
Archived author: HelloKitty • Posted: 2023-03-08T04:03:34.119000+00:00
Original source

If you're looking for what those DBC ids point to you'll have to query the GO tables for GOs of type GAMEOBJECT_TYPE_SPELL_FOCUS (8) and the first data column should be the SpellFocusId DBC key.
rektbyfaith
03-08-2023, 04:03 AM #15

Archived author: HelloKitty • Posted: 2023-03-08T04:03:34.119000+00:00
Original source

If you're looking for what those DBC ids point to you'll have to query the GO tables for GOs of type GAMEOBJECT_TYPE_SPELL_FOCUS (8) and the first data column should be the SpellFocusId DBC key.

rektbyfaith
Administrator
0
03-08-2023, 04:06 AM
#16
Archived author: Saty • Posted: 2023-03-08T04:06:39.737000+00:00
Original source

Huh so its a serverside thing then... was hoping I can figure stuff out client side
rektbyfaith
03-08-2023, 04:06 AM #16

Archived author: Saty • Posted: 2023-03-08T04:06:39.737000+00:00
Original source

Huh so its a serverside thing then... was hoping I can figure stuff out client side

rektbyfaith
Administrator
0
03-08-2023, 04:07 AM
#17
Archived author: HelloKitty • Posted: 2023-03-08T04:07:49.779000+00:00
Original source

Well depending on what you want to create you can at least show the name of the focus object from just the DBCs. But that's about it, otherwise gotta query those tables
rektbyfaith
03-08-2023, 04:07 AM #17

Archived author: HelloKitty • Posted: 2023-03-08T04:07:49.779000+00:00
Original source

Well depending on what you want to create you can at least show the name of the focus object from just the DBCs. But that's about it, otherwise gotta query those tables

rektbyfaith
Administrator
0
03-08-2023, 04:09 AM
#18
Archived author: Saty • Posted: 2023-03-08T04:09:54.928000+00:00
Original source

Seems like it haha. Dammit.
rektbyfaith
03-08-2023, 04:09 AM #18

Archived author: Saty • Posted: 2023-03-08T04:09:54.928000+00:00
Original source

Seems like it haha. Dammit.

rektbyfaith
Administrator
0
03-08-2023, 04:21 AM
#19
Archived author: Saty • Posted: 2023-03-08T04:21:10.249000+00:00
Original source

Thank you very much tho, would never have figured that out
rektbyfaith
03-08-2023, 04:21 AM #19

Archived author: Saty • Posted: 2023-03-08T04:21:10.249000+00:00
Original source

Thank you very much tho, would never have figured that out

rektbyfaith
Administrator
0
03-08-2023, 04:28 AM
#20
Archived author: HelloKitty • Posted: 2023-03-08T04:28:55.334000+00:00
Original source

Happy to help <:owocat:486485371849277451>
rektbyfaith
03-08-2023, 04:28 AM #20

Archived author: HelloKitty • Posted: 2023-03-08T04:28:55.334000+00:00
Original source

Happy to help <:owocat:486485371849277451>

Pages (2): Previous 1 2
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)