HM-CODE / Haunted-Memories

A repository for Haunted Memories code.
http://www.haunted-memories.net/
BSD 3-Clause "New" or "Revised" License
4 stars 5 forks source link

getstat does not work for merits #4

Closed ghost closed 13 years ago

ghost commented 13 years ago

Using getstat() to get the value of a merit always returns 0. It should return the current (permanent) value of the merit.

ghost commented 13 years ago

This also affects +setstat for merits, but will be fixed by repairing getstat.

Getstat is presently one very nasty kludge of code. It should probably be written in a more elegant, distributed style. Getstat is #5/FN_GETSTAT and #1687/STATTYPE and #1687/GET.

hmmorpheus commented 13 years ago

So.. um.. looks like I accidently fixed this one already. At least testing on the dev port side returns the appropriate permanent value of the merits I tested it with.

Not, mind, that it couldn't use a rewrite ANYWAYS, but yeeeeh.

hmmorpheus commented 13 years ago

Tested this, and looked at the bits I can see. Can confirm that with the rewrite to setstat/statype already made to go with cgen MK II that getstat works, even for merits.