Disarm problems still no sulution

From: Alex Mann (alex4501@hotmail.com)
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:

Hi
I am having some problems with my dual wield skill. Firstly, at the moment
the player can only dual wield an weapon if it has the dwield bit set on it.
Unfortunately this mean that they can wield a weapon which requires 2 hands,
and then dual wield a single handed weapon.

I want to add a check into the dual wield code to make sure that the weapon
they are wielding has the dwield bit set to it (i.e making it require only 1
hand to wield). And if it hasn't (i.e it requires two hands to hold) Then it
stops them dwielding the weapon.

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);
}

The problem with this code is that wield works fine but no matter which
weapon type you wield two-handed or single handed, it always throws up the
catch above. It is obviously a problem with the logic statement but i am not
sure quite what.

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

Chears
Alex Mann
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


     +------------------------------------------------------------+
     | 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