Open
Conversation
Owner
Author
|
Please review, i got this idea to convert the AutoEquip and make a separated merc and player one. Do not merge |
dzik87
reviewed
Sep 8, 2020
|
|
||
| // no point in wanting items we cant equip | ||
| if (item.getStat(sdk.stats.Levelreq) > me.getStat(sdk.stats.Level) || item.dexreq > me.getStat(sdk.stats.Dexterity) || item.strreq > me.getStat(sdk.stats.Strength)) { | ||
| if (item.getStat(sdk.stats.Levelreq) > this.reference.getStat(sdk.stats.Level) || item.dexreq > this.reference.getStat(sdk.stats.Dexterity) || item.strreq > this.reference.getStat(sdk.stats.Strength)) { |
Collaborator
There was a problem hiding this comment.
Here we need to add extra check if item what we want replace doesn't give us bonus str/dex so we end up beign unable to equip new item.
When extra bonus stats from items are super handy i suggest to go with raw stats.
|
|
||
| // no quest items | ||
| if (['msf','vip'].includes(item.code)) return false; | ||
| if (['msf', 'vip'].includes(item.code)) return false; |
Collaborator
There was a problem hiding this comment.
Here we might also want to add Khalims Will
| } | ||
|
|
||
| if (hasDependency(item)) { |
Collaborator
There was a problem hiding this comment.
Maybe we can check do we have dependency item before excluding it ?
|
|
||
| // Not an item, or unidentified, or not enough stats | ||
| if (this.type !== 4 || !this.getFlag(0x10) || this.getStat(sdk.stats.Levelreq) > me.getStat(sdk.stats.Level) || this.dexreq > me.getStat(sdk.stats.Dexterity) || this.strreq > me.getStat(sdk.stats.Strength)) { | ||
| if (this.type !== 4 || !this.getFlag(0x10) || this.getStat(sdk.stats.Levelreq) > onWho.getStat(sdk.stats.Level) || this.dexreq > onWho.getStat(sdk.stats.Dexterity) || this.strreq > onWho.getStat(sdk.stats.Strength)) { |
Collaborator
There was a problem hiding this comment.
Same as above: check vs raw stats or take into consideration bonuses from item we want to replace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.