本文整理汇总了C++中CItemBase::GetTFlags方法的典型用法代码示例。如果您正苦于以下问题:C++ CItemBase::GetTFlags方法的具体用法?C++ CItemBase::GetTFlags怎么用?C++ CItemBase::GetTFlags使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CItemBase
的用法示例。
在下文中一共展示了CItemBase::GetTFlags方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CanSeeLOS_New
//.........这里部分代码省略.........
if ( (pStatic->m_x + pBlock->m_x != ptNow.m_x) || (pStatic->m_y + pBlock->m_y != ptNow.m_y) )
continue;
//Fix for Stacked items blocking view
if ( (pStatic->m_x == ptDst.m_x) && (pStatic->m_y == ptDst.m_y) && (pStatic->m_z >= GetTopZ()) && (pStatic->m_z <= ptSrc.m_z) )
continue;
pItemDef = CItemBase::FindItemBase(pStatic->GetDispID());
wTFlags = 0;
Height = 0;
bNullTerrain = false;
if ( !pItemDef )
{
WARNLOS(("STATIC - Cannot get pItemDef for item (0%x)\n", pStatic->GetDispID()));
}
else
{
if (pItemDef->Can(CAN_I_BLOCKLOS))
{
WARNLOS(("pStatic blocked by CAN_I_BLOCKLOS"));
bPath = false;
break;
}
if ( (flags & LOS_FISHING) && (ptSrc.GetDist(ptNow) >= 2) && (pItemDef->GetType() != IT_WATER) &&
( pItemDef->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(("pStatic blocked - flags & 0800, distance >= 2 and type of pItemDef is not IT_WATER\n"));
bPath = false;
break;
}
wTFlags = pItemDef->GetTFlags();
Height = pItemDef->GetHeight();
if ( pItemDef->GetID() != pStatic->GetDispID() ) //not a parent item
{
WARNLOS(("Not a parent item (STATIC)\n"));
pDupeDef = CItemBaseDupe::GetDupeRef((ITEMID_TYPE)(pStatic->GetDispID()));
if ( !pDupeDef )
{
g_Log.EventDebug("AdvancedLoS: Failed to get non-parent reference (static) (DispID 0%x) (X: %d Y: %d Z: %hhd M: %hhu)\n", pStatic->GetDispID(), ptNow.m_x, ptNow.m_y, pStatic->m_z, ptNow.m_map);
}
else
{
wTFlags = pDupeDef->GetTFlags();
Height = pDupeDef->GetHeight();
}
}
else
{
WARNLOS(("Parent item (STATIC)\n"));
}
Height = (wTFlags & UFLAG2_CLIMBABLE) ? Height / 2 : Height;
if ( ((wTFlags & (UFLAG1_WALL|UFLAG1_BLOCK|UFLAG2_PLATFORM)) || (pItemDef->Can(CAN_I_BLOCKLOS_HEIGHT))) && !((wTFlags & UFLAG2_WINDOW) && (flags & LOS_NB_WINDOWS)) )
{
WARNLOS(("pStatic %0x %d,%d,%d - %d\n", pStatic->GetDispID(), pStatic->m_x, pStatic->m_y, pStatic->m_z, Height));
min_z = pStatic->m_z;
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) )