Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Anyone know how to get info about respawn time of creature that is somewhere in world ?

[DiscordArchive] Anyone know how to get info about respawn time of creature that is somewhere in world ?

[DiscordArchive] Anyone know how to get info about respawn time of creature that is somewhere in world ?

rektbyfaith
Administrator
0
01-22-2021, 07:23 PM
#1
Archived author: hguy • Posted: 2021-01-22T19:23:21.159000+00:00
Original source

Anyone know how to get info about respawn time of creature that is somewhere in world ?
rektbyfaith
01-22-2021, 07:23 PM #1

Archived author: hguy • Posted: 2021-01-22T19:23:21.159000+00:00
Original source

Anyone know how to get info about respawn time of creature that is somewhere in world ?

rektbyfaith
Administrator
0
01-22-2021, 07:23 PM
#2
Archived author: hguy • Posted: 2021-01-22T19:23:33.393000+00:00
Original source

if (Creature* boss1 = ObjectAccessor::GetCreature(*player, BOSS_ID_1))
{
if (boss1->isDead())
g1 << "Test: |cffff0000DEAD|r\n" << "> |cffDA70D6Respawn in " << secsToTimeString(uint32(boss1->GetRespawnTime()));
rektbyfaith
01-22-2021, 07:23 PM #2

Archived author: hguy • Posted: 2021-01-22T19:23:33.393000+00:00
Original source

if (Creature* boss1 = ObjectAccessor::GetCreature(*player, BOSS_ID_1))
{
if (boss1->isDead())
g1 << "Test: |cffff0000DEAD|r\n" << "> |cffDA70D6Respawn in " << secsToTimeString(uint32(boss1->GetRespawnTime()));

rektbyfaith
Administrator
0
01-22-2021, 07:25 PM
#3
Archived author: Kitzunu • Posted: 2021-01-22T19:25:53.820000+00:00
Original source

I may be wrong, but I think the command `.npc info` shows the respawn time of a dead creature. That way you could look in the command to see how it works.
But I can't remember if that works on AC or if it was on TC
rektbyfaith
01-22-2021, 07:25 PM #3

Archived author: Kitzunu • Posted: 2021-01-22T19:25:53.820000+00:00
Original source

I may be wrong, but I think the command `.npc info` shows the respawn time of a dead creature. That way you could look in the command to see how it works.
But I can't remember if that works on AC or if it was on TC

rektbyfaith
Administrator
0
01-22-2021, 07:27 PM
#4
Archived author: Kitzunu • Posted: 2021-01-22T19:27:32.029000+00:00
Original source

but you'd probably need to get the GUID of the creature
rektbyfaith
01-22-2021, 07:27 PM #4

Archived author: Kitzunu • Posted: 2021-01-22T19:27:32.029000+00:00
Original source

but you'd probably need to get the GUID of the creature

rektbyfaith
Administrator
0
01-22-2021, 07:30 PM
#5
Archived author: hguy • Posted: 2021-01-22T19:30:06.392000+00:00
Original source

I just don't know how to find creature by guid in the world
rektbyfaith
01-22-2021, 07:30 PM #5

Archived author: hguy • Posted: 2021-01-22T19:30:06.392000+00:00
Original source

I just don't know how to find creature by guid in the world

rektbyfaith
Administrator
0
01-22-2021, 07:31 PM
#6
Archived author: hguy • Posted: 2021-01-22T19:31:34.003000+00:00
Original source

// these functions return objects if found in whole world
// ACCESS LIKE THAT IS NOT THREAD SAFE
static Pet* FindPet(uint64);
static Player* FindPlayer(uint64);
static Creature* FindCreature(uint64);
rektbyfaith
01-22-2021, 07:31 PM #6

Archived author: hguy • Posted: 2021-01-22T19:31:34.003000+00:00
Original source

// these functions return objects if found in whole world
// ACCESS LIKE THAT IS NOT THREAD SAFE
static Pet* FindPet(uint64);
static Player* FindPlayer(uint64);
static Creature* FindCreature(uint64);

rektbyfaith
Administrator
0
01-22-2021, 07:36 PM
#7
Archived author: hguy • Posted: 2021-01-22T19:36:30.392000+00:00
Original source

maybe like this ?
rektbyfaith
01-22-2021, 07:36 PM #7

Archived author: hguy • Posted: 2021-01-22T19:36:30.392000+00:00
Original source

maybe like this ?

rektbyfaith
Administrator
0
01-22-2021, 07:36 PM
#8
Archived author: hguy • Posted: 2021-01-22T19:36:30.921000+00:00
Original source

if (Creature* boss1 = ObjectAccessor::GetObjectInWorld(BOSS_ID_1, creature))
rektbyfaith
01-22-2021, 07:36 PM #8

Archived author: hguy • Posted: 2021-01-22T19:36:30.921000+00:00
Original source

if (Creature* boss1 = ObjectAccessor::GetObjectInWorld(BOSS_ID_1, creature))

rektbyfaith
Administrator
0
01-22-2021, 07:45 PM
#9
Archived author: hguy • Posted: 2021-01-22T19:45:34.908000+00:00
Original source

Found it if (Creature* boss1 = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(BOSS_ID_1, 200001, HIGHGUID_UNIT), (Creature*)NULL))
rektbyfaith
01-22-2021, 07:45 PM #9

Archived author: hguy • Posted: 2021-01-22T19:45:34.908000+00:00
Original source

Found it if (Creature* boss1 = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(BOSS_ID_1, 200001, HIGHGUID_UNIT), (Creature*)NULL))

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