zoneMinStatus bug
Posted: Sat Dec 06, 2008 2:38 pm
Yo Image, if you're trolling today
there's a small bug found by one of my players whom I thought was just on crack... where you cannot /zone QueensColony if QueensColony is already loaded and it's min/max status = 0 (meaning, there is no restriction.
I think the check is at line 1590'ish:
My zoneMinStatus would never be < 0, would it? Maybe I don't know the options here. I am also not sure how we're passing the else if() check and ending up in that last block of code, since zoneMinStatus = 0, and so does GetAdminStatus() of the player. At any rate, what we end up with is an inability to enter the zone *and* are told we need a status of 12131 to enter. /boggle
Any ideas?
I think the check is at line 1590'ish:
Code: Select all
if ( zoneMinStatus < 0 )
{
Variable* var = variables.FindVariable("min_zone_status_override");
if ( !var )
{
SimpleMessage(CHANNEL_COLOR_YELLOW, noneEnter);
Message(CHANNEL_COLOR_YELLOW, "Required status %i to enter, no zone status override set.",zoneMinStatus);
return false;
}
else if ( var )
{
sint16 minStatus = atoi(var->GetValue());
if( minStatus > GetAdminStatus() )
{
SimpleMessage(CHANNEL_COLOR_YELLOW, youCannotEnter);
Message(CHANNEL_COLOR_YELLOW, "Required status %i to override to enter.",minStatus);
return false;
}
}
}
else if ( zoneMinStatus > 0 && zoneMinStatus > GetAdminStatus ( ) )
{
SimpleMessage(CHANNEL_COLOR_YELLOW, youCannotEnter);
Message(CHANNEL_COLOR_YELLOW, "Required status %i to enter.",zoneMinStatus);
return false;
}Any ideas?