{"action":"created","issue":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/16733","repository_url":"https://api.github.com/repos/TrinityCore/TrinityCore","labels_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/16733/labels{/name}","comments_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/16733/comments","events_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/16733/events","html_url":"https://github.com/TrinityCore/TrinityCore/issues/16733","id":138731579,"number":16733,"title":"[3.3.5] .npc delete guid and wp show off not working properly","user":{"login":"Magnifikator","id":1770433,"avatar_url":"https://avatars.githubusercontent.com/u/1770433?v=3","gravatar_id":"","url":"https://api.github.com/users/Magnifikator","html_url":"https://github.com/Magnifikator","followers_url":"https://api.github.com/users/Magnifikator/followers","following_url":"https://api.github.com/users/Magnifikator/following{/other_user}","gists_url":"https://api.github.com/users/Magnifikator/gists{/gist_id}","starred_url":"https://api.github.com/users/Magnifikator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Magnifikator/subscriptions","organizations_url":"https://api.github.com/users/Magnifikator/orgs","repos_url":"https://api.github.com/users/Magnifikator/repos","events_url":"https://api.github.com/users/Magnifikator/events{/privacy}","received_events_url":"https://api.github.com/users/Magnifikator/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/labels/Comp-Core","name":"Comp-Core","color":"FF6600"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-05T22:59:56Z","updated_at":"2016-03-07T12:19:01Z","closed_at":null,"body":"d55d32fa0f7a\r\n\r\nBoth commands don't work properly because of the same fault. \r\n.wp show off doesn't delete the visual waypoint marker (because it can't find the guid)\r\n.npc del guid also doesn't work because of the same reason.\r\n\r\nLooking to the code:\r\n\r\ncs_npc.cpp line 492:\r\nunit = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(ObjectGuid(HighGuid::Unit, cr_data->id, lowguid));\r\n\r\nunit is always 0 (null)\r\n\r\ncs_wp.cpp line 1025:\r\nCreature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(ObjectGuid(HighGuid::Unit, VISUAL_WAYPOINT, guid));\r\n\r\ncreature is always 0 (null)\r\n\r\nUnfortunately I couldn't find exactly where the problem is. ObjectGuid() seems to be correct. It contains the correct guid. Maybe it's GetCreature().\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/comments/193228799","html_url":"https://github.com/TrinityCore/TrinityCore/issues/16733#issuecomment-193228799","issue_url":"https://api.github.com/repos/TrinityCore/TrinityCore/issues/16733","id":193228799,"user":{"login":"Magnifikator","id":1770433,"avatar_url":"https://avatars.githubusercontent.com/u/1770433?v=3","gravatar_id":"","url":"https://api.github.com/users/Magnifikator","html_url":"https://github.com/Magnifikator","followers_url":"https://api.github.com/users/Magnifikator/followers","following_url":"https://api.github.com/users/Magnifikator/following{/other_user}","gists_url":"https://api.github.com/users/Magnifikator/gists{/gist_id}","starred_url":"https://api.github.com/users/Magnifikator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Magnifikator/subscriptions","organizations_url":"https://api.github.com/users/Magnifikator/orgs","repos_url":"https://api.github.com/users/Magnifikator/repos","events_url":"https://api.github.com/users/Magnifikator/events{/privacy}","received_events_url":"https://api.github.com/users/Magnifikator/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T12:19:01Z","updated_at":"2016-03-07T12:19:01Z","body":"cs_wp.cpp line 1024\r\nObjectGuid::LowType guid = fields[0].GetUInt32();\r\n\r\nThat's also a database guid and not a counter. Same issue same reason.\r\n\r\nI just don't know if you should give another parameter or change the ObjectGuid() method."}}