Enable multiple NPC equipment materials

This change allows #npcedit
armtexture/bracertexture/handtexture/legtexture/feettexture to work
properly and sets individual armor slot materials for NPCs.
This commit is contained in:
Shane Lynch
2015-03-10 21:33:44 -07:00
parent 6a241d44cc
commit 13743caf19
7 changed files with 66 additions and 9 deletions
+12 -1
View File
@@ -1904,7 +1904,12 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
"npc_types.no_target_hotkey, "
"npc_types.raid_target, "
"npc_types.attack_delay, "
"npc_types.light "
"npc_types.light, "
"npc_types.armtexture, "
"npc_types.bracertexture, "
"npc_types.handtexture, "
"npc_types.legtexture, "
"npc_types.feettexture "
"FROM npc_types %s",
where_condition.c_str()
);
@@ -2074,6 +2079,12 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
temp_npctype_data->attack_delay = atoi(row[90]);
temp_npctype_data->light = (atoi(row[91]) & 0x0F);
temp_npctype_data->armtexture = atoi(row[92]);
temp_npctype_data->bracertexture = atoi(row[93]);
temp_npctype_data->handtexture = atoi(row[94]);
temp_npctype_data->legtexture = atoi(row[95]);
temp_npctype_data->feettexture = atoi(row[96]);
// If NPC with duplicate NPC id already in table,
// free item we attempted to add.
if (zone->npctable.find(temp_npctype_data->npc_id) != zone->npctable.end()) {