超级玩家
 
- 贡献度
- 116
- 金元
- 3218
- 积分
- 786
- 精华
- 0
- 注册时间
- 2016-5-31
|
因为拍卖时间那个是原本有的,你仔细看看结构就知道了,一个是只有get函数,一个有get有set,返回的也不一样
灵果的那个你改的话会报没有生成这个函数之类的.所以我一般直接patch构造函数,像这样:
[HarmonyPatch(typeof(ConfSchoolStoreItem), MethodType.Constructor, new Type[] { typeof(int), typeof(int),
typeof(string), typeof(int), typeof(string), typeof(int), typeof(int), typeof(int) })]
class StoreItemPatch
{
public static void Prefix(ref int countMin, ref int countMax)
{
MelonLogger.Msg("StoreItemPre"); //可以打印下看看有没有成功
countMin *= 5;
countMax*= 5;
}
}
我没测试,你自己多研究一下
|
|