View Single Post
  #5  
Old 03-28-2008, 05:32 PM
TheLieka
Developer
 
Join Date: Oct 2004
Location: THE ATL (wut wut)
Posts: 325
Default

.\zone\zoning.cpp

After:

Code:
		case ZoneToSafeCoords:
			//going to safe coords, but client dosent know where?
			//assume it is this zone for now.
Add:

Code:
cheat_timer.Start(35000,false); //Lieka:  Allow Zone/Evac to Safe Coords without triggering MQWarp detector.
After:

Code:
		case GMSummon:
Add:

Code:
cheat_timer.Start(35000,false); //Lieka:  Allow Inter-Zone GM Summons without triggering MQZone detectors.

After:

Code:
		case ZoneSolicited:  //we told the client to zone somewhere, so we know where they are going.
Add:

Code:
cheat_timer.Start(3500,false); //Lieka:  Allow Server Forced Zoning without triggering MQZone detector.
After:

Code:
		case ZoneUnsolicited:   //client came up with this on its own.
			zone_point = zone->GetClosestZonePointWithoutZone(GetX(), GetY(), GetZ(), ZONEPOINT_NOZONE_RANGE);
			if(zone_point) {
				//we found a zone point, which is a reasonable distance away
				//assume that is the one were going with.
Add:

Code:
cheat_timer.Start(3500,false); //Lieka:  Allow Zone normal zoning without triggering MQZone detector.
After:

Code:
			} else {
				//unable to find a zone point... is there anything else
				//that can be a valid un-zolicited zone request?
Add:

Code:
this->CheatDetected(MQZone); //Lieka:  Bring down the hammer, they are trying to zone without meeting any of the above criteria.
After:

Code:
		if(zone_mode == ZoneUnsolicited) {
			zone_point = zone->GetClosestZonePoint(GetX(), GetY(), GetZ(), target_zone_id, ZONEPOINT_ZONE_RANGE);
			//if we didnt get a zone point, or its to a different zone,
			//then we assume this is invalid.
			if(!zone_point || zone_point->target_zone_id != target_zone_id) {
				Message(13, "Invalid unsolicited zone request.");
				LogFile->write(EQEMuLog::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id);
Add:

Code:
		if ((this->cheat_timer.GetRemainingTime())<1 || (!this->cheat_timer.Enabled())){ //Lieka:  Disable MQGate Detector if timer is active.
				this->CheatDetected(MQGate);
				}
Change (Insert Red Lines):

Code:
[color=red]		//for now, there are no other cases...
		
		//could not find a valid reason for them to be zoning, stop it.
		this->CheatDetected(MQZone);  //Lieka:  Bring down the hammer, we don't let hackers off that easily...
		Message(13, "Invalid unsolicited zone request.");
		LogFile->write(EQEMuLog::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%s'. Not near a zone point.", GetName(), target_zone_name);
		SendZoneCancel(zc);
		return;

Change (Insert Red Lines):

Code:
	//enforce min status and level
	if (!ignorerestrictions && (Admin() < minstatus || GetLevel() < minlevel)) {
		this->cheat_timer.Start(3500,false); //Lieka:  Don't set off warp detector for when a player is moved to the safe-spot for trying to access a zone without the appropriate level or status requirements (i.e. zoning into FearPlane at level 30, etc)
		myerror = ZONE_ERROR_NOEXPERIENCE;
	}
	
	if(!ignorerestrictions && flag_needed[0] != '\0') {
		//the flag needed string is not empty, meaning a flag is required.
		if(Admin() < minStatusToIgnoreZoneFlags && !HasZoneFlag(target_zone_id)) {
			this->cheat_timer.Start(3500,false); //Lieka:  Don't set off warp detector for when a player is moved to the safe-spot for trying to access a zone without the appropriate flag.
			Message(13, "You must have the flag %s to enter this zone.");
			myerror = ZONE_ERROR_NOEXPERIENCE;
		}
	}
After:

Code:
void Client::SendZoneCancel(ZoneChange_Struct *zc) {
	//effectively zone them right back to where they were
	//unless we find a better way to stop the zoning process.
	EQApplicationPacket *outapp;
Add:

Code:
cheat_timer.Start(3500,false); //Lieka:  Disable MQ Warp & MQ Gate Detector when zoning fails. (not high enough level, etc)
After:

Code:
void Client::SendZoneError(ZoneChange_Struct *zc, sint8 err) {
	LogFile->write(EQEMuLog::Error, "Zone %i is not available because target wasn't found or character insufficent level", zc->zoneID);
Add:

Code:
	cheat_timer.Start(3500,false);//Lieka:  Disable /Warp & /Gate Detector when zoning fails. (not high enough level, etc)
Change (insert red lines):


Code:
	switch(zm) {
		case EvacToSafeCoords:
			this->cheat_timer.Start(2500,false);// Null: added a timers to this location because sometimes the ones in the other locations of code were not doing the job
		case ZoneToSafeCoords:
			this->cheat_timer.Start(2500,false);
			x = zone->safe_x();
			y = zone->safe_y();
			z = zone->safe_z();
			heading = heading;
			break;
		case GMSummon:
			this->cheat_timer.Start(2500,false);
			zonesummon_x = x_pos = x;
			zonesummon_y = y_pos = y;
			zonesummon_z = z_pos = z;
			heading = heading;
			
			zonesummon_id = zoneID;
			zonesummon_ignorerestrictions = 1;
			break;
		case ZoneSolicited:
			this->cheat_timer.Start(2500,false);
			zonesummon_x = x;
			zonesummon_y = y;
			zonesummon_z = z;
			heading = heading;
			
			zonesummon_id = zoneID;
			zonesummon_ignorerestrictions = ignorerestrictions;
			break;
		case GateToBindPoint:
			this->cheat_timer.Start(2500,false);
			x = x_pos = m_pp.binds[0].x;
			y = y_pos = m_pp.binds[0].y;
			z = z_pos = m_pp.binds[0].z;
			heading = m_pp.binds[0].heading;
			break;
		case ZoneToBindPoint:
			this->cheat_timer.Start(2500,false);
			x = x_pos = m_pp.binds[0].x;
			y = y_pos = m_pp.binds[0].y;
			z = z_pos = m_pp.binds[0].z;
			heading = m_pp.binds[0].heading;
			
			zonesummon_ignorerestrictions = 1;
			LogFile->write(EQEMuLog::Debug, "Player %s has died and will be zoned to bind point in zone: %s at LOC x=%f, y=%f, z=%f, heading=%f", GetName(), pZoneName, m_pp.binds[0].x, m_pp.binds[0].y, m_pp.binds[0].z, m_pp.binds[0].heading);
			break;
		case SummonPC:
			this->cheat_timer.Start(2500,false);
			zonesummon_x = x_pos = x;
			zonesummon_y = y_pos = y;
			zonesummon_z = z_pos = z;
			heading = heading;
			break;
		default:
			LogFile->write(EQEMuLog::Error, "Client::ZonePC() received a reguest to perform an unsupported client zone operation.");
			ReadyToZone = false;
			break;
	}
__________________
Daxum



Former ServerOp - Vallon Zek / Tallon Zek Emu Server - Legit / Guild PvP - (2007 - 2011 RIP)
Reply With Quote