本文整理汇总了C++中CItem::GetUnkPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ CItem::GetUnkPoint方法的具体用法?C++ CItem::GetUnkPoint怎么用?C++ CItem::GetUnkPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CItem
的用法示例。
在下文中一共展示了CItem::GetUnkPoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CanSeeLOS_New
//.........这里部分代码省略.........
max_z = minimum(Height + min_z, UO_SIZE_Z);
WARNLOS(("wTFlags(0%x)\n", wTFlags));
WARNLOS(("pStatic %0x Z check: %d,%d (Now: %d) (Dest: %d).\n", pStatic->GetDispID(), min_z, max_z, ptNow.m_z, ptDst.m_z));
if ( (min_z <= ptNow.m_z) && (max_z >= ptNow.m_z) )
{
if ( ptNow.m_x != ptDst.m_x || ptNow.m_y != ptDst.m_y || min_z > ptDst.m_z || max_z < ptDst.m_z )
{
WARNLOS(("pStatic blocked - m:%d M:%d\n", min_z, max_z));
bPath = false;
break;
}
}
}
}
}
}
}
if ( !bPath )
break;
// --------- In game items ----------
if ( !(flags & LOS_NB_DYNAMIC) )
{
if ( !((flags & LOS_NB_LOCAL_DYNAMIC) && (pSrcRegion == pNowRegion)) )
{
CWorldSearch AreaItems(ptNow, 0);
for (;;)
{
pItem = AreaItems.GetItem();
if ( !pItem )
break;
if ( pItem->GetUnkPoint().m_x != ptNow.m_x || pItem->GetUnkPoint().m_y != ptNow.m_y )
continue;
if ( !CanSeeItem(pItem) )
continue;
//Fix for Stacked items blocking view
if ( (pItem->GetUnkPoint().m_x == ptDst.m_x) && (pItem->GetUnkPoint().m_y == ptDst.m_y) && (pItem->GetUnkPoint().m_z >= GetTopZ()) && (pItem->GetUnkPoint().m_z <= ptSrc.m_z) )
continue;
pItemDef = static_cast<CItemBase*>(pItem->Base_GetDef());
wTFlags = 0;
Height = 0;
bNullTerrain = false;
if ( !pItemDef )
{
WARNLOS(("DYNAMIC - Cannot get pItemDef for item (0%x)\n", pItem->GetDispID()));
}
else
{
if (pItem->Can(CAN_I_BLOCKLOS))
{
WARNLOS(("pItem blocked by CAN_I_BLOCKLOS"));
bPath = false;
break;
}
if ( (flags & LOS_FISHING) && (ptSrc.GetDist(ptNow) >= 2) && (pItem->GetType() != IT_WATER) &&
( pItem->Can(CAN_I_DOOR | CAN_I_PLATFORM | CAN_I_BLOCK | CAN_I_CLIMB | CAN_I_FIRE | CAN_I_ROOF | CAN_I_BLOCKLOS | CAN_I_BLOCKLOS_HEIGHT) ) )
{
WARNLOS(("pItem blocked - flags & 0800, distance >= 2 and type of pItemDef is not IT_WATER\n"));
bPath = false;
break;
示例2: ImportWSC
//.........这里部分代码省略.........
if ( s.IsKey("ID" ))
{
if ( m_pCurObj != NULL )
return false;
pItem = CItem::CreateTemplate(static_cast<ITEMID_TYPE>(ATOI(pArg)));
pItem->SetName( sName );
m_pCurObj = pItem;
m_pCurSer->m_pObj = pItem;
continue;
}
if ( m_pCurObj == NULL )
{
DEBUG_ERR(( "Import:Bad Item Key '%s'\n", s.GetKey()));
break;
}
else if ( s.IsKey("CONT" ))
{
m_pCurSer->m_dwContSer = ATOI(pArg);
}
else if ( s.IsKey("LAYER" ))
{
m_pCurSer->m_layer = static_cast<LAYER_TYPE>(ATOI(pArg));
continue;
}
else if (pItem == NULL)
{
DEBUG_ERR(( "Import:Found '%s' before ID.\n", s.GetKey()));
continue;
}
if ( s.IsKey("X" ))
{
CPointMap pt = pItem->GetUnkPoint();
pt.m_x = (short)( ATOI(pArg) );
pItem->SetUnkPoint(pt);
continue;
}
else if ( s.IsKey("Y" ))
{
CPointMap pt = pItem->GetUnkPoint();
pt.m_y = (short)( ATOI(pArg) );
pItem->SetUnkPoint(pt);
continue;
}
else if ( s.IsKey("Z" ))
{
CPointMap pt = pItem->GetUnkPoint();
pt.m_z = (char)( ATOI(pArg) );
pItem->SetUnkPoint(pt);
continue;
}
else if ( s.IsKey("COLOR" ))
{
pItem->SetHue( static_cast<HUE_TYPE>( ATOI(pArg) ) );
continue;
}
else if ( s.IsKey("AMOUNT" ))
{
pItem->SetAmount( (word)ATOI(pArg) );
continue;
}
else if ( s.IsKey("MOREX" ))
{
pItem->m_itNormal.m_morep.m_x = (short)(ATOI(pArg));
continue;