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 12-28-2002, 04:46 PM
Edgar1898
Senior Member
Former EQEmu Developer
Current EQ2Emu Lead Developer
 
Join Date: Dec 2002
Posts: 1,065
Default TradeSkills Patch

Replace the "switch(combin->tradeskill)" switch in client_process.cpp with the following:
Code:
switch(combin->tradeskill)
{
case 0x10:	//Tailoring
	tradeskill = 61;
	break;
case 0x12:	//Fletching
	tradeskill = 64;
	break;
case 0x14:	//Jewelry Making
	tradeskill = 68;
	break;
case 0x0F: // Baking
	tradeskill = 60;
	break;
case 0x09: //Alchemy
	if ((this->class_==10) & (this->level >=25))
		tradeskill=59;
	else if (this->class_!=10)
		this->Message(4,"This tradeskill can only be used by the Shaman class.");	
	else if (this->level<25)
		this->Message(4,"You can use this tradeskill until you reach a level of 25.");
	break;	
case 0x11: //Blacksmithing
	tradeskill=63;
	break;	
case 0x16: //Pottery
	tradeskill=69;
	break;
case 0x0A: //Tinkering
	if (this->race==12)
		tradeskill = 57;
	else
		this->Message(4,"This tradeskill is only available to the Gnomish race.");
break;
case 0x1B: //Research
	tradeskill = 58;
	break;
case 0x0C: //Make Poison
	if (this->class_==9)
		tradeskill=56;
	else
		this->Message(4,"This tradeskill is only available to the Rogue class.");
	break;
case 0x2E: //Fishing
	tradeskill=55;
	break;
default:
	cout << combin->tradeskill;
	this->Message(4,"This tradeskill has not been implemented yet, if you get this message send a petition and let them know what tradeskill you were trying to use.");
}

After you do that. Change the following:
Code:
if ((pp.gm==1) || (chance > ((float)rand()/RAND_MAX*100))){
								this->Message(4,"You have fashioned the items together to create something new!");
								PutItemInInventory(0,product,1);
								for (int k=0; k<10; k++)
									if (pp.containerinv[(((int16)combin->containerslot-22)*10) + k] != 0xFFFF)
										DeleteItemInInventory(((combin->containerslot-22)*10) + k + 250);
							}
To this:

Code:
if ((pp.gm==1) || (chance > ((float)rand()/RAND_MAX*100))){
								this->Message(4,"You have fashioned the items together to create something new!");
								PutItemInInventory(0,product,1);
								for (int k=0; k<10; k++)
									if (pp.containerinv[(((int16)combin->containerslot-22)*10) + k] != 0xFFFF)
										DeleteItemInInventory(((combin->containerslot-22)*10) + k + 250,TRUE);
							}

We added a boolean of true to the deleteitem so that it would update the clients items so they couldnt keep making the item with the same components. Do the same to:

Code:
else
							{
								this->Message(4,"You lacked the skills to fashion the items together.");
								for (int k=0; k<10; k++)
									if (pp.containerinv[(((int16)combin->containerslot-22)*10) + k] != 0xFFFF)
										DeleteItemInInventory(((combin->containerslot-22)*10) + k + 250);
							}
to make it:

Code:
else
                      {
								this->Message(4,"You lacked the skills to fashion the items together.");
								for (int k=0; k<10; k++)
									if (pp.containerinv[(((int16)combin->containerslot-22)*10) + k] != 0xFFFF)
										DeleteItemInInventory(((combin->containerslot-22)*10) + k + 250,TRUE);
							}

I think that is all the tradeskills, if you find one I dont have listed, let me know and Ill find it. -LethalEncounter
Reply With Quote
  #2  
Old 12-29-2002, 02:23 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Ive merged this in... Thanks for the update!
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #3  
Old 12-29-2002, 04:48 AM
Drawde
Dragon
 
Join Date: Jan 2002
Posts: 521
Default

Great work, that should improve the functionality of tradeskills a lot (now all we need is ovens, forges, etc in the cities).
Will this also fix quest containers, or do they use a seperate tradeskill?
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:14 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