Sign in to follow this  
Ostentatio

Rarity transfer does not function on complex item creation [Fixed]

Recommended Posts

Situation: Starting a complex item (i.e. any item requiring "continue" actions to complete) with rare/supreme/fantastic items.

 

Expected behavior: Similar behavior to continuing with rare parts. In that case, chance to transfer rarity from a part used is 1 in (total number of parts needed by item).

 

Actual behavior: Rarity does not transfer from either starting item, ever.

 

Steps to reproduce: Create tons of unfinished items. They should never start rare from rare parts, only from a rare window Moment of Inspiration.

 

 

Cause of bug: The code sets a local rarity variable on unfinished item creation based on the rarity of the action (MoI), the rarity of the parts, and random chance. However, this value is never used.

In AdvancedCreationEntry.run():

byte rarity = 0;
if (act.getRarity() > rarity && Server.rand.nextInt(this.getTotalNumberOfItems()) == 0) {
    rarity = act.getRarity();
}
if (realSource.rarity > rarity && Server.rand.nextInt(this.getTotalNumberOfItems()) == 0) {
    rarity = realSource.rarity;
}
if (realTarget.rarity > rarity && Server.rand.nextInt(this.getTotalNumberOfItems()) == 0) {
    rarity = realTarget.rarity;
}

However, this value is never used; the code instead uses act.getRarity() (MoI rarity) when creating the actual item.

 

I assume this is a bug, since it is inconsistent with how continuing unfinished items works, the code seems to imply it should work, and I can't see any reason why this would be intended. This just seems like a simple oversight that the item creation calls use "act.getRarity()" instead of the rarity value set previously in the function.

 

Solution: In the ItemFactory.createItem() calls in AdvancedCreationEntry.run(), replace "act.getRarity()" with "rarity" as set by the function properly.

  • Like 2

Share this post


Link to post
Share on other sites

so currently, using a rare item at creation is the best way to insure you just completely wasted that rare component?

Share this post


Link to post
Share on other sites
13 minutes ago, Wurmhole said:

so currently, using a rare item at creation is the best way to insure you just completely wasted that rare component?

 

Could always throw it in a trash bin, but yes.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this