I tested this with mocked up data based on zanix's post about the color codes.
In lib/wowdb.php, replace the following:
- Code: Select all
if( !empty($attack['DamageRange']) )
$this->add_value( 'melee_range', $attack['DamageRange'] );
With this:
- Code: Select all
if( !empty($attack['DamageRange']) )
{
$attack['DamageRange'] = preg_replace('/\|c[0-9a-f]{8}(.*?)\|r/i', '\1', $attack['DamageRange']);
$this->add_value( 'melee_range', $attack['DamageRange'] );
}
Then replace the following:
- Code: Select all
if( !empty($attack['DamageRange']) )
$this->add_value( 'ranged_range', $attack['DamageRange'] );
With this:
- Code: Select all
if( !empty($attack['DamageRange']) )
{
$attack['DamageRange'] = preg_replace('/\|c[0-9a-f]{8}(.*?)\|r/i', '\1', $attack['DamageRange']);
$this->add_value( 'ranged_range', $attack['DamageRange'] );
}
Updated: changed patterns to be case insensitive.