-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from planetarium/refactor-minor
feat: introduce "{network}/avatars/{address}"
- Loading branch information
Showing
5 changed files
with
92 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,29 @@ | ||
using Nekoyume.Model.State; | ||
|
||
namespace Mimir.Models.Agent; | ||
|
||
public class Avatar(string avatarAddress, string avatarName, int level, int actionPoint, long dailyRewardReceivedIndex) | ||
public class Avatar( | ||
string agentAddress, | ||
string avatarAddress, | ||
string avatarName, | ||
int level, | ||
int actionPoint, | ||
long dailyRewardReceivedIndex) | ||
{ | ||
public string AgentAddress { get; set; } = agentAddress; | ||
public string AvatarAddress { get; set; } = avatarAddress; | ||
public string AvatarName { get; set; } = avatarName; | ||
public int Level { get; set; } = level; | ||
public int ActionPoint { get; private set; } = actionPoint; | ||
public long DailyRewardReceivedIndex { get; private set; } = dailyRewardReceivedIndex; | ||
|
||
public Avatar(AvatarState avatarState) : this( | ||
avatarState.agentAddress.ToString(), | ||
avatarState.address.ToString(), | ||
avatarState.name, | ||
avatarState.level, | ||
avatarState.actionPoint, | ||
avatarState.dailyRewardReceivedIndex) | ||
{ | ||
} | ||
} |
This file contains 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
This file contains 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