DarkCastleMUD / DarkCastle

Dark Castle is a text-based MUD (multi-user dungeon) that was originally based on DIKU MUD around 1995. It has been running since then.
https://www.dcastle.org/
GNU Lesser General Public License v2.1
12 stars 11 forks source link

Something wrong with ch->pcdata->last_obj_edit #124

Closed TehDreadPirateRoberts closed 2 years ago

TehDreadPirateRoberts commented 3 years ago

When you type opedit VNUM, the VNUM showing at 'Current object set to: #' is not correct. It looks like it is actually giving me not the VNUM, but the row number that it is in in the objects database. There are currently 5861 items in the object database, the last one being VNUM 32045. If you 'opedit 32045', the field 'Current object set to:' is 5861.

_opedit 32025 Syntax: opedit [obj_num] [field] [arg] Edit a field with no args for help on that field.

The field must be one of the following: add remove type arglist command list

Current object set to: 5861_

I had found the field ch->pcdata->last_obj_edit in wiz_104.cpp.

bdunavant commented 3 years ago

There's VNUM and RNUM. One represents the object ID in the object file, and the other represents the array-index of the object in the global item array in run-time memory (which is basically all the object files, with the blanks removed).

They get mixed up a lot.

TehDreadPirateRoberts commented 2 years ago

This has been rectified.