Fix for special_abilities crash dealing with std::string in struct that was then memcpyed

This commit is contained in:
KimLS
2013-07-18 00:24:43 -07:00
parent 2331678312
commit 1f2145a45d
8 changed files with 17 additions and 27 deletions
+2 -2
View File
@@ -1130,7 +1130,7 @@ const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
tmpNPCType->min_dmg = atoi(row[r++]);
tmpNPCType->max_dmg = atoi(row[r++]);
tmpNPCType->attack_count = atoi(row[r++]);
tmpNPCType->special_abilities = row[r++];
strn0cpy(tmpNPCType->special_abilities, row[r++], 512);
tmpNPCType->npc_spells_id = atoi(row[r++]);
tmpNPCType->d_meele_texture1 = atoi(row[r++]);
tmpNPCType->d_meele_texture2 = atoi(row[r++]);
@@ -1440,7 +1440,7 @@ const NPCType* ZoneDatabase::GetMercType(uint32 id, uint16 raceid, uint32 client
tmpNPCType->min_dmg = atoi(row[r++]);
tmpNPCType->max_dmg = atoi(row[r++]);
tmpNPCType->attack_count = atoi(row[r++]);
tmpNPCType->special_abilities = row[r++];
strn0cpy(tmpNPCType->special_abilities, row[r++], 512);
//tmpNPCType->npc_spells_id = atoi(row[r++]);
tmpNPCType->d_meele_texture1 = atoi(row[r++]);
tmpNPCType->d_meele_texture2 = atoi(row[r++]);