• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ITEMGET函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: ZTLuaManager

void ClassCalc::GetAttackDamage(LPOBJ lpUser)
{
#if (ENABLETEST_ZTLUA == 1)
    ZTLuaManager* LuaMng = new ZTLuaManager(FILE_LUA_CHARACTERBASICS);
    ZTLuaUnit::Bind(LuaMng->getLua());
    ZTLuaItem::Bind(LuaMng->getLua());
    LuaMng->Call("setAttackDamage", lpUser->m_Index);
    ZTLuaManager::Delete(LuaMng);
#else
    CItem* Right	= &lpUser->pInventory[0];
    CItem* Left		= &lpUser->pInventory[1];
    int Strength	= lpUser->Strength + lpUser->AddStrength;
    int Dexterity	= lpUser->Dexterity + lpUser->AddDexterity;
    int Vitality	= lpUser->Vitality + lpUser->AddVitality;
    int Energy		= lpUser->Energy + lpUser->AddEnergy;
    WORD Class		= lpUser->Class;
    // ----
    if( Class == CLASS_WIZARD || Class == CLASS_KNIGHT )
    {
        lpUser->m_AttackDamageMinRight	= Strength / this->m_Data[Class].AttackDamageMinRightDiv1;
        lpUser->m_AttackDamageMaxRight	= Strength / this->m_Data[Class].AttackDamageMaxRightDiv1;
        lpUser->m_AttackDamageMinLeft	= Strength / this->m_Data[Class].AttackDamageMinLeftDiv1;
        lpUser->m_AttackDamageMaxLeft	= Strength / this->m_Data[Class].AttackDamageMaxLeftDiv1;
    }
    else if( Class == CLASS_ELF )
    {
        if(		(Right->m_Type >= ITEMGET(4,8) && Right->m_Type < ITEMGET(4,15) )
                ||	(Left->m_Type >= ITEMGET(4,0) && Left->m_Type < ITEMGET(4,7))
                ||	Right->m_Type == ITEMGET(4,16)
                ||	Left->m_Type == ITEMGET(4,17)
                ||	Right->m_Type == ITEMGET(4,18)
                ||	Right->m_Type == ITEMGET(4,19)
                ||	Left->m_Type == ITEMGET(4,20)
                ||	Left->m_Type == ITEMGET(4,21)
                ||	Left->m_Type == ITEMGET(4,22)
                ||	Left->m_Type == ITEMGET(4,23)
                ||	Left->m_Type == ITEMGET(4,24)
                ||	Left->m_Type == ITEMGET(4,25)
                ||	Right->m_Type == ITEMGET(4,26)
                ||	Left->m_Type == ITEMGET(4,27))
        {
            if(		(Right->IsItem() && !Right->m_IsValidItem)
                    ||	(Left->IsItem() && !Left->m_IsValidItem) )
            {
                lpUser->m_AttackDamageMinRight	= (Dexterity + Strength) / this->m_Data[Class].AttackDamageMinRightDiv3;
                lpUser->m_AttackDamageMaxRight	= (Dexterity + Strength) / this->m_Data[Class].AttackDamageMaxRightDiv3;
                lpUser->m_AttackDamageMinLeft	= (Dexterity + Strength) / this->m_Data[Class].AttackDamageMinLeftDiv3;
                lpUser->m_AttackDamageMaxLeft	= (Dexterity + Strength) / this->m_Data[Class].AttackDamageMaxLeftDiv3;
            }
            else
            {
                lpUser->m_AttackDamageMinRight	= (Dexterity / this->m_Data[Class].AttackDamageMinRightDiv1) + (Strength / this->m_Data[Class].AttackDamageMinRightDiv2);
                lpUser->m_AttackDamageMaxRight	= (Dexterity / this->m_Data[Class].AttackDamageMaxRightDiv1) + (Strength / this->m_Data[Class].AttackDamageMaxRightDiv2);
                lpUser->m_AttackDamageMinLeft	= (Dexterity / this->m_Data[Class].AttackDamageMinLeftDiv1) + (Strength / this->m_Data[Class].AttackDamageMinLeftDiv2);
                lpUser->m_AttackDamageMaxLeft	= (Dexterity / this->m_Data[Class].AttackDamageMaxLeftDiv1) + (Strength / this->m_Data[Class].AttackDamageMaxLeftDiv2);
            }
        }
        else
        {
            lpUser->m_AttackDamageMinRight	= (Dexterity + Strength) / this->m_Data[Class].AttackDamageMinRightDiv3;
            lpUser->m_AttackDamageMaxRight	= (Dexterity + Strength) / this->m_Data[Class].AttackDamageMaxRightDiv3;
            lpUser->m_AttackDamageMinLeft	= (Dexterity + Strength) / this->m_Data[Class].AttackDamageMinLeftDiv3;
            lpUser->m_AttackDamageMaxLeft	= (Dexterity + Strength) / this->m_Data[Class].AttackDamageMaxLeftDiv3;
        }
    }
    else if( Class == CLASS_MAGUMSA || Class == CLASS_DARKLORD )
    {
        lpUser->m_AttackDamageMinRight	= (Strength / this->m_Data[Class].AttackDamageMinRightDiv1) + (Energy / this->m_Data[Class].AttackDamageMinRightDiv2);
        lpUser->m_AttackDamageMaxRight	= (Strength / this->m_Data[Class].AttackDamageMaxRightDiv1) + (Energy / this->m_Data[Class].AttackDamageMaxRightDiv2);
        lpUser->m_AttackDamageMinLeft	= (Strength / this->m_Data[Class].AttackDamageMinLeftDiv1) + (Energy / this->m_Data[Class].AttackDamageMinLeftDiv2);
        lpUser->m_AttackDamageMaxLeft	= (Strength / this->m_Data[Class].AttackDamageMaxLeftDiv1) + (Energy / this->m_Data[Class].AttackDamageMaxLeftDiv2);
    }
    else if( Class == CLASS_SUMMONER )
    {
        lpUser->m_AttackDamageMinRight	= ((Strength + Dexterity) / this->m_Data[Class].AttackDamageMinRightDiv1);
        lpUser->m_AttackDamageMaxRight	= ((Strength + Dexterity) / this->m_Data[Class].AttackDamageMaxRightDiv1);
        lpUser->m_AttackDamageMinLeft	= ((Strength + Dexterity) / this->m_Data[Class].AttackDamageMinLeftDiv1);
        lpUser->m_AttackDamageMaxLeft	= ((Strength + Dexterity) / this->m_Data[Class].AttackDamageMaxLeftDiv1);
    }
    else if( Class == CLASS_FIGHTER )
    {
        lpUser->m_AttackDamageMinRight	= Vitality / this->m_Data[Class].AttackDamageMinRightDiv1 + Strength / this->m_Data[Class].AttackDamageMinRightDiv2;
        lpUser->m_AttackDamageMaxRight	= Vitality / this->m_Data[Class].AttackDamageMaxRightDiv1 + Strength / this->m_Data[Class].AttackDamageMaxRightDiv2;
        lpUser->m_AttackDamageMinLeft	= Vitality / this->m_Data[Class].AttackDamageMinLeftDiv1 + Strength / this->m_Data[Class].AttackDamageMinLeftDiv2;
        lpUser->m_AttackDamageMaxLeft	= Vitality / this->m_Data[Class].AttackDamageMaxLeftDiv1 + Strength / this->m_Data[Class].AttackDamageMaxLeftDiv2;
    }
    else
    {
        lpUser->m_AttackDamageMinRight	= Strength / 8;
        lpUser->m_AttackDamageMaxRight	= Strength / 4;
        lpUser->m_AttackDamageMinLeft	= Strength / 8;
        lpUser->m_AttackDamageMaxLeft	= Strength / 4;
    }
#endif
}
开发者ID:stimpy76,项目名称:OpenMuS9,代码行数:95,代码来源:ClassCalc.cpp


示例17: if

void CCalCharacter::gObjCalCharacter(int aIndex)
{
	LPOBJ lpObj = &gObj[aIndex];
	int Strength = 0;
	int Dexterity = 0;
	int Vitality = 0;
	int Energy = 0;
	int Leadership = 0;
	// ----
	CItem * Right = &lpObj->pInventory[0];
	CItem * Left  = &lpObj->pInventory[1];
	CItem * Helm  = &lpObj->pInventory[2];
	CItem * Armor  = &lpObj->pInventory[3];
	CItem * Pants  = &lpObj->pInventory[4];
	CItem * Gloves = &lpObj->pInventory[5];
	CItem * Boots = &lpObj->pInventory[6];
	CItem * Wings = &lpObj->pInventory[7];
	CItem * Helper = &lpObj->pInventory[8];
	CItem * Amulet = &lpObj->pInventory[9];
	CItem * Ring01 = &lpObj->pInventory[10];
	CItem * Ring02 = &lpObj->pInventory[11];
	lpObj->HaveWeaponInHand = true;
	// -------------------------------------------------------
	// Check Weapon in hand
	// -------------------------------------------------------
	if ( Right->IsItem() == false && Left->IsItem() == false )
	{
		lpObj->HaveWeaponInHand = false;
	}
	else if ( Left->IsItem() == false && Right->m_Type == ITEMGET(4,15) ) // Arrow
	{
		lpObj->HaveWeaponInHand = false;
	}
	else if ( Right->IsItem() == false )
	{
		int iType = Left->m_Type / MAX_SUBTYPE_ITEMS;

		if ( Left->m_Type == ITEMGET(4,7) ) // Bolt
		{
			lpObj->HaveWeaponInHand = false;
		}
		else if ( iType == 6 ) // Shield
		{
			lpObj->HaveWeaponInHand = false;
		}
	}
	// -------------------------------------------------------
	lpObj->AddLife = 0;
	lpObj->AddMana = 0;
	lpObj->MonsterDieGetMoney = 0;
	lpObj->MonsterDieGetLife = 0;
	lpObj->MonsterDieGetMana = 0;
	lpObj->DamageReflect = 0;
	lpObj->DamageMinus = 0;
	lpObj->SkillLongSpearChange = false;

	if ( lpObj->m_iItemEffectValidTime > 0 )
	{
		g_ItemAddOption.PrevSetItemLastEffectForHallowin(lpObj);
	}

	int iItemIndex;
	BOOL bIsChangeItem;	// lc34

	for ( iItemIndex=0; iItemIndex<MAX_PLAYER_EQUIPMENT;iItemIndex++)
	{
		if ( lpObj->pInventory[iItemIndex].IsItem() != FALSE )
		{
			lpObj->pInventory[iItemIndex].m_IsValidItem = true;
		}
	}

	do
	{
		lpObj->SetOpAddMaxAttackDamage = 0;
		lpObj->SetOpAddMinAttackDamage = 0;
		lpObj->SetOpAddDamage = 0;
		lpObj->SetOpIncAGValue = 0;
		lpObj->SetOpAddCriticalDamageSuccessRate = 0;
		lpObj->SetOpAddCriticalDamage = 0;
		lpObj->SetOpAddExDamageSuccessRate = 0;
		lpObj->SetOpAddExDamage = 0;
		lpObj->SetOpAddSkillAttack = 0;
		lpObj->AddStrength = 0;
		lpObj->AddDexterity = 0;
		lpObj->AddVitality = 0;
		lpObj->AddEnergy = 0;
		lpObj->AddBP = 0;
		lpObj->iAddShield = 0;
		lpObj->SetOpAddAttackDamage = 0;
		lpObj->SetOpAddDefence = 0;
		lpObj->SetOpAddMagicPower = 0;
		lpObj->SetOpAddDefenceRate = 0;
		lpObj->SetOpIgnoreDefense = 0;
		lpObj->SetOpDoubleDamage = 0;
		lpObj->SetOpTwoHandSwordImproveDamage = 0;
		lpObj->SetOpImproveSuccessAttackRate = 0;
		lpObj->SetOpReflectionDamage = 0;
		lpObj->SetOpImproveSheldDefence = 0;
		lpObj->SetOpDecreaseAG = 0;
//.........这里部分代码省略.........
开发者ID:kelemeto76,项目名称:mu-bk-server-sourcecode,代码行数:101,代码来源:ObjCalCharacter.cpp


示例18: CheckItemOptForGetExpEx

void CheckItemOptForGetExpEx(LPOBJ lpObj,__int64 & iExp,int bRewardExp)
{
	__int64 iRetExp = iExp;
	int iAddExpRate = 100;

	if ( gObjCheckUsedBuffEffect(lpObj, AT_CSHOP_SEAL_OF_SUSTENANCE) || gObjCheckUsedBuffEffect(lpObj, AT_PCBANG_SEAL_OF_SUSTENANCE) )
	{
		iRetExp = 0;
	}
	else if (
		 gObjCheckUsedBuffEffect(lpObj, AT_CSHOP_SEAL_OF_ASCENSION)
      || gObjCheckUsedBuffEffect(lpObj, AT_CSHOP_SEAL_OF_WEALTH)
      || gObjCheckUsedBuffEffect(lpObj, AT_PCBANG_SEAL_OF_ASCENSION)
      || gObjCheckUsedBuffEffect(lpObj, AT_PCBANG_SEAL_OF_WEALTH)
      || gObjCheckUsedBuffEffect(lpObj, AT_CSHOP_SEAL_OF_HEALING)
      || gObjCheckUsedBuffEffect(lpObj, AT_CSHOP_MASTER_SEAL_OF_ASCENSION)
      || gObjCheckUsedBuffEffect(lpObj, AT_CSHOP_MASTER_SEAL_OF_WEALTH) )
    {
		iAddExpRate = gObjGetTotalValueOfEffect(lpObj, ADD_OPTION_EXPERIENCE);
		
		if( g_MasterExp.IsEnabled(lpObj) )
		{
			if ( gObjCheckUsedBuffEffect(lpObj, AT_CSHOP_MASTER_SEAL_OF_ASCENSION) || gObjCheckUsedBuffEffect(lpObj, AT_CSHOP_MASTER_SEAL_OF_WEALTH) )
			{
				if ( bRewardExp )
					iAddExpRate = 100;
			}
			else
			{
				iAddExpRate = 100;
			}
		}
		else
		{
			if ( gObjCheckUsedBuffEffect(lpObj, AT_CSHOP_MASTER_SEAL_OF_ASCENSION) || gObjCheckUsedBuffEffect(lpObj, AT_CSHOP_MASTER_SEAL_OF_WEALTH) )
			{
				iAddExpRate = 100;
			}
			else
			{
				if ( bRewardExp )
					iAddExpRate = 100;
			}
		}
		//iRetExp = iRetExp * iAddExpRate / 100;
    }
	else if ( gObjCheckUsedBuffEffect(lpObj, AT_PARTY_EXP_BONUS) )
	{
        iAddExpRate = 190;

        if ( lpObj->PartyNumber >= 0 )
		{
			for (int i = 0; i < MAX_USER_IN_PARTY; ++i )
			{
				LPOBJ lpPartyObj = &gObj[gParty.m_PartyS[lpObj->PartyNumber].Number[i]]; // wz bug ? need to check for -1
				int iPartyDis = gObjCalDistance(lpObj, lpObj);
				
				if ( lpObj->m_Index != lpPartyObj->m_Index && lpObj->MapNumber == lpPartyObj->MapNumber && iPartyDis < 10 )
					iAddExpRate += 10;
			}
        }
        
		// g_MasterLevelSystem.IsMasterLevelUser(lpObj) )
		if ( bRewardExp || g_MasterExp.IsEnabled(lpObj) )
			iAddExpRate = 100;
		
		//iRetExp = iRetExp * iAddExpRate / 100;
	}
	else if ( gObjCheckUsedBuffEffect(lpObj, AT_NEWPVPSYSTEM_REWARD) )
	{
		// g_MasterLevelSystem.IsMasterLevelUser(lpObj) )
		if( g_MasterExp.IsEnabled(lpObj) )
			return; // webzen error ? ...

#if (ENABLETEST_NEWPVP == 1)
        if (g_NewPVP.IsVulcanusMap(lpObj->MapNumber) && iRetExp == iExp) {
			iExp = iRetExp * gObjGetTotalValueOfEffect(lpObj, 60) / 100 + iRetExp;
			return;
		}
#endif
	}

	if( (lpObj->pInventory[10].IsItem() && lpObj->pInventory[10].m_Type == ITEMGET(13,77) && lpObj->pInventory[10].m_Durability > 0.0 &&  !lpObj->pInventory[10].m_bExpired) ||
		(lpObj->pInventory[11].IsItem() && lpObj->pInventory[11].m_Type == ITEMGET(13,77) && lpObj->pInventory[11].m_Durability > 0.0 &&  !lpObj->pInventory[11].m_bExpired))
	{
		if( gObjCheckUsedBuffEffect(lpObj,AT_CSHOP_SEAL_OF_SUSTENANCE) || gObjCheckUsedBuffEffect(lpObj,AT_PCBANG_SEAL_OF_SUSTENANCE) )
		{
			iRetExp = 0;
		}
		else
		{
			if( bRewardExp )
			{
				iAddExpRate = 100;
			}
			else
			{
				iAddExpRate += 30;
			}
			
//.........这里部分代码省略.........
开发者ID:stimpy76,项目名称:zTeam-Source-Season8,代码行数:101,代码来源:BuffEffectSlot.cpp


示例19: gObjSetItemApply

void gObjSetItemApply(LPOBJ lpObj)
{
	lpObj->m_AttackDamageMinLeft += lpObj->SetOpAddAttackDamage;
	lpObj->m_AttackDamageMaxLeft += lpObj->SetOpAddAttackDamage;
	lpObj->m_AttackDamageMinRight += lpObj->SetOpAddAttackDamage;
	lpObj->m_AttackDamageMaxRight += lpObj->SetOpAddAttackDamage;

	lpObj->m_AttackDamageMinLeft += lpObj->SetOpAddMinAttackDamage;
	lpObj->m_AttackDamageMinRight += lpObj->SetOpAddMinAttackDamage;

	lpObj->m_AttackDamageMaxLeft += lpObj->SetOpAddMaxAttackDamage;
	lpObj->m_AttackDamageMaxRight += lpObj->SetOpAddMaxAttackDamage;

	lpObj->m_MagicDamageMin += lpObj->m_MagicDamageMin * lpObj->SetOpAddMagicPower / 100;
	lpObj->m_MagicDamageMax += lpObj->m_MagicDamageMax * lpObj->SetOpAddMagicPower / 100;

	lpObj->AddLife += INT(lpObj->AddVitality * gCharInfo.sCharInfo[lpObj->Class].VitalityToLife);
	lpObj->AddMana += INT(lpObj->AddEnergy * gCharInfo.sCharInfo[lpObj->Class].EnergyToMana);

	lpObj->m_CriticalDamage += lpObj->SetOpAddCriticalDamageSuccessRate;
	lpObj->m_ExcelentDamage += lpObj->SetOpAddExDamageSuccessRate;

	if ( lpObj->pInventory[10].IsSetItem() )
	{
		lpObj->pInventory[10].PlusSpecialSetRing((LPBYTE)lpObj->m_AddResistance);
	}

	if ( lpObj->pInventory[11].IsSetItem() )
	{
		lpObj->pInventory[11].PlusSpecialSetRing((LPBYTE)lpObj->m_AddResistance);
	}

	if ( lpObj->pInventory[9].IsSetItem() )
	{
		lpObj->pInventory[9].PlusSpecialSetRing((LPBYTE)lpObj->m_AddResistance);
	}

	if ( lpObj->SetOpTwoHandSwordImproveDamage )
	{
		if ( !lpObj->pInventory[1].IsItem() && !lpObj->pInventory[0].IsItem() )
		{
			lpObj->SetOpTwoHandSwordImproveDamage = 0;
		}

		if ( lpObj->pInventory[1].IsItem() && lpObj->pInventory[1].m_TwoHand == FALSE )
		{
			lpObj->SetOpTwoHandSwordImproveDamage = 0;
		}

		if ( lpObj->pInventory[0].IsItem() && lpObj->pInventory[0].m_TwoHand == FALSE )
		{
			lpObj->SetOpTwoHandSwordImproveDamage = 0;
		}
	}

	if ( (lpObj->MaxLife + lpObj->AddLife ) < lpObj->Life )
	{
		lpObj->Life = lpObj->MaxLife + lpObj->AddLife;
		GCReFillSend(lpObj->m_Index, lpObj->Life, 0xFF, 0, lpObj->iShield);
	}

	gObjSetBP(lpObj->m_Index);

	if ( (lpObj->MaxMana + lpObj->AddMana ) < lpObj->Mana )
	{
		lpObj->Mana = lpObj->MaxMana + lpObj->AddMana;
		GCManaSend(lpObj->m_Index, lpObj->Mana, 0xFF, 0, lpObj->BP);
	}

	lpObj->m_Defense += lpObj->SetOpAddDefence * 10 / 20;
	lpObj->m_Defense += lpObj->m_Defense * lpObj->SetOpAddDefenceRate / 100;

	if ( lpObj->pInventory[1].m_Type >= ITEMGET(6,0) && lpObj->pInventory[1].m_Type < ITEMGET(7,0) )
	{
		lpObj->m_Defense += lpObj->m_Defense * lpObj->SetOpImproveSheldDefence / 100;
	}
}
开发者ID:kelemeto76,项目名称:mu-bk-server-sourcecode,代码行数:77,代码来源:ObjCalCharacter.cpp


示例20: GObjExtItemApply

void GObjExtItemApply(LPOBJ lpObj)
{

	int n;
	int i;
	int max_count = 0;
	int temp_n[3] = {0, 1, 9};
	int temp_n2[10] = {2, 3, 4, 5, 6, 7, 8, 10, 11, 1};
	int maxn2_loop = 9;

	for ( i=0;i<3;i++ )
	{
		n = temp_n[i];

		if ( lpObj->pInventory[n].m_Type >= ITEMGET(6, 0) && lpObj->pInventory[n].m_Type < ITEMGET(7, 0) )
			continue;

		if ( lpObj->pInventory[n].IsItem() == TRUE )
		{
			if ( lpObj->pInventory[n].m_Durability != 0.0f )
			{
				if ( lpObj->pInventory[n].m_IsValidItem == true )
				{
					if ( lpObj->pInventory[n].IsExtAttackRate() )
					{
						if ( ( lpObj->pInventory[n].m_Type >= ITEMGET(5, 0) && lpObj->pInventory[n].m_Type < ITEMGET(6, 0) ) ||
							lpObj->pInventory[n].m_Type == ITEMGET(13,12) ||
							lpObj->pInventory[n].m_Type == ITEMGET(13,25) ||
							lpObj->pInventory[n].m_Type == ITEMGET(13,27) )
						{
							lpObj->m_MagicDamageMax += lpObj->Level / 20;
							lpObj->m_MagicDamageMin += lpObj->Level / 20;
						}
						else 
						{
							if ( n == 0 || n == 9 )
							{
								lpObj->m_AttackDamageMinRight += lpObj->Level / 20;
								lpObj->m_AttackDamageMaxRight += lpObj->Level / 20;
							}
							
							if ( n == 1 || n == 9 )
							{
								lpObj->m_AttackDamageMinLeft += lpObj->Level / 20;
								lpObj->m_AttackDamageMaxLeft += lpObj->Level / 20;
							}
						}
					}

					if ( lpObj->pInventory[n].IsExtAttackRate2() )
					{
						if ( ( lpObj->pInventory[n].m_Type >= ITEMGET(5, 0) && lpObj->pInventory[n].m_Type < ITEMGET(6, 0) ) ||
							lpObj->pInventory[n].m_Type == ITEMGET(13,12) ||
							lpObj->pInventory[n].m_Type == ITEMGET(13,25) ||
							lpObj->pInventory[n].m_Type == ITEMGET(13,27) )
						{
							lpObj->m_MagicDamageMax += lpObj->m_MagicDamageMax * lpObj->pInventory[n].IsExtAttackRate2() / 100;
							lpObj->m_MagicDamageMin += lpObj->m_MagicDamageMin * lpObj->pInventory[n].IsExtAttackRate2() / 100;
						}
						else 
						{
							if ( n == 0 || n == 9 )
							{
								lpObj->m_AttackDamageMinRight += lpObj->m_AttackDamageMinRight * lpObj->pInventory[n].IsExtAttackRate2() / 100;
								lpObj->m_AttackDamageMaxRight += lpObj->m_AttackDamageMaxRight * lpObj->pInventory[n].IsExtAttackRate2() / 100;
							}
							
							if ( n == 1 || n == 9 )
							{
								lpObj->m_AttackDamageMinLeft += lpObj->m_AttackDamageMinLeft * lpObj->pInventory[n].IsExtAttackRate2() / 100;
								lpObj->m_AttackDamageMaxLeft += lpObj->m_AttackDamageMaxLeft * lpObj->pInventory[n].IsExtAttackRate2() / 100;
							}
						}
					}

					lpObj->m_ExcelentDamage += lpObj->pInventory[n].IsExtExcellentDamage();
					lpObj->m_AttackSpeed += lpObj->pInventory[n].IsExtAttackSpeed();
					lpObj->m_MagicSpeed += lpObj->pInventory[n].IsExtAttackSpeed();
					lpObj->MonsterDieGetLife += lpObj->pInventory[n].IsExtMonsterDieLife();
					lpObj->MonsterDieGetMana += lpObj->pInventory[n].IsExtMonsterDieMana();
				}
			}
		}
	}
		
	if ( lpObj->pInventory[1].IsItem() == TRUE )
	{
		if ( lpObj->pInventory[1].m_Type >= ITEMGET(6, 0) && lpObj->pInventory[1].m_Type <= ITEMGET(6, 21) )
		{
			maxn2_loop = 10;
		}
	}

	for ( i=0;i<maxn2_loop;i++)
	{
		n = temp_n2[i];

		if ( max_count < 8 )
		{
			if ( lpObj->pInventory[n].IsItem() == TRUE &&
//.........这里部分代码省略.........
开发者ID:kelemeto76,项目名称:mu-bk-server-sourcecode,代码行数:101,代码来源:ObjCalCharacter.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ITEM_CHECKINDEX函数代码示例发布时间:2022-05-30
下一篇:
C++ IT函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap