Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] ```local PACKET_EVENT_ON_PACKET_RECEIVE = 5

[DiscordArchive] ```local PACKET_EVENT_ON_PACKET_RECEIVE = 5

[DiscordArchive] ```local PACKET_EVENT_ON_PACKET_RECEIVE = 5

Pages (3): 1 2 3 Next
rektbyfaith
Administrator
0
12-03-2023, 09:19 PM
#1
Archived author: Nocty1501 • Posted: 2023-12-03T21:19:25.874000+00:00
Original source

```local PACKET_EVENT_ON_PACKET_RECEIVE = 5
local CMSG_REPOP_REQUEST = 346
local CMSG_RECLAIM_CORPSE = 466
local CMSG_SPIRIT_HEALER_ACTIVATE = 540

local function OnAttemptRevive(event, packet, player)
player:SendNotification("You are already lost...")
return false
end

RegisterPacketEvent(CMSG_RECLAIM_CORPSE, PACKET_EVENT_ON_PACKET_RECEIVE, OnAttemptRevive(event, packet, player))
RegisterPacketEvent(CMSG_RECLAIM_CORPSE, PACKET_EVENT_ON_PACKET_RECEIVE, OnAttemptRevive(event, packet, player))
RegisterPacketEvent(CMSG_SPIRIT_HEALER_ACTIVATE, PACKET_EVENT_ON_PACKET_RECEIVE, OnAttemptRevive(event, packet, player))```
what did I screw up?
rektbyfaith
12-03-2023, 09:19 PM #1

Archived author: Nocty1501 • Posted: 2023-12-03T21:19:25.874000+00:00
Original source

```local PACKET_EVENT_ON_PACKET_RECEIVE = 5
local CMSG_REPOP_REQUEST = 346
local CMSG_RECLAIM_CORPSE = 466
local CMSG_SPIRIT_HEALER_ACTIVATE = 540

local function OnAttemptRevive(event, packet, player)
player:SendNotification("You are already lost...")
return false
end

RegisterPacketEvent(CMSG_RECLAIM_CORPSE, PACKET_EVENT_ON_PACKET_RECEIVE, OnAttemptRevive(event, packet, player))
RegisterPacketEvent(CMSG_RECLAIM_CORPSE, PACKET_EVENT_ON_PACKET_RECEIVE, OnAttemptRevive(event, packet, player))
RegisterPacketEvent(CMSG_SPIRIT_HEALER_ACTIVATE, PACKET_EVENT_ON_PACKET_RECEIVE, OnAttemptRevive(event, packet, player))```
what did I screw up?

rektbyfaith
Administrator
0
12-03-2023, 09:21 PM
#2
Archived author: Honey • Posted: 2023-12-03T21:21:14.010000+00:00
Original source

There's no player object. You need to evaluate if it's an issue that there's no `player` object available.
rektbyfaith
12-03-2023, 09:21 PM #2

Archived author: Honey • Posted: 2023-12-03T21:21:14.010000+00:00
Original source

There's no player object. You need to evaluate if it's an issue that there's no `player` object available.

rektbyfaith
Administrator
0
12-03-2023, 09:21 PM
#3
Archived author: Honey • Posted: 2023-12-03T21:21:52.677000+00:00
Original source

To solve the bug, do
```lua
if player then
<do stuff>
end
return false
```
rektbyfaith
12-03-2023, 09:21 PM #3

Archived author: Honey • Posted: 2023-12-03T21:21:52.677000+00:00
Original source

To solve the bug, do
```lua
if player then
<do stuff>
end
return false
```

rektbyfaith
Administrator
0
12-03-2023, 09:22 PM
#4
Archived author: Honey • Posted: 2023-12-03T21:22:11.302000+00:00
Original source

However, your message won't be sent
rektbyfaith
12-03-2023, 09:22 PM #4

Archived author: Honey • Posted: 2023-12-03T21:22:11.302000+00:00
Original source

However, your message won't be sent

rektbyfaith
Administrator
0
12-03-2023, 09:22 PM
#5
Archived author: Honey • Posted: 2023-12-03T21:22:18.036000+00:00
Original source

in that specific case.
rektbyfaith
12-03-2023, 09:22 PM #5

Archived author: Honey • Posted: 2023-12-03T21:22:18.036000+00:00
Original source

in that specific case.

rektbyfaith
Administrator
0
12-03-2023, 09:22 PM
#6
Archived author: Nocty1501 • Posted: 2023-12-03T21:22:32.208000+00:00
Original source

I don't get it. how is this function even being called without a player?
rektbyfaith
12-03-2023, 09:22 PM #6

Archived author: Nocty1501 • Posted: 2023-12-03T21:22:32.208000+00:00
Original source

I don't get it. how is this function even being called without a player?

rektbyfaith
Administrator
0
12-03-2023, 09:23 PM
#7
Archived author: Honey • Posted: 2023-12-03T21:23:20.715000+00:00
Original source

I'm just guessing, but if the player is dad, there might be no player object.
rektbyfaith
12-03-2023, 09:23 PM #7

Archived author: Honey • Posted: 2023-12-03T21:23:20.715000+00:00
Original source

I'm just guessing, but if the player is dad, there might be no player object.

rektbyfaith
Administrator
0
12-03-2023, 09:23 PM
#8
Archived author: Nocty1501 • Posted: 2023-12-03T21:23:55.552000+00:00
Original source

eh...? that can't be right
rektbyfaith
12-03-2023, 09:23 PM #8

Archived author: Nocty1501 • Posted: 2023-12-03T21:23:55.552000+00:00
Original source

eh...? that can't be right

rektbyfaith
Administrator
0
12-03-2023, 09:24 PM
#9
Archived author: Honey • Posted: 2023-12-03T21:24:42.044000+00:00
Original source

Let us know what you found out
rektbyfaith
12-03-2023, 09:24 PM #9

Archived author: Honey • Posted: 2023-12-03T21:24:42.044000+00:00
Original source

Let us know what you found out

rektbyfaith
Administrator
0
12-03-2023, 09:28 PM
#10
Archived author: Nocty1501 • Posted: 2023-12-03T21:28:40.327000+00:00
Original source

oh, of course
rektbyfaith
12-03-2023, 09:28 PM #10

Archived author: Nocty1501 • Posted: 2023-12-03T21:28:40.327000+00:00
Original source

oh, of course

Pages (3): 1 2 3 Next
Recently Browsing
 
Recently Browsing