Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] The despawn too?

[DiscordArchive] The despawn too?

[DiscordArchive] The despawn too?

rektbyfaith
Administrator
0
03-21-2025, 03:35 PM
#1
Archived author: metallinos • Posted: 2025-03-21T15:35:35.673000+00:00
Original source

The despawn too?
rektbyfaith
03-21-2025, 03:35 PM #1

Archived author: metallinos • Posted: 2025-03-21T15:35:35.673000+00:00
Original source

The despawn too?

rektbyfaith
Administrator
0
03-21-2025, 03:54 PM
#2
Archived author: Sanderis • Posted: 2025-03-21T15:54:40.010000+00:00
Original source

From the looks of it
rektbyfaith
03-21-2025, 03:54 PM #2

Archived author: Sanderis • Posted: 2025-03-21T15:54:40.010000+00:00
Original source

From the looks of it

rektbyfaith
Administrator
0
03-21-2025, 03:55 PM
#3
Archived author: Sanderis • Posted: 2025-03-21T15:55:02.874000+00:00
Original source

It'll sit there for like 3 minutes
rektbyfaith
03-21-2025, 03:55 PM #3

Archived author: Sanderis • Posted: 2025-03-21T15:55:02.874000+00:00
Original source

It'll sit there for like 3 minutes

rektbyfaith
Administrator
0
03-21-2025, 04:00 PM
#4
Archived author: metallinos • Posted: 2025-03-21T16:00:16.916000+00:00
Original source

The logout despawn, I mean
rektbyfaith
03-21-2025, 04:00 PM #4

Archived author: metallinos • Posted: 2025-03-21T16:00:16.916000+00:00
Original source

The logout despawn, I mean

rektbyfaith
Administrator
0
03-21-2025, 04:00 PM
#5
Archived author: metallinos • Posted: 2025-03-21T16:00:46.021000+00:00
Original source

You can store and it will get the GUID from the player:SetData / GetData methods but you can't print the GUID, can't contatentate it unless you convert it to a string first
rektbyfaith
03-21-2025, 04:00 PM #5

Archived author: metallinos • Posted: 2025-03-21T16:00:46.021000+00:00
Original source

You can store and it will get the GUID from the player:SetData / GetData methods but you can't print the GUID, can't contatentate it unless you convert it to a string first

rektbyfaith
Administrator
0
03-21-2025, 04:01 PM
#6
Archived author: metallinos • Posted: 2025-03-21T16:01:18.039000+00:00
Original source

Try
```
local function OnPlayerLogout(event, player)
local vendorGUID = player:GetData("VendorSummonedGUID")

if vendorGUID then
Debug("Player " .. player:GetName() .. " logged out, cleaning up summoned NPC")
local npc = player:GetMap():GetWorldObject(vendorGUID)
if npc then
Debug("Despawning NPC with GUID: " .. tostring(vendorGUID))
npcBig GrinespawnOrUnsummon()
end
end
end
```
instead, then it'll disappear on logout (if that's desirable)
rektbyfaith
03-21-2025, 04:01 PM #6

Archived author: metallinos • Posted: 2025-03-21T16:01:18.039000+00:00
Original source

Try
```
local function OnPlayerLogout(event, player)
local vendorGUID = player:GetData("VendorSummonedGUID")

if vendorGUID then
Debug("Player " .. player:GetName() .. " logged out, cleaning up summoned NPC")
local npc = player:GetMap():GetWorldObject(vendorGUID)
if npc then
Debug("Despawning NPC with GUID: " .. tostring(vendorGUID))
npcBig GrinespawnOrUnsummon()
end
end
end
```
instead, then it'll disappear on logout (if that's desirable)

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