本文整理汇总了C++中Datapad::SerializeWaypoints方法的典型用法代码示例。如果您正苦于以下问题:C++ Datapad::SerializeWaypoints方法的具体用法?C++ Datapad::SerializeWaypoints怎么用?C++ Datapad::SerializeWaypoints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Datapad
的用法示例。
在下文中一共展示了Datapad::SerializeWaypoints方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: return
bool MessageLib::sendBaselinesPLAY_8(PlayerObject* playerObject,PlayerObject* targetObject)
{
if(!targetObject->isConnected()) {
LOG (error) << "MessageLib::sendBaselinesPLAY_8 playerObject : " << playerObject->getId() << "not accessible";
return(false);
}
Datapad* datapad = playerObject->getDataPad();
if(!datapad) {
LOG (error) << "MessageLib::sendBaselinesPLAY_8 : No Datapad for player : " << playerObject->getId();
return false;
}
XPList* xpList = playerObject->getXpList();
XPList::iterator xpIt = xpList->begin();
//start with the data
mMessageFactory->StartMessage();
mMessageFactory->addUint16(7); //Operand Count
// xp list
mMessageFactory->addUint32(xpList->size());
mMessageFactory->addUint32(playerObject->mXpUpdateCounter);
xpIt = xpList->begin();
while(xpIt != xpList->end())
{
mMessageFactory->addUint8(0);
mMessageFactory->addString(gSkillManager->getXPTypeById((*xpIt).first));
mMessageFactory->addInt32((*xpIt).second);
++xpIt;
}
// waypoint list
swganh::messages::BaselinesMessage message;
datapad->SerializeWaypoints(&message);
mMessageFactory->addData(message.data.data(),message.data.size());
// current force
mMessageFactory->addUint32(playerObject->GetCurrentForcePower());
// max force
mMessageFactory->addUint32(playerObject->GetMaxForcePower());
// unknown
mMessageFactory->addUint32(5);
mMessageFactory->addUint64(20);
mMessageFactory->addUint8(0);
mMessageFactory->addUint32(5);
mMessageFactory->addUint64(14);
mMessageFactory->addUint8(0);
// quest list
mMessageFactory->addUint64(0);
mMessageFactory->addUint32(0);
mMessageFactory->addUint64(0);
mMessageFactory->addUint32(0);
mMessageFactory->addUint16(0);
Message* data = mMessageFactory->EndMessage();
//*************************************************
//now wrap it up
mMessageFactory->StartMessage();
mMessageFactory->addUint32(opBaselinesMessage);
mMessageFactory->addUint64(playerObject->getId());
mMessageFactory->addUint32(opPLAY);
mMessageFactory->addUint8(8);
mMessageFactory->addUint32(data->getSize());
mMessageFactory->addData(data->getData(),data->getSize());
data->setPendingDelete(true);
(targetObject->getClient())->SendChannelA(mMessageFactory->EndMessage(), targetObject->getAccountId(), CR_Client, 5);
return(true);
}