Re: Disarm problems still no sulution

From: Patrick Dughi (dughi@imaxx.net)
Date: 08/21/00


> Hi
> You may remember i wrote to you with this problem before, but the suggested
> answer had the same problem as the one which i wrote,
> Here is the initial letter i wrote:
>
> Here is the code I came up with for the check, if anyone has any ideas.
>
> else if (!CAN_WEAR(GET_EQ(ch, WEAR_WIELD), ITEM_WEAR_DWIELD))
> {
>   send_to_char("You are already wielding a weapon which requires both
> hands!\r\n", ch);
>   perform_remove(ch, WEAR_DWIELD);
> }
>
> And this was the statement suggested:
>
> else if(GET_EQ(ch,WEAR_WIELD) &&
> !IS_OBJ_STAT(GET_EQ(ch,WEAR_WIELD),ITEM_WEAR_DWIELD))
>   {
>    send_to_char("You are already wielding a weapon which requires both
> hands!\r\n", ch);
>    perform_remove(ch, WEAR_DWIELD);
>   }
>
>
> The trouble with this is that it won't let you dwield any weapon, no matter
> what weapon you are wielding. Any further suggestions

        Actually, that's wrong. I typed (and archives back me up)


        if(GET_EQ(ch,WEAR_WIELD) &&
                !IS_OBJ_STAT(GET_EQ(ch,WEAR_WIELD),ITEM_WEAR_DWIELD)) {
          blahblahblah, no eq for you.
        }

        After all, why would you want to remove something if you haven't
even wielded it yet?

        Also, there aren't any logic errors in that bit of code, it says
pretty cleanly, "If you're wielding something, and the thing you're
wielding doesn't have the dual wield bit set, then ..."

        Since this tiny bit of code is correct, I suspect that you've
confused the definintion of ITEM_WEAR_DWIELD and WEAR_DWIELD thoughout
your code as you had in your original post.  Determine for yourself which
macro each refers to, and what they ought to be used for.  Look at my
original reply for a walk though, and then grep your source code to make
sure you've added correctly in every place.

        I still have no idea on how to further help you with disarm.

                                                PjD


     +------------------------------------------------------------+
     | 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 : 04/11/01 PDT