|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum) |
|
|
|
01-15-2014, 01:45 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,595
|
|
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();
}
|
|
|
|
01-15-2014, 02:25 PM
|
Demi-God
|
|
Join Date: Apr 2008
Location: MA
Posts: 1,164
|
|
The client seems to only enable the "Save Dye" button if you have that exact item ID in your inventory.
|
01-15-2014, 03:11 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
We really should fix that SetColor()...
I guess bit-shifting didn't exist back then
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
01-15-2014, 03:34 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,595
|
|
Quote:
Originally Posted by demonstar55
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?
|
01-15-2014, 03:44 PM
|
Demi-God
|
|
Join Date: Apr 2008
Location: MA
Posts: 1,164
|
|
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
|
01-15-2014, 06:18 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
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
|
01-15-2014, 09:09 PM
|
Dragon
|
|
Join Date: May 2010
Posts: 965
|
|
Quote:
Originally Posted by Kingly_Krab
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.
|
01-16-2014, 09:16 PM
|
|
Developer
|
|
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
|
|
Yes, the dye id requirement is exclusive and singularly unique.
__________________
Uleat of Bertoxxulous
Compilin' Dirty
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 07:20 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|