mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-03 19:52:26 +00:00
Final tweak for light sources
This commit is contained in:
parent
2b8bdb9158
commit
8dfa0a7220
@ -1019,15 +1019,8 @@ uint8 Inventory::FindBrightestLightType()
|
|||||||
auto item = inst->GetItem();
|
auto item = inst->GetItem();
|
||||||
if (item == nullptr) { continue; }
|
if (item == nullptr) { continue; }
|
||||||
|
|
||||||
switch (item->Light) {
|
if (item->ItemClass != ItemClassCommon) { continue; }
|
||||||
case lightTypeCandle:
|
if (item->Light < 9 || item->Light > 13) { continue; }
|
||||||
case lightTypeTorch:
|
|
||||||
case lightTypeSmallLantern:
|
|
||||||
case lightTypeLargeLantern:
|
|
||||||
continue;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (LightProfile_Struct::TypeToLevel(item->Light))
|
if (LightProfile_Struct::TypeToLevel(item->Light))
|
||||||
general_light_type = item->Light;
|
general_light_type = item->Light;
|
||||||
|
|||||||
@ -477,17 +477,18 @@ struct LightProfile_Struct
|
|||||||
/*
|
/*
|
||||||
Current criteria (light types):
|
Current criteria (light types):
|
||||||
Equipment: { 0 .. 15 }
|
Equipment: { 0 .. 15 }
|
||||||
General: { 0 .. 15 } =/= { 1, 2, 4, 6 }
|
General: { 9 .. 13 }
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
|
- Initial character load and item movement updates use different light source update behaviors
|
||||||
|
-- Server procedure matches the item movement behavior since most updates occur post-character load
|
||||||
- MainAmmo is not considered when determining light sources
|
- MainAmmo is not considered when determining light sources
|
||||||
- No 'Sub' or 'Aug' items are recognized as light sources
|
- No 'Sub' or 'Aug' items are recognized as light sources
|
||||||
- Extinguishable light types { Candle, Torch, SmallLantern, LargeLantern } are not considered for general (carried) light sources
|
- Light types '< 9' and '> 13' are not considered for general (carried) light sources
|
||||||
- Client calls '__debugbreak' for type values > 127
|
|
||||||
- If values > 0x0F are valid, then assignment limiters will need to be removed
|
- If values > 0x0F are valid, then assignment limiters will need to be removed
|
||||||
- MainCursor 'appears' to be a valid light source update slot..but, have not experienced updates during debug sessions
|
- MainCursor 'appears' to be a valid light source update slot..but, have not experienced updates during debug sessions
|
||||||
- "Fire Beetle Eyes" are still causing issues in general slots (no item movement sound effect)
|
- All clients have a bug regarding stackable items (light and sound updates are not processed when picking up an item)
|
||||||
- Wearable equipment types still register as valid light sources when in general slots (needs exemption criteria)
|
-- The timer-based update cancels out the invalid light source
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static uint8 TypeToLevel(uint8 lightType);
|
static uint8 TypeToLevel(uint8 lightType);
|
||||||
|
|||||||
@ -1441,15 +1441,8 @@ void Corpse::UpdateEquipmentLight()
|
|||||||
auto item = database.GetItem((*iter)->item_id);
|
auto item = database.GetItem((*iter)->item_id);
|
||||||
if (item == nullptr) { continue; }
|
if (item == nullptr) { continue; }
|
||||||
|
|
||||||
switch (item->Light) {
|
if (item->ItemClass != ItemClassCommon) { continue; }
|
||||||
case lightTypeCandle:
|
if (item->Light < 9 || item->Light > 13) { continue; }
|
||||||
case lightTypeTorch:
|
|
||||||
case lightTypeSmallLantern:
|
|
||||||
case lightTypeLargeLantern:
|
|
||||||
continue;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_Light.TypeToLevel(item->Light))
|
if (m_Light.TypeToLevel(item->Light))
|
||||||
general_light_type = item->Light;
|
general_light_type = item->Light;
|
||||||
|
|||||||
@ -5054,15 +5054,8 @@ void Merc::UpdateEquipmentLight()
|
|||||||
auto item = database.GetItem((*iter)->item_id);
|
auto item = database.GetItem((*iter)->item_id);
|
||||||
if (item == nullptr) { continue; }
|
if (item == nullptr) { continue; }
|
||||||
|
|
||||||
switch (item->Light) {
|
if (item->ItemClass != ItemClassCommon) { continue; }
|
||||||
case lightTypeCandle:
|
if (item->Light < 9 || item->Light > 13) { continue; }
|
||||||
case lightTypeTorch:
|
|
||||||
case lightTypeSmallLantern:
|
|
||||||
case lightTypeLargeLantern:
|
|
||||||
continue;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_Light.TypeToLevel(item->Light))
|
if (m_Light.TypeToLevel(item->Light))
|
||||||
general_light_type = item->Light;
|
general_light_type = item->Light;
|
||||||
|
|||||||
11
zone/npc.cpp
11
zone/npc.cpp
@ -737,15 +737,8 @@ void NPC::UpdateEquipmentLight()
|
|||||||
auto item = database.GetItem((*iter)->item_id);
|
auto item = database.GetItem((*iter)->item_id);
|
||||||
if (item == nullptr) { continue; }
|
if (item == nullptr) { continue; }
|
||||||
|
|
||||||
switch (item->Light) {
|
if (item->ItemClass != ItemClassCommon) { continue; }
|
||||||
case lightTypeCandle:
|
if (item->Light < 9 || item->Light > 13) { continue; }
|
||||||
case lightTypeTorch:
|
|
||||||
case lightTypeSmallLantern:
|
|
||||||
case lightTypeLargeLantern:
|
|
||||||
continue;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (m_Light.TypeToLevel(item->Light))
|
if (m_Light.TypeToLevel(item->Light))
|
||||||
general_light_type = item->Light;
|
general_light_type = item->Light;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user