本文整理汇总了C++中CDBAgent::SaveSkillShortcut方法的典型用法代码示例。如果您正苦于以下问题:C++ CDBAgent::SaveSkillShortcut方法的具体用法?C++ CDBAgent::SaveSkillShortcut怎么用?C++ CDBAgent::SaveSkillShortcut使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDBAgent
的用法示例。
在下文中一共展示了CDBAgent::SaveSkillShortcut方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReqSkillDataSave
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};
short 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);
}