Skip to content
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

Implement CombatPoints, Crystal and CrystalPerPrice Calculation in ProductStateHandler #542

Open
Spoomer opened this issue Dec 1, 2024 · 2 comments · May be fixed by #564
Open

Implement CombatPoints, Crystal and CrystalPerPrice Calculation in ProductStateHandler #542

Spoomer opened this issue Dec 1, 2024 · 2 comments · May be fixed by #564
Assignees
Labels
enhancement New feature or request mimir.worker

Comments

@Spoomer
Copy link
Contributor

Spoomer commented Dec 1, 2024

Until now Mimir.Worker does not track CombatPoints and Crystal, CrystalPerPrice. This should be implemented.

Goals:

  • implement CombatPoints, Crystal and CrystalPerPrice Calculation in ProductStateHandler
  • provide Script to calculate and update the values for products in the database

Investigation information's so far:

  • Code for calculation in ProductStateHandler is commented out
  • CombatPoints calculation looks functional
  • Crystal and CrystalPerPrice calculation needs a mapping from Lib9c.Models.Items.Equipment to Nekoyume.Model.Item.Equipment but regardless, it seems functional

Are there other problems?

@Spoomer
Copy link
Contributor Author

Spoomer commented Dec 1, 2024

I would like to implement this.

@Atralupus
Copy link
Member

You're correct.

The issue with the Crystal and CrystalPerPrice calculation lies in the mapping from Lib9c.Models.Items.Equipment to Nekoyume.Model.Item.Equipment. This was temporarily put on hold, but there are no other significant issues at the moment.

I did consider that using the .NET extension feature could simplify this process. For example:

public class A
{
    public int Property1 { get; set; }
    public string Property2 { get; set; }
}

public class B
{
    public int Property1 { get; set; }
    public string Property2 { get; set; }
}

public static class AExtensions
{
    public static B ToB(this A a)
    {
        return new B
        {
            Property1 = a.Property1,
            Property2 = a.Property2
        };
    }
}

Feel free to proceed! I'll assign the issue to you right away.

Thank you, as always, for contributing to Mimir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mimir.worker
Projects
Status: Assigned
2 participants