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

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 04-09-2005, 09:07 PM
mollymillions's Avatar
mollymillions
Hill Giant
 
Join Date: May 2003
Posts: 176
Default

Code:
-----------------------------
Replace \zone\client_process.cpp -line 1275 ish
-----------------------------
else if (gmskill->skillbank == 0x00)
	{
		// normal skills go here
		if (gmskill->skill_id > HIGHEST_SKILL)
		{
			cout << "Wrong Training Skill (abilities)" << endl;
			DumpPacket(app);
			return;
		}
		int8 skilllevel = GetRawSkill(gmskill->skill_id);
		//if ( skilllevel == 255)
		//{
		//  // Client never gets this skill; check for gm status or fail
		//  return;
		//}
		//else if (skilllevel == 254)
		//{
		//  // Client training new skill for the first time set the skill to level-1
		//  int16 t_level = database.GetTrainlevel(GetClass(), gmskill->skill_id);
		//  //cout<<"t_level:"<<t_level<<endl;
		//  if (t_level == 66 || t_level == 0)
		//  {
		//	  return;
		//  }
		//  //m_pp.skills[gmskill->skill_id + 1] = t_level;
		//  SetSkill(gmskill->skill_id, t_level);
		//}
		if (skilllevel == 0) {
			int16 t_level = database.GetTrainlevel(GetRace(), GetClass(), gmskill->skill_id);		   
			if (t_level == 66 || t_level == 0)
			{
				return;
			}
			SetSkill(gmskill->skill_id, t_level);
		}
		else if (skilllevel <= 251)
		{
			// Client train a valid skill
			// FIXME If the client doesn't do the "You are more skilled than I" check we should do it here
			SetSkill(gmskill->skill_id, skilllevel + 1);
		}
		else
		{
			// Log a warning someones been hacking
			LogFile->write(EQEMuLog::Error, "OP_GMTrainSkill: failed client: %s", GetName());
			return;
		}
		
-----------------
replace \zone\client_packet.cpp -line 5800 ish (redundant code)
-----------------
	////validate skills
	//for (int sk = 1; sk < MAX_PP_SKILL; sk++) {
	//  //int cap = GetSkillCap(sk-1);
	//  //int cap = MaxSkill(sk-1, GetClass(), GetLevel());
	//  int cap = MaxSkill( sk-1, GetClass(), GetRace(), GetLevel());
	//  if (cap >= 254)
	//	  m_pp.skills[sk] = cap;
	//}	 
----------------------------
insert \world\net.cpp -line 205 ish
----------------------------
	LogFile->write(EQEMuLog::Status, "Loading start skills..");
	database.LoadClassSkill(false);
	database.LoadClassSkill(true);  
	
--------------
insert \world\client.h -line 70 ish
--------------
	void SetClassStartingSkills( PlayerProfile_Struct *pp ); //nolonger used
	void SetRaceStartingSkills( PlayerProfile_Struct *pp ); //nolonger used
	void SetStartingSkills( PlayerProfile_Struct *pp );
			
-------------------------------
insert \world\client.cpp -line 1300 ish
--------------------------------
void Client::SetStartingSkills( PlayerProfile_Struct *pp )
{ 
	for (int8 skill=0;skill<=HIGHEST_SKILL;skill++) {	   
		StartSkill = database.GetMaxSkill(skill,(int8)(pp->class_),(int16)(pp->race),0);	
		if (StartSkill > 0) 
				pp->skills[skill+1] = StartSkill;	   
	}
}
Reply With Quote
 


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:04 AM.


 

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