Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Just put check in for specific ids and spawn the dummy?

[DiscordArchive] Just put check in for specific ids and spawn the dummy?

[DiscordArchive] Just put check in for specific ids and spawn the dummy?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
05-30-2022, 07:32 PM
#1
Archived author: Clotic • Posted: 2022-05-30T19:32:01.751000+00:00
Original source

Just put check in for specific ids and spawn the dummy?
rektbyfaith
05-30-2022, 07:32 PM #1

Archived author: Clotic • Posted: 2022-05-30T19:32:01.751000+00:00
Original source

Just put check in for specific ids and spawn the dummy?

rektbyfaith
Administrator
0
05-30-2022, 07:32 PM
#2
Archived author: Clotic • Posted: 2022-05-30T19:32:41.602000+00:00
Original source

Assume that's what u wanna do or if u wanna do all creatures then do all creatures in range 9999999
rektbyfaith
05-30-2022, 07:32 PM #2

Archived author: Clotic • Posted: 2022-05-30T19:32:41.602000+00:00
Original source

Assume that's what u wanna do or if u wanna do all creatures then do all creatures in range 9999999

rektbyfaith
Administrator
0
05-30-2022, 07:32 PM
#3
Archived author: Foe • Posted: 2022-05-30T19:32:48.677000+00:00
Original source

Yes, but you can flag the bosses as active
rektbyfaith
05-30-2022, 07:32 PM #3

Archived author: Foe • Posted: 2022-05-30T19:32:48.677000+00:00
Original source

Yes, but you can flag the bosses as active

rektbyfaith
Administrator
0
05-30-2022, 07:32 PM
#4
Archived author: Foe • Posted: 2022-05-30T19:32:57.843000+00:00
Original source

that way they don't unload
rektbyfaith
05-30-2022, 07:32 PM #4

Archived author: Foe • Posted: 2022-05-30T19:32:57.843000+00:00
Original source

that way they don't unload

rektbyfaith
Administrator
0
05-30-2022, 07:34 PM
#5
Archived author: Honey • Posted: 2022-05-30T19:34:53.689000+00:00
Original source

Hmm i would check for
- nil doing nothing
- IsInCombat() starting a timer
- IsDead() ending the timer and removing the entry from the list to check for this instance id
rektbyfaith
05-30-2022, 07:34 PM #5

Archived author: Honey • Posted: 2022-05-30T19:34:53.689000+00:00
Original source

Hmm i would check for
- nil doing nothing
- IsInCombat() starting a timer
- IsDead() ending the timer and removing the entry from the list to check for this instance id

rektbyfaith
Administrator
0
05-30-2022, 07:35 PM
#6
Archived author: Honey • Posted: 2022-05-30T19:35:17.955000+00:00
Original source

Don't think i need states or make sure it stays loaded for that
rektbyfaith
05-30-2022, 07:35 PM #6

Archived author: Honey • Posted: 2022-05-30T19:35:17.955000+00:00
Original source

Don't think i need states or make sure it stays loaded for that

rektbyfaith
Administrator
0
05-30-2022, 07:38 PM
#7
Archived author: Foe • Posted: 2022-05-30T19:38:15.142000+00:00
Original source

in the generic loop you just check if the creature is dead, if it is, then you don't have to check whether it's in combat or not
rektbyfaith
05-30-2022, 07:38 PM #7

Archived author: Foe • Posted: 2022-05-30T19:38:15.142000+00:00
Original source

in the generic loop you just check if the creature is dead, if it is, then you don't have to check whether it's in combat or not

rektbyfaith
Administrator
0
05-30-2022, 07:39 PM
#8
Archived author: Honey • Posted: 2022-05-30T19:39:27.913000+00:00
Original source

i think i need it to start the combat timer. I aim at knowing encounter durations, sorry should've said that.
rektbyfaith
05-30-2022, 07:39 PM #8

Archived author: Honey • Posted: 2022-05-30T19:39:27.913000+00:00
Original source

i think i need it to start the combat timer. I aim at knowing encounter durations, sorry should've said that.

rektbyfaith
Administrator
0
05-30-2022, 07:45 PM
#9
Archived author: Foe • Posted: 2022-05-30T19:45:53.845000+00:00
Original source

```Lua
local function CheckBossStatus()
local boss; -- lets assume we have already fetched the boss object
local timerStart = nil; -- instantiate timer as nil
local timerEnd = nil;

if(boss and not boss:IsDead()) then -- Boss exists and isn't dead
if(boss:IsInCombat() and not timerStart) then -- the boss is in combat and timer is not instantiated
timerStart = os.time() -- instantiate timer as current unix time
end
else -- boss does not exist or is dead
if(timerStart) then -- start timer has been instantiated
timerEnd = os.time()
end
end

if(timerStart and timerEnd) then
-- you can do stuff with start and end timer here
end
end```
rektbyfaith
05-30-2022, 07:45 PM #9

Archived author: Foe • Posted: 2022-05-30T19:45:53.845000+00:00
Original source

```Lua
local function CheckBossStatus()
local boss; -- lets assume we have already fetched the boss object
local timerStart = nil; -- instantiate timer as nil
local timerEnd = nil;

if(boss and not boss:IsDead()) then -- Boss exists and isn't dead
if(boss:IsInCombat() and not timerStart) then -- the boss is in combat and timer is not instantiated
timerStart = os.time() -- instantiate timer as current unix time
end
else -- boss does not exist or is dead
if(timerStart) then -- start timer has been instantiated
timerEnd = os.time()
end
end

if(timerStart and timerEnd) then
-- you can do stuff with start and end timer here
end
end```

rektbyfaith
Administrator
0
05-30-2022, 07:46 PM
#10
Archived author: Foe • Posted: 2022-05-30T19:46:14.759000+00:00
Original source

Very pseudo-code, obviously would need better storage of timers and instance etc
rektbyfaith
05-30-2022, 07:46 PM #10

Archived author: Foe • Posted: 2022-05-30T19:46:14.759000+00:00
Original source

Very pseudo-code, obviously would need better storage of timers and instance etc

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