diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..74b79ad --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +#排除所有的编译目录 +**/Win32/ + +#排除历史和恢复目录 +__history/ +__recovery/ + +#排除本地设置 +*.~dsk +*.cbpr +*.local +*.rc \ No newline at end of file diff --git a/ActCodeFormUnit.cpp b/ActCodeFormUnit.cpp index 831136e..0a09ed5 100644 --- a/ActCodeFormUnit.cpp +++ b/ActCodeFormUnit.cpp @@ -32,6 +32,8 @@ void __fastcall TActCodeForm::FormCreate(TObject *Sender) m_lbTips->Caption = Format(String("Ч%.4d-%.2d-%.2d %.2d:%.2d"), ARRAYOFCONST((dt->tm_year+1900, dt->tm_mon+1, dt->tm_mday, dt->tm_hour, dt->tm_min))); } + + m_btnReset->Enabled = true; } else m_lbTips->Caption = "Ȩ벢֤"; @@ -39,8 +41,8 @@ void __fastcall TActCodeForm::FormCreate(TObject *Sender) //--------------------------------------------------------------------------- void __fastcall TActCodeForm::OnCodeChange(TObject *Sender) { - m_btnOk->Caption = "֤"; - m_btnOk->Enabled = m_leActCode->Text.Length()>0; + m_btnOk->Caption = m_leActCode->Text.Length()>0 ? "֤" : "ر"; + m_btnReset->Enabled = m_leActCode->Text.Length()>0; if(m_tExpire>0){ m_tExpire = 0; @@ -55,7 +57,9 @@ void __fastcall TActCodeForm::OnCodeKeyPress(TObject *Sender, System::WideChar & else if(Key<0x1E) return; - if((Key>'9' || Key<'0') && (Key<'A' || Key>'F')) + if(Key>='a' && Key<='f') + Key -= 32; + else if((Key>'9' || Key<'0') && (Key<'A' || Key>'F')) Key = 0; } //--------------------------------------------------------------------------- @@ -112,4 +116,12 @@ void __fastcall TActCodeForm::UMUserConfirm(TMessage &msg) } } //--------------------------------------------------------------------------- +void __fastcall TActCodeForm::OnResetClick(TObject *Sender) +{ + m_leActCode->Text = ""; + m_lbTips->Caption = "Ȩ벢֤"; + PostMessage(Application->MainFormHandle, UM_USERCONFIRM, UR_RESET, 0 ); + m_btnOk->Caption = "ر"; +} +//--------------------------------------------------------------------------- diff --git a/ActCodeFormUnit.dfm b/ActCodeFormUnit.dfm index 67bbc26..c26f550 100644 --- a/ActCodeFormUnit.dfm +++ b/ActCodeFormUnit.dfm @@ -31,9 +31,9 @@ object ActCodeForm: TActCodeForm ParentFont = False end object m_leActCode: TLabeledEdit - Left = 96 + Left = 75 Top = 27 - Width = 153 + Width = 129 Height = 23 AutoSize = False EditLabel.Width = 45 @@ -49,12 +49,22 @@ object ActCodeForm: TActCodeForm OnKeyPress = OnCodeKeyPress end object m_btnOk: TButton - Left = 113 - Top = 91 + Left = 115 + Top = 88 Width = 75 Height = 25 - Caption = #39564#35777 + Caption = #20851#38381 TabOrder = 1 OnClick = OnOkClick end + object m_btnReset: TButton + Left = 212 + Top = 26 + Width = 63 + Height = 25 + Caption = #37325#32622 + Enabled = False + TabOrder = 2 + OnClick = OnResetClick + end end diff --git a/ActCodeFormUnit.h b/ActCodeFormUnit.h index d313bb3..a23345a 100644 --- a/ActCodeFormUnit.h +++ b/ActCodeFormUnit.h @@ -10,7 +10,8 @@ #include #include -#define UR_VERIFY 0x00 +#define UR_RESET 0x00 +#define UR_VERIFY 0x01 //--------------------------------------------------------------------------- class TActCodeForm : public TForm @@ -19,10 +20,12 @@ __published: // IDE-managed Components TLabeledEdit *m_leActCode; TButton *m_btnOk; TLabel *m_lbTips; + TButton *m_btnReset; void __fastcall FormCreate(TObject *Sender); void __fastcall OnCodeChange(TObject *Sender); void __fastcall OnCodeKeyPress(TObject *Sender, System::WideChar &Key); void __fastcall OnOkClick(TObject *Sender); + void __fastcall OnResetClick(TObject *Sender); private: // User declarations int m_tExpire; diff --git a/HookJS.cpp b/HookJS.cpp index 8fa25e9..5ef7d0a 100644 --- a/HookJS.cpp +++ b/HookJS.cpp @@ -425,7 +425,7 @@ String enterJS_PA = "const itemMap = VideoGameCore.RoomItemStore.storeVidMap;" "if(roadMap && itemMap){" "const rooms = VideoGameCore.RoomConfig.instance.getAllRoomInfoByFilter({gameType:'BAC'});" - "if(rooms.length>=45){" + "if(rooms.length>=15){" "iRet = 1;" "let info='1|';" "for(const r of rooms){" diff --git a/PNGButton.hpp b/PNGButton.hpp new file mode 100644 index 0000000..97da7f4 --- /dev/null +++ b/PNGButton.hpp @@ -0,0 +1,100 @@ +// CodeGear C++Builder +// Copyright (c) 1995, 2024 by Embarcadero Technologies, Inc. +// All rights reserved + +// (DO NOT EDIT: machine generated header) 'PNGButton.pas' rev: 36.00 (Windows) + +#ifndef PNGButtonHPP +#define PNGButtonHPP + +#pragma delphiheader begin +#pragma option push +#if defined(__BORLANDC__) && !defined(__clang__) +#pragma option -w- // All warnings off +#pragma option -Vx // Zero-length empty class member +#endif +#pragma pack(push,8) +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +//-- user supplied ----------------------------------------------------------- + +namespace Pngbutton +{ +//-- forward type declarations ----------------------------------------------- +class DELPHICLASS TPNGButton; +//-- type declarations ------------------------------------------------------- +class PASCALIMPLEMENTATION TPNGButton : public Vcl::Controls::TGraphicControl +{ + typedef Vcl::Controls::TGraphicControl inherited; + +private: + System::Classes::TNotifyEvent FOnMouseEnter; + System::Classes::TNotifyEvent FOnMouseLeave; + System::Uitypes::TModalResult FModalResult; + +protected: + int EtatBtn; + bool FDown; + int FStateCount; + Vcl::Imaging::Pngimage::TPngImage* FPngImg; + bool FVisible; + DYNAMIC void __fastcall MouseDown(System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y); + DYNAMIC void __fastcall MouseUp(System::Uitypes::TMouseButton Button, System::Classes::TShiftState Shift, int X, int Y); + MESSAGE void __fastcall MouseEnter(Winapi::Messages::TMessage &Msg); + MESSAGE void __fastcall MouseLeave(Winapi::Messages::TMessage &Msg); + virtual void __fastcall SetEnabled(bool Value); + +public: + __fastcall virtual TPNGButton(System::Classes::TComponent* AOwner); + __fastcall virtual ~TPNGButton(); + void __fastcall SetStateCount(int value); + void __fastcall SetPngImg(Vcl::Imaging::Pngimage::TPngImage* value); + void __fastcall SetDown(bool value); + virtual void __fastcall Paint(); + DYNAMIC void __fastcall Click(); + +__published: + __property Action; + __property Anchors = {default=3}; + __property bool Down = {read=FDown, write=SetDown, default=0}; + __property Enabled = {default=1}; + __property int ImgStates = {read=FStateCount, write=SetStateCount, default=4}; + __property System::Uitypes::TModalResult ModalResult = {read=FModalResult, write=FModalResult, default=0}; + __property ParentShowHint = {default=1}; + __property Vcl::Imaging::Pngimage::TPngImage* PngImg = {read=FPngImg, write=SetPngImg}; + __property PopupMenu; + __property ShowHint; + __property Visible = {default=1}; + __property OnClick; + __property OnContextPopup; + __property OnMouseDown; + __property OnMouseUp; + __property OnMouseMove; + __property System::Classes::TNotifyEvent OnMouseEnter = {read=FOnMouseEnter, write=FOnMouseEnter}; + __property System::Classes::TNotifyEvent OnMouseLeave = {read=FOnMouseLeave, write=FOnMouseLeave}; +}; + + +//-- var, const, procedure --------------------------------------------------- +extern DELPHI_PACKAGE void __fastcall Register(); +} /* namespace Pngbutton */ +#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_PNGBUTTON) +using namespace Pngbutton; +#endif +#pragma pack(pop) +#pragma option pop + +#pragma delphiheader end. +//-- end unit ---------------------------------------------------------------- +#endif // PNGButtonHPP diff --git a/RBmaster.cbproj b/RBmaster.cbproj index 81ae1be..1486918 100644 --- a/RBmaster.cbproj +++ b/RBmaster.cbproj @@ -80,7 +80,7 @@ _RBM_;$(Defines) true ..\Global\;..\CEF4Delphi\$(Platform)\hpps;$(IncludePath) - CompanyName=;FileDescription=;FileVersion=4.0.5.0;InternalName=RBmaster;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=红蓝大师;ProductVersion=3.0;Comments= + CompanyName=;FileDescription=;FileVersion=4.0.7.0;InternalName=RBmaster;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=红蓝大师;ProductVersion=3.0;Comments= 1033 System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) rtl.lib;vcl.lib;fmx.lib;vclimg.lib;xmlrtl.lib;vclactnband.lib;vclx.lib;CEF4DelphiVCLRTL.lib;vclwinx.lib;bindengine.lib;TPNGButton.lib @@ -102,7 +102,7 @@ $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png 4 true - 5 + 7 ..\Deploy\$(Platform)\$(Config)\ @@ -166,7 +166,7 @@ $(BDSLIB)\$(PLATFORM)\debug\$(LANGDIR);$(ILINK_TranslatedLibraryPath) - CompanyName=;FileVersion=4.0.5.0;InternalName=RBmaster;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=红蓝大师;ProductVersion=3.0;Comments=;ProgramID=;FileDescription= + CompanyName=;FileVersion=4.0.7.0;InternalName=RBmaster;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=红蓝大师;ProductVersion=3.0;Comments=;ProgramID=;FileDescription= rtl.lib;vcl.lib;fmx.lib;vclimg.lib;xmlrtl.lib;vclactnband.lib;vclx.lib;CEF4DelphiVCLRTL.lib;vclwinx.lib;bindengine.lib;TPNGButton.lib requireAdministrator Debug @@ -189,7 +189,7 @@ None - CompanyName=;FileVersion=4.0.5.0;InternalName=RBmaster;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=红蓝大师;ProductVersion=3.0;Comments=;ProgramID=;FileDescription= + CompanyName=;FileVersion=4.0.7.0;InternalName=RBmaster;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=红蓝大师;ProductVersion=3.0;Comments=;ProgramID=;FileDescription= rtl.lib;vcl.lib;fmx.lib;vclimg.lib;xmlrtl.lib;vclactnband.lib;vclx.lib;CEF4DelphiVCLRTL.lib;vclwinx.lib;bindengine.lib;TPNGButton.lib requireAdministrator ..\Deploy\$(Platform)\$(Config)\ diff --git a/RBmasterMain.cpp b/RBmasterMain.cpp index ebc9770..e1605bd 100644 --- a/RBmasterMain.cpp +++ b/RBmasterMain.cpp @@ -2265,6 +2265,11 @@ void __fastcall TMainForm::UMUserConfirm(TMessage &msg) ClearURThread(); int op = msg.WParam; + if(op==UR_RESET){ + m_sActCode = ""; + return; + } + bool bVerify = op