View Single Post
  #1  
Old 01-15-2014, 01:45 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,604
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