Change for 'general' slot range light source behavior

This commit is contained in:
Uleat
2015-02-26 21:05:06 -05:00
parent 1f0b86a0d5
commit e15ee6e320
6 changed files with 37 additions and 17 deletions
+6 -2
View File
@@ -1010,6 +1010,7 @@ uint8 Inventory::FindBrightestLightType()
brightest_light_type = item->Light;
}
uint8 general_light_type = 0;
for (auto iter = m_inv.begin(); iter != m_inv.end(); ++iter) {
if (iter->first < EmuConstants::GENERAL_BEGIN || iter->first > EmuConstants::GENERAL_END) { continue; }
@@ -1028,10 +1029,13 @@ uint8 Inventory::FindBrightestLightType()
break;
}
if (LightProfile_Struct::IsLevelGreater(item->Light, brightest_light_type))
brightest_light_type = item->Light;
if (LightProfile_Struct::TypeToLevel(item->Light))
general_light_type = item->Light;
}
if (LightProfile_Struct::IsLevelGreater(general_light_type, brightest_light_type))
brightest_light_type = general_light_type;
return brightest_light_type;
}
+2
View File
@@ -486,6 +486,8 @@ struct LightProfile_Struct
- Client calls '__debugbreak' for type values > 127
- 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
- "Fire Beetle Eyes" are still causing issues in general slots (no item movement sound effect)
- Wearable equipment types still register as valid light sources when in general slots (needs exemption criteria)
*/
static uint8 TypeToLevel(uint8 lightType);