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:
@@ -3531,7 +3531,7 @@ char* SerializeItem(const ItemInst *inst, int16 slot_id_in, uint32 *length, uint
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Moofta: if the item has an aug of type 20 (ornamentation) then we use the ID file of that when serializing.
|
// Moofta: if the item has an aug of type 20 (ornamentation) then we use the ID file of that when serializing.
|
||||||
// the only thing we should probably worry about is generating a wear change packet to all cl;ients in zone if someone adds a type 20 aug.
|
// the only thing we should probably worry about is generating a wear change packet to all clients in zone if someone adds a type 20 aug.
|
||||||
if (inst && inst->HasOrnamentation()) //instance is not null and does have an ornament aug (slot 20)
|
if (inst && inst->HasOrnamentation()) //instance is not null and does have an ornament aug (slot 20)
|
||||||
{
|
{
|
||||||
ItemInst* ornamentation = inst->GetOrnamentation();
|
ItemInst* ornamentation = inst->GetOrnamentation();
|
||||||
|
|||||||
+27
-5
@@ -1907,14 +1907,36 @@ void Client::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
|||||||
ns->spawn.colors[MaterialFeet].color = GetEquipmentColor(MaterialFeet);
|
ns->spawn.colors[MaterialFeet].color = GetEquipmentColor(MaterialFeet);
|
||||||
}
|
}
|
||||||
if ((inst = m_inv[SLOT_PRIMARY]) && inst->IsType(ItemClassCommon)) {
|
if ((inst = m_inv[SLOT_PRIMARY]) && inst->IsType(ItemClassCommon)) {
|
||||||
item = inst->GetItem();
|
if (inst->HasOrnamentation())
|
||||||
if (strlen(item->IDFile) > 2)
|
{
|
||||||
ns->spawn.equipment[MaterialPrimary] = atoi(&item->IDFile[2]);
|
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)) {
|
if ((inst = m_inv[SLOT_SECONDARY]) && inst->IsType(ItemClassCommon)) {
|
||||||
item = inst->GetItem();
|
if (inst->HasOrnamentation())
|
||||||
if (strlen(item->IDFile) > 2)
|
{
|
||||||
|
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]);
|
ns->spawn.equipment[MaterialSecondary] = atoi(&item->IDFile[2]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//these two may be related to ns->spawn.texture
|
//these two may be related to ns->spawn.texture
|
||||||
|
|||||||
+12
-13
@@ -1899,25 +1899,24 @@ int32 Client::GetEquipmentMaterial(uint8 material_slot) const
|
|||||||
const ItemInst* inst = m_inv.GetItem(inventorySlot);
|
const ItemInst* inst = m_inv.GetItem(inventorySlot);
|
||||||
if (inst != nullptr)
|
if (inst != nullptr)
|
||||||
{
|
{
|
||||||
|
if (inst->HasOrnamentation())
|
||||||
if (strlen(inst->GetItem()->IDFile) > 2)
|
|
||||||
{
|
{
|
||||||
if (inst->HasOrnamentation())
|
ItemInst* ornament = inst->GetOrnamentation();
|
||||||
|
if (strlen(ornament->GetItem()->IDFile) > 2)
|
||||||
{
|
{
|
||||||
ItemInst* ornament = inst->GetOrnamentation();
|
return atoi(&ornament->GetItem()->IDFile[2]);
|
||||||
if (strlen(ornament->GetItem()->IDFile) > 2)
|
|
||||||
{
|
|
||||||
return atoi(&ornament->GetItem()->IDFile[2]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (strlen(inst->GetItem()->IDFile) > 2)
|
||||||
{
|
{
|
||||||
return atoi(&inst->GetItem()->IDFile[2]);
|
return atoi(&inst->GetItem()->IDFile[2]);
|
||||||
}
|
}
|
||||||
}
|
else //may as well try this, since were going to 0 anyways
|
||||||
else //may as well try this, since were going to 0 anyways
|
{
|
||||||
{
|
return inst->GetItem()->Material;
|
||||||
return inst->GetItem()->Material;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user