zoneMinStatus bug

Old bugs stored here for reference.
Locked
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

zoneMinStatus bug

Post by John Adams » 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:

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

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Sat Dec 06, 2008 2:46 pm

Egads... I love these inconsistent anomalies. So I boot up my dev server to trace what it's doing to try and find out why we're unable to use the /zone command... and on my dev server, it works perfectly.
Of course.
Let me see if I can find the reproducable steps before you waste your time. Sorry. :)

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Sat Dec 06, 2008 3:09 pm

Ok, got it to happen consistently. Here's what's happening (I think). I am standing in Antonica, trying to /zone QueensColony. The value for zoneMinStatus = -12851, and the value for zoneMinLevel = 52685.
Client-side, we see:
You are too low to enter here.
Required level 26979 to enter, required status 1 to override.
I do not know where that status = 1 is coming from. This zone has 0/0 set for any restrictions - but the value for start_zone = 1, as well as always_loaded = 1. Could the param fetch be out of order? I can't find that info. But here's how it should work (and seems to work for zones that are not always_loaded or currently running)
if a zone records min_status and min_level both = 0, anyone should be able to /zone in. :) Master of the obvious, ain't I?

Image
Retired
Posts: 251
Joined: Sun Oct 26, 2008 10:07 am

Post by Image » Wed Dec 10, 2008 10:22 am

Looks like some temp variables are not getting set to 0 before use.
I will have to look at it when I get back from my trip, I don't have the source code on this computer.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: zoneMinStatus bug

Post by John Adams » Tue Jan 20, 2009 12:33 am

Image, any chance of bugging you about this again? I just re-enabled `always_loaded` and `city_zones` and this bug has resurfaced (I forgot why I wasn't using city_zones before). Seems with these zones pre-loaded, something is not allowing players of proper status/lev to zone into them.

Thanks

Image
Retired
Posts: 251
Joined: Sun Oct 26, 2008 10:07 am

Re: zoneMinStatus bug

Post by Image » Tue Jan 20, 2009 6:09 am

Sorry John, this fell off my chart. The fix will be up in the SVN today and will be reflected in the changelog. Static zones have their own database query instead of using the standard zones query, it wasn't grabbing the min status/level or the instance type (which are not set by default). That is why you would see random numbers since it wasn't initialized.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: zoneMinStatus bug

Post by John Adams » Tue Jan 20, 2009 12:04 pm

Awesome, thank you for the fix.

Locked

Who is online

Users browsing this forum: No registered users and 0 guests