⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 humdb.pas

📁 传奇源代码的delphi版本
💻 PAS
📖 第 1 页 / 共 4 页
字号:
  sSQL4 = 'SELECT * FROM TBL_CHARACTER_MAGIC WHERE FLD_CHARNAME=''%s''';
  sSQL5 = 'SELECT * FROM TBL_CHARACTER_ITEM WHERE FLD_CHARNAME=''%s''';
  sSQL6 = 'SELECT * FROM TBL_CHARACTER_STORAGE WHERE FLD_CHARNAME=''%s''';
begin
  Result := True;
  sChrName := m_QuickList[nIndex];

  try
    dbQry.SQL.Clear;
    dbQry.SQL.Add(format(sSQL, [sChrName]));
    try
      dbQry.Open;
    except
      Result := False;
      OutMainMessage('[Exception] TFileDB.GetRecord (1)');
      Exit;
    end;

    if dbQry.RecordCount > 0 then begin
      HumanRCD.Header.sAccount      := Trim(dbQry.FieldByName('FLD_LOGINID').AsString);
      HumanRCD.Header.sChrName      := Trim(dbQry.FieldByName('FLD_CHARNAME').AsString);
      HumanRCD.Header.boDeleted     := dbQry.FieldByName('FLD_DELETED').AsBoolean;
      HumanRCD.Header.UpdateDate    := dbQry.FieldByName('FLD_LASTUPDATE').AsDateTime;
      HumanRCD.Header.CreateDate    := dbQry.FieldByName('FLD_CREATEDATE').AsDateTime;

      HumanRCD.Data.sChrName        := Trim(dbQry.FieldByName('FLD_CHARNAME').AsString);
      HumanRCD.Data.sCurMap         := Trim(dbQry.FieldByName('FLD_MAPNAME').AsString);
      HumanRCD.Data.wCurX           := dbQry.FieldByName('FLD_CX').AsInteger;
      HumanRCD.Data.wCurY           := dbQry.FieldByName('FLD_CY').AsInteger;
      HumanRCD.Data.btDir           := dbQry.FieldByName('FLD_DIR').AsInteger;
      HumanRCD.Data.btHair          := dbQry.FieldByName('FLD_HAIR').AsInteger;
      HumanRCD.Data.btSex           := dbQry.FieldByName('FLD_SEX').AsInteger;
      HumanRCD.Data.btJob           := dbQry.FieldByName('FLD_JOB').AsInteger;
      HumanRCD.Data.nGold           := dbQry.FieldByName('FLD_GOLD').AsInteger;

      HumanRCD.Data.Abil.Level      := dbQry.FieldByName('FLD_LEVEL').AsInteger;
      HumanRCD.Data.Abil.HP         := dbQry.FieldByName('FLD_HP').AsInteger;
      HumanRCD.Data.Abil.MP         := dbQry.FieldByName('FLD_MP').AsInteger;
      HumanRCD.Data.Abil.Exp        := dbQry.FieldByName('FLD_EXP').AsInteger;

      HumanRCD.Data.sHomeMap        := Trim(dbQry.FieldByName('FLD_HOMEMAP').AsString);
      HumanRCD.Data.wHomeX          := dbQry.FieldByName('FLD_HOMECX').AsInteger;
      HumanRCD.Data.wHomeY          := dbQry.FieldByName('FLD_HOMECY').AsInteger;

      HumanRCD.Data.nBonusPoint     := dbQry.FieldByName('FLD_BONUSPOINT').AsInteger;
      HumanRCD.Data.btCreditPoint   := dbQry.FieldByName('FLD_CREDITPOINT').AsInteger;

      HumanRCD.Data.btReLevel       := dbQry.FieldByName('FLD_REBIRTHLEVEL').AsInteger;
      HumanRCD.Data.sMasterName     := Trim(dbQry.FieldByName('FLD_MASTERCHARNAME').AsString);
      HumanRCD.Data.boMaster        := dbQry.FieldByName('FLD_MASTER').AsBoolean;
      HumanRCD.Data.sDearName       := Trim(dbQry.FieldByName('FLD_DEARCHARNAME').AsString);
      HumanRCD.Data.sStoragePwd     := Trim(dbQry.FieldByName('FLD_STORAGEPASSWD').AsString);
      HumanRCD.Data.nPayMentPoint   := dbQry.FieldByName('FLD_PAYPOINT').AsInteger;
      HumanRCD.Data.nPKPoint        := dbQry.FieldByName('FLD_PKPOINT').AsInteger;
      HumanRCD.Data.btAllowGroup    := Byte(dbQry.FieldByName('FLD_ALLOWPARTY').AsBoolean);
      HumanRCD.Data.btFreeGuiltyCount := dbQry.FieldByName('FLD_FREEGULITYCOUNT').AsInteger;
      HumanRCD.Data.btAttatckMode   := dbQry.FieldByName('FLD_ATTACKMODE').AsInteger;
      HumanRCD.Data.btIncHealth     := dbQry.FieldByName('FLD_INCHEALTH').AsInteger;
      HumanRCD.Data.btIncSpell      := dbQry.FieldByName('FLD_INCSPELL').AsInteger;
      HumanRCD.Data.btIncHealing    := dbQry.FieldByName('FLD_INCHEALING').AsInteger;
      HumanRCD.Data.btFightZoneDieCount := dbQry.FieldByName('FLD_FIGHTZONEDIE').AsInteger;
      HumanRCD.Data.btFirstLogin    := dbQry.FieldByName('FLD_TESTSERVERRESETCOUNT').AsInteger;

      HumanRCD.Data.sAccount        := Trim(dbQry.FieldByName('FLD_LOGINID').AsString);
      HumanRCD.Data.boLockLogon     := dbQry.FieldByName('FLD_LOCKLOGON').AsBoolean;
      HumanRCD.Data.wContribution   := dbQry.FieldByName('FLD_CONTRIBUTION').AsInteger;
      HumanRCD.Data.nHungerStatus   := dbQry.FieldByName('FLD_HUNGRYSTATE').AsInteger;
      HumanRCD.Data.boAllowGuildRecall := dbQry.FieldByName('FLD_ENABLEGRECALL').AsBoolean;
      HumanRCD.Data.wGroupRcallTime := dbQry.FieldByName('FLD_GROUPRECALLTIME').AsInteger;
      HumanRCD.Data.dBodyLuck       := dbQry.FieldByName('FLD_BODYLUCK').AsFloat;
      HumanRCD.Data.boAllowGroupRecall := dbQry.FieldByName('FLD_ENABLEGROUPRECALL').AsBoolean;
      HumanRCD.Data.btMarryCount    := dbQry.FieldByName('FLD_MARRYCOUNT').AsInteger;

      sTmp := dbQry.FieldByName('FLD_STATUS').AsString;

      i := 0;
      while True do begin
        if sTmp = '' then break;
        if i >= High(HumanRCD.Data.wStatusTimeArr) then break;
        sTmp := GetValidStr3(sTmp, str, ['/']);
        HumanRCD.Data.wStatusTimeArr[i] := StrToInt(str);
        Inc(i);
      end;
    end;

    dbQry.SQL.Clear;
    dbQry.SQL.Add(format(sSQL2, [sChrName]));
    try
      dbQry.Open;
    except
      Result := False;
      OutMainMessage('[Exception] TFileDB.GetRecord (2)');
      Exit;
    end;

    if dbQry.RecordCount > 0 then begin
      HumanRCD.Data.BonusAbil.AC    := dbQry.FieldByName('FLD_BONUSAC').AsInteger;
      HumanRCD.Data.BonusAbil.MAC   := dbQry.FieldByName('FLD_BONUSMAC').AsInteger;
      HumanRCD.Data.BonusAbil.DC    := dbQry.FieldByName('FLD_BONUSDC').AsInteger;
      HumanRCD.Data.BonusAbil.MC    := dbQry.FieldByName('FLD_BONUSMC').AsInteger;
      HumanRCD.Data.BonusAbil.SC    := dbQry.FieldByName('FLD_BONUSSC').AsInteger;
      HumanRCD.Data.BonusAbil.HP    := dbQry.FieldByName('FLD_BONUSHP').AsInteger;
      HumanRCD.Data.BonusAbil.MP    := dbQry.FieldByName('FLD_BONUSMP').AsInteger;
      HumanRCD.Data.BonusAbil.Hit   := dbQry.FieldByName('FLD_BONUSACCURACY').AsInteger;
      HumanRCD.Data.BonusAbil.Speed := dbQry.FieldByName('FLD_BONUSAGILITY').AsInteger;
    end;

   { dbQry.SQL.Clear;
    dbQry.SQL.Add(format(sSQL3, [sChrName]));
    try
      dbQry.Open;
    except
      Result := False;
      OutMainMessage('[Exception] TFileDB.GetRecord (3)');
      Exit;
    end;

    if dbQry.RecordCount > 0 then begin
      sTmp := dbQry.FieldByName('FLD_QUESTOPENINDEX').AsString;

      i := 0;
      while True do begin
        if sTmp = '' then break;
        if i >= High(HumanRCD.Data.QuestUnitOpen) then break;
        sTmp := GetValidStr3(sTmp, str, ['/']);
        HumanRCD.Data.QuestUnitOpen[i] := StrToInt(str);
        Inc(i);
      end;

      sTmp := dbQry.FieldByName('FLD_QUESTFININDEX').AsString;

      i := 0;
      while True do begin
        if sTmp = '' then break;
        if i >= High(HumanRCD.Data.QuestUnit) then break;
        sTmp := GetValidStr3(sTmp, str, ['/']);
        HumanRCD.Data.QuestUnit[i] := StrToInt(str);
        Inc(i);
      end;

      sTmp := dbQry.FieldByName('FLD_QUEST').AsString;

      i := 0;
      while True do begin
        if sTmp = '' then break;
        if i >= High(HumanRCD.Data.QuestFlag) then break;
        sTmp := GetValidStr3(sTmp, str, ['/']);
        HumanRCD.Data.QuestFlag[i] := StrToInt(str);
        Inc(i);
      end;
    end;

    dbQry.SQL.Clear;
    dbQry.SQL.Add(format(sSQL4, [sChrName]));
    try
      dbQry.Open;
    except
      Result := False;
      OutMainMessage('[Exception] TFileDB.GetRecord (4)');
      Exit;
    end;

    nCount := dbQry.RecordCount -1;
    if nCount > MAXMAGIC then nCount := MAXMAGIC;
    for i:=0 to nCount do begin
      HumanRCD.Data.Magic[i].wMagIdx    := dbQry.FieldByName('FLD_MAGICID').AsInteger;
      HumanRCD.Data.Magic[i].btLevel    := dbQry.FieldByName('FLD_LEVEL').AsInteger;
      HumanRCD.Data.Magic[i].btKey      := dbQry.FieldByName('FLD_USEKEY').AsInteger;
      HumanRCD.Data.Magic[i].nTranPoint := dbQry.FieldByName('FLD_CURRTRAIN').AsInteger;
      dbQry.Next;
    end;

    dbQry.SQL.Clear;
    dbQry.SQL.Add(format(sSQL5, [sChrName]));
    try
      dbQry.Open;
    except
      Result := False;
      OutMainMessage('[Exception] TFileDB.GetRecord (5)');
      Exit;
    end;

    nCount := dbQry.RecordCount -1;
    if nCount > MAXBAGITEM+MAXUSEITEM then nCount := MAXBAGITEM+MAXUSEITEM;
    for i:=0 to nCount do begin
      nPosition := dbQry.FieldByName('FLD_POSITION').AsInteger -1;

      if (nPosition >= 0) and (nPosition <= MAXUSEITEM) then begin
        HumanRCD.Data.HumItems[nPosition].MakeIndex   := dbQry.FieldByName('FLD_MAKEINDEX').AsInteger;
        HumanRCD.Data.HumItems[nPosition].wIndex      := dbQry.FieldByName('FLD_STDINDEX').AsInteger;
        HumanRCD.Data.HumItems[nPosition].Dura        := dbQry.FieldByName('FLD_DURA').AsInteger;
        HumanRCD.Data.HumItems[nPosition].DuraMax     := dbQry.FieldByName('FLD_DURAMAX').AsInteger;
        HumanRCD.Data.HumItems[nPosition].Count       := dbQry.FieldByName('FLD_COUNT').AsInteger;
        HumanRCD.Data.HumItems[nPosition].Color       := dbQry.FieldByName('FLD_COLOR').AsInteger;

        HumanRCD.Data.HumItems[nPosition].btValue[0]  := dbQry.FieldByName('FLD_VALUE1').AsInteger;
        HumanRCD.Data.HumItems[nPosition].btValue[1]  := dbQry.FieldByName('FLD_VALUE2').AsInteger;
        HumanRCD.Data.HumItems[nPosition].btValue[2]  := dbQry.FieldByName('FLD_VALUE3').AsInteger;
        HumanRCD.Data.HumItems[nPosition].btValue[3]  := dbQry.FieldByName('FLD_VALUE4').AsInteger;
        HumanRCD.Data.HumItems[nPosition].btValue[4]  := dbQry.FieldByName('FLD_VALUE5').AsInteger;
        HumanRCD.Data.HumItems[nPosition].btValue[5]  := dbQry.FieldByName('FLD_VALUE6').AsInteger;
        HumanRCD.Data.HumItems[nPosition].btValue[6]  := dbQry.FieldByName('FLD_VALUE7').AsInteger;
        HumanRCD.Data.HumItems[nPosition].btValue[7]  := dbQry.FieldByName('FLD_VALUE8').AsInteger;
        HumanRCD.Data.HumItems[nPosition].btValue[8]  := dbQry.FieldByName('FLD_VALUE9').AsInteger;
        HumanRCD.Data.HumItems[nPosition].btValue[9]  := dbQry.FieldByName('FLD_VALUE10').AsInteger;
        HumanRCD.Data.HumItems[nPosition].btValue[10]  := dbQry.FieldByName('FLD_VALUE11').AsInteger;
        HumanRCD.Data.HumItems[nPosition].btValue[11]  := dbQry.FieldByName('FLD_VALUE12').AsInteger;
        HumanRCD.Data.HumItems[nPosition].btValue[12]  := dbQry.FieldByName('FLD_VALUE13').AsInteger;
        HumanRCD.Data.HumItems[nPosition].btValue[13]  := dbQry.FieldByName('FLD_VALUE14').AsInteger;
      end else begin
        HumanRCD.Data.BagItems[i].MakeIndex   := dbQry.FieldByName('FLD_MAKEINDEX').AsInteger;
        HumanRCD.Data.BagItems[i].wIndex      := dbQry.FieldByName('FLD_STDINDEX').AsInteger;
        HumanRCD.Data.BagItems[i].Dura        := dbQry.FieldByName('FLD_DURA').AsInteger;
        HumanRCD.Data.BagItems[i].DuraMax     := dbQry.FieldByName('FLD_DURAMAX').AsInteger;
        HumanRCD.Data.BagItems[i].Count       := dbQry.FieldByName('FLD_COUNT').AsInteger;
        HumanRCD.Data.BagItems[i].Color       := dbQry.FieldByName('FLD_COLOR').AsInteger;

        HumanRCD.Data.BagItems[i].btValue[0]  := dbQry.FieldByName('FLD_VALUE1').AsInteger;
        HumanRCD.Data.BagItems[i].btValue[1]  := dbQry.FieldByName('FLD_VALUE2').AsInteger;
        HumanRCD.Data.BagItems[i].btValue[2]  := dbQry.FieldByName('FLD_VALUE3').AsInteger;
        HumanRCD.Data.BagItems[i].btValue[3]  := dbQry.FieldByName('FLD_VALUE4').AsInteger;
        HumanRCD.Data.BagItems[i].btValue[4]  := dbQry.FieldByName('FLD_VALUE5').AsInteger;
        HumanRCD.Data.BagItems[i].btValue[5]  := dbQry.FieldByName('FLD_VALUE6').AsInteger;
        HumanRCD.Data.BagItems[i].btValue[6]  := dbQry.FieldByName('FLD_VALUE7').AsInteger;
        HumanRCD.Data.BagItems[i].btValue[7]  := dbQry.FieldByName('FLD_VALUE8').AsInteger;
        HumanRCD.Data.BagItems[i].btValue[8]  := dbQry.FieldByName('FLD_VALUE9').AsInteger;
        HumanRCD.Data.BagItems[i].btValue[9]  := dbQry.FieldByName('FLD_VALUE10').AsInteger;
        HumanRCD.Data.BagItems[i].btValue[10]  := dbQry.FieldByName('FLD_VALUE11').AsInteger;
        HumanRCD.Data.BagItems[i].btValue[11]  := dbQry.FieldByName('FLD_VALUE12').AsInteger;
        HumanRCD.Data.BagItems[i].btValue[12]  := dbQry.FieldByName('FLD_VALUE13').AsInteger;
        HumanRCD.Data.BagItems[i].btValue[13]  := dbQry.FieldByName('FLD_VALUE14').AsInteger;
      end;
      dbQry.Next;
    end;

    dbQry.SQL.Clear;
    dbQry.SQL.Add(format(sSQL6, [sChrName]));
    try
      dbQry.Open;
    except
      Result := False;
      OutMainMessage('[Exception] TFileDB.GetRecord (6)');
      Exit;
    end;

    nCount := dbQry.RecordCount -1;
    if nCount > STORAGELIMIT then nCount := STORAGELIMIT;
    for i:=0 to nCount do begin
      HumanRCD.Data.StorageItems[i].MakeIndex   := dbQry.FieldByName('FLD_MAKEINDEX').AsInteger;
      HumanRCD.Data.StorageItems[i].wIndex      := dbQry.FieldByName('FLD_STDINDEX').AsInteger;
      HumanRCD.Data.StorageItems[i].Dura        := dbQry.FieldByName('FLD_DURA').AsInteger;
      HumanRCD.Data.StorageItems[i].DuraMax     := dbQry.FieldByName('FLD_DURAMAX').AsInteger;
      HumanRCD.Data.StorageItems[i].Count       := dbQry.FieldByName('FLD_COUNT').AsInteger;
      HumanRCD.Data.StorageItems[i].Color       := dbQry.FieldByName('FLD_COLOR').AsInteger;

      HumanRCD.Data.StorageItems[i].btValue[0]  := dbQry.FieldByName('FLD_VALUE1').AsInteger;
      HumanRCD.Data.StorageItems[i].btValue[1]  := dbQry.FieldByName('FLD_VALUE2').AsInteger;
      HumanRCD.Data.StorageItems[i].btValue[2]  := dbQry.FieldByName('FLD_VALUE3').AsInteger;
      HumanRCD.Data.StorageItems[i].btValue[3]  := dbQry.FieldByName('FLD_VALUE4').AsInteger;
      HumanRCD.Data.StorageItems[i].btValue[4]  := dbQry.FieldByName('FLD_VALUE5').AsInteger;
      HumanRCD.Data.StorageItems[i].btValue[5]  := dbQry.FieldByName('FLD_VALUE6').AsInteger;
      HumanRCD.Data.StorageItems[i].btValue[6]  := dbQry.FieldByName('FLD_VALUE7').AsInteger;
      HumanRCD.Data.StorageItems[i].btValue[7]  := dbQry.FieldByName('FLD_VALUE8').AsInteger;
      HumanRCD.Data.StorageItems[i].btValue[8]  := dbQry.FieldByName('FLD_VALUE9').AsInteger;
      HumanRCD.Data.StorageItems[i].btValue[9]  := dbQry.FieldByName('FLD_VALUE10').AsInteger;
      HumanRCD.Data.StorageItems[i].btValue[10]  := dbQry.FieldByName('FLD_VALUE11').AsInteger;
      HumanRCD.Data.StorageItems[i].btValue[11]  := dbQry.FieldByName('FLD_VALUE12').AsInteger;
      HumanRCD.Data.StorageItems[i].btValue[12]  := dbQry.FieldByName('FLD_VALUE13').AsInteger;
      HumanRCD.Data.StorageItems[i].btValue[13]  := dbQry.FieldByName('FLD_VALUE14').AsInteger;
      dbQry.Next;
    end;
             }
  finally
    dbQry.Close;
  end;
end;

function TFileDB.UpdateRecord(nIndex: integer; var HumanRCD: THumDataInfo; boNew: boolean): boolean;//0x0048B134
var
  sdt       :String;
  i         :Integer;
  sTmp      :String;
  hd        :pTHumData;
  m         :TMemoryStream;
begin
  Result := True;
  sdt := FormatDateTime(SQLDTFORMAT, Now);

  try
    dbQry.SQL.Clear;

    if boNew then begin
      hd := @HumanRCD.Data;
      //New Character
      dbQry.SQL.Clear;
      dbQry.SQL.Add(format('INSERT INTO TBL_CHARACTER ('+
						               'FLD_LOGINID, FLD_CHARNAME, FLD_JOB, FLD_SEX, FLD_DIR, '+
                           'FLD_ATTACKMODE, FLD_CX, FLD_CY, FLD_MAPNAME, FLD_GOLD, FLD_HAIR, '+
                           'FLD_ISADMIN, FLD_DELETED, FLD_CREATEDATE, FLD_LASTUPDATE) VALUES ( '+
                           '''%s'', ''%s'', %d, %d, 0, '+
                           '1, %d, %d, ''%s'', 0, %d, '+
						               '0, 0, ''%s'', ''%s'' )',
                           [hd.sAccount, hd.sChrName, hd.btJob, hd.btSex,
                           hd.wCurX, hd.wCurY, hd.sCurMap, hd.btHair,
                           sdt, sdt]));


      try
        dbQry.Execute;
      except
        Result := False;
        OutMainMessage('[Exception] TFileDB.UpdateRecord (1)');
        Exit;
      end;

      dbQry.SQL.Clear;
      dbQry.SQL.Add(format('INSERT INTO TBL_ADDABILITY(FLD_CHARNAME, FLD_LEVEL) '+
                           'VALUES( ''%s'', %d )',
                           [hd.sChrName,
                           hd.Abil.Level]));

      try
        dbQry.Execute;
      except
        Result := False;
        OutMainMessage('[Exception] TFileDB.UpdateRecord (2)');
        Exit;
      end;
    end else begin
      hd := @HumanRCD.Data;

      //General Update
      sTmp := '';
      for i:=0 to High(HumanRCD.Data.wStatusTimeArr) do
        sTmp := sTmp + IntToStr(HumanRCD.Data.wStatusTimeArr[i]) + '/';
      
      dbQry.SQL.Clear;
      dbQry.SQL.Add(format('UPDATE TBL_CHARACTER SET FLD_JOB=%d, FLD_SEX=%d, FLD_HAIR=%d, ' +
                           'FLD_DIR=%d, FLD_CX=%d, FLD_CY=%d, ' +
                           'FLD_LEVEL=%d, FLD_HP=%d, FLD_MP=%d, FLD_EXP=%d, ' +
						               'FLD_ATTACKMODE=%d, FLD_MAPNAME=''%s'', FLD_GOLD=%d, ' +
                           'FLD_ISADMIN=%d, FLD_DELETED=%d, FLD_HOMEMAP=''%s'', FLD_HOMECX=%d, FLD_HOMECY=%d, ' +
                           'FLD_BONUSPOINT=%d, FLD_CREDITPOINT=%d, FLD_MASTERCHARNAME=''%s'', FLD_MASTER=%d, ' +
                           'FLD_REBIRTHLEVEL=%d, FLD_TESTSERVERRESETCOUNT=%d, FLD_FREEGULITYCOUNT=%d, '+
                           'FLD_DEARCHARNAME=''%s'', FLD_STORAGEPASSWD=''%s'', FLD_PAYPOINT=%d, FLD_PKPOINT=%d, FLD_ALLOWPARTY=%d, ' +
                           'FLD_INCHEALTH=%d, FLD_INCSPELL=%d, FLD_INCHEALING=%d, FLD_FIGHTZONEDIE=%d, ' +
                           'FLD_LOCKLOGON=%d, FLD_CONTRIBUTION=%d, FLD_HUNGRYSTATE=%d, FLD_ENABLEGRECALL=%d, ' +
                           'FLD_GROUPRECALLTIME=%d, FLD_BODYLUCK=%F, FLD_ENABLEGROUPRECALL=%d, FLD_MARRYCOUNT=%d, ' +
                           'FLD_STATUS=''%s'', FLD_LASTUPDATE=''%s'' WHERE FLD_CHARNAME=''%s''',
                           [hd.btJob, hd.btSex, hd.btHair,
                           hd.btDir, hd.wCurX, hd.wCurY,
                           hd.Abil.Level, hd.Abil.HP, hd.Abil.MP, hd.Abil.Exp,
                           hd.btAttatckMode, hd.sCurMap, hd.nGold,
                           0, 0, hd.sHomeMap, hd.wHomeX, hd.wHomeY,
                           hd.nBonusPoint, hd.btCreditPoint, hd.sMasterName, BoolToInt(hd.boMaster),
                           hd.btReLevel, hd.btFirstLogin, hd.btFreeGuiltyCount,
                           hd.sDearName, hd.sStoragePwd, hd.nPayMentPoint, hd.nPKPoint, hd.btAllowGroup,
                           hd.btIncHealth, hd.btIncSpell, hd.btIncHealing, hd.btFightZoneDieCount,
                           BoolToInt(hd.boLockLogon), hd.wContribution, hd.nHungerStatus, BoolToInt(hd.boAllowGuildReCall),
                           hd.wGroupRcallTime, hd.dBodyLuck, BoolToInt(hd.boAllowGroupReCall), hd.btMarryCount,
                           sTmp, FormatDateTime(SQLDTFORMAT, HumanRCD.Header.UpdateDate), HumanRCD.Header.sChrName]));

      try
        dbQry.Execute;
      except
        Result := False;
        OutMainMessage('[Exception] TFileDB.UpdateRecord (4)');
        Exit;
      end;


      dbQry.SQL.Clear;
      dbQry.SQL.Add(format('UPDATE TBL_ADDABILITY SET ' +
                           'FLD_BONUSAC=%d, FLD_BONUSMAC=%d, FLD_BONUSDC=%d, FLD_BONUSMC=%d, FLD_BONUSSC=%d, ' +
						               'FLD_BONUSHP=%d, FLD_BONUSMP=%d, FLD_BONUSACCURACY=%d, FLD_BONUSAGILITY=%d ' +
						               'WHERE FLD_CHARNAME=''%s''',

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -