Re: [CODE][NEWBIE]weapon holding

From: Daniel Koepke (dkoepke@california.com)
Date: 02/14/99


anthony benjamin wrote:

> I looked through the archives already, and the site...but could find
> no help...

What?  You didn't look all the way back to...uh, a week or two ago?
I'm pretty damn sure this was discussed.

> if (GET_EQ(ch, WEAR_HOLD) == ITEM_WEAPON){

That won't work.  And you already have held, so use it rather than
GET_EQ(ch, WEAR_HOLD).  You want to get the type of held to see if
it's ITEM_WEAPON.  That is, GET_OBJ_TYPE(held) == ITEM_WEAPON.

>     dam = str_app[STRENGTH_APPLY_INDEX(ch)].todam;
>     dam += GET_DAMROLL(ch);
>
>     if (held) {

Why?!  If you've already used GET_EQ(ch, WEAR_HOLD) [held], you can't
get here without it being != NULL -- at least, not without it crashing
before that line.

> }else{
>  //nothing

Then remove it. :)

-dak : No, I'm not being an ass - I'm being concise and direct.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST