-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Durability Bonus Prop #281
Added Durability Bonus Prop #281
Conversation
This is ready to go |
Like the artifact rarity (#280), this exposes the stuff to JS via Item, but it is added to the Base Object - this makes more sense to hang off cItem instead, as it doesn't have a conceptual value for a character |
source/cItem.cpp
Outdated
void CItem::SetDurabilityHpBonus(SI16 newValue) | ||
{ | ||
durabilityHpBonus = newValue; | ||
if (CanBeObjType(OT_ITEM)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given this only applies to Items (i.e. CanBeObjType(OT_ITEM) is always true), you can probably remove the IF directly and just call UpdateRegion().
You also shouldn't need to do a static cast, as you're already in CItem at this point.
So this whole if could be reduced to, hopefully, UpdateRegion();
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay will update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending testing, this looks OK to me
No description provided.