moylin
-
İçerik sayısı
94 -
Katılım
-
Son ziyaret
-
Puan
2,201 [ Bağış Yap ]
İletiler : moylin
-
-
-
teşekkürler
-
-
Thanks
-
Good version, better development
-
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_ptrdbCommand(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;
} -
-
Thanks
-
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 -
-- 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
-- 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? -
Kullanılan beceriler kısayol çubuğuna düzgün şekilde kaydedilemez,Sorunu nerede tespit edebilirim?
-
-
AlıntıI did not ask for your code. I asked the Knight OnLine version that you are working on since the cause of your problem might differ version to version.
In addition, you can check how you handleWIZ_SKILLDATA 0x79
packet. Also, you can check another game server projects like this and collect a better insight on your problem.
Good luck
https://gist.github.com/moylin/1acd5bee958f5cd2c879a8d626433a6f -
src 2117 DB2502
-
Alıntıcheck to gameserver logs file.
logs ? -
AlıntıYou might wanna share your KO version
I need to handle the problem well before I can share it. There are a lot of problems and I don’t share well. -
I want to know why my skills can't be saved in the shortcut bar,I checked SQLSERVER,USERDATAorUSERDATA_SKILLSHORTCUT,But can't find the problem
-
Thanks
-
Thanks
-
Thanks
-
-
Thanks
-
-
Good
2300 Server Files + Database + Client [Özel]
Forum 2000+ Paylaşım
tarihinde gönderildi
thanks