Skip to content

Commit

Permalink
fix: destruct of indestructible objects fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
neverbot committed Sep 2, 2024
1 parent abdcbd6 commit 67a2b76
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions mudlib/lib/user/roles/coder_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,20 +410,24 @@ void ask_dest()
void dest_answer(string s)
{
string err, shrt;
int value;

if (affirmative(s))
{
if (majd)
{
shrt = (string)dest_obj[objn]->short();
catch(shrt = (string)dest_obj[objn]->short());
err = catch(dest_obj[objn]->dwep());
write("DWEP failed: " + err + "\n");

if (dest_obj[objn])
{
write("This object does not want to be destroyed.\n");
err = catch(destruct(dest_obj[objn]));
write("destruct() failed: " + err + "\n");
err = catch(value = destruct(dest_obj[objn]));
if (err)
write("destruct() failed with error: " + err + "\n");
else
write("destruct() failed with value: " + value + "\n");
}

majd = 0;
Expand Down

0 comments on commit 67a2b76

Please sign in to comment.