This commit is contained in:
Shauren
2016-07-10 11:30:39 +02:00
2 changed files with 3 additions and 2 deletions

View File

@@ -1955,7 +1955,7 @@ ItemModifiedAppearanceEntry const* Item::GetItemModifiedAppearance() const
uint32 Item::GetModifier(ItemModifier modifier) const
{
return GetDynamicValues(ITEM_DYNAMIC_FIELD_MODIFIERS)[modifier];
return GetDynamicValue(ITEM_DYNAMIC_FIELD_MODIFIERS, modifier);
}
void Item::SetModifier(ItemModifier modifier, uint32 value)

View File

@@ -1356,7 +1356,8 @@ std::vector<uint32> const& Object::GetDynamicValues(uint16 index) const
uint32 Object::GetDynamicValue(uint16 index, uint16 offset) const
{
ASSERT(index < _dynamicValuesCount || PrintIndexError(index, false));
ASSERT(offset < _dynamicValues[index].size());
if (offset >= _dynamicValues[index].size())
return 0;
return _dynamicValues[index][offset];
}