Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Commit

Permalink
bugfix - avatar import
Browse files Browse the repository at this point in the history
  • Loading branch information
rpaciorek committed Aug 24, 2023
1 parent 7318527 commit 34062a1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dragonrescue-import.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>

<SourceControlInformationFeatureSupported>true</SourceControlInformationFeatureSupported>
<Version>0.2.0</Version>
<Version>0.2.1</Version>
<InformationalVersion>$(SourceRevisionId)</InformationalVersion>

<OutputPath>$(MSBuildThisFileDirectory)bin</OutputPath>
Expand Down
7 changes: 5 additions & 2 deletions src/Importers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,11 @@ public static async System.Threading.Tasks.Task ImportAvatar(LoginApi.Data login
Console.WriteLine("Importing viking XP ...");
foreach (var xpEntry in avatar.Achievements) {
if (xpEntry.PointTypeID != null && xpEntry.AchievementPointTotal != null) {
var res2 = VikingApi.SetPlayerXP(client, apiToken, (int)(xpEntry.PointTypeID), (int)(xpEntry.AchievementPointTotal));
Console.WriteLine(string.Format(" set xp type={0} to {1} res={3}", xpEntry.PointTypeID, xpEntry.AchievementPointTotal, res2));
string res2 = "err";
try {
res2 = await VikingApi.SetPlayerXP(client, apiToken, (int)(xpEntry.PointTypeID), (int)(xpEntry.AchievementPointTotal));
} catch {}
Console.WriteLine(string.Format(" set xp type={0} to {1} res={2}", xpEntry.PointTypeID, xpEntry.AchievementPointTotal, res2));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Schema/AvatarDisplayData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace dragonrescue.Schema;

// Token: 0x02000472 RID: 1138
[XmlRoot(ElementName = "AvatarDisplayData", Namespace = "", IsNullable = false)]
[XmlRoot(ElementName = "Avatar", Namespace = "", IsNullable = false)]
[Serializable]
public class AvatarDisplayData
{
Expand Down

0 comments on commit 34062a1

Please sign in to comment.