This seems to work but it's wrong. "Preprocessor directives are interpreted before the results of the preprocessing step are compiled."
I don't understand enough about source to explain why this edit works, but I know that it's not the right way to go about making this edit. VS and GCC throw out warnings about macro redefinition. Any help would be much appreciated.
So I have been playing around with this a bit today and I'm trying to figure out the best way to do this.
I need to convert the macro NORMALIZE_RDAMAGE to a function because I need it to offer 2 different options.
For example to have capped max reflect damage on MvPs but not on normal monsters and players.
Right now herc has
#ifdef RENEWAL #define NORMALIZE_RDAMAGE(d) ( trdamage += rdamage = max(1, min(max_reflect_damage, (d))) ) #else #define NORMALIZE_RDAMAGE(d) ( trdamage += rdamage = max(1, (d)) ) #endif
I want to change this to be if the target is an MvP or not.
Doing
if ( is_boss(src) ) { #define NORMALIZE_RDAMAGE(d) ( trdamage += rdamage = max(1, min(max_reflect_damage, (d))) ) } else { #define NORMALIZE_RDAMAGE(d) ( trdamage += rdamage = max(1, (d)) ) }
This seems to work but it's wrong. "Preprocessor directives are interpreted before the results of the preprocessing step are compiled."
I don't understand enough about source to explain why this edit works, but I know that it's not the right way to go about making this edit. VS and GCC throw out warnings about macro redefinition. Any help would be much appreciated.
Share this post
Link to post
Share on other sites