mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
Fully working type 20 ornaments for UF/ROF (propbably SoD too)
This commit is contained in:
+27
-5
@@ -1907,14 +1907,36 @@ void Client::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
||||
ns->spawn.colors[MaterialFeet].color = GetEquipmentColor(MaterialFeet);
|
||||
}
|
||||
if ((inst = m_inv[SLOT_PRIMARY]) && inst->IsType(ItemClassCommon)) {
|
||||
item = inst->GetItem();
|
||||
if (strlen(item->IDFile) > 2)
|
||||
ns->spawn.equipment[MaterialPrimary] = atoi(&item->IDFile[2]);
|
||||
if (inst->HasOrnamentation())
|
||||
{
|
||||
ItemInst* ornament = inst->GetOrnamentation();
|
||||
if (strlen(ornament->GetItem()->IDFile) > 2)
|
||||
{
|
||||
ns->spawn.equipment[MaterialPrimary]= atoi(&ornament->GetItem()->IDFile[2]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item = inst->GetItem();
|
||||
if (strlen(item->IDFile) > 2)
|
||||
ns->spawn.equipment[MaterialPrimary] = atoi(&item->IDFile[2]);
|
||||
}
|
||||
}
|
||||
if ((inst = m_inv[SLOT_SECONDARY]) && inst->IsType(ItemClassCommon)) {
|
||||
item = inst->GetItem();
|
||||
if (strlen(item->IDFile) > 2)
|
||||
if (inst->HasOrnamentation())
|
||||
{
|
||||
ItemInst* ornament = inst->GetOrnamentation();
|
||||
if (strlen(ornament->GetItem()->IDFile) > 2)
|
||||
{
|
||||
ns->spawn.equipment[MaterialPrimary]= atoi(&ornament->GetItem()->IDFile[2]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item = inst->GetItem();
|
||||
if (strlen(item->IDFile) > 2)
|
||||
ns->spawn.equipment[MaterialSecondary] = atoi(&item->IDFile[2]);
|
||||
}
|
||||
}
|
||||
|
||||
//these two may be related to ns->spawn.texture
|
||||
|
||||
+13
-14
@@ -1899,26 +1899,25 @@ int32 Client::GetEquipmentMaterial(uint8 material_slot) const
|
||||
const ItemInst* inst = m_inv.GetItem(inventorySlot);
|
||||
if (inst != nullptr)
|
||||
{
|
||||
|
||||
if (strlen(inst->GetItem()->IDFile) > 2)
|
||||
if (inst->HasOrnamentation())
|
||||
{
|
||||
if (inst->HasOrnamentation())
|
||||
ItemInst* ornament = inst->GetOrnamentation();
|
||||
if (strlen(ornament->GetItem()->IDFile) > 2)
|
||||
{
|
||||
ItemInst* ornament = inst->GetOrnamentation();
|
||||
if (strlen(ornament->GetItem()->IDFile) > 2)
|
||||
{
|
||||
return atoi(&ornament->GetItem()->IDFile[2]);
|
||||
}
|
||||
return atoi(&ornament->GetItem()->IDFile[2]);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strlen(inst->GetItem()->IDFile) > 2)
|
||||
{
|
||||
return atoi(&inst->GetItem()->IDFile[2]);
|
||||
}
|
||||
}
|
||||
else //may as well try this, since were going to 0 anyways
|
||||
{
|
||||
return inst->GetItem()->Material;
|
||||
}
|
||||
else //may as well try this, since were going to 0 anyways
|
||||
{
|
||||
return inst->GetItem()->Material;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user