[crossfire] Summon pet monster

Andreas Kirschbaum kirschbaum at myrealbox.com
Fri Sep 30 17:35:47 CDT 2005


Benjamin Lerman wrote:
>
     
      but before going further, I find this line quite weird:
     
     >
     
     
     >
     
       Did I miss something, or is those line something like:
     
     >
     
     
     >
     
       if(x || y) if(y) foo()
     
     >
     
     
     >
     
       Because if it is the case, then it should be changed to:
     
     >
     
     
     >
     
       if(y) foo()
     
     
Yes, the current code does not make sense. Your proposed change seems
reasonable to me.


>
     
       and the next line should be put before this one...
     
     
I assume you want to swap the following blocks?

|
     
         if (who->chosen_skill) apply_special(who, who->chosen_skill, AP_UNAPPLY);
     
     |
     
     
     |
     
         /* Only goal in this case was to unapply a skill */
     
     |
     
         if (!new_skill) return 0;
     
     
If so: that probably would not be correct. According to the comment for
this function, "!new_skill" means to just unapply the old skill.
Therefore the call to apply_special(..., AP_UNAPPLY) must not be
removed.

    
    


More information about the crossfire mailing list