コード例 #1
0
ファイル: Packets.cs プロジェクト: umby24/ClassicBot
        public void Handle(NetworkManager nm, Bot core)
        {
            if (!core.EnableCpe)
                core.RaiseErrorMessage("Protocol error: Received Holdthis while CPE Disabled.");

            if (!core.ClientSupportedExtensions.Contains(CPEExtensions.HeldBlock))
                core.RaiseErrorMessage("Protocol error: Received HoldThis, which client does not support.");

            core.HeldBlock = BlockToHold;
            core.CanChangeBlock = (PreventChange > 0);
            core.RaiseHeldBlockChange(BlockToHold, PreventChange);
        }