Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear up item ownership for dead factions #38334

Merged
merged 3 commits into from Feb 26, 2020
Merged

Clear up item ownership for dead factions #38334

merged 3 commits into from Feb 26, 2020

Conversation

ghost
Copy link

@ghost ghost commented Feb 25, 2020

Summary

SUMMARY: Bugfixes "Clear up item ownership for dead factions"

Purpose of change

Fixes #37339
Fixes #38225

Describe the solution

When an NPC drops an item, their ownership is still on it.

when they die, ownership is cleared on all their inventory, but the world may be scattered with items they dropped earlier, this validates this check for a dead faction when its owner is requested.

Describe alternatives you've considered

N/A

Testing

Spawned an NPC, told them to drop their weapon, then killed them, their weapon no longer produced a debugmsg about a non-existent faction., and itwas available to pick up as it now had no owner.

Additional context

N/A

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Items / Item Actions / Item Qualities Items and how they work and interact NPC / Factions NPCs, AI, Speech, Factions, Ownership labels Feb 25, 2020
@Rivet-the-Zombie Rivet-the-Zombie merged commit 241522e into CleverRaven:master Feb 26, 2020
fengjixuchui added a commit to fengjixuchui/Cataclysm-DDA that referenced this pull request Feb 26, 2020
Merge pull request CleverRaven#38334 from davidpwbrown/dead_npc_owner…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Items / Item Actions / Item Qualities Items and how they work and interact NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
2 participants