forked from beerpsi/Rizu
29 lines
694 B
C#
29 lines
694 B
C#
// ReSharper disable CheckNamespace
|
|
// ReSharper disable InconsistentNaming
|
|
|
|
using MAI2.Util;
|
|
using Rizu.Core;
|
|
using Rizu.MonoMod;
|
|
|
|
namespace Manager.UserDatas;
|
|
|
|
public class patch_UserDetail : UserDetail
|
|
{
|
|
private extern void orig_set_CourseRank(uint value);
|
|
|
|
public void set_CourseRank(uint value)
|
|
{
|
|
var prevValue = CourseRank;
|
|
|
|
orig_set_CourseRank(value);
|
|
|
|
// Don't send an import if it's the same rank
|
|
if (value == prevValue || value == 0)
|
|
{
|
|
return;
|
|
}
|
|
|
|
SingletonMonoBehaviour<RizuMonoBehaviour>.instance.StartCoroutine(Exporter.Instance.ExportDan(this));
|
|
}
|
|
}
|