(RoF+) Implemented Armor Ornamentation using Hero's Forge Armor Models. To use, create an ornamentation augment and set the herosforgemodel field in the items table.

(RoF+) Added command #heromodel (#hm for short) - Usage: #heromodel [hero forge model] [ [slot] ] (example: #heromodel 63)
This commit is contained in:
Trevius
2014-12-13 13:53:55 -06:00
parent 80a67f9ebc
commit 9056008342
22 changed files with 457 additions and 393 deletions
+32 -2
View File
@@ -4390,7 +4390,7 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
uint32 spawnedbotid = 0;
spawnedbotid = this->GetBotID();
for (int i = 0; i < _MaterialCount; i++)
for (int i = 0; i < MaterialPrimary; i++)
{
inst = GetBotItem(i);
if (inst)
@@ -4420,6 +4420,34 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
}
}
}
inst = GetBotItem(MainPrimary);
if(inst)
{
item = inst->GetItem();
if(item)
{
if(strlen(item->IDFile) > 2)
{
ns->spawn.equipment[MaterialPrimary] = atoi(&item->IDFile[2]);
}
ns->spawn.colors[MaterialPrimary].color = GetEquipmentColor(MaterialPrimary);
}
}
inst = GetBotItem(MainSecondary);
if(inst)
{
item = inst->GetItem();
if(item)
{
if(strlen(item->IDFile) > 2)
{
ns->spawn.equipment[MaterialSecondary] = atoi(&item->IDFile[2]);
}
ns->spawn.colors[MaterialSecondary].color = GetEquipmentColor(MaterialSecondary);
}
}
}
}
@@ -16007,11 +16035,13 @@ uint8 Bot::GetNumberNeedingHealedInGroup(uint8 hpr, bool includePets) {
uint32 Bot::GetEquipmentColor(uint8 material_slot) const
{
//Bot tints
uint32 slotid = 0;
int16 slotid = 0;
uint32 botid = this->GetBotID();
//Translate code slot # to DB slot #
slotid = Inventory::CalcSlotFromMaterial(material_slot);
if(invslot == INVALID_INDEX)
return 0;
//read from db
std::string query = StringFormat("SELECT color FROM botinventory "