[CF-Devel] gaea / ruggilli bug
Mark Wedel
mwedel at sonic.net
Mon Apr 22 01:12:01 CDT 2002
Johnny Shelley wrote:
>
As of latest cvs, gaea and ruggilli are now allowed weapons and armour
>
respectively. This is a Bad Thing(tm), no?
Yep. I've attached the diff that I came up with to fix the problem - I didn't
do much of the god code, so perhaps someone else knows why the arch is checked.
It appears that this bug in CVS has been around for a very long time - it is
possible some other change in some code elsewhere resulted in this bug showing
up, but if so, I'm not sure what that would be.
-------------- next part --------------
Index: server/gods.c
===================================================================
RCS file: /cvsroot/crossfire/crossfire/server/gods.c,v
retrieving revision 1.28
diff -c -r1.28 gods.c
*** server/gods.c 30 Oct 2001 02:30:20 -0000 1.28
--- server/gods.c 22 Apr 2002 06:02:54 -0000
***************
*** 370,375 ****
--- 370,381 ----
check_special_prayers (op, new_god);
}
+ /* op is the player.
+ * exp_obj is the widsom experience.
+ * flag is the flag to check against.
+ * string is the string to print out.
+ */
+
int worship_forbids_use (object *op, object *exp_obj, uint32 flag, char *string) {
if(QUERY_FLAG(&op->arch->clone,flag))
***************
*** 402,414 ****
*/
void update_priest_flag (object *god, object *exp_ob, uint32 flag) {
- /* GROS - Corrected here the 'god flowers' bug. */
if(QUERY_FLAG(god,flag)&&!QUERY_FLAG(exp_ob,flag))
SET_FLAG(exp_ob,flag);
else if(QUERY_FLAG(exp_ob,flag)&&!QUERY_FLAG(god,flag))
{
! if (!(QUERY_FLAG(&(exp_ob->arch->clone),flag)))
! CLEAR_FLAG(exp_ob,flag);
};
}
--- 408,428 ----
*/
void update_priest_flag (object *god, object *exp_ob, uint32 flag) {
if(QUERY_FLAG(god,flag)&&!QUERY_FLAG(exp_ob,flag))
SET_FLAG(exp_ob,flag);
else if(QUERY_FLAG(exp_ob,flag)&&!QUERY_FLAG(god,flag))
{
! /* When this is called with the exp_ob set to the player,
! * this check is broken, because most all players arch
! * allow use of weapons. I'm not actually sure why this
! * check is here - I guess if you had a case where the
! * value in the archetype (wisdom) should over ride the restrictions
! * the god places on it, this may make sense. But I don't think
! * there is any case like that.
! */
!
! /* if (!(QUERY_FLAG(&(exp_ob->arch->clone),flag)))*/
! CLEAR_FLAG(exp_ob,flag);
};
}
More information about the crossfire
mailing list