当前位置: 首页>>代码示例>>C++>>正文


C++ P_ITEM::DeleteAmount方法代码示例

本文整理汇总了C++中P_ITEM::DeleteAmount方法的典型用法代码示例。如果您正苦于以下问题:C++ P_ITEM::DeleteAmount方法的具体用法?C++ P_ITEM::DeleteAmount怎么用?C++ P_ITEM::DeleteAmount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在P_ITEM的用法示例。


在下文中一共展示了P_ITEM::DeleteAmount方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: takeGold

UINT32 cNPC::takeGold( UINT32 amount, bool useBank )
{
	P_ITEM pPack = getBackpack();

	UINT32 dAmount = 0;

	if( pPack )
		dAmount = pPack->DeleteAmount( amount, 0xEED, 0 );

	return dAmount;
}
开发者ID:BackupTheBerlios,项目名称:wolfpack-svn,代码行数:11,代码来源:npc.cpp

示例2: RemoveShields

static void RemoveShields(P_CHAR pc)
{
	cwmWorldState->RemoveItemsFromCharBody(pc->serial,0x1B, 0xC3);
	cwmWorldState->RemoveItemsFromCharBody(pc->serial,0x1B, 0xC4);
	P_ITEM pPack = Packitem(pc);
	if (pPack)
	{
		pPack->DeleteAmount(666,0x1BC3);	// hope they don't have more than 666 shields ;-) (Duke)
		pPack->DeleteAmount(666,0x1BC4);
	}
}
开发者ID:BackupTheBerlios,项目名称:wolfpack-svn,代码行数:11,代码来源:guildstones.cpp

示例3: BountyWithdrawGold

bool cBounty::BountyWithdrawGold( P_CHAR pVictim, int nAmount )
{
	int has = pVictim->CountBankGold();
	if (has < nAmount)
		return false;

	P_ITEM pBox = pVictim->GetBankBox();
	if (!pBox)
		return false;	// shouldn't happen coz it's needed in CountBankGold...

	pBox->DeleteAmount(nAmount,0x0EED);
	return true;
}
开发者ID:BackupTheBerlios,项目名称:wolfpack-svn,代码行数:13,代码来源:bounty.cpp


注:本文中的P_ITEM::DeleteAmount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。