[Bug] Oasis OLC module handles mob gender settings improperly
< Newer Topic
:: Older Topic >
AFKMud 2.03
Pages:<< prev 1 next >>
#1 Feb 16, 2008 7:19 pm
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:
Change to:
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.
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 >>