From 414b81cba9a6838a43a3fa164c89f42c7f4a27ce Mon Sep 17 00:00:00 2001 From: SicdeX Date: Sun, 24 Nov 2024 20:23:49 +0600 Subject: [PATCH] fix: CPlayerCustomData#destroyedItem --- wrapper/Managers/Monitors/PlayerCustomDataChanged.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrapper/Managers/Monitors/PlayerCustomDataChanged.ts b/wrapper/Managers/Monitors/PlayerCustomDataChanged.ts index 82da6543e9..0bad939b4b 100644 --- a/wrapper/Managers/Monitors/PlayerCustomDataChanged.ts +++ b/wrapper/Managers/Monitors/PlayerCustomDataChanged.ts @@ -9,7 +9,7 @@ import { PlayerCustomData } from "../../Objects/DataBook/PlayerCustomData" import { EntityManager } from "../EntityManager" import { EventsSDK } from "../EventsSDK" -new (class CPlayerDataCustomChanged { +new (class CPlayerCustomDataChanged { private readonly playersItems = new Map>() constructor() { @@ -173,7 +173,7 @@ new (class CPlayerDataCustomChanged { if (playerID === -1) { playerID = owner.OwnerPlayerID // example: courier } - const playerData = PlayerCustomData.get(owner.PlayerID) + const playerData = PlayerCustomData.get(playerID) if (playerData === undefined || !playerData.IsValid) { return }