Jump to content
Araştır
  • Diğer seçenekler ...
Sonuçları bul ...
Sonuçları bul ...
KO Developers Platformuna Hoşgeldin!
moylin

Skill kısayol sütununa kaydedilemez?

Önerilen Mesajlar

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?

İletiyi paylaş


Link to post
Sitelerde Paylaş

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

İletiyi paylaş


Link to post
Sitelerde Paylaş
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;
}

İletiyi paylaş


Link to post
Sitelerde Paylaş

×
×
  • Yeni Oluştur...