diff --git a/common/item_instance.cpp b/common/item_instance.cpp index d8d23064e..ffec614b4 100644 --- a/common/item_instance.cpp +++ b/common/item_instance.cpp @@ -539,16 +539,16 @@ EQEmu::ItemInstance* EQEmu::ItemInstance::GetOrnamentationAug(int32 ornamentatio } uint32 EQEmu::ItemInstance::GetOrnamentHeroModel(int32 material_slot) const { - uint32 HeroModel = 0; - if (m_ornament_hero_model > 0) - { - HeroModel = m_ornament_hero_model; - if (material_slot >= 0) - { - HeroModel = (m_ornament_hero_model * 100) + material_slot; - } - } - return HeroModel; + // Not a Hero Forge item. + if (m_ornament_hero_model == 0) + return 0; + + // Item is using an explicit Hero Forge ID + if (m_ornament_hero_model >= 1000) + return m_ornament_hero_model; + + // Item is using a shorthand ID + return (m_ornament_hero_model * 100) + material_slot; } bool EQEmu::ItemInstance::UpdateOrnamentationInfo() { diff --git a/zone/command.cpp b/zone/command.cpp index 718feedcc..307b4e949 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -745,24 +745,15 @@ void command_wc(Client *c, const Seperator *sep) uint32 hero_forge_model = 0; uint32 wearslot = atoi(sep->arg[1]); + // Hero Forge if (sep->argnum > 2) { hero_forge_model = atoi(sep->arg[3]); - if (hero_forge_model > 0) - { - // Conversion to simplify the command arguments - // Hero's Forge model is actually model * 1000 + texture * 100 + wearslot - hero_forge_model *= 1000; - hero_forge_model += (atoi(sep->arg[2]) * 100); - hero_forge_model += wearslot; - // For Hero's Forge, slot 7 is actually for Robes, but it still needs to use slot 1 in the packet - if (wearslot == 7) - { - wearslot = 1; - } + if (hero_forge_model != 0 && hero_forge_model < 1000) { + // Shorthand Hero Forge ID. Otherwise use the value the user entered. + hero_forge_model = (hero_forge_model * 100) + wearslot; } - } /* // Leaving here to add color option to the #wc command eventually