Bug r11653 - $class[none].primestat returns $stat[Muscle]

Fluxxdog

Active member
Found a bit of a hang up that was killing things by casting CLEESH repeatedly. My script goes through available combat skills until it finds one that belong to a certain class, like a Muscle class. However, CLEESH's class is $class[none]. The primestat for that skill is $stat[Muscle]. This lead my script to try and use CLEESH to get Gaze of the Volcano God, which obviously wouldn't work.

While I can adjust my script to work around that, there was a definite error in listing a non-existent class that's commonly used for comparison as having an existing stat. This makes all skills that have no associated class seen as Muscle-class skills. A simple enough change would be to change $class[none].primestat to $stat[none]
 
Simply adding
Code:
if ( this.contentString.contains( "none" ) )
{
	return DataTypes.STAT_INIT;
}
in ProxyRecordValue.ClassProxy.get_primestat() does the trick. A good solution would be more comprehensive though.
 
A comprehensive solution starts with KoLCharacter.getPrimeIndex(). That value is used in so many different places in unexpected ways that it would take some work to not break anything.
 
Back
Top