Skip to content

Commit

Permalink
stealable treasure fixes
Browse files Browse the repository at this point in the history
closes #818
closes #819
  • Loading branch information
b5635 committed Sep 15, 2023
1 parent 755cbff commit 605f8e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/nss/area_cleanup.nss
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ void main()

if (GetIsObjectValid(oOldPlaceable) && GetLocalString(oOldPlaceable, "master") == "")
{
object oItem = GetFirstItemInInventory(oOldPlaceable);

// clear all items on destruction
while (GetIsObjectValid(oItem))
{
DestroyObject(oItem);
oItem = GetNextItemInInventory(oOldPlaceable);
}

DestroyObject(oOldPlaceable);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/nss/pptreas_disturb.nss
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void main()
{
if(ValidThiefChecker(oTarget, oPC))
{
int nDC = GetSkillRank(SKILL_SPOT, oPC) + d20();
int nDC = GetSkillRank(SKILL_SPOT, oTarget) + d20();

if (nDC < 1) nDC = 1;

Expand Down

0 comments on commit 605f8e5

Please sign in to comment.