[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:
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?
Archived author: Gromix • Posted: 2023-05-23T15:26:16.733000+00:00
Original source
What am I doing wrong?
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
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.
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 ?
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
Archived author: Gromix • Posted: 2023-05-23T15:48:50.014000+00:00
Original source
thanks