Login
User Name:

Password:



Register

Forgot your password?
 I3 and IMC
Dec 26, 2024 3:27 am
By GatewaySysop
Hi - Clean SmaugFuss map/description issue..
Dec 15, 2024 7:29 pm
By Samson
AFKMud 2.2.4
Dec 10, 2024 4:09 pm
By Samson
Ubuntu 22.04.5 LTS
Dec 5, 2024 5:10 pm
By Remcon
SmaugFUSS 1.8/1.9
Nov 29, 2024 11:46 am
By Remcon
LOP 1.6
Author: Remcon
Submitted by: Remcon
SWFOTEFUSS 1.5.1
Author: Various
Submitted by: Samson
SWRFUSS 1.4.1
Author: Various
Submitted by: Samson
SmaugFUSS 1.9.5
Author: Various
Submitted by: Samson
AFKMud 2.2.4
Author: AFKMud Team
Submitted by: Samson
Users Online
Bing

Members: 0
Guests: 18
Stats
Files
Topics
Posts
Members
Newest Member
496
3,808
19,708
594
MaisieMacl

Today's Birthdays
There are no member birthdays today.
» SmaugMuds » Bugfix Lists » AFKMud Bugfix List » [Bug] Oasis OLC module handle...
Forum Rules | Mark all | Recent Posts

[Bug] Oasis OLC module handles mob gender settings improperly
< Newer Topic :: Older Topic > AFKMud 2.03

Pages:<< prev 1 next >>
Post is unread #1 Feb 16, 2008 7:19 pm   
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,697
JoinedJan 1, 2002

 
Bug: Oasis OLC module handles mob gender settings improperly
Danger: Low - Mobs set using the code may end up with incorrect gender settings, but otherwise has no real affect.
Discovered in: AFKMud 2.03
Found by: Samson
Fixed by: Samson

---

olcmob.cpp, medit_parse

Locate:
      case MEDIT_SEX:
         victim->sex = URANGE( 0, atoi( arg ), 2 );
         if( victim->has_actflag( ACT_PROTOTYPE ) )
            victim->pIndexData->sex = victim->sex;
         olc_log( d, "Changed sex to %s", victim->sex == 1 ? "Male" : victim->sex == 2 ? "Female" : "Neutral" );
         break;


Change to:
      case MEDIT_SEX:
         victim->sex = URANGE( 0, atoi( arg ), SEX_MAX - 1 );
         if( victim->has_actflag( ACT_PROTOTYPE ) )
            victim->pIndexData->sex = victim->sex;
         olc_log( d, "Changed sex to %s", victim->sex == SEX_MALE ? "Male" : victim->sex == SEX_FEMALE ? "Female" : victim->sex == SEX_NEUTRAL ? "Neutral" : "Hermaphrodyte" );
         break;


The original range argument on this block of code would cut off hermaphrodyte settings if they were used, and the text reporting was a source of confusion for what actually happened. It could lead to going back to correct settings that weren't wrong to begin with. The use of hardcoded values wasn't helping things either.

Pages:<< prev 1 next >>