There are some casts that can be removed. As an example:
if (pEffectData->HasDuration() && pEffectData->HasMagnitude()) {
Cost = (float)(BaseCost / 10.0 + BaseCost * Duration * Magnitude / 5.0);
} else if (pEffectData->HasDuration()) {
Cost = (float)(BaseCost / 10.0 + BaseCost * Duration / 5.0);
} else if (pEffectData->HasMagnitude()) {
Cost = (float)(BaseCost / 10.0 + BaseCost * Magnitude / 5.0);
} else {
Cost = (float)(BaseCost / 10.0 + BaseCost / 5.0);
}
Cost and BaseCost are defined as floats a few lines earlier so the result will automatically be float without concerns in the modern standard. Another option would be to set the float specifier on the numeric literals so they’d be, say, 5.0f instead but I’m pretty sure that’s unnecessary with the current implicit conversion rules in the language. Removing the casts in these cases will greatly improve readability so will add it to the list of things to do after the initial reformat 🙂
