Esempio n. 1
0
 public static bool CheckBossAccess(string bossPlace, OfferingBowl __instance, Humanoid user)
 {
     foreach (var boss in bossList)
     {
         if (Real.Value)
         {
             var bossCalc = (realDay * boss.Days);
             if ((currentDay < bossCalc) && (bossPlace == boss.PlaceName))
             {
                 Debug.Log("Yes he is entering in exeption");
                 user.Message(MessageHud.MessageType.Center, $"O {boss.NameTranslate} só pode ser invocado em {currentDay} / {bossCalc} dias!");
                 return(true);
             }
         }
         else
         {
             if ((currentDay < boss.Days) && (bossPlace == boss.PlaceName))
             {
                 Debug.Log("Yes he is entering in exeption");
                 user.Message(MessageHud.MessageType.Center, $"O {boss.NameTranslate} só pode ser invocado em {currentDay} / {boss.Days} dias!");
                 return(true);
             }
         }
     }
     return(false);
 }
Esempio n. 2
0
            static bool Prefix(OfferingBowl __instance, Humanoid user, ItemDrop.ItemData item)
            {
                foreach (var boss in bossList)
                {
                    if (__instance.m_name == boss.PlaceName && boss.ItemAmount > 0)
                    {
                        __instance.m_bossItems = boss.ItemAmount;
                    }
                }

                currentDay = EnvMan.instance.GetDay(ZNet.instance.GetTimeSeconds());
                Debug.Log("UseItem debugging...");
                Debug.Log($"{currentDay}<{realDay} && {__instance.m_name}=={bosses[0]}?");
                return(!CheckBossAccess(__instance.m_name, __instance, user));
            }
Esempio n. 3
0
            static bool Prefix(OfferingBowl __instance, Humanoid user)
            {
                foreach (var boss in bossList)
                {
                    if (__instance.m_name == boss.PlaceName && boss.ItemAmount > 0)
                    {
                        __instance.m_bossItems = boss.ItemAmount;
                    }
                }

                currentDay = EnvMan.instance.GetDay(ZNet.instance.GetTimeSeconds());
                Debug.Log("Interact debugging...");
                Debug.Log($"Current day is: { currentDay }");
                Debug.Log($"Current boss is: { Localization.instance.Localize(__instance.m_name) }");
                Debug.Log($"Current boss altar name: { __instance.m_name }");
                return(CheckBossAccess(__instance.m_name, __instance, user));
            }
 private void Start()
 {
     audioSource  = GetComponent <AudioSource>();
     offeringBowl = GetComponentInChildren <OfferingBowl>();
     offeringRock = GetComponentInChildren <OfferingRock>();
 }