You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to wiki:
".npc delete [#guid]" - Delete creature with guid #guid (or the selected if no guid is provided).
".npc move [#creature_guid]" - Move the targeted creature spawn point to your coordinates.
When i try to execute this command either through ingame chat or world console i just get syntaxis help:
"Syntax: .npc move [#creature_guid]" - same with delete
My account have gmlevel 3 and i added npc beforehand with no problems (apart for his departure through textures in direction of his chill coordinates).
Expected Blizzlike Behaviour
As documentation stated expected behaviour is teleportation of npc by his guid to player position / or deletion of npc by his guid (which i found in "creature" DB table by his id1).
All steps are ingame (except DB part):
Spawn npc in stormwind: .npc add 32509 (it's a heirloom vendor, which roams betwen floors in Dalaran in his store)
'npc just goes away but that's not the point'
Find his GUID in db with SQL: SELECT * FROM creature WHERE id1 = 32509;
There suppose to be two entries - one for original NPC in Dalaran and one for our newly spawned NPC. Take the latter one.
Try: .npc move xxxx - where xxxx is your guid.
Extra Notes
So as i can see in command cs_npc.cpp itself - there just no GUID argument in methods/functions:
And it was like this since this commit (i think, i didn't see after it).
So is this just lost functionality or it was deliberate choice - to let move/delete npc only with targeting them?
Either Documentation is deprecated (which is less of a priority i think) or this functionality should be restored.
So if there was deliberate decision to remove guid from commands then i could make a PR for documentation. And if there were not then i could try to reimplement it, because as i see it i just need to be something like this (i just took code from HandleNpcSetMoveTypeCommand):
And also there is redundant fetch of data because we already got one:
CreatureData const* data = sObjectMgr->GetCreatureData(lowguid); -- here we get data
if (!data)
{
handler->SendErrorMessage(LANG_COMMAND_CREATGUIDNOTFOUND, lowguid);
return false;
}
if (handler->GetSession()->GetPlayer()->GetMapId() != data->mapid)
{
handler->SendErrorMessage(LANG_COMMAND_CREATUREATSAMEMAP, lowguid);
return false;
}
float x = handler->GetSession()->GetPlayer()->GetPositionX();
float y = handler->GetSession()->GetPlayer()->GetPositionY();
float z = handler->GetSession()->GetPlayer()->GetPositionZ();
float o = handler->GetSession()->GetPlayer()->GetOrientation();
if (creature)
{
if (CreatureData const* data = sObjectMgr->GetCreatureData(creature->GetSpawnId())) -- and here we get it again
Or data fetched by lowGuid and creature.spawnId is different?
.npc set movetype [#creature_guid] stay/random/way [NODEL] - also didn't work as intended (but worked partially) with GUID. Tried
.npc set movetype xxxxx stay - and got error "An error occured formatting string "Creature movement type set tp '%s', waypoints removed (if any).". So i think command parsed wrong and my "stay" got lost. Because that wondering npc just respawns at his position and goes away instead of standing still.
Kitzunu
added a commit
to Kitzunu/azerothcore-wotlk
that referenced
this issue
Dec 22, 2024
Current Behaviour
According to wiki:
".npc delete [#guid]" - Delete creature with guid #guid (or the selected if no guid is provided).
".npc move [#creature_guid]" - Move the targeted creature spawn point to your coordinates.
When i try to execute this command either through ingame chat or world console i just get syntaxis help:
"Syntax: .npc move [#creature_guid]" - same with delete
My account have gmlevel 3 and i added npc beforehand with no problems (apart for his departure through textures in direction of his chill coordinates).
Expected Blizzlike Behaviour
As documentation stated expected behaviour is teleportation of npc by his guid to player position / or deletion of npc by his guid (which i found in "creature" DB table by his id1).
Source
https://www.azerothcore.org/wiki/gm-commands
Steps to reproduce the problem
All steps are ingame (except DB part):
Spawn npc in stormwind: .npc add 32509 (it's a heirloom vendor, which roams betwen floors in Dalaran in his store)
'npc just goes away but that's not the point'
Find his GUID in db with SQL: SELECT * FROM creature WHERE id1 = 32509;
There suppose to be two entries - one for original NPC in Dalaran and one for our newly spawned NPC. Take the latter one.
Try: .npc move xxxx - where xxxx is your guid.
Extra Notes
So as i can see in command cs_npc.cpp itself - there just no GUID argument in methods/functions:
And it was like this since this commit (i think, i didn't see after it).
So is this just lost functionality or it was deliberate choice - to let move/delete npc only with targeting them?
Either Documentation is deprecated (which is less of a priority i think) or this functionality should be restored.
So if there was deliberate decision to remove guid from commands then i could make a PR for documentation. And if there were not then i could try to reimplement it, because as i see it i just need to be something like this (i just took code from HandleNpcSetMoveTypeCommand):
And also there is redundant fetch of data because we already got one:
Or data fetched by lowGuid and creature.spawnId is different?
AC rev. hash/commit
AzerothCore rev. 82aedf7+ 2024-05-04 08:33:28 +0700 (npcbots_3.3.5 branch) (Win64, Release, Static) (worldserver-daemon)
Operating system
Windows 11 x64
Custom changes or Modules
The text was updated successfully, but these errors were encountered: