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)

Reply
 
Thread Tools Display Modes
  #1  
Old 01-15-2014, 01:45 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default Prismatic Dye Question.

Okay, so in the source there is a setting for specifically choosing item ID 32557 for dye, would it be impossible to set up a rule_value entry for that so you could choose the item id for that rather than a constant? Below is the code I'm talking about, I don't know if the client requires it or not, it's just something I was wondering about. Responses are appreciated, thanks!

Code:
void Client::DyeArmor(DyeStruct* dye)
{
	int16 slot=0;
	for(int i=0;i<7;i++)
	{
		if(m_pp.item_tint[i].rgb.blue!=dye->dye[i].rgb.blue || m_pp.item_tint[i].rgb.red!=dye->dye[i].rgb.red || m_pp.item_tint[i].rgb.green != dye->dye[i].rgb.green)
		{
			slot = m_inv.HasItem(32557, 1, invWherePersonal);
			if(slot != SLOT_INVALID)
			{
				DeleteItemInInventory(slot,1,true);
				uint8 slot2=SlotConvert(i);
				ItemInst* inst = this->m_inv.GetItem(slot2);
				if(inst)
				{
					inst->SetColor((dye->dye[i].rgb.red*65536)+(dye->dye[i].rgb.green*256)+(dye->dye[i].rgb.blue));
					database.SaveInventory(CharacterID(),inst,slot2);
					if(dye->dye[i].rgb.use_tint)
						m_pp.item_tint[i].rgb.use_tint = 0xFF;
					else
						m_pp.item_tint[i].rgb.use_tint=0x00;
				}
				m_pp.item_tint[i].rgb.blue=dye->dye[i].rgb.blue;
				m_pp.item_tint[i].rgb.red=dye->dye[i].rgb.red;
				m_pp.item_tint[i].rgb.green=dye->dye[i].rgb.green;
				SendWearChange(i);
			}
			else
			{
				Message(13,"Could not locate A Vial of Prismatic Dye.");
				return;
			}
		}
	}
	EQApplicationPacket* outapp=new EQApplicationPacket(OP_Dye,0);
	QueuePacket(outapp);
	safe_delete(outapp);
	Save();
}
Reply With Quote
  #2  
Old 01-15-2014, 02:25 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

The client seems to only enable the "Save Dye" button if you have that exact item ID in your inventory.
Reply With Quote
  #3  
Old 01-15-2014, 03:11 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

We really should fix that SetColor()...

I guess bit-shifting didn't exist back then
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #4  
Old 01-15-2014, 03:34 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

Quote:
Originally Posted by demonstar55 View Post
The client seems to only enable the "Save Dye" button if you have that exact item ID in your inventory.
I'm confused as to why that's the case, you'd think you'd be able to change that, I didn't realize the client could actually read specific items from the database and check their ID like that, care to expand upon your response?
Reply With Quote
  #5  
Old 01-15-2014, 03:44 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

If you have a Vial of Prismatic Dye in your inventory, the "Save Dye" button in the dye window is clickable. If you don't, it's not. So I'm guessing without client side hackery, it's not possible to change. Unless the server tells the client to enable the button, but I don't think that's the case, but I haven't looked either.

EDIT: I guess it could also be a certain flag is set in the item field, but I'd have to look at that too.

EDIT2: There is an itemtype that we call Dye (so does alla), but that client doesn't seem to enable the dye button for any of these, except for the Vial of Prismatic Dye
Reply With Quote
  #6  
Old 01-15-2014, 06:18 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

on EDIT2, I'll poke around tonight and see what I can find.

Before coins went weightless, there was a specific range of id's that was used to identify those 'coin pouches' with redux.

As far as I've read, they were hard-coded for id's.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #7  
Old 01-15-2014, 09:09 PM
sorvani
Dragon
 
Join Date: May 2010
Posts: 965
Default

Quote:
Originally Posted by Kingly_Krab View Post
I'm confused as to why that's the case, you'd think you'd be able to change that, I didn't realize the client could actually read specific items from the database and check their ID like that, care to expand upon your response?
It is not reading the database. The client is likely hard coded to look for that specific item.
Reply With Quote
  #8  
Old 01-16-2014, 09:16 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Yes, the dye id requirement is exclusive and singularly unique.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
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 07:20 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3