mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
[Crash] Fix player event crash in ITEM_DESTROY (#4326)
This commit is contained in:
parent
e1344039ff
commit
13a7532ef8
@ -5787,21 +5787,19 @@ void Client::Handle_OP_DeleteItem(const EQApplicationPacket *app)
|
|||||||
|
|
||||||
SetIntoxication(GetIntoxication()+IntoxicationIncrease);
|
SetIntoxication(GetIntoxication()+IntoxicationIncrease);
|
||||||
|
|
||||||
|
if (player_event_logs.IsEventEnabled(PlayerEvent::ITEM_DESTROY) && inst->GetItem()) {
|
||||||
|
auto e = PlayerEvent::DestroyItemEvent{
|
||||||
|
.item_id = inst->GetItem()->ID,
|
||||||
|
.item_name = inst->GetItem()->Name,
|
||||||
|
.charges = inst->GetCharges(),
|
||||||
|
.reason = "Client deleted",
|
||||||
|
};
|
||||||
|
|
||||||
|
RecordPlayerEventLog(PlayerEvent::ITEM_DESTROY, e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DeleteItemInInventory(alc->from_slot, 1);
|
DeleteItemInInventory(alc->from_slot, 1);
|
||||||
|
|
||||||
if (player_event_logs.IsEventEnabled(PlayerEvent::ITEM_DESTROY)) {
|
|
||||||
auto e = PlayerEvent::DestroyItemEvent{
|
|
||||||
.item_id = inst->GetItem()->ID,
|
|
||||||
.item_name = inst->GetItem()->Name,
|
|
||||||
.charges = inst->GetCharges(),
|
|
||||||
.reason = "Client deleted",
|
|
||||||
};
|
|
||||||
|
|
||||||
RecordPlayerEventLog(PlayerEvent::ITEM_DESTROY, e);
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::Handle_OP_DeleteSpawn(const EQApplicationPacket *app)
|
void Client::Handle_OP_DeleteSpawn(const EQApplicationPacket *app)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user