mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 15:58:36 +00:00
(RoF+) Added herosforgemodel field to the npc_types table. Not fully functional yet for NPCs (currently only displays helm correctly).
(RoF2) Updated item links from #npcstat command output.
This commit is contained in:
+13
-3
@@ -978,7 +978,8 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
||||
|
||||
strn0cpy(ns->spawn.lastName, lastname, sizeof(ns->spawn.lastName));
|
||||
|
||||
for (i = 0; i < _MaterialCount; i++)
|
||||
//for (i = 0; i < _MaterialCount; i++)
|
||||
for (i = 0; i < 9; i++)
|
||||
{
|
||||
// Only Player Races Wear Armor
|
||||
if (Mob::IsPlayerRace(race) || i > 6)
|
||||
@@ -2733,7 +2734,6 @@ int32 Mob::GetEquipmentMaterial(uint8 material_slot) const
|
||||
|
||||
int32 Mob::GetHerosForgeModel(uint8 material_slot) const
|
||||
{
|
||||
|
||||
uint32 HeroModel = 0;
|
||||
if (material_slot >= 0 && material_slot < MaterialPrimary)
|
||||
{
|
||||
@@ -2744,7 +2744,7 @@ int32 Mob::GetHerosForgeModel(uint8 material_slot) const
|
||||
|
||||
if (item != 0 && invslot != INVALID_INDEX)
|
||||
{
|
||||
if (this->IsClient())
|
||||
if (IsClient())
|
||||
{
|
||||
const ItemInst* inst = CastToClient()->m_inv[invslot];
|
||||
if (inst)
|
||||
@@ -2766,6 +2766,16 @@ int32 Mob::GetHerosForgeModel(uint8 material_slot) const
|
||||
HeroModel = item->HerosForgeModel;
|
||||
}
|
||||
}
|
||||
|
||||
if (IsNPC())
|
||||
{
|
||||
HeroModel = CastToNPC()->GetHeroForgeModel();
|
||||
// Robes require full model number, and should only be sent to chest slot
|
||||
if (HeroModel > 1000 && material_slot != 1)
|
||||
{
|
||||
HeroModel = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Auto-Convert Hero Model to match the slot
|
||||
|
||||
Reference in New Issue
Block a user