Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 4
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Inconsistancy?
Forum Rules | Mark all | Recent Posts

Inconsistancy?
< Newer Topic :: Older Topic > maybe a bug... maybe not

Pages:<< prev 1 next >>
Post is unread #1 Dec 4, 2003, 10:21 am   Last edited Nov 24, 2007, 12:19 am by Samson
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

In plugging away at my area converter (antique uber-customized diku-gamma), I noticed something that strikes me as odd.

In the build.c file, the variables item_w_flags[] and w_flags[] are defined, and they are both initialized to the same values (which makes me think one of them is redundant... but that's another topic).

I noticed that they have pairs of entries for wear-slots with the same name, such as "neck" and "neck". That's all well and good, except that the get_wflag() routine does
    for ( x = 0; x < (sizeof(w_flags) / sizeof(w_flags[0])); x++ )
      if ( !str_cmp(flag, w_flags[x]) )
        return x;


Wouldn't that mean that it's impossible to ever get the second wear slot of a given name back, and in turn, when generating an output string using flag_string() or ext_flag_string(), any items which should be wearable in either slot would become wearable in only the first one (since only that bit would get set -- twice) after OLC is used?

It seems like a bug to me... can anyone verify or dispute this?
       
Post is unread #2 Dec 6, 2003, 7:51 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

The get_wflag function is correct. It is called upon during OLC to set wearflags - which are not the same as the locations themselves.

A wearflag says: "I can wear this on bodypart ".
A wearlocation: "This is being worn on your ".

The wearlocations are only used when you attempt to wear a second item using a given wearflag - if there's another slot available it works. Otherwise it fails.

Yes, it can be a bit confusing, but there's no bug here.
       
Pages:<< prev 1 next >>