Activated light field load from npctypes table

This commit is contained in:
Uleat 2015-01-21 20:01:59 -05:00
parent a71690b725
commit b186b0538a
3 changed files with 18 additions and 7 deletions

View File

@ -1,5 +1,10 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 01/21/2015 ==
Uleat: Added `light` field to npctypes load query (all six clients tested positive for functionality.)
Note: This only affects 'innate' light. Equipment (other) light is still in-work.
Optional SQL: utils/sql/git/optional/2015_01_21_NPC_Types_Light_Field_Primer.sql
== 01/20/2015 ==
Uleat: Fix for Inventory::_HasItemByUse(bucket) using the parent container when searching for bag container items.

View File

@ -0,0 +1,5 @@
-- 'greater lightstone' light level on 'wisp' race
UPDATE `npc_types` SET `light` = 11 WHERE `race` = 69;
-- 'fire beetle eye' light level on 'beetle' race with name criteria
UPDATE `npc_types` SET `light` = 12 WHERE `race` = 22 AND (`name` LIKE '%fire%' OR `name` LIKE '%lava%');

View File

@ -1770,7 +1770,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, npc_types.attack_delay FROM npc_types WHERE id = %d", id);
"npc_types.raid_target, npc_types.attack_delay, npc_types.light FROM npc_types WHERE id = %d", id);
auto results = QueryDatabase(query);
if (!results.Success()) {
@ -1938,6 +1938,7 @@ const NPCType* ZoneDatabase::GetNPCType (uint32 id) {
tmpNPCType->no_target_hotkey = atoi(row[88]) == 1 ? true: false;
tmpNPCType->raid_target = atoi(row[89]) == 0 ? false: true;
tmpNPCType->attack_delay = atoi(row[90]);
tmpNPCType->light = atoi(row[91]);
// If NPC with duplicate NPC id already in table,
// free item we attempted to add.