本文整理汇总了C++中CChar::Horse_UnMount方法的典型用法代码示例。如果您正苦于以下问题:C++ CChar::Horse_UnMount方法的具体用法?C++ CChar::Horse_UnMount怎么用?C++ CChar::Horse_UnMount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChar
的用法示例。
在下文中一共展示了CChar::Horse_UnMount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NPC_PetClearOwners
void CChar::NPC_PetClearOwners(bool bResendTooltip)
{
ADDTOCALLSTACK("CChar::NPC_PetClearOwners");
CChar *pOwner = NPC_PetGetOwner();
Memory_ClearTypes(MEMORY_IPET|MEMORY_FRIEND);
if ( m_pNPC )
m_pNPC->m_bonded = 0; // pets without owner cannot be bonded
if ( NPC_IsVendor() )
{
StatFlag_Clear(STATF_INVUL);
if ( pOwner ) // give back to NPC owner all the stuff we are trying to sell
{
CItemContainer *pBankVendor = GetContainerCreate(LAYER_BANKBOX);
CItemContainer *pBankOwner = pOwner->GetContainerCreate(LAYER_BANKBOX);
pOwner->AddGoldToPack(pBankVendor->m_itEqBankBox.m_Check_Amount, pBankOwner);
pBankVendor->m_itEqBankBox.m_Check_Amount = 0;
for ( size_t i = 0; i < COUNTOF(sm_VendorLayers); i++ )
{
CItemContainer *pCont = GetContainerCreate(sm_VendorLayers[i]);
if ( !pCont )
continue;
CItem *pItemNext = NULL;
for ( CItem *pItem = pCont->GetContentHead(); pItem != NULL; pItem = pItemNext )
{
pItemNext = pItem->GetNext();
pBankOwner->ContentAdd(pItem);
}
}
}
}
if ( IsStatFlag(STATF_Ridden) )
{
CChar *pCharRider = Horse_GetMountChar();
if ( pCharRider )
pCharRider->Horse_UnMount();
}
if ( pOwner )
{
if ( IsSetOF(OF_PetSlots) )
pOwner->FollowersUpdate(this, static_cast<short>(-maximum(1, GetDefNum("FOLLOWERSLOTS", true))));
if ( bResendTooltip )
ResendTooltip();
}
}