本文整理汇总了C++中NetworkMessage::getU16方法的典型用法代码示例。如果您正苦于以下问题:C++ NetworkMessage::getU16方法的具体用法?C++ NetworkMessage::getU16怎么用?C++ NetworkMessage::getU16使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetworkMessage
的用法示例。
在下文中一共展示了NetworkMessage::getU16方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool ProtocolGame78::internalSetOutfit(NetworkMessage& msg, Outfit_t& outfit)
{
MSG_READ_U16(looktype);
outfit.m_looktype = looktype;
if(outfit.m_looktype != 0){
if(!Objects::getInstance()->getOutfitType(outfit.m_looktype)){
return false;
}
MSG_READ_U8(head);
MSG_READ_U8(body);
MSG_READ_U8(legs);
MSG_READ_U8(feet);
MSG_READ_U8(addons);
outfit.m_lookhead = head;
outfit.m_lookbody = body;
outfit.m_looklegs = legs;
outfit.m_lookfeet = feet;
outfit.m_addons = addons;
}
else{
uint16_t itemid;
if(!msg.getU16(itemid)){
return false;
}
if(itemid != 0 && !Objects::getInstance()->getItemType(itemid)){
return false;
}
outfit.m_lookitem = itemid;
}
return true;
}