I'm looking for a 'shortcut' to help clean up some of my code...
In struct clan_data, I changed int Class to short Class[7]. I did this so certain orders/clans/whatever could have only certain classes join their group (up to 7 different classes), if they wanted it class-specific. This is all fine and dandy, but when updating the code, I ended up having to do checks like:
Is there a way I could change that so it'd loop the checks like...
Hopefully you understand what I mean... :X Thanks in advance!
-Tz
In struct clan_data, I changed int Class to short Class[7]. I did this so certain orders/clans/whatever could have only certain classes join their group (up to 7 different classes), if they wanted it class-specific. This is all fine and dandy, but when updating the code, I ended up having to do checks like:
if( victim->Class != ( clan->Class[0] || clan->Class[1] || clan->Class[3] <etc> ) )Is there a way I could change that so it'd loop the checks like...
if( victim->Class != clan->Class[<0 through 6>] )
{
<blah>
}Hopefully you understand what I mean... :X Thanks in advance!
-Tz