[CF-Devel] patch: max level

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Sat Mar 13 19:19:01 CST 2004


With this little change, we can allow players to gain exp
in their skills even if maxed out overall.
We just restrict the maxexp check in change_exp to monsters, as
add_exp checks everything correctly for players already.

Then it is no more harmful to gain experience in "useless" skills.

Speaking of that, it seems to me like fireborn do fire damage with
punching and karate.
While this has a certain logic, it also renders their natural
flame touch useless.
-------------- next part --------------
*** common/living.c~	Sat Mar 13 23:36:32 2004
--- common/living.c	Sun Mar 14 00:49:04 2004
***************
*** 1757,1779 ****
       */
      if (exp == 0) return;
  
-     /* reset exp to max allowed value.  We subtract from
-      * MAX_EXPERIENCE to prevent overflows.  If the player somehow has
-      * more than max exp, just return.
-      */
-     if (exp > 0 && ( op->stats.exp > (MAX_EXPERIENCE - exp))) {
- 	exp = MAX_EXPERIENCE - op->stats.exp;
- 	if (exp < 0) return;
-     }
- 
      /* Monsters are easy - we just adjust their exp - we   
       * don't adjust level, since in most cases it is unrelated to
       * the exp they have - the monsters exp represents what its
       * worth.
       */
      if(op->type != PLAYER) {
! 	/* Sanity check */
! 	if (!QUERY_FLAG(op, FLAG_ALIVE)) return;
  	op->stats.exp += exp;
      }
      else {				/* Players only */ 
--- 1757,1778 ----
       */
      if (exp == 0) return;
  
      /* Monsters are easy - we just adjust their exp - we   
       * don't adjust level, since in most cases it is unrelated to
       * the exp they have - the monsters exp represents what its
       * worth.
       */
      if(op->type != PLAYER) {
!       /* Sanity check */
!       if (!QUERY_FLAG(op, FLAG_ALIVE)) return;
!       /* reset exp to max allowed value.  We subtract from
!        * MAX_EXPERIENCE to prevent overflows.  If the moster somehow has
!        * more than max exp, just return. add_player_exp checks this for players
!        */
!       if (exp > 0 && ( op->stats.exp > (MAX_EXPERIENCE - exp))) {
! 		exp = MAX_EXPERIENCE - op->stats.exp;
! 	  if (exp < 0) return;
!       }
  	op->stats.exp += exp;
      }
      else {				/* Players only */ 
-------------- next part --------------
_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list