Fix attack_delay for real

This commit is contained in:
Michael Cook (mackal) 2014-09-12 13:10:03 -04:00
parent 873d343529
commit d51241720a

View File

@ -922,8 +922,8 @@ const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
"npc_types.texture, npc_types.helmtexture, npc_types.size, "
"npc_types.loottable_id, npc_types.merchant_id, npc_types.alt_currency_id, "
"npc_types.adventure_template_id, npc_types.trap_template, npc_types.attack_speed, "
"npc_types.attack_delay, npc_types.STR, npc_types.STA, npc_types.DEX, npc_types.AGI, "
"npc_types._INT, npc_types.WIS, npc_types.CHA, npc_types.MR, npc_types.CR, npc_types.DR, "
"npc_types.STR, npc_types.STA, npc_types.DEX, npc_types.AGI, npc_types._INT, "
"npc_types.WIS, npc_types.CHA, npc_types.MR, npc_types.CR, npc_types.DR, "
"npc_types.FR, npc_types.PR, npc_types.Corrup, npc_types.PhR,"
"npc_types.mindmg, npc_types.maxdmg, npc_types.attack_count, npc_types.special_abilities,"
"npc_types.npc_spells_id, npc_types.npc_spells_effects_id, npc_types.d_meele_texture1,"
@ -942,7 +942,7 @@ const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
"npc_types.Avoidance, npc_types.slow_mitigation, npc_types.maxlevel, npc_types.scalerate, "
"npc_types.private_corpse, npc_types.unique_spawn_by_name, npc_types.underwater, "
"npc_types.emoteid, npc_types.spellscale, npc_types.healscale, npc_types.no_target_hotkey,"
"npc_types.raid_target FROM npc_types WHERE id = %d", id);
"npc_types.raid_target, npc_types.attack_delay FROM npc_types WHERE id = %d", id);
auto results = QueryDatabase(query);
if (!results.Success()) {
@ -976,7 +976,6 @@ const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
tmpNPCType->adventure_template = atoi(row[14]);
tmpNPCType->trap_template = atoi(row[15]);
tmpNPCType->attack_speed = atof(row[16]);
tmpNPCType->attack_delay = atoi(row[17]);
tmpNPCType->STR = atoi(row[17]);
tmpNPCType->STA = atoi(row[18]);
tmpNPCType->DEX = atoi(row[19]);
@ -1100,6 +1099,7 @@ const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
tmpNPCType->healscale = atoi(row[86]);
tmpNPCType->no_target_hotkey = atoi(row[87]) == 1 ? true: false;
tmpNPCType->raid_target = atoi(row[88]) == 0 ? false: true;
tmpNPCType->attack_delay = atoi(row[89]);
// If NPC with duplicate NPC id already in table,
// free item we attempted to add.