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

.\zone\client_process.cpp

Change (Insert Red Lines):

Code:
	if (ra->action == 1) {
		this->cheat_timer.Start(3500, false); //[Paddy] Allow getting rezzed without triggering 
		cout << "Player " << this->name << " got a " << (int16)spells[ra->spellid].base[0] << "% Rezz" << endl;
		this->BuffFadeAll();
		SetMana(0);
		SetHP(GetMaxHP()/5);
		EQApplicationPacket* outapp = app->Copy();
		outapp->SetOpcode(OP_RezzComplete);
Change (Insert Red Lines):

Code:
void Client::OPGMSummon(const EQApplicationPacket *app)
{
	GMSummon_Struct* gms = (GMSummon_Struct*) app->pBuffer;
	Mob* st = entity_list.GetMob(gms->charname);

	if(st && st->IsCorpse())
	{
		st->CastToCorpse()->Summon(this, false);
	}
	else
	{
		if(admin < 80)
		{
			return;
		}
		if(st)
		{
			this->cheat_timer.Start(3500, false);//[Paddy] Allow PC's to be summoned without triggering Warp Detection
			Message(0, "Local: Summoning %s to %i, %i, %i", gms->charname, gms->x, gms->y, gms->z);
			if (st->IsClient() && (st->CastToClient()->GetAnon() != 1 || this->Admin() >= st->CastToClient()->Admin()))
				st->CastToClient()->MovePC((float)gms->x, (float)gms->y, (float)gms->z, this->GetHeading(), 2, true);
			else
				st->GMMove(this->GetX(), this->GetY(), this->GetZ(),this->GetHeading());
		}
		else
		{
			int8 tmp = gms->charname[strlen(gms->charname)-1];
			if (!worldserver.Connected())
			{
				Message(0, "Error: World server disconnected");
			}
			else if (tmp < '0' || tmp > '9') // dont send to world if it's not a player's name
			{
				ServerPacket* pack = new ServerPacket(ServerOP_ZonePlayer, sizeof(ServerZonePlayer_Struct));
				ServerZonePlayer_Struct* szp = (ServerZonePlayer_Struct*) pack->pBuffer;
				strcpy(szp->adminname, this->GetName());
				szp->adminrank = this->Admin();
				strcpy(szp->name, gms->charname);
				strcpy(szp->zone, zone->GetShortName());
				szp->x_pos = (float)gms->x;
				szp->y_pos = (float)gms->y;
				szp->z_pos = (float)gms->z;
				szp->ignorerestrictions = 2;
				worldserver.SendPacket(pack);
				safe_delete(pack);
			}
			else {
				//all options have been exhausted
				//summon our target...
				this->cheat_timer.Start(3500, false); //Lieka:  Don't want to trip the MQWarp detector here either.
				if(GetTarget() && GetTarget()->IsCorpse()){
					GetTarget()->CastToCorpse()->Summon(this, false);
				}
			}
		}
	}
}
.\zone\command.cpp

Change (Insert Red Lines):

Code:
	else if (t->IsClient())
	{
		if(c->Admin() < 150)
		{
			c->Message(0, "You may not summon a player.");
			return;
		}
		t->CastToClient()->cheat_timer.Start(3500,false); //Lieka:  Prevent Zone-to-Zone GM Summons from triggering the MQZone and MQWarp detectors.
		c->Message(0, "Summoning player %s to %1.1f, %1.1f, %1.1f", t->GetName(), c->GetX(), c->GetY(), c->GetZ());
		t->CastToClient()->MovePC(zone->GetZoneID(), c->GetX(), c->GetY(), c->GetZ(), c->GetHeading(), 2, GMSummon);
	}
}
Change (Insert Red Lines):

Code:
	if (sep->IsNumber(2) || sep->IsNumber(3) || sep->IsNumber(4)){
		//zone to specific coords
		c->CastToClient()->cheat_timer.Start(3500,false);  //Lieka:  Not sure why we put this here... should be an admin if you are zoning to special coordinates by this point.
		c->MovePC(zoneid, atof(sep->arg[2]), atof(sep->arg[3]), atof(sep->arg[4]), 0.0f, 0);
	}
	else {
		//zone to safe coords
		c->cheat_timer.Start(3500,false); //Lieka:  Should only hit this spot if your status is high enough to #zone, but prevent it from triggering the detector anyway.
		c->MovePC(zoneid, 0.0f, 0.0f, 0.0f, 0.0f, 0, ZoneToSafeCoords);
	}
}
.\zone.mob.h

After:

Code:
	inline int16	GetRace()				const { return race; }
	inline int8	GetGender()					const { return gender; }
	inline int8	GetTexture()				const { return texture; }
	inline int8	GetHelmTexture()			const { return helmtexture; }
	inline int8	GetClass()					const { return class_; }
	inline uint8	GetLevel()				const { return level; }
	inline const char*	GetName()			const { return name; }
Add:

Code:
	float GetLWDistance()					{ return last_warp_distance; }    //Null:  these are used to return the values to #showstats
	float GetWarpThreshold()				{ return warp_threshold; }		  //this one too
Change (Insert Red Lines):

Code:
	bool fix_pathing;
	Timer cheat_timer; //Lieka:  Timer used to check for movement exemptions/client-based, unsolicited zone exemptions
	Timer threshold_timer;  //Null:  threshold timer
	float warp_threshold;   //Null:  threshold for warp detector
	float last_warp_distance;  //Null:  last distance logged as a warp, used for logs and #showstats
	inline float GetCWPX() const { return(cur_wp_x); }
	inline float GetCWPY() const { return(cur_wp_y); }
	inline float GetCWPZ() const { return(cur_wp_z); }


.\zone\mob.cpp

Change (Insert Red Lines):

Code:
		attack_timer(2000),
		attack_dw_timer(2000),
		ranged_timer(2000),
		tic_timer(6000),
		mana_timer(2000),
		spellend_timer(0),
		cheat_timer(0), //Lieka:  Timer for MQ Detector exemptions
		stunned_timer(0),
		bardsong_timer(6000),
		threshold_timer(0), //Lieka:  Timer to allow exemptions MQWarp related to lag
#ifdef FLEE_HP_RATIO
		flee_timer(FLEE_CHECK_TIMER),
#endif
		bindwound_timer(10000)
	//	mezzed_timer(0)
		{
	targeted = false;
	logpos = false;
	tar_ndx=0;
	tar_vector=0;
	tar_vx=0;
	tar_vy=0;
	tar_vz=0;
	tarx=0;
	tary=0;
	tarz=0;
	AI_Init();
	SetMoving(false);
	moved=false;
	warp_threshold = 140;            //Null:  set the threshold on creation of mob instance
	last_warp_distance = 0;			 //Null: set this one to zero also just because.
	_egnode = NULL;
	adverrorinfo = 0;
	name[0]=0;
	clean_name[0]=0;
	lastname[0]=0;
Change (Insert Red Lines):

Code:
	logging_enabled = false;
	isgrouped = false;
	_appearance = eaStanding;
	pRunAnimSpeed = 0;
//	guildeqid = GUILD_NONE;
	
    spellend_timer.Disable();
	cheat_timer.Disable();
	bardsong_timer.Disable();
	bardsong = 0;
	bardsong_target_id = 0;
	casting_spell_id = 0;
	target = 0;
Change (Insert Red Lines):

Code:
void Mob::ShowStats(Client* client) {
	client->Message(0, "Name: %s %s", GetName(), lastname);
	client->Message(0, "  Level: %i  MaxHP: %i  CurHP: %i  AC: %i  Class: %i", GetLevel(), GetMaxHP(), GetHP(), GetAC(), GetClass());
	client->Message(0, "  MaxMana: %i  CurMana: %i  ATK: %i  Size: %1.1f", GetMaxMana(), GetMana(), GetATK(), GetSize());
	client->Message(0, "  STR: %i  STA: %i  DEX: %i  AGI: %i  INT: %i  WIS: %i  CHA: %i", GetSTR(), GetSTA(), GetDEX(), GetAGI(), GetINT(), GetWIS(), GetCHA());
	client->Message(0, "  MR: %i  PR: %i  FR: %i  CR: %i  DR: %i", GetMR(), GetPR(), GetFR(), GetCR(), GetDR());
	client->Message(0, "  Race: %i  BaseRace: %i  Texture: %i  HelmTexture: %i  Gender: %i  BaseGender: %i", GetRace(), GetBaseRace(), GetTexture(), GetHelmTexture(), GetGender(), GetBaseGender());
	client->Message(0, "  Last Warp Distance: %f Threshold Remaining: %f", GetLWDistance(), GetWarpThreshold());   //Null:  added this to check players last warp distance for debuging.
	if (client->Admin() >= 100) {
		client->Message(0, "  EntityID: %i  PetID: %i  OwnerID: %i  AIControlled: %i", this->GetID(), this->GetPetID(), this->GetOwnerID(), this->IsAIControlled());
		if (this->IsClient()) {
			client->Message(0, "  CharID: %i  PetID: %i", this->CastToClient()->CharacterID(), this->GetPetID());
			client->Message(0, "  Endurance: %i, Max Endurance %i",client->GetEndurance(), client->GetMaxEndurance());
		}
Change (Insert Red Lines):

Code:
		if (target->IsClient()) {
			target->CastToClient()->cheat_timer.Start(3500,false); //Lieka:  Prevent Mob Summons from tripping hack detector.
			target->CastToClient()->MovePC(zone->GetZoneID(), x_pos, y_pos, z_pos, target->GetHeading(), 0, SummonPC);
		}
		else
			GetHateTop()->GMMove(x_pos, y_pos, z_pos, target->GetHeading());
        return true;
	}
	return false;
}
__________________
Daxum



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