PDA

View Full Version : Prismatic Dye Question.


Kingly_Krab
01-15-2014, 01:45 PM
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!

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();
}

demonstar55
01-15-2014, 02:25 PM
The client seems to only enable the "Save Dye" button if you have that exact item ID in your inventory.

Uleat
01-15-2014, 03:11 PM
We really should fix that SetColor()...

I guess bit-shifting didn't exist back then :-D

Kingly_Krab
01-15-2014, 03:34 PM
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?

demonstar55
01-15-2014, 03:44 PM
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

Uleat
01-15-2014, 06:18 PM
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.

sorvani
01-15-2014, 09:09 PM
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.

Uleat
01-16-2014, 09:16 PM
Yes, the dye id requirement is exclusive and singularly unique.