Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] I need a creature object by lowId. My next idea doesn't work:

[DiscordArchive] I need a creature object by lowId. My next idea doesn't work:

[DiscordArchive] I need a creature object by lowId. My next idea doesn't work:

rektbyfaith
Administrator
0
05-23-2023, 03:25 PM
#1
Archived author: Gromix • Posted: 2023-05-23T15:25:24.427000+00:00
Original source

I need a creature object by lowId. My next idea doesn't work:
My custom command in game: `.npc move 79930`
`static bool HandleNpcMoveCommand(ChatHandler* handler, CreatureSpawnId lowGuid)
{
Player* player = handler->GetSession()->GetPlayer();
ObjectGuid guid = ObjectGuid::Create<HighGuid::Unit>(VISUAL_WAYPOINT, lowGuid);
Creature* wpCreature = player->GetMap()->GetCreature(guid);
return true;
}`
Why wpCreature is null? Should I type GUID or current Id?
rektbyfaith
05-23-2023, 03:25 PM #1

Archived author: Gromix • Posted: 2023-05-23T15:25:24.427000+00:00
Original source

I need a creature object by lowId. My next idea doesn't work:
My custom command in game: `.npc move 79930`
`static bool HandleNpcMoveCommand(ChatHandler* handler, CreatureSpawnId lowGuid)
{
Player* player = handler->GetSession()->GetPlayer();
ObjectGuid guid = ObjectGuid::Create<HighGuid::Unit>(VISUAL_WAYPOINT, lowGuid);
Creature* wpCreature = player->GetMap()->GetCreature(guid);
return true;
}`
Why wpCreature is null? Should I type GUID or current Id?

rektbyfaith
Administrator
0
05-23-2023, 03:26 PM
#2
Archived author: Gromix • Posted: 2023-05-23T15:26:16.733000+00:00
Original source

What am I doing wrong?
rektbyfaith
05-23-2023, 03:26 PM #2

Archived author: Gromix • Posted: 2023-05-23T15:26:16.733000+00:00
Original source

What am I doing wrong?

rektbyfaith
Administrator
0
05-23-2023, 03:41 PM
#3
Archived author: Gromix • Posted: 2023-05-23T15:41:14.507000+00:00
Original source

the build takes so long that it takes ages to test it ‍
rektbyfaith
05-23-2023, 03:41 PM #3

Archived author: Gromix • Posted: 2023-05-23T15:41:14.507000+00:00
Original source

the build takes so long that it takes ages to test it ‍

rektbyfaith
Administrator
0
05-23-2023, 03:43 PM
#4
Archived author: Honey • Posted: 2023-05-23T15:43:24.379000+00:00
Original source

Are you chaning code in a widespread used header file? That will result in most of the core being re-compiled. Try creating a module instead, which doesn't change any core files. That way you can re-compile in seconds.
rektbyfaith
05-23-2023, 03:43 PM #4

Archived author: Honey • Posted: 2023-05-23T15:43:24.379000+00:00
Original source

Are you chaning code in a widespread used header file? That will result in most of the core being re-compiled. Try creating a module instead, which doesn't change any core files. That way you can re-compile in seconds.

rektbyfaith
Administrator
0
05-23-2023, 03:46 PM
#5
Archived author: Gromix • Posted: 2023-05-23T15:46:39.201000+00:00
Original source

OK, what are the module limitations? Can I change everything? For example, commands like .npc move... etc ?
rektbyfaith
05-23-2023, 03:46 PM #5

Archived author: Gromix • Posted: 2023-05-23T15:46:39.201000+00:00
Original source

OK, what are the module limitations? Can I change everything? For example, commands like .npc move... etc ?

rektbyfaith
Administrator
0
05-23-2023, 03:48 PM
#6
Archived author: Honey • Posted: 2023-05-23T15:48:27.534000+00:00
Original source

Instead of changing the core directly, modules use hooks and execute code in places where the core calls these hooks.
See https://www.azerothcore.org/wiki/create-a-module
[Embed: Create a Module]
Wiki and Documentation of the AzerothCore project
https://www.azerothcore.org/wiki/create-a-module
rektbyfaith
05-23-2023, 03:48 PM #6

Archived author: Honey • Posted: 2023-05-23T15:48:27.534000+00:00
Original source

Instead of changing the core directly, modules use hooks and execute code in places where the core calls these hooks.
See https://www.azerothcore.org/wiki/create-a-module
[Embed: Create a Module]
Wiki and Documentation of the AzerothCore project
https://www.azerothcore.org/wiki/create-a-module

rektbyfaith
Administrator
0
05-23-2023, 03:48 PM
#7
Archived author: Gromix • Posted: 2023-05-23T15:48:50.014000+00:00
Original source

thanks
rektbyfaith
05-23-2023, 03:48 PM #7

Archived author: Gromix • Posted: 2023-05-23T15:48:50.014000+00:00
Original source

thanks

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