Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Is there a way to have the player cast a spell without checking for reagents, but still keeping the

[DiscordArchive] Is there a way to have the player cast a spell without checking for reagents, but still keeping the

[DiscordArchive] Is there a way to have the player cast a spell without checking for reagents, but still keeping the

rektbyfaith
Administrator
0
01-25-2024, 08:23 AM
#1
Archived author: tomato • Posted: 2024-01-25T08:23:11.908000+00:00
Original source

Is there a way to have the player cast a spell without checking for reagents, but still keeping the cast time? Something like setting `triggered` to true without making the cast instant?
rektbyfaith
01-25-2024, 08:23 AM #1

Archived author: tomato • Posted: 2024-01-25T08:23:11.908000+00:00
Original source

Is there a way to have the player cast a spell without checking for reagents, but still keeping the cast time? Something like setting `triggered` to true without making the cast instant?

rektbyfaith
Administrator
0
01-25-2024, 08:29 AM
#2
Archived author: Anchy • Posted: 2024-01-25T08:29:13.117000+00:00
Original source

you should be able to just use the CastSpell function which is part of Unit
rektbyfaith
01-25-2024, 08:29 AM #2

Archived author: Anchy • Posted: 2024-01-25T08:29:13.117000+00:00
Original source

you should be able to just use the CastSpell function which is part of Unit

rektbyfaith
Administrator
0
01-25-2024, 08:34 AM
#3
Archived author: tomato • Posted: 2024-01-25T08:34:09.772000+00:00
Original source

hmm, calling `player:CastSpell(nil, 3561, false)` in a `PLAYER_EVENT_ON_COMMAND` handler results in the client refusing to cast due to missing a rune
rektbyfaith
01-25-2024, 08:34 AM #3

Archived author: tomato • Posted: 2024-01-25T08:34:09.772000+00:00
Original source

hmm, calling `player:CastSpell(nil, 3561, false)` in a `PLAYER_EVENT_ON_COMMAND` handler results in the client refusing to cast due to missing a rune

rektbyfaith
Administrator
0
01-25-2024, 08:43 AM
#4
Archived author: Anchy • Posted: 2024-01-25T08:43:01.398000+00:00
Original source

ah right, it's likely failing the CheckCast you are correct
rektbyfaith
01-25-2024, 08:43 AM #4

Archived author: Anchy • Posted: 2024-01-25T08:43:01.398000+00:00
Original source

ah right, it's likely failing the CheckCast you are correct

rektbyfaith
Administrator
0
01-25-2024, 08:43 AM
#5
Archived author: Anchy • Posted: 2024-01-25T08:43:47.449000+00:00
Original source

CheckCast is quite late into CastSpell chain so I'm not sure sorry
rektbyfaith
01-25-2024, 08:43 AM #5

Archived author: Anchy • Posted: 2024-01-25T08:43:47.449000+00:00
Original source

CheckCast is quite late into CastSpell chain so I'm not sure sorry

rektbyfaith
Administrator
0
01-25-2024, 08:43 AM
#6
Archived author: Anchy • Posted: 2024-01-25T08:43:49.863000+00:00
Original source

maybe Foe knows
rektbyfaith
01-25-2024, 08:43 AM #6

Archived author: Anchy • Posted: 2024-01-25T08:43:49.863000+00:00
Original source

maybe Foe knows

rektbyfaith
Administrator
0
01-25-2024, 08:43 AM
#7
Archived author: tomato • Posted: 2024-01-25T08:43:50.090000+00:00
Original source

giving the player the required item right before calling `CastSpell` and then removing it right after *works*, but requires a `PLAYER_EVENT_ON_SPELL_CAST` handler that calls `spell:Cast(true)`, and still causes error text on the client, which is kinda eh (and feels super hacky)
rektbyfaith
01-25-2024, 08:43 AM #7

Archived author: tomato • Posted: 2024-01-25T08:43:50.090000+00:00
Original source

giving the player the required item right before calling `CastSpell` and then removing it right after *works*, but requires a `PLAYER_EVENT_ON_SPELL_CAST` handler that calls `spell:Cast(true)`, and still causes error text on the client, which is kinda eh (and feels super hacky)

rektbyfaith
Administrator
0
01-25-2024, 08:45 AM
#8
Archived author: Anchy • Posted: 2024-01-25T08:45:00.983000+00:00
Original source

you could theoretically modify the spell conditions before it's actually cast and remove the requirement
rektbyfaith
01-25-2024, 08:45 AM #8

Archived author: Anchy • Posted: 2024-01-25T08:45:00.983000+00:00
Original source

you could theoretically modify the spell conditions before it's actually cast and remove the requirement

rektbyfaith
Administrator
0
01-25-2024, 08:45 AM
#9
Archived author: Anchy • Posted: 2024-01-25T08:45:01.707000+00:00
Original source

lol
rektbyfaith
01-25-2024, 08:45 AM #9

Archived author: Anchy • Posted: 2024-01-25T08:45:01.707000+00:00
Original source

lol

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)