Jump to content
Araştır
  • Diğer seçenekler ...
Sonuçları bul ...
Sonuçları bul ...

moylin

Üye
  • İçerik sayısı

    94
  • Katılım

  • Son ziyaret

  • Puan

    2,201 [ Bağış Yap ]

İletiler : moylin


  1. Alıntı
    send function bro

    name
    bool CDBAgent::LoadSkillShortcut(Packet & result, CUser *pUser)

    I do not char use it

    use binary string bro
    char value old



    bool CDBAgent::LoadSkillShortcut(Packet & result, CUser *pUser)
    {
    if (pUser == nullptr)
    return false;

    unique_ptr dbCommand(m_GameDB->CreateCommand());
    if (dbCommand.get() == nullptr)
    return false;

    uint16 sCount;
    char strSkillData[260];

    dbCommand->AddParameter(SQL_PARAM_INPUT, pUser->GetName().c_str(), pUser->GetName().length());
    if (!dbCommand->Execute(_T("SELECT nCount, strSkillData FROM USERDATA_SKILLSHORTCUT WHERE strCharID = ?")))
    {
    ReportSQLError(m_GameDB->GetError());
    return false;
    }

    if (!dbCommand->hasData())
    return false;

    dbCommand->FetchUInt16(1, sCount);
    dbCommand->FetchString(2, strSkillData, sizeof(strSkillData));

    result for (uint32 i = 0; i result
    return true;
    }


  2. SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER OFF
    GO

    ALTER PROCEDURE [dbo].[SKILLSHORTCUT_SAVE]
    @strCharID nvarchar(50),
    @nCount smallint,
    @strSkillData varchar(260)
    AS

    SELECT strCharID FROM USERDATA_SKILLSHORTCUT WHERE strCharID = @strCharID
    IF(@@rowcount = 0)
    BEGIN
    INSERT USERDATA_SKILLSHORTCUT VALUES(@strCharID, 0, '')
    END

    UPDATE USERDATA_SKILLSHORTCUT
    SET nCount = @nCount, strSkillData = @strSkillData
    WHERE strCharID = @strCharID

    -- mesaja ek olarak --
    SET ANSI_NULLS ON
    
    GO
    SET QUOTED_IDENTIFIER OFF
    GO


    ALTER PROCEDURE [dbo].[SKILLSHORTCUT_LOAD]
    @strCharID nvarchar(50)
    AS
    SELECT nCount, strSkillData FROM dbo.USERDATA_SKILLSHORTCUT WHERE strCharID = @strCharID

  3. jbyhry
    -- mesaja ek olarak --
    Bu yeteneği sadece 7-8 pozisyonda saklayabilir,
    -- mesaja ek olarak --
    Alıntı
    if you have src look void CUser::ReqSkillDataSave(Packet & pkt) function


    jbyhry
    jbyjoa
    -- mesaja ek olarak --
    Resim gönderemiyorumhttps://prntscr.com/jbyhry
    https://prntscr.com/jbyhry
    -- mesaja ek olarak --
    https://prntscr.com/jbyjoa
    -- mesaja ek olarak --



    void CUser::ReqSkillDataSave(Packet & pkt)
    {
    // Initialize our buffer (not all skills are likely to be saved, we need to store the entire 260 bytes).
    char buff[260] = {0};
    uint16 sCount;

    // Read in our skill count
    pkt >> sCount;

    // Make sure we're not going to copy too much (each skill is 1 uint32).
    if ((sCount * sizeof(uint32)) > sizeof(buff))
    return;

    // Copy the skill data directly in from where we left off reading in the packet buffer
    memcpy(buff, (char *)(pkt.contents() + pkt.rpos()), sCount * sizeof(uint32));

    // Finally, save the skill data.
    g_DBAgent.SaveSkillShortcut(sCount, buff, this);
    }


    -- mesaja ek olarak --
    Alıntı
    What!?
    Can you share any picture?


    İlgili problemin resmini gönderdim ve yardım istedim?
×
×
  • Yeni Oluştur...