本文整理汇总了C++中Item::GetEquipFromType方法的典型用法代码示例。如果您正苦于以下问题:C++ Item::GetEquipFromType方法的具体用法?C++ Item::GetEquipFromType怎么用?C++ Item::GetEquipFromType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Item
的用法示例。
在下文中一共展示了Item::GetEquipFromType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Execute
//.........这里部分代码省略.........
Msg.SetResult(nResult);
pGamePlayer->SendPacket( &Msg ) ;
g_pLog->FastSaveLog( LOG_FILE_1, "CGEquipRemouldHandler GetItemClass is not ICLASS_EQUIP ") ;
return PACKET_EXE_CONTINUE;
}
if(!(pPacket->getItemID() == pEquipItem->GetGUID()))
{
nResult = EQUIPREMOULD_EQUIP_FAIL;
Msg.SetResult(nResult);
pGamePlayer->SendPacket( &Msg ) ;
g_pLog->FastSaveLog( LOG_FILE_1, "CGEquipRemouldHandler GUID is different ") ;
return PACKET_EXE_CONTINUE;
}
if (pEquipItem->GetItemType() > EQUIP_ADORN)
{
nResult = EQUIPREMOULD_EQUIP_FAIL;
Msg.SetResult(nResult);
pGamePlayer->SendPacket( &Msg ) ;
g_pLog->FastSaveLog( LOG_FILE_1, "CGEquipRemouldHandler GUID is different ") ;
return PACKET_EXE_CONTINUE;
}
}
break;
default:
{
g_pLog->FastSaveLog( LOG_FILE_1, "CGEquipRemouldHandler: EquipFromType error, EquipFromType=%d", pPacket->GetEquipPosType()) ;
return PACKET_EXE_ERROR;
}
break;
}
if (pEquipItem->GetEquipFromType() != ITEM_CREATE)
{
nResult = EQUIPREMOULD_TYPE_FAIL;
Msg.SetResult(nResult);
pGamePlayer->SendPacket( &Msg ) ;
g_pLog->FastSaveLog( LOG_FILE_1, "CGEquipRemouldHandler Type error ") ;
return PACKET_EXE_CONTINUE;
}
ITEM_PRODUCT_INFO_TB* pCreateTB = g_ItemTable.GetItemProductInfoTB(pEquipItem->GetItemTableIndex());
if(pCreateTB == NULL)
{
nResult = EQUIPREMOULD_EQUIP_FAIL;
Msg.SetResult(nResult);
pGamePlayer->SendPacket(&Msg);
return PACKET_EXE_CONTINUE;
}
if (pCreateTB->m_nRemouldInfoCount != pPacket->GetValidNum())
{
return PACKET_EXE_ERROR;
}
if (pCreateTB->m_RemouldMoney > pHuman->GetMoney())
{
nResult = EQUIPREMOULD_MONEY_FAIL;
Msg.SetResult(nResult);
pGamePlayer->SendPacket(&Msg);
return PACKET_EXE_CONTINUE;
}
struct MATERIAL_REQ
{
UINT m_nIndex;
UINT m_nCount;