Difference for server/skill_util.c from version 1.12 to 1.13


version 1.12 version 1.13
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_skill_util_c =   * static char *rcsid_skill_util_c =
  *   "$Id: skill_util.c,v 1.12 2000/12/27 07:53:35 cvs Exp $";   *   "$Id: skill_util.c,v 1.13 2001/01/19 07:43:57 cvs Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 1238
 
Line 1238
     return 0;      return 0;
 }  }
   
   /* This is like change_skill above, but it is given that
    * skill is already in who's inventory - this saves us
    * time if the caller has already done the work for us.
    * return 0 on success, 1 on failure.
    */
   
   int change_skill_to_skill (object *who, object *skill)
   {
       if (!skill) return 1;     /* Quick sanity check */
   
       if (who->chosen_skill == skill)
       {
           /* optimization for changing skill to current skill */
           if (who->type == PLAYER)
               who->contr->shoottype = range_skill;
           return 0;
       }
   
       if (skill->env != who) {
    LOG(llevError,"change_skill_to_skill: skill is not in players inventory\n");
    return 1;
       }
   
       if (apply_special (who, skill, AP_APPLY)) {
    LOG (llevError, "BUG: change_skill(): can't apply new skill\n");
               return 1;
       }
       return 0;
   }
   
 /* attack_melee_weapon() - this handles melee weapon attacks -b.t.  /* attack_melee_weapon() - this handles melee weapon attacks -b.t.
  * For now we are just checking to see if we have a ready weapon here.   * For now we are just checking to see if we have a ready weapon here.
  * But there is a real neato possible feature of this scheme which   * But there is a real neato possible feature of this scheme which
Line 1384
 
Line 1414
                 tmp2=arch_to_object(skill);                  tmp2=arch_to_object(skill);
  insert_ob_in_ob(tmp2,op);   insert_ob_in_ob(tmp2,op);
  (void) link_player_skill(op,tmp2);   (void) link_player_skill(op,tmp2);
  esrv_send_item(op, tmp2);  
      }       }
      /* now try to ready the new skill */       /* now try to ready the new skill */
      if(!change_skill(op,tmp2->stats.sp)) {  /* oh oh, trouble! */       if(change_skill_to_skill(op,tmp2)) {  /* oh oh, trouble! */
         LOG(llevError,"do_skill_attack() could'nt give new hth skill to %s\n",          LOG(llevError,"do_skill_attack() could'nt give new hth skill to %s\n",
  op->name);   op->name);
  return 0;   return 0;
      }        }
     }       }
   
   #if 0
    /* check if op is using a hth attack, if so modify damage */     /* check if op is using a hth attack, if so modify damage */
           if(QUERY_FLAG(op,FLAG_READY_SKILL) && op->chosen_skill            if(QUERY_FLAG(op,FLAG_READY_SKILL) && op->chosen_skill
              && !QUERY_FLAG(op, FLAG_READY_WEAPON))               && !QUERY_FLAG(op, FLAG_READY_WEAPON))
Line 1404
 
Line 1434
  op->stats.dam=dam;   op->stats.dam=dam;
     }      }
    }     }
   #endif
   
    /* if we have 'ready weapon' but no 'melee weapons' skill readied     /* if we have 'ready weapon' but no 'melee weapons' skill readied
     * this will flip to that skill. This is only window dressing for      * this will flip to that skill. This is only window dressing for


Legend:
line(s) removed in v.1.12 
line(s) changed
 line(s) added in v.1.13

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:45