mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-26 09:32:34 +00:00
Allow npc_types field 'special_abilities' to be set as null in database.
Changed due to issues when trying to copy npcs or remove abilities from the field directly in the dataabase.
This commit is contained in:
parent
affb735c38
commit
bb91265b2b
@ -0,0 +1,6 @@
|
|||||||
|
ALTER TABLE `merc_stats`
|
||||||
|
MODIFY COLUMN `special_abilities` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL AFTER `attack_speed`;
|
||||||
|
|
||||||
|
ALTER TABLE `npc_types`
|
||||||
|
MODIFY COLUMN `special_abilities` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL AFTER `npcspecialattks`;
|
||||||
|
|
||||||
@ -1816,7 +1816,12 @@ const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
|
|||||||
tmpNPCType->min_dmg = atoi(row[31]);
|
tmpNPCType->min_dmg = atoi(row[31]);
|
||||||
tmpNPCType->max_dmg = atoi(row[32]);
|
tmpNPCType->max_dmg = atoi(row[32]);
|
||||||
tmpNPCType->attack_count = atoi(row[33]);
|
tmpNPCType->attack_count = atoi(row[33]);
|
||||||
strn0cpy(tmpNPCType->special_abilities, row[34], 512);
|
|
||||||
|
if (row[34] != nullptr)
|
||||||
|
strn0cpy(tmpNPCType->special_abilities, row[34], 512);
|
||||||
|
else
|
||||||
|
strn0cpy(tmpNPCType->special_abilities,"\0", 512);
|
||||||
|
|
||||||
tmpNPCType->npc_spells_id = atoi(row[35]);
|
tmpNPCType->npc_spells_id = atoi(row[35]);
|
||||||
tmpNPCType->npc_spells_effects_id = atoi(row[36]);
|
tmpNPCType->npc_spells_effects_id = atoi(row[36]);
|
||||||
tmpNPCType->d_meele_texture1 = atoi(row[37]);
|
tmpNPCType->d_meele_texture1 = atoi(row[37]);
|
||||||
@ -2018,7 +2023,11 @@ const NPCType* ZoneDatabase::GetMercType(uint32 id, uint16 raceid, uint32 client
|
|||||||
tmpNPCType->min_dmg = atoi(row[24]);
|
tmpNPCType->min_dmg = atoi(row[24]);
|
||||||
tmpNPCType->max_dmg = atoi(row[25]);
|
tmpNPCType->max_dmg = atoi(row[25]);
|
||||||
tmpNPCType->attack_count = atoi(row[26]);
|
tmpNPCType->attack_count = atoi(row[26]);
|
||||||
strn0cpy(tmpNPCType->special_abilities, row[27], 512);
|
|
||||||
|
if (row[27] != nullptr)
|
||||||
|
strn0cpy(tmpNPCType->special_abilities, row[27], 512);
|
||||||
|
else
|
||||||
|
strn0cpy(tmpNPCType->special_abilities,"\0", 512);
|
||||||
|
|
||||||
tmpNPCType->d_meele_texture1 = atoi(row[28]);
|
tmpNPCType->d_meele_texture1 = atoi(row[28]);
|
||||||
tmpNPCType->d_meele_texture2 = atoi(row[29]);
|
tmpNPCType->d_meele_texture2 = atoi(row[29]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user