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


C++ ITEMGET函数代码示例

本文整理汇总了C++中ITEMGET函数的典型用法代码示例。如果您正苦于以下问题:C++ ITEMGET函数的具体用法?C++ ITEMGET怎么用?C++ ITEMGET使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: ITEMGET

void CShop::ShopItemDelete(int Pos,CShop *Shop)
{
	Shop->m_item[Pos].Clear();
	for (int i = 0; i < Type.size(); i++)
	{
		int type = ITEMGET(Type[i],Index[i]); 
		if ( type == Shop->m_item[Pos].m_Type && Dur[i] == Shop->m_item[Pos].m_Durability && Level[i] == Shop->m_item[Pos].m_Level && 
			Opt1[i] == Shop->m_item[Pos].m_Option1 && Opt2[i] == Shop->m_item[Pos].m_Option2 && Opt3[i] == Shop->m_item[Pos].m_Option3 )
		{
			Type[i] = -1;
			Index[i] = -1;
			Dur[i] = -1;
			Level[i] = -1;
			Opt1[i] = -1;
			Opt2[i] = -1;
			Opt3[i] = -1;
			break;
		}
	}
	Shop->RefreshShopItems();
}
开发者ID:Hagaib,项目名称:p4f-free-emu,代码行数:21,代码来源:Shop.cpp

示例2: LogAdd

int CIllusionTempleEvent::CharmOfLuckCount(int iIndex)
{
	if( OBJMAX_RANGE(iIndex ) == FALSE )
	{
		LogAdd("return %s %d",__FILE__,__LINE__);
		return -1;
	}

	LPOBJ lpObj = &gObj[iIndex];
	int iCharmCount = 0;

	for(int n = 0; n < CHAOS_BOX_SIZE; n++)
	{
		if( lpObj->pChaosBox[n].IsItem() == TRUE &&
			lpObj->pChaosBox[n].m_Type == ITEMGET(14,53) )
		{
			iCharmCount += (int)lpObj->pChaosBox[n].m_Durability;
		}
	}
return iCharmCount;
}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:21,代码来源:IllusionTempleEvent.cpp

示例3: _GetItemType

int CJewelOfHarmonySystem::_GetItemType(CItem *pItem)
{
	int iItemType = JEWELOFHARMONY_ITEM_TYPE_NULL;


	if ( (pItem->m_Type >= ITEMGET(0,0) && pItem->m_Type <ITEMGET(4,0)) || (pItem->m_Type >= ITEMGET(4,0) && pItem->m_Type <ITEMGET(4,7)) || (pItem->m_Type >= ITEMGET(4,8) && pItem->m_Type <ITEMGET(4,15)) || (pItem->m_Type >= ITEMGET(4,16) && pItem->m_Type <ITEMGET(5,0)) )
		iItemType =JEWELOFHARMONY_ITEM_TYPE_WEAPON;

	if (pItem->m_Type >= ITEMGET(5,0) && pItem->m_Type <ITEMGET(6,0) )
		iItemType =JEWELOFHARMONY_ITEM_TYPE_STAFF;

	if (pItem->m_Type >= ITEMGET(6,0) && pItem->m_Type <ITEMGET(12,0) )
		iItemType =JEWELOFHARMONY_ITEM_TYPE_DEFENSE;

	return iItemType;
}
开发者ID:ElBedeawi,项目名称:mu-server-ex,代码行数:16,代码来源:JewelOfHarmonySystem.cpp

示例4: memcpy

bool GensPvP::CheckInvFree(int aIndex)
{
	if(OBJMAX_RANGE(aIndex) == 0)
	{
		return false;
	}

	BYTE Num = gObj[aIndex].GensLevel -1;
	//BYTE TempInventoryMap[BASIC_INVENTORY_SIZE + (MAX_EXTENDED_INV*EXTENDED_INV_SIZE)];
	BYTE TempInventoryMap[MAIN_INVENTORY_NORMAL_SIZE + (MAX_EXTENDED_INV*EXTENDED_INV_SIZE) + PSHOP_SIZE];
	memcpy(TempInventoryMap,gObj[aIndex].pInventoryMap,ReadConfig.GETSLOTS(aIndex));

	for(int x=0;x<this->rItem[Num].Count;x++)
	{
		int item = ITEMGET(this->rItem[Num].Type,this->rItem[Num].Index);
		if(gObjTempInventoryInsertItem(&gObj[aIndex],item,TempInventoryMap) == 255)
		{
			return false;
		}
	}
	return true;
}
开发者ID:ADMTec,项目名称:GameServer,代码行数:22,代码来源:GensPvP.cpp

示例5: GetTickCount

//004AA480
void MapClass::StateSetDestroy()
{
    int CurTime = GetTickCount();

    for (int n=0; n<MAX_MAPITEM; n++)
    {
        if ( this->m_cItem[n].IsItem() != FALSE )
        {
            if ( this->m_cItem[n].m_State == 1 )
            {
                this->m_cItem[n].m_State = 2;
            }
            else if ( this->m_cItem[n].m_State == 8 )
            {
                this->m_cItem[n].Clear();
                this->m_cItem[n].live = 0;
                this->m_cItem[n].Give = 1;
            }
        }

        if ( this->m_cItem[n].IsItem() != FALSE )
        {
            if ( this->m_cItem[n].m_State != 8 )
            {
                if ( CurTime > this->m_cItem[n].m_Time )
                {
                    LogAddTD(lMsg.Get(MSGGET(4, 76)), this->m_cItem[n].GetName(), this->m_cItem[n].m_Type, this->m_cItem[n].m_Level, this->m_cItem[n].m_Special[0] , this->m_cItem[n].m_Number);
                    this->m_cItem[n].m_State = 8;

                    if(this->m_cItem[n].m_Type == ITEMGET(14,64)) //season 2.5 add-on
                    {
                        g_IllusionTempleEvent.SetNpcStatueRegen(this->thisMapNumber);
                    }
                }
            }
        }
    }
}
开发者ID:Natzugen,项目名称:server-xmtur,代码行数:39,代码来源:MapClass.cpp

示例6: CheckOverlapCsMarks

int CCastleSiegeSync::CheckOverlapCsMarks(int iIndex)
{
	for ( int x=INVENTORY_BAG_START;x<ReadConfig.MAIN_INVENTORY_SIZE(iIndex,false);x++)
	{
		if ( gObj[iIndex].pInventory[x].IsItem() == TRUE )
		{
			if ( gObj[iIndex].pInventory[x].m_Type == ITEMGET(14,21) )
			{
				if ( gObj[iIndex].pInventory[x].m_Level == 3 )
				{
					int op = gObj[iIndex].pInventory[x].m_Durability;

					if ( ITEM_DUR_RANGE(op) != FALSE)
					{
						return x;
					}
				}
			}
		}
	}

	return -1;
}
开发者ID:ADMTec,项目名称:GameServer,代码行数:23,代码来源:CastleSiegeSync.cpp

示例7: switch

BYTE _SOCKET_SPHERE_OPTION::SetSphereOption(_SOCKET_SEED_DATA* lpSeedData,BYTE btLevel)
{
	if( lpSeedData == NULL || btLevel == NULL )
	{
		return false;
	}

	this->btOptionId = btLevel * MAX_SEED_OPTION + lpSeedData->btOption;
	this->btOption = lpSeedData->btOption;
	this->btGroup = lpSeedData->btGroup;
	this->btIndex = lpSeedData->btIndex;
	this->btIncType = lpSeedData->btIncType;
	this->btLevel = btLevel;
	this->wSphereValue = lpSeedData->btIncValue[-1+btLevel];

	switch( lpSeedData->btGroup )
	{
	case 1:
		this->SeedItem = ITEMGET(12,100);
		break;
	case 2:
		this->SeedItem = ITEMGET(12,101);
		break;
	case 3:
		this->SeedItem = ITEMGET(12,102);
		break;
	case 4:
		this->SeedItem = ITEMGET(12,103);
		break;
	case 5:
		this->SeedItem = ITEMGET(12,104);
		break;
	case 6:
		this->SeedItem = ITEMGET(12,105);
		break;
	case 7:
		break;
	default:
		return false;
	}

	this->SeedItem += (this->btLevel -1)*6;

return true;
}
开发者ID:stimpy76,项目名称:zTeam-Source-Season8,代码行数:45,代码来源:SocketItemOption.cpp

示例8: CheckOverlapKundunMark

//00415FC0 - identical
int CKalimaGate::CheckOverlapKundunMark(int iIndex, BYTE btLevel)
{
	for ( int x = 0;x<MAIN_INVENTORY_SIZE;x++ )
	{
		if ( gObj[iIndex].pInventory[x].IsItem() == TRUE )
		{
			if ( gObj[iIndex].pInventory[x].m_Type == ITEMGET(14, 29) )
			{
				if ( gObj[iIndex].pInventory[x].m_Level == btLevel )
				{
					int iITEM_DUR = gObj[iIndex].pInventory[x].m_Durability;

					if ( KUNDUN_MARK_RANGE(iITEM_DUR) != FALSE )
					{
						return x;
					}
				}
			}
		}
	}

	return -1;
}
开发者ID:331515194,项目名称:zTeamS6.3,代码行数:24,代码来源:KalimaGate.cpp

示例9: ITEMGET

BOOL CCashLotterySystem::InsertItem(int iItemCategory, int iItemType, int iItemIndex, int iItemLevelMin, int iItemLevelMax, int iSkillOption, int iLuckOption, int iAddOption, int iExOption)
{
	if ( iItemCategory < 0 || iItemCategory > MAX_LOTTERY_ITEM_CATEGORY )
		return FALSE;

	int iItemCount = this->LotteryItemListCount[iItemCategory];

	if ( iItemCount < 0 || iItemCount > MAX_LOTTERY_ITEM_COUNT )
		return FALSE;

	this->LotteryItemList[iItemCategory][iItemCount].btItemType = iItemType;
	this->LotteryItemList[iItemCategory][iItemCount].wItemIndex = iItemIndex;
	this->LotteryItemList[iItemCategory][iItemCount].btItemLevelMin = iItemLevelMin;
	this->LotteryItemList[iItemCategory][iItemCount].btItemLevelMax = iItemLevelMax;
	this->LotteryItemList[iItemCategory][iItemCount].btSkillOption = iSkillOption;
	this->LotteryItemList[iItemCategory][iItemCount].btLuckOption = iLuckOption;
	this->LotteryItemList[iItemCategory][iItemCount].btAddOption = iAddOption;
	this->LotteryItemList[iItemCategory][iItemCount].btExOption = iExOption;

	int iItemCode = 0;
	int iItemHeight = 0;
	int iItemWidth = 0;

	iItemCode = ITEMGET(iItemType, iItemIndex);
	iItemHeight = ItemAttribute[iItemCode].Height;
	iItemWidth = ItemAttribute[iItemCode].Width;

	if ( iItemWidth > this->iItemMaxWidth )
		this->iItemMaxWidth = iItemWidth;

	if ( iItemHeight > this->iItemMaxHeight )
		this->iItemMaxHeight = iItemHeight;

	this->LotteryItemListCount[iItemCategory]++;

	return TRUE;
}
开发者ID:AkiraJue,项目名称:OpenMuS9,代码行数:37,代码来源:CashLotterySystem.cpp

示例10: switch

BOOL CIllusionTempleEvent::CheckChangeRing(int nType)
{
	int bRet = 0;

	switch(nType)
	{
		case ITEMGET(13,10):
		case ITEMGET(13,39):
		case ITEMGET(13,40):
		case ITEMGET(13,41):
		case ITEMGET(13,68): //season4 add-on
		case ITEMGET(13,76): //season4.6 add-on
			bRet = 1;
			break;
	}

	return bRet;
}
开发者ID:EderRS,项目名称:muOnline-season6,代码行数:18,代码来源:IllusionTempleEvent.cpp

示例11: InitQuestItem

void CQuestInfo::InitQuestItem()
{
	int questcount = this->GetQeustCount();
	int foundquest = 0;
	LPQUEST_INFO lpQuestInfo;
	LPQUEST_SUB_INFO lpSubInfo;

	for (int i=0;i<MAX_QUEST_INFO;i++)
	{
		lpQuestInfo = this->GetQuestInfo(i);

		if ( lpQuestInfo == NULL )
		{
			continue;
		}

		for ( int n=0;n<lpQuestInfo->QuestSubInfoCount;n++)
		{
			lpSubInfo = &lpQuestInfo->QuestSubInfo[n];

			if ( lpSubInfo != NULL )
			{
				if ( lpSubInfo->QuestType == 1 )
				{
					LPITEM_ATTRIBUTE p = &ItemAttribute[ITEMGET(lpSubInfo->NeedType, lpSubInfo->NeedSubType) ];
					p->QuestItem = TRUE;
					LogAddTD("[Quest] [SetQuestItem] %s", p->Name);
				}
			}
		}
		foundquest++;
		if ( foundquest == questcount )
		{
			return;
		}
	}
}
开发者ID:constantinbogdan,项目名称:node3d,代码行数:37,代码来源:QuestInfo.cpp

示例12: ITEMGET

StatGem::StatGem()
{
	this->m_GemInfo[0].ItemID		= ITEMGET(14, 308);
	this->m_GemInfo[0].EffectType	= StatGemType::DoubleDamageRate;
	this->m_GemInfo[0].EffectValue	= 100;
	this->m_GemInfo[1].ItemID		= ITEMGET(14, 309);
	this->m_GemInfo[1].EffectType	= StatGemType::ExcellentDamageRate;
	this->m_GemInfo[1].EffectValue	= 100;
	this->m_GemInfo[2].ItemID		= ITEMGET(14, 310);
	this->m_GemInfo[2].EffectType	= StatGemType::DamageDecrease;
	this->m_GemInfo[2].EffectValue	= 100;
	this->m_GemInfo[3].ItemID		= ITEMGET(14, 311);
	this->m_GemInfo[3].EffectType	= StatGemType::DefenseIncrease;
	this->m_GemInfo[3].EffectValue	= 100;
	this->m_GemInfo[4].ItemID		= ITEMGET(14, 312);
	this->m_GemInfo[4].EffectType	= StatGemType::ZenHuntIncrease;
	this->m_GemInfo[4].EffectValue	= 100;
	this->m_GemInfo[5].ItemID		= ITEMGET(14, 313);
	this->m_GemInfo[5].EffectType	= StatGemType::MaxLifeIncrease;
	this->m_GemInfo[5].EffectValue	= 100;
}
开发者ID:stimpy76,项目名称:zTeam-Source-Season8,代码行数:21,代码来源:StatGem.cpp

示例13: switch

//00556760 //identical Calls alloc 3x
BYTE CSeedSphere::SetInfo(CSeed * lpSeed, BYTE slot_count)
{
	if(lpSeed == NULL || !slot_count)
	{
		return 0;
	}
	
	this->m_btItemByteOption	= slot_count * 50 + lpSeed->m_btOptionIndex;
	this->m_btOptionIndex	= lpSeed->m_btOptionIndex;

	this->m_btElementIndex	= lpSeed->m_btElementIndex;
	
	this->m_btItemLevel	= lpSeed->m_btItemLevel;
	
	this->m_btOptionType	= lpSeed->m_btOptionType;
	
	this->m_btSocketSlotCount	= slot_count;
	
	this->m_wSocketSlot  = lpSeed->m_btSocketSlot[slot_count-1];

	switch(lpSeed->m_btElementIndex)
	{
	case 1:this->m_iItemIndex = ITEMGET(12,100);	break;
	case 2:this->m_iItemIndex = ITEMGET(12,101);	break;
	case 3:this->m_iItemIndex = ITEMGET(12,102);	break;
	case 4:this->m_iItemIndex = ITEMGET(12,103);	break;
	case 5:this->m_iItemIndex = ITEMGET(12,104);	break;
	case 6:this->m_iItemIndex = ITEMGET(12,105);	break;
	case 7:								break;
	default:							return 0;
	}

	this->m_iItemIndex += (this->m_btSocketSlotCount - 1) * 6;

	return 1;
}
开发者ID:Natzugen,项目名称:server-xmtur,代码行数:37,代码来源:SocketData.cpp

示例14: switch

int CCashItemPeriodSystem::GetItemPeriodInfoEffectID(int iItemCode)
{
	int iValue = 0;

	switch(iItemCode)
	{
	case ITEMGET(13,43):
		iValue = AT_CSHOP_SEAL_OF_ASCENSION;
		break;
	case ITEMGET(13,44):
		iValue = AT_CSHOP_SEAL_OF_WEALTH;
		break;
	case ITEMGET(13,45):
		iValue = AT_CSHOP_SEAL_OF_SUSTENANCE;
		break;
	case ITEMGET(13,59):
		iValue = AT_CSHOP_SEAL_OF_MOBILITY;
		break;
	case ITEMGET(13,62): //Season 3.5
		iValue = AT_CSHOP_SEAL_OF_HEALING;
		break;
	case ITEMGET(13,63): //Season 3.5
		iValue = AT_CSHOP_SEAL_OF_DIVINITY;
		break;
	case ITEMGET(14,72):
		iValue = AT_CSHOP_SCROLL_OF_QUICKNESS;
		break;
	case ITEMGET(14,73):
		iValue = AT_CSHOP_SCROLL_OF_DEFENSE;
		break;
	case ITEMGET(14,74):
		iValue = AT_CSHOP_SCROLL_OF_WRATH;
		break;
	case ITEMGET(14,75):
		iValue = AT_CSHOP_SCROLL_OF_WIZARDRY;
		break;
	case ITEMGET(14,76):
		iValue = AT_CSHOP_SCROLL_OF_HEALTH;
		break;
	case ITEMGET(14,77):
		iValue = AT_CSHOP_SCROLL_OF_MANA;
		break;
	case ITEMGET(14,97): //Season 3.5
		iValue = AT_CSHOP_SCROLL_OF_BATTLE;
		break;
	case ITEMGET(14,98): //Season 3.5
		iValue = AT_CSHOP_SCROLL_OF_STRENGTHENER;
		break;
	case ITEMGET(14,78):
		iValue = AT_CSHOP_LEAP_OF_STRENGTH;
		break;
	case ITEMGET(14,79):
		iValue = AT_CSHOP_LEAP_OF_QUICKNESS;
		break;
	case ITEMGET(14,80):
		iValue = AT_CSHOP_LEAP_OF_HEALTH;
		break;
	case ITEMGET(14,81):
		iValue = AT_CSHOP_LEAP_OF_ENERGY;
		break;
	case ITEMGET(14,82):
		iValue = AT_CSHOP_LEAP_OF_CONTROL;
		break;
	case ITEMGET(13,81): //Season 4.5
		iValue = AT_CSHOP_GUARDIAN_AMULET;
		break;
	case ITEMGET(13,82): //Season 4.5
		iValue = AT_CSHOP_PROTECT_AMULET;
		break;
	case ITEMGET(13,93): //Season 4.5
		iValue = AT_CSHOP_MASTER_SEAL_OF_ASCENSION;
		break;
	case ITEMGET(13,94): //Season 4.5
		iValue = AT_CSHOP_MASTER_SEAL_OF_WEALTH;
		break;
	case ITEMGET(13,104): //AG AURA BOOST
		iValue = AT_CSHOP_AG_AURA;
		break;
	case ITEMGET(13,105): //AG AURA BOOST
		iValue = AT_CSHOP_SD_AURA;
		break;
	default:
		iValue = AT_NULL_BUFF_EFFECT;
		break;
	}

	return iValue;
}
开发者ID:331515194,项目名称:zTeamS6.3,代码行数:88,代码来源:CashItemPeriodSystem.cpp

示例15: switch

void CLuckyCoin::ExchangeCoin(LPOBJ lpObj,int Type)
{
	int Count = 0;
	BYTE Socket[5];
	Socket[0] = 0xFF;
	Socket[1] = 0xFF;
	Socket[2] = 0xFF;
	Socket[3] = 0xFF;
	Socket[4] = 0xFF;
	CItem item;
	// ----
	switch ( Type )
	{
	case 0:	// -- 10 Coin Change
		Count = gLuckyCoin.GetCoinCount(lpObj);
		if ( Count < 10 )
		{
			GCServerMsgStringSend("[LuckyCoin]: Need 10 coins",lpObj->m_Index,1);
			return;
		}
		else
		{
			item.m_Type = ITEMGET(14,13);
			// ----
			if ( gObjInventoryInsertItem(lpObj->m_Index,item) == -1 )
			{
				return;
			}
			for (int i=0;i<10;i++)
			{
				gLuckyCoin.DeleteCoin(lpObj);
			}

			//ItemSerialCreateSend(lpObj->m_Index,236,0,0,ITEMGET(14,14),0,0,0,0,0,lpObj->m_Index,0,0,Socket);
		}
		break;
	case 1:	// -- 20 Coin Change
		Count = gLuckyCoin.GetCoinCount(lpObj);
		if ( Count < 20 )
		{
			GCServerMsgStringSend("[LuckyCoin]: Need 20 coins",lpObj->m_Index,1);
			return;
		}
		else
		{
			item.m_Type = ITEMGET(14,14);
			// ----
			if ( gObjInventoryInsertItem(lpObj->m_Index,item) == -1 )
			{
				return;
			}
			for (int i=0;i<20;i++)
			{
				gLuckyCoin.DeleteCoin(lpObj);
			}
			//ItemSerialCreateSend(lpObj->m_Index,236,0,0,ITEMGET(14,13),0,0,0,0,0,lpObj->m_Index,0,0,Socket);
		}
		break;
	case 2:	// -- 30 Coin Change
		Count = gLuckyCoin.GetCoinCount(lpObj);
		if ( Count < 30 )
		{
			GCServerMsgStringSend("[LuckyCoin]: Need 30 coins",lpObj->m_Index,1);
			return;
		}
		else
		{
			item.m_Type = ITEMGET(14,16);
			// ----
			if ( gObjInventoryInsertItem(lpObj->m_Index,item) == -1 )
			{
				return;
			}
			for (int i=0;i<30;i++)
			{
				gLuckyCoin.DeleteCoin(lpObj);
			}
			//ItemSerialCreateSend(lpObj->m_Index,236,0,0,ITEMGET(14,16),0,0,0,0,0,lpObj->m_Index,0,0,Socket);
		}
		break;
	}
}
开发者ID:kelemeto76,项目名称:mu-bk-server-sourcecode,代码行数:82,代码来源:LuckyCoin.cpp


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