Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-09-2002, 02:58 PM
Merkur
Sarnak
 
Join Date: Mar 2002
Posts: 53
Default

Some more lines :) Consider works pretty good this way - not 100% perfect but pretty close to EQ Live.

Code:
case OP_Consider:     //03/09   -Merkur
	{
		Consider_Struct* conin = (Consider_Struct*)app->pBuffer;
		if (conin->targetid == GetID())
			break;		// don't consider yourself
		
		APPLAYER* outapp = new APPLAYER(OP_Consider, sizeof(Consider_Struct));
		Consider_Struct* con = (Consider_Struct*)outapp->pBuffer;
		con->playerid = GetID();
		con->targetid = conin->targetid;
		con->faction = GetFactionLevel(character_id,entity_list.GetMob(conin->targetid)->GetNPCTypeID(), race, class_, DEITY_AGNOSTIC); // rembrant, Dec. 20, 2001; TODO: Send the players proper deity						
		sint8 tmp = entity_list.GetMob(conin->targetid)->GetLevel() - this->GetLevel();
		
		int32 conlevel;
		if (GetLevel() <= 12)
		{
			conlevel =  (tmp <= -4) ? 0x02:			//green
		(tmp >=-3 && tmp <= -1) ? 0x04://blue
		(tmp == 0) ? 0x00:				//white
		(tmp >= 1 && tmp <= 2) ?0x0F:    //yellow
		0x0D;							//red
		}
		else if (GetLevel() >= 13 && GetLevel() <= 24)
		{
			conlevel =  (tmp <= -6) ? 0x02:			//green
		(tmp >=-5 && tmp <= -4) ? 0x12: //blue2
		(tmp >=-3 && tmp <= -1) ? 0x04://blue
		(tmp == 0) ? 0x00:				//white
		(tmp >= 1 && tmp <= 2) ?0x0F:    //yellow
		0x0D;							//red
		}
		else if (GetLevel() >= 25 && GetLevel() <= 40)
		{
			conlevel =  (tmp <= -11) ? 0x02:			//green
		(tmp >=-10 && tmp <= -8) ? 0x04://blue
		(tmp == 0) ? 0x00:				//white
		(tmp >= 1 && tmp <= 2) ?0x0F:    //yellow
		0x0D;							//red
		}
		else if (GetLevel() >= 41 && GetLevel() <= 48)
		{
			conlevel =  (tmp <= -12) ? 0x02:			//green
		(tmp >=-11 && tmp <= -1) ? 0x04://blue
		(tmp == 0) ? 0x00:				//white
		(tmp >= 1 && tmp <= 2) ?0x0F:    //yellow
		0x0D;							//red
		}
		else if (GetLevel() >= 50)
		{
			conlevel =  (tmp <= -14) ? 0x02:			//green
		(tmp >=-13 && tmp <= -1) ? 0x04://blue
		(tmp == 0) ? 0x00:				//white
		(tmp >= 1 && tmp <= 2) ?0x0F:    //yellow
		0x0D;							//red
		};
		con->level = conlevel;
		//  These values are only used if you con PCs (i think), but i see no reason...
		//	con->cur_hp = target->GetHP(); // rembrant, Dec. 20, 2001
		//	con->max_hp = target->GetMaxHP(); // rembrant, Dec. 20, 2001
		QueuePacket(outapp);
		delete outapp;			
		break;
	}
edit: fixed a small error in this code (used wrong id for faction)
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:29 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3