--- deliantra/server/common/exp.C 2006/08/29 08:01:35 1.2 +++ deliantra/server/common/exp.C 2006/08/30 16:30:36 1.3 @@ -1,6 +1,6 @@ /* * static char *rcsid_arch_c = - * "$Id: exp.C,v 1.2 2006/08/29 08:01:35 root Exp $"; + * "$Id: exp.C,v 1.3 2006/08/30 16:30:36 root Exp $"; */ /* @@ -31,9 +31,6 @@ sint64 *levels; -#define TRUE 1 -#define FALSE 0 - float exp_att_mult[NROFATTACKS+2] = { 0.0, /* AT_PHYSICAL */ 0.0, /* AT_MAGIC */ @@ -99,23 +96,23 @@ att_mult = prot_mult =spec_mult = 1.0; for(i=0;iattacktype&mask) != FALSE)); + att_mult += (exp_att_mult[i] * ((ob->attacktype&mask) != 0)); /* We multiply & then divide to prevent roundoffs on the floats. * the doubling is to take into account the table and resistances * are lower than they once were. */ prot_mult += (exp_prot_mult[i] * 200*ob->resist[i]) / 100.0; } - spec_mult += (0.3*(QUERY_FLAG(ob,FLAG_SEE_INVISIBLE)!= FALSE)) + - (0.5*(QUERY_FLAG(ob,FLAG_SPLITTING)!= FALSE))+ - (0.3*(QUERY_FLAG(ob,FLAG_HITBACK)!= FALSE)) + - (0.1*(QUERY_FLAG(ob,FLAG_REFL_MISSILE)!= FALSE)) + - (0.3*(QUERY_FLAG(ob,FLAG_REFL_SPELL)!= FALSE)) + - (1.0*(QUERY_FLAG(ob,FLAG_NO_MAGIC)!= FALSE)) + - (0.1*(QUERY_FLAG(ob,FLAG_PICK_UP)!= FALSE)) + - (0.1*(QUERY_FLAG(ob,FLAG_USE_SCROLL)!= FALSE)) + - (0.2*(QUERY_FLAG(ob,FLAG_USE_RANGE)!= FALSE)) + - (0.1*(QUERY_FLAG(ob,FLAG_USE_BOW)!= FALSE)); + spec_mult += (0.3*(QUERY_FLAG(ob,FLAG_SEE_INVISIBLE)!= 0)) + + (0.5*(QUERY_FLAG(ob,FLAG_SPLITTING)!= 0))+ + (0.3*(QUERY_FLAG(ob,FLAG_HITBACK)!= 0)) + + (0.1*(QUERY_FLAG(ob,FLAG_REFL_MISSILE)!= 0)) + + (0.3*(QUERY_FLAG(ob,FLAG_REFL_SPELL)!= 0)) + + (1.0*(QUERY_FLAG(ob,FLAG_NO_MAGIC)!= 0)) + + (0.1*(QUERY_FLAG(ob,FLAG_PICK_UP)!= 0)) + + (0.1*(QUERY_FLAG(ob,FLAG_USE_SCROLL)!= 0)) + + (0.2*(QUERY_FLAG(ob,FLAG_USE_RANGE)!= 0)) + + (0.1*(QUERY_FLAG(ob,FLAG_USE_BOW)!= 0)); exp = (ob->stats.maxhp<5) ? 5 : ob->stats.maxhp; exp *= (QUERY_FLAG(ob,FLAG_CAST_SPELL) && has_ability(ob)) @@ -139,8 +136,8 @@ for(tmp=ob->inv;tmp!=NULL;tmp=tmp->below) if(tmp->type==SPELL||tmp->type==SPELLBOOK) - return TRUE; - return FALSE; + return true; + return false; } /* This loads the experience table from the exp_table