コード例 #1
0
ファイル: TShock.cs プロジェクト: Aidyndavis/TShock
        private void OnHardUpdate( HardUpdateEventArgs args )
        {
            if (args.Handled)
                return;

            if (!Config.AllowCorruptionCreep && ( args.Type == 23 || args.Type == 25 || args.Type == 0 ||
                args.Type == 112 || args.Type == 23 || args.Type == 32 ) )
            {
                args.Handled = true;
                return;
            }

            if (!Config.AllowHallowCreep && (args.Type == 109 || args.Type == 117 || args.Type == 116 ) )
            {
                args.Handled = true;
            }
        }
コード例 #2
0
ファイル: GameHooks.cs プロジェクト: k0rd/TerrariaAPI-Server
 public static bool OnHardUpdate(int x, int y, int type)
 {
     if (HardUpdate == null)
     {
         return false;
     }
     HardUpdateEventArgs args = new HardUpdateEventArgs
     {
         X = x,
         Y = y,
         Type = type
     };
     GameHooks.HardUpdate(args);
     return args.Handled;
 }