本文整理汇总了C++中CItemContainer::ContentsDump方法的典型用法代码示例。如果您正苦于以下问题:C++ CItemContainer::ContentsDump方法的具体用法?C++ CItemContainer::ContentsDump怎么用?C++ CItemContainer::ContentsDump使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CItemContainer
的用法示例。
在下文中一共展示了CItemContainer::ContentsDump方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NPC_OnHearPetCmd
//.........这里部分代码省略.........
case PC_STAY:
case PC_STOP:
Skill_Start(NPCACT_STAY);
break;
case PC_TRANSFER:
if ( IsStatFlag(STATF_Conjured) )
{
pSrc->SysMessage(g_Cfg.GetDefaultMsg(DEFMSG_NPC_PET_TARG_TRANSFER_SUMMONED));
return true;
}
pTargPrompt = g_Cfg.GetDefaultMsg(DEFMSG_NPC_PET_TARG_TRANSFER);
break;
case PC_RELEASE:
SoundChar(CRESND_RAND2);
if ( IsStatFlag(STATF_Conjured) || (m_pNPC->m_bonded && IsStatFlag(STATF_DEAD)) )
{
Delete();
return true;
}
Skill_Start(SKILL_NONE);
NPC_PetClearOwners();
ResendTooltip();
break;
case PC_DROP:
{
// Drop backpack items on ground
// NOTE: This is also called on pet release
CItemContainer *pPack = GetPack();
if ( pPack )
{
pPack->ContentsDump(GetTopPoint(), ATTR_OWNED);
break;
}
if ( NPC_CanSpeak() )
Speak(g_Cfg.GetDefaultMsg(DEFMSG_NPC_PET_CARRYNOTHING));
return true;
}
case PC_DROP_ALL:
DropAll(NULL, ATTR_OWNED);
break;
case PC_SPEAK:
NPC_OnPetCommand(true, pSrc);
return true;
case PC_EQUIP:
ItemEquipWeapon(false);
ItemEquipArmor(false);
break;
case PC_STATUS:
{
if ( !NPC_CanSpeak() )
break;
unsigned int iWage = pCharDef->GetHireDayWage();
CItemContainer *pBank = GetBank();
TCHAR *pszMsg = Str_GetTemp();
if ( NPC_IsVendor() )
{
CItemContainer *pCont = GetBank(LAYER_VENDOR_STOCK);
TCHAR *pszTemp1 = Str_GetTemp();
示例2: NPC_OnHearPetCmd
//.........这里部分代码省略.........
Skill_Start(NPCACT_STAY);
break;
case PC_TRANSFER:
if ( IsStatFlag(STATF_Conjured) )
{
pSrc->SysMessage(g_Cfg.GetDefaultMsg(DEFMSG_NPC_PET_TARG_TRANSFER_SUMMONED));
return true;
}
pTargPrompt = g_Cfg.GetDefaultMsg(DEFMSG_NPC_PET_TARG_TRANSFER);
break;
case PC_RELEASE:
if ( IsStatFlag(STATF_Conjured) || (m_pNPC->m_bonded && IsStatFlag(STATF_DEAD)) )
{
Effect(EFFECT_XYZ, ITEMID_FX_TELE_VANISH, this, 10, 15);
Sound(SOUND_TELEPORT);
Delete();
return true;
}
SoundChar(CRESND_NOTICE);
Skill_Start(SKILL_NONE);
NPC_PetClearOwners();
ResendTooltip();
break;
case PC_DROP:
{
// Drop backpack items on ground
// NOTE: This is also called on pet release
CItemContainer *pPack = GetContainer(LAYER_PACK);
if ( pPack )
{
pPack->ContentsDump(GetTopPoint(), ATTR_OWNED);
break;
}
if ( NPC_CanSpeak() )
Speak(g_Cfg.GetDefaultMsg(DEFMSG_NPC_PET_CARRYNOTHING));
return true;
}
case PC_DROP_ALL:
DropAll(NULL, ATTR_OWNED);
break;
case PC_SPEAK:
NPC_PetConfirmCommand(true, pSrc);
return true;
case PC_EQUIP:
ItemEquipWeapon(false);
ItemEquipArmor(false);
break;
case PC_STATUS:
{
if ( !NPC_CanSpeak() )
break;
CItemContainer *pBank = GetContainerCreate(LAYER_BANKBOX);
TCHAR *pszMsg = Str_GetTemp();
if ( NPC_IsVendor() )
{
CItemContainer *pCont = GetContainerCreate(LAYER_VENDOR_STOCK);
TCHAR *pszTemp1 = Str_GetTemp();
TCHAR *pszTemp2 = Str_GetTemp();