Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 08-16-2015, 03:29 AM
Shendare
Dragon
 
Join Date: Apr 2009
Location: California
Posts: 814
Default

Oh, I had the which-tint-takes-priority code in my testing state there. Here's the correct Client::GetEquipmentColor() method from inventory.cpp:

diff --git a/zone/inventory.cpp b/zone/inventory.cpp
Code:
index e1904d5..c04a6cc 100644
--- a/zone/inventory.cpp
+++ b/zone/inventory.cpp
@@ -2635,9 +2635,16 @@ uint32 Client::GetEquipmentColor(uint8 material_slot) const
 	if (material_slot > EmuConstants::MATERIAL_END)
 		return 0;
 
+	if (m_pp.item_tint[material_slot].RGB.UseTint)
+		return m_pp.item_tint[material_slot].Color; // Priority 1: Prismatic Dye on the slot
+	
+	ItemInst* inst = GetInv().GetItem(Inventory::CalcSlotFromMaterial(material_slot));
+	if (inst != nullptr)
+		return inst->GetColor(); // Priority 2: Equipped item's augmented or default tint
+
 	const Item_Struct *item = database.GetItem(GetEquipment(material_slot));
 	if(item != nullptr)
-		return ((m_pp.item_tint[material_slot].RGB.UseTint) ? m_pp.item_tint[material_slot].Color : item->Color);
+		return item->Color; // Priority 3: Default color for the item from the database
 
 	return 0;
 }
Reply With Quote
 


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 06:01 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