本文整理汇总了C++中Datapad::getData方法的典型用法代码示例。如果您正苦于以下问题:C++ Datapad::getData方法的具体用法?C++ Datapad::getData怎么用?C++ Datapad::getData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Datapad
的用法示例。
在下文中一共展示了Datapad::getData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sendCreatePlayer
//======================================================================================================================
//
// create player
//
bool MessageLib::sendCreatePlayer(PlayerObject* playerObject,PlayerObject* targetObject)
{
if(!_checkPlayer(targetObject))
return(false);
sendCreateObjectByCRC(playerObject,targetObject,false);
if(targetObject == playerObject)
{
sendBaselinesCREO_1(playerObject);
sendBaselinesCREO_4(playerObject);
}
sendBaselinesCREO_3(playerObject,targetObject);
sendBaselinesCREO_6(playerObject,targetObject);
sendCreateObjectByCRC(playerObject,targetObject,true);
sendContainmentMessage(playerObject->getPlayerObjId(),playerObject->getId(),4,targetObject);
sendBaselinesPLAY_3(playerObject,targetObject);
sendBaselinesPLAY_6(playerObject,targetObject);
if(targetObject == playerObject)
{
sendBaselinesPLAY_8(playerObject,targetObject);
sendBaselinesPLAY_9(playerObject,targetObject);
}
//close the yalp
sendEndBaselines(playerObject->getPlayerObjId(),targetObject);
sendPostureMessage(playerObject,targetObject);
if(playerObject->getParentId())
{
sendContainmentMessage(playerObject->getId(),playerObject->getParentId(),4,targetObject);
}
if(targetObject == playerObject)
{
// tangible objects
if(TangibleObject* hair = dynamic_cast<TangibleObject*>(playerObject->getEquipManager()->getEquippedObject(CreatureEquipSlot_Hair)))
{
//only create the hair as the helmet will be created at a different time
if(hair->getTangibleType() == TanType_Hair)
{
sendCreateTangible(hair,targetObject);
}
}
// create inventory and contents
if(dynamic_cast<TangibleObject*>(playerObject->getEquipManager()->getEquippedObject(CreatureEquipSlot_Inventory)))
{
sendInventory(playerObject);
}
// mission bag
if(TangibleObject* missionBag = dynamic_cast<TangibleObject*>(playerObject->getEquipManager()->getEquippedObject(CreatureEquipSlot_Mission)))
{
gMessageLib->sendCreateTangible(missionBag,playerObject);
//Now iterate through the missions and create them clientside
MissionBag* mbag = dynamic_cast<MissionBag*> (missionBag);
MissionList::iterator it = mbag->getMissions()->begin();
while(it != mbag->getMissions()->end())
{
MissionObject* mission = dynamic_cast<MissionObject*>(*it);
sendCreateObjectByCRC(mission, targetObject, false);
sendContainmentMessage(mission->getId(), mbag->getId(), 4, targetObject);
sendBaselinesMISO_3(mission, targetObject);
sendBaselinesMISO_6(mission, targetObject);
sendBaselinesMISO_8(mission, targetObject);
sendBaselinesMISO_9(mission, targetObject);
sendEndBaselines(mission->getId(), targetObject);
++it;
}
}
// datapad
Datapad* datapad = playerObject->getDataPad();
if(datapad)
{
//would be nice to use the tangibles objectcontainer for the datapad
//need to get missionobjects intangibles, Man Schematics, waypoints and stuff in though, so better do it manually
gMessageLib->sendCreateTangible(datapad,playerObject);
//now iterate through the schematics and create them clientside
Datapad* dpad = dynamic_cast<Datapad*> (datapad);
ManufacturingSchematicList* manufacturingSchematics = dpad->getManufacturingSchematics();
ManufacturingSchematicList::iterator it = manufacturingSchematics->begin();
while(it != manufacturingSchematics->end())
{
gMessageLib->sendCreateManufacturingSchematic((dynamic_cast<ManufacturingSchematic*>(*it)),playerObject ,false);
//.........这里部分代码省略.........