Пример #1
0
        // 隐藏低品级商品
        // *** 在这个地方改,会导致交易之后隐藏的商品真的消失 ***
        // 应该在 ShopSystem::SetItems 方法的 actor == false 的流程中的 MakeItem 方法调用时过滤,但是太麻烦了,暂时不想改
        private static void Postfix(ref ShopSystem __instance)
        {
            if (!Main.enabled)
            {
                return;
            }

            if (Main.settings.hideLowQuality)
            {
                __instance.shopItems = Merchandise.FilterLowQualityItems(__instance.shopItems);
            }
        }
Пример #2
0
        // 更改商店商品生成逻辑,使物品数量增加
        private static bool Prefix(ref ShopSystem __instance, int shopTyp, int moneyCost, int levelAdd, int isTaiWu, int shopActorId,
                                   ref int ___actorShopId, ref int ___shopSystemTyp, ref int ___showLevelAdd,
                                   ref int ___newShopLevel, ref int ___shopSellCost, ref int ___shopSystemCost)
        {
            if (!Main.enabled)
            {
                return(true);
            }

            Merchandise.SetShopItems(ref __instance, shopTyp, moneyCost, levelAdd, isTaiWu, shopActorId,
                                     ref ___actorShopId, ref ___shopSystemTyp, ref ___showLevelAdd,
                                     ref ___newShopLevel, ref ___shopSellCost, ref ___shopSystemCost);

            return(false);
        }