SRL Archive - Reflection Development

Fixed R_GetMMLevels


vilon

2009-07-13 21:33:43

R_GetMMLevels('run') was broken. Here is the fixed version:

{*******************************************************************************
function R_GetMMLevels(Which: string): Integer;
By: lordsaturn, fixed by vilon
Description: Returns the current value at the designated MM spot.
*******************************************************************************}
function R_GetMMLevels(Which: string): Integer;
begin
Result := -1;
case LowerCase(Which) of
'hitpoints', 'hp': Result := 748;
'prayer', 'pp' : Result := 749;
'run', 'energy' : Result := 750;
else
SRL_Warn('R_GetMMLevels', 'Invaild string.', -3);
end;
Result := StrToIntDef(GetInterfaceText(Result, 4 + 1 * Integer(Result = 750)), -1);
end;

Method

2009-07-13 22:42:10

Were the interface IDs off or something?

vilon

2009-07-14 00:40:05

From: Method
Were the interface IDs off or something?


Run was at 5 instead of 2, or whatever it was before. The rest was fine :p.

Naike

2009-07-14 23:31:08

Added to dev svn, thanks vilon ;)

Dynamite

2009-07-14 23:34:38

N1ke you Dev now?

T~M

Naike

2009-07-15 02:41:18

I got access to the dev svn, that's it.