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 05-05-2003, 03:06 PM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default Trainer enhancement.

The other day while collecting data, I noticed something EQLive trainers do that EMU trainers dont do. Each time you train a point in a skill on live, it gives the You've become better at <insert skill>! (new value) that also displays when you increase the skill through use. I thought to myself, hey, that'd be a simple and neat addition, so here it is.

client_process.cpp - case OP_GMTrainSkill:

line 944, change:
Code:
						if (gmskill->skillbank == 0x01) {
							// languages go here
							if (gmskill->skill_id > 25) {
								cout << "Wrong Training Skill (languages)" << endl;
								DumpPacket(app);
								break;
								}
								cout << "Training language: " << gmskill->skill_id << endl;
								IncreaseLanguageSkill(gmskill->skill_id);
								pp.points--;
						}
To:
Code:
              	   				if (gmskill->skillbank == 0x01) {
							// languages go here
							if (gmskill->skill_id > 25) {
								cout << "Wrong Training Skill (languages)" << endl;
								DumpPacket(app);
								break;
								}
								cout << "Training language: " << gmskill->skill_id << endl;
								IncreaseLanguageSkill(gmskill->skill_id);
								pp.points--;
	{
		APPLAYER* outapp = new APPLAYER(OP_SkillUpdate, sizeof(SkillUpdate_Struct));
		SkillUpdate_Struct* skill = (SkillUpdate_Struct*)outapp->pBuffer;
	    skill->skillId=gmskill->skill_id;
		skill->value=GetSkill(gmskill->skill_id);
		QueuePacket(outapp);
		delete outapp;
	}
						}
line 983 change:
Code:
								else if (GetSkill(gmskill->skill_id) >= 0 && GetSkill(gmskill->skill_id) <= 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
									IncreaseSkill(gmskill->skill_id);
								}
To:
Code:
								else if (GetSkill(gmskill->skill_id) >= 0 && GetSkill(gmskill->skill_id) <= 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
									IncreaseSkill(gmskill->skill_id);
	{
		APPLAYER* outapp = new APPLAYER(OP_SkillUpdate, sizeof(SkillUpdate_Struct));
		SkillUpdate_Struct* skill = (SkillUpdate_Struct*)outapp->pBuffer;
	    skill->skillId=gmskill->skill_id;
		skill->value=GetSkill(gmskill->skill_id);
		QueuePacket(outapp);
		delete outapp;
	}
								}
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
Reply


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 01:39 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