-
Notifications
You must be signed in to change notification settings - Fork 626
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
[Fix] Souleater effect modifier stacking #4557
Conversation
b2d9f56
to
a741921
Compare
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.
Seems fine apart from those two points
src/map/lua/lua_baseentity.cpp
Outdated
} | ||
} | ||
return maxModValue; | ||
return static_cast<CBattleEntity*>(m_PBaseEntity)->getMaxGearMod(static_cast<Mod>(modId)); |
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.
Inside the function that this calls, you're checking for whether or not this is a Char entity, so why not cast to a char here?
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.
Changed it to CCharEntity*
src/map/lua/lua_baseentity.cpp
Outdated
{ | ||
ShowWarning("CLuaBaseEntity::getMaxGearMod() - m_PBaseEntity is not a player."); | ||
ShowWarning("Invalid Entity (NPC: %s) calling function.", m_PBaseEntity->GetName()); |
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.
This could get called on a Pet or a Mob, not necessarily just an NPC
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.
Changed it to Non-PC, since it is meant for player characters only.
I affirm:
What does this pull request do?
As per this BG article https://www.bg-wiki.com/ffxi/Souleater
Equipment that enhances Souleater (Souleater +X) does not stack. An exception happens with augments.
This PR (attempts to):
getMaxGearMod()
which returns the highest value of a modifier found in gear, insstead of the total value.Steps to test these changes
Use Souleater with different pieces of gear that enhance Souleater and see if it only takes the higest value.