private void UpdateAnimaBehaviors()
        {
            bool isNew = false;

            if (EnlivenedBuff.CanBuff(this.player, this.AnimaPercent))
            {
                isNew = this.ApplyEnlivened();
            }
            else if (NecrotisNatusDeBuff.CanBuff(this.player, this.AnimaPercent))
            {
                isNew = this.ApplyNecrotisNatus();
            }
            else if (NecrotisOmnisDeBuff.CanBuff(this.player, this.AnimaPercent))
            {
                isNew = this.ApplyNecrotisOmnis();
            }

            if (isNew)
            {
                if (Main.netMode == NetmodeID.MultiplayerClient)
                {
                    PlayerAnimaSyncProtocol.Broadcast(this);
                }
            }
        }
示例#2
0
        internal static void ApplyWorldBehaviors(Player player)
        {
            if (Main.netMode == NetmodeID.MultiplayerClient)
            {
                return;
            }

            string timerName = "NecrotisOmnisDeBuff_" + player.whoAmI;

            if (Timers.GetTimerTickDuration(timerName) > 0)
            {
                return;
            }

            Timers.SetTimer(timerName, 5, false, () => {
                var myplayer = player.GetModPlayer <NecrotisPlayer>();

                if (!player.dead && NecrotisOmnisDeBuff.CanBuff(player, myplayer.AnimaPercent))
                {
                    CursedBramblesAPI.SetPlayerToCreateBrambleWake(player, true, 64, 10);
                }
                else
                {
                    CursedBramblesAPI.UnsetPlayerBrambleWakeCreating(player);
                }
                return(false);
            });
        }