That would work, but unfortunatly objects can have more than one flag
for restrictions. 

Keith Mervine
"Non Omnis Moriar"
"Growing old is mandatory, growing up is optional"
Service Management Application Developer
International Monetary Fund
[EMAIL PROTECTED]
202-623-7610



> -----Original Message-----
> From: Sandi Fallon [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 11, 2003 3:45 PM
> To: [email protected]
> Subject: Re: Is there a better way to do this check?
> 
> 
> Keith,
> 
> It's often not how you process the data, but the form the data is in.
> Assuming any restricted object had a line "Cla 6" (just like
> the pfiles) I'd do something like,
> 
> bool can_wear_class(CHAR_DATA *ch, OBJ_DATA *obj){
>    if (obj->restrictclass != NULL && obj->class != ch->class)
>       return FALSE;
>    else return TRUE;
>    }
> 
> 
>    
> Sandi                            
> 
>                   "I have not yet begun to code!"
> 
> [EMAIL PROTECTED]                           blades.inetsolve.com 3333
> 
> 
> -- 
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
> 

Reply via email to