示例#1
0
void AutoExpClass__AddExp(void * lpParam)
{
	PMSG_KILLPLAYER pkillMsg;
	PHeadSetBE((LPBYTE)&pkillMsg, 0x16, sizeof(pkillMsg));

	while(AutoExp.Enabled)
	{
		Sleep(AutoExp.Time);
		for ( int n = OBJ_STARTUSERINDEX ; n < OBJMAX ; n++)
		{
			if ( gObj[n].Connected == PLAYER_PLAYING )
			{
				if ( gObj[n].Type == OBJ_USER )
				{
					if((gObj[n].Level < ReadConfig.Max_Normal_Level)||(gObj[n].MasterCharacterInfo->MasterLevel < ReadConfig.Max_Master_Level))
					{
						if(gObjItsInSafeZone(gObj[n].m_Index) == 1)//If safezone
						{
							int AddExp = 0;
							AddExp = (int)(AutoExp.BaseExp * gObj[n].Level) ;
						
							if(AddExp > 0x0FFFF)
								AddExp = 65534;

							if(AddExp > 0)
							{
								pkillMsg.NumberH = 0xFF;
								pkillMsg.NumberL = 0xFF;
								pkillMsg.ExpH = SET_NUMBERH(AddExp);
								pkillMsg.ExpL = SET_NUMBERL(AddExp);
								pkillMsg.DamageH = SET_NUMBERH(0x00);
								pkillMsg.DamageL = SET_NUMBERL(0x00);

								DataSend(gObj[n].m_Index, (UCHAR*)&pkillMsg, pkillMsg.h.size);

								gObjSetExpPetItem(n, AddExp);
								int LevelUp = 0;
								gObjLevelUp(&gObj[n],AddExp,gObj[n].Class,EVENT_TYPE_AUTOEXP,LevelUp);
							}
						}
					}
				}
			}
		}
	}
}
示例#2
0
void CDevilSquareGround::SendScore()
{
	if ( this->m_DevilSquareRankList.size() < 1 )
	{
		return;
	}

	BYTE count = 1;
	int iUserCount = this->m_DevilSquareRankList.size();
	int iExp = 0;

	std::vector<LPOBJ>::iterator Itor = this->m_DevilSquareRankList.begin();

	for ( ; Itor != this->m_DevilSquareRankList.end() ; Itor++ )
	{
		memcpy(this->m_DevilSquareScoreInfoTOP10.Score[count].Name , (*(Itor))->Name, MAX_ACCOUNT_LEN);
		this->m_DevilSquareScoreInfoTOP10.Score[count].TotalScore = (*(Itor))->m_nEventScore;

		if ( iUserCount <= 6 )
		{
			if ( count < 4 )	// For DS from 0 to 3
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[count-1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[count-1][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[3][1];
			}
		}
		else
		{
			int lc5 = count*100/iUserCount;

			if ( count == 1 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[0][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[0][1];
			}
			else if ( lc5 <= 30 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[1][1];
			}
			else if ( lc5 <= 50 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[2][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[2][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[3][1];
			}
		}

		count++;

		if ( count >= 10 )
		{
			break;
		}
	}

	this->m_DevilSquareScoreInfoTOP10.Count  = count;
	int iSize = count * 24 + 5;

	PHeadSetB((LPBYTE)&this->m_DevilSquareScoreInfoTOP10, 0x93, iSize);
	count = 1;

	Itor = this->m_DevilSquareRankList.begin();

	LogAddTD("[DevilSquare] Rank [%d]", this->m_iIndex);

	for ( ; Itor != this->m_DevilSquareRankList.end(); Itor++ )
	{
		if ( iUserCount <= 6 )
		{
			if ( count < 4 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[count-1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[count-1][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[3][1];
			}
		}
		else
		{
			int lc7 = count*100/iUserCount;

			if ( count ==1 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[0][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[0][1];
			}
			else if ( lc7 <= 30 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[1][1];
			}
			else if ( lc7 <= 50 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[2][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[2][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[3][1];
			}
		}

		if ( g_CrywolfSync.GetOccupationState() == 1 && g_iCrywolfApplyMvpPenalty != FALSE)
		{
			this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp =  (this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp * g_CrywolfSync.GetGettingExpPenaltyRate()) / 100;
		}

		__int64 iExp64 = this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp;

		CheckItemOptForGetExpEx((*(Itor)),iExp64,TRUE);
		(*(Itor))->Experience += (DWORD)iExp64;
		bool ret = gObjLevelUp((*(Itor)), &iExp64, 0, EVENT_TYPE_DEVILSQUARE);

		(*(Itor))->m_nEventMoney = this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen;

		if ( gObjCheckMaxZen((*(Itor))->m_Index, (*(Itor))->m_nEventMoney) == FALSE )
		{
			int Zen = MAX_ZEN - (*(Itor))->Money;
			(*(Itor))->Money += Zen;
		}
		else
		{
			(*(Itor))->Money += (*(Itor))->m_nEventMoney;
		}

		GCMoneySend((*(Itor))->m_Index, (*(Itor))->Money);

		if ( ret == true )
		{
			GCKillPlayerExpSend((*(Itor))->m_Index, (WORD)-1, this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp, 0, 0);
		}

		if( count == 1 )
		{
			g_EventItemBagManager.OpenSpecial(EventBagSpecial::DevilSquare1, (*(Itor))->m_Index, (*(Itor))->MapNumber, (*(Itor))->X, (*(Itor))->Y);
		}
		else if( count == 2)
		{
			g_EventItemBagManager.OpenSpecial(EventBagSpecial::DevilSquare2, (*(Itor))->m_Index, (*(Itor))->MapNumber, (*(Itor))->X, (*(Itor))->Y);
		}
		else if( count == 3)
		{
			g_EventItemBagManager.OpenSpecial(EventBagSpecial::DevilSquare3, (*(Itor))->m_Index, (*(Itor))->MapNumber, (*(Itor))->X, (*(Itor))->Y);
		}

		this->SendRankingInfo((*(Itor)));

		LogAddTD("Rank :[%d] : [%s][%s][%d][%d][%d]", count, (*(Itor))->AccountID, (*(Itor))->Name, (*(Itor))->m_nEventMoney, (*(Itor))->m_nEventExp, (*(Itor))->m_nEventScore);
		memcpy(this->m_DevilSquareScoreInfoTOP10.Score[0].Name , (*(Itor))->Name, MAX_ACCOUNT_LEN);
		this->m_DevilSquareScoreInfoTOP10.Score[0].TotalScore = (*(Itor))->m_nEventScore;
		this->m_DevilSquareScoreInfoTOP10.MyRank = count;
		count++;

		DataSend((*(Itor))->m_Index, (BYTE *)&this->m_DevilSquareScoreInfoTOP10 , iSize);

#ifdef POINTEX
		g_ShopPointEx.AddEventBonus((*(Itor))->m_Index, ShopPointExEvent::DS);
#endif

#if( __4GAMERS__ == 1 )
		g_Achievements.GD_UpdateEventDataDS((*(Itor)), (*(Itor))->m_nEventExp, (*(Itor))->m_nEventScore);
#endif

		(*(Itor))->m_nEventScore = 0;
		(*(Itor))->m_nEventMoney = 0;
		(*(Itor))->m_nEventExp = 0;
	}
}
void CDevilSquareGround::SendScore()
{
	if ( this->m_DevilSquareRankList.size() < 1 )
	{
		return;
	}

	BYTE count = 1;
	int iUserCount = this->m_DevilSquareRankList.size();

	int iExp = 0;

	for ( std::vector<OBJECTSTRUCT *>::iterator Itor = this->m_DevilSquareRankList.begin() ; Itor != this->m_DevilSquareRankList.end() ; Itor++ )
	{
		memcpy(this->m_DevilSquareScoreInfoTOP10.Score[count].Name , (*(Itor))->Name, MAX_ACCOUNT_LEN);
		this->m_DevilSquareScoreInfoTOP10.Score[count].TotalScore = (*(Itor))->m_nEventScore;

		if ( iUserCount <= 6 )
		{
			if ( count < 4 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[count-1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[count-1][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[3][1];
			}
		}
		else
		{
			int lc5 = count*100/iUserCount;

			if ( count == 1 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[0][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[0][1];
			}
			else if ( lc5 <= 30 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[1][1];
			}
			else if ( lc5 <= 50 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[2][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[2][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[3][1];
			}
		}

		count++;

		if ( count >= 10 )
		{
			break;
		}
	}

	this->m_DevilSquareScoreInfoTOP10.Count  = count;
	int iSize = count * 24 + 5;

	PHeadSetB((LPBYTE)&this->m_DevilSquareScoreInfoTOP10, 0x93, iSize);
	count = 1;

	 std::vector<OBJECTSTRUCT *>::iterator Itor = this->m_DevilSquareRankList.begin();

	LogAddTD("[DevilSquare] Rank [%d]", this->m_iIndex);

	for ( ; Itor != this->m_DevilSquareRankList.end(); Itor++ )
	{
		if ( iUserCount <= 6 )
		{
			if ( count < 4 ) //webzen fixed on season 3.0
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[count-1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[count-1][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[3][1];
			}
		}
		else
		{
			int lc7 = count*100/iUserCount;

			if ( count ==1 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[0][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[0][1];
			}
			else if ( lc7 <= 30 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[1][1];
			}
			else if ( lc7 <= 50 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[2][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[2][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[3][1];
			}
		}

		if ( g_CrywolfSync.GetOccupationState() == 1 && Configs.CrywolfApplyMvpPenalty != FALSE)
		{
			this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp =  (this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp * g_CrywolfSync.GetGettingExpPenaltyRate()) / 100;
		}

		__int64 exp = this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp;
		gObjSealUserSetExp((*(Itor)), exp, TRUE); //Seal Exp (Season3 add-on)

		(*(Itor))->Experience += (int)exp;		
		
		bool ret = gObjLevelUp((*(Itor)), exp, 0, EVENT_TYPE_DEVILSQUARE);

		(*(Itor))->m_nEventMoney = this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen;

		if ( gObjCheckMaxZen((*(Itor))->m_Index, (*(Itor))->m_nEventMoney) == FALSE )
		{
			int Zen = MAX_ZEN - (*(Itor))->Money;
			(*(Itor))->Money += Zen;
		}
		else
		{
			(*(Itor))->Money += (*(Itor))->m_nEventMoney;
		}

		GCMoneySend((*(Itor))->m_Index, (*(Itor))->Money);

		if ( ret == true )
		{
			GCKillPlayerExpSend((*(Itor))->m_Index, (WORD)-1, exp, 0, 0);//Season 4.5 changed
		}

		this->SendRankingInfo((*(Itor)));

		LogAddTD("Rank :[%d] : [%s][%s][%d][%d][%d]", count, (*(Itor))->AccountID, (*(Itor))->Name, (*(Itor))->m_nEventMoney, (*(Itor))->m_nEventExp, (*(Itor))->m_nEventScore);
		
		memcpy(this->m_DevilSquareScoreInfoTOP10.Score[0].Name , (*(Itor))->Name, MAX_ACCOUNT_LEN);
		this->m_DevilSquareScoreInfoTOP10.Score[0].TotalScore = (*(Itor))->m_nEventScore;
		this->m_DevilSquareScoreInfoTOP10.MyRank = count;
		count++;

		DataSend((*(Itor))->m_Index, (LPBYTE)&this->m_DevilSquareScoreInfoTOP10 , iSize);

		(*(Itor))->m_nEventScore = 0;
		(*(Itor))->m_nEventMoney = 0;
		(*(Itor))->m_nEventExp = 0;
	}
}
void CDevilSquare::gObjExpParty(LPOBJ lpObj, LPOBJ lpTargetObj, int AttackDamage, BOOL MSBFlag)
{
    int n;
    __int64 exp;
    __int64 maxexp = 0;
    __int64 totalexp;
    int level = ((lpTargetObj->Level + 25) * lpTargetObj->Level) / 3;
    int number;
    int partynum = 0;
    int totallevel = 0;
    int partylevel;
    int partycount;
    int dis[6];
    int viewplayer = 0;
    int viewpercent = 100;
    BOOL bApplaySetParty = FALSE;
    bool bCheckSetParty[6];
    partynum = lpObj->PartyNumber;
    LPOBJ lpPartyObj;


    int toplevel = 0;
    int distance;

    for (n=0; n<MAX_USER_IN_PARTY; n++)
    {
        number = gParty.m_PartyS[partynum].Number[n];

        if ( number >= 0 )
        {
            lpPartyObj = &gObj[number];

            distance = gObjCalDistance(lpObj,lpPartyObj);

            if( distance < 10 )
            {
                if(lpPartyObj->Level > toplevel)
                {
                    toplevel = lpPartyObj->Level;
                }
            }
        }
    }

    if ( OBJMAX_RANGE(partynum) == FALSE )
    {
        LogAdd("error : %s %d", __FILE__, __LINE__);
        return;
    }

    partycount = gParty.m_PartyS[partynum].Count;

    for ( n =0; n<MAX_USER_IN_PARTY; n++)
    {
        number = gParty.m_PartyS[partynum].Number[n];

        if ( number >= 0 )
        {
            lpPartyObj = &gObj[number];

            if ( lpTargetObj->MapNumber ==lpPartyObj->MapNumber )
            {
                dis[n] = gObjCalDistance(lpTargetObj, &gObj[number]);

                if ( dis[n] < 10 )
                {
                    lpPartyObj = &gObj[number];

                    if ( toplevel >= (lpPartyObj->Level + 200 ) ) // #formula
                    {
                        totallevel = totallevel + lpPartyObj->Level + 200;
                    }
                    else
                    {
                        totallevel += lpPartyObj->Level;
                    }

                    viewplayer++;
                    bCheckSetParty[lpPartyObj->Class] = true;
                }
            }
        }
    }

    viewpercent += gParty.GetExpBonus(lpObj, lpTargetObj, partynum);

    if ( viewplayer > 1 )
    {
        partylevel = totallevel / viewplayer;
    }
    else
    {
        partylevel = totallevel;
    }

    if ( (lpTargetObj->Level +10) < partylevel )
    {
        level = (level * (lpTargetObj->Level+10) ) / partylevel;
    }

    if ( lpTargetObj->Level >= 65 )
    {
        if ( viewplayer == 1 )
        {
            level += (lpTargetObj->Level - 64) * (lpTargetObj->Level/ 4);
        }
        else
        {
            level += (int)(200.0 - (lpObj->Level * 0.2));
        }
    }

    if ( level > 0 )
    {
        maxexp = level / 2;
    }
    else
    {
        level = 0;
    }

    if ( maxexp < 1 )
    {
        totalexp = level;
    }
    else
    {
        totalexp = level + rand()%maxexp;
    }

    if ( lpTargetObj->Type == OBJ_MONSTER )
    {
        lpTargetObj->Money = (int)totalexp;
    }

    for ( n=0; n<MAX_USER_IN_PARTY; n++)
    {
        number = gParty.m_PartyS[partynum].Number[n];

        if ( number >= 0 )
        {
            lpPartyObj = &gObj[number];

            if ( lpTargetObj->MapNumber == lpPartyObj->MapNumber )
            {
                if ( dis[n] < 10 )
                {
                    DWORD myexp = gLevelExperience[lpPartyObj->Level];
                    exp = ((totalexp * viewpercent* lpPartyObj->Level ) / totallevel ) / 100;

                    if ( exp > myexp  )
                    {
                        exp = myexp;
                    }

                    if( lpPartyObj->Type == OBJ_USER )
                    {
                        if ( lpTargetObj->Type == OBJ_USER )
                        {
                            exp = 0;
                        }
                    }

                    if ( g_MasterExp.IsEnabled(lpPartyObj) == FALSE )
                    {
                        exp += (exp * m_ObjBill[lpPartyObj->m_Index].GetExp()) / 100;
                        exp = int(exp * g_MapRateInfo.GetExp(lpPartyObj->MapNumber));
                    }

                    if ( g_CrywolfSync.GetOccupationState() == 1 && g_iCrywolfApplyMvpPenalty != FALSE)
                    {
                        exp =  (exp * g_CrywolfSync.GetGettingExpPenaltyRate()) / 100;
                    }

                    if ( exp > 0 )
                    {
                        if ( lpPartyObj->Type == OBJ_USER )
                        {

                            CheckItemOptForGetExpEx(lpPartyObj,exp,0);

                            lpPartyObj->Experience += (DWORD)exp;
                            lpPartyObj->m_nEventExp += (int)exp;

                            if ( gObjLevelUp(lpPartyObj, &exp, lpTargetObj->Class, EVENT_TYPE_PARTY) == false )
                            {
                                continue;
                            }
                        }
                    }

                    if ( lpPartyObj->Type == OBJ_USER )
                    {
                        GCKillPlayerExpSend(lpPartyObj->m_Index, lpTargetObj->m_Index,(int)exp, AttackDamage, MSBFlag);
                    }
                }
            }
        }
    }
}
int  CDevilSquare::gObjMonsterExpSingle(LPOBJ lpObj, LPOBJ lpTargetObj, int dmg, int tot_dmg)
{
    __int64 exp;
    __int64 maxexp = 0;
    int level = ((lpTargetObj->Level + 25) * lpTargetObj->Level) / 3;

    if ( (lpTargetObj->Level + 10) < lpObj->Level  )
    {
        level = (level*(lpTargetObj->Level + 10))/(lpObj->Level);
    }

    if ( lpTargetObj->Level >= 65 )
    {
        level += (lpTargetObj->Level-64)*(lpTargetObj->Level / 4);
    }

    if ( level > 0 )
    {
        maxexp = level / 2;
    }
    else
    {
        level = 0;
    }

    if ( maxexp < 1 )
    {
        exp = level;
    }
    else
    {
        exp = level + rand()%maxexp;
    }

    exp = (dmg * exp)/tot_dmg;

    DWORD mymaxexp = gLevelExperience[lpObj->Level];

    __int64 mymaxexp_ = mymaxexp;

    if ( exp > mymaxexp_ )
    {
        exp = mymaxexp;
    }

    lpTargetObj->Money += (int)exp;

    if ( g_MasterExp.IsEnabled(lpObj) == FALSE )
    {
        exp += (exp * m_ObjBill[lpObj->m_Index].GetExp()) / 100;
        exp = int(exp * g_MapRateInfo.GetExp(lpObj->MapNumber));
    }

    if ( g_CrywolfSync.GetOccupationState() == 1 && g_iCrywolfApplyMvpPenalty != FALSE)
    {
        exp =  (exp * g_CrywolfSync.GetGettingExpPenaltyRate()) / 100;
    }

    if ( exp > 0 )
    {
        if ( lpObj->Type == OBJ_USER )
        {

            CheckItemOptForGetExpEx(lpObj,exp,0);

            lpObj->Experience += (DWORD)exp;
            lpObj->m_nEventExp += (int)exp;

            if ( gObjLevelUp(lpObj, &exp, lpTargetObj->Class, 0) == false )
            {
                return 0;
            }
        }
    }

    return (int)exp;
}
示例#6
0
void CDevilSquare::gObjExpParty(LPOBJ lpObj, LPOBJ lpTargetObj, int AttackDamage, BOOL MSBFlag)
{
	int n;
	DWORD exp;
	DWORD maxexp = 0;
	int totalexp;
	int level = ((lpTargetObj->Level + 25) * lpTargetObj->Level) / 3;
	int number;
	int partynum = 0;
	int totallevel = 0;
	int partylevel;
	int partycount;
	int dis[MAX_USER_IN_PARTY];
	int viewplayer = 0;
	int viewpercent = 100;
	BOOL bApplaySetParty = FALSE;
	bool bCheckSetParty[MAX_TYPE_PLAYER];
	partynum = lpObj->PartyNumber;
	LPOBJ lpPartyObj;

	
	int toplevel = 0;

	for (n=0;n<MAX_USER_IN_PARTY;n++)
	{
		number = gParty.m_PartyS[partynum].Number[n];

		if ( number >= 0 )
		{
			lpPartyObj = &gObj[number];

			if ( lpPartyObj->Level > toplevel )
			{
				toplevel = lpPartyObj->Level;
			}
		}
	}

	if ( OBJMAX_RANGE(partynum) == FALSE )
	{
		LogAdd("error : %s %d", __FILE__, __LINE__);
		return;
	}

	partycount = gParty.m_PartyS[partynum].Count;

	for ( n =0;n<MAX_USER_IN_PARTY;n++)
	{
		number = gParty.m_PartyS[partynum].Number[n];

		if ( number >= 0 )
		{
			lpPartyObj = &gObj[number];

			if ( lpTargetObj->MapNumber ==lpPartyObj->MapNumber )
			{
				dis[n] = gObjCalDistance(lpTargetObj, &gObj[number]);

				if ( dis[n] < 10 )
				{
					lpPartyObj = &gObj[number];

					if ( toplevel >= (lpPartyObj->Level + 200 ) ) // #formula
					{
						totallevel = totallevel + lpPartyObj->Level + 200;
					}
					else
					{
						totallevel += lpPartyObj->Level;
					}

					viewplayer++;
					bCheckSetParty[lpPartyObj->Class] = true;
				}
			}
		}
	}

	if ( bCheckSetParty[0] != false && bCheckSetParty[1] != false && bCheckSetParty[2] != false )
	{
		bApplaySetParty = TRUE;
	}

	if ( viewplayer > 1 )
	{
		if ( bApplaySetParty != FALSE )
		{
			if ( viewplayer == 3 )
			{
				viewpercent = 230;
			}
			else if ( viewplayer == 4 )
			{
				viewpercent = 270;
			}
			else if ( viewplayer >= 5 )
			{
				viewpercent = 300;
			}
			else
			{
				viewpercent = 120;
			}
		}
		else
		{
			if ( viewplayer == 2 )
			{
				viewpercent = 160;
			}
			else if ( viewplayer == 3 )
			{
				viewpercent = 180;
			}
			else if ( viewplayer == 4 )
			{
				viewpercent = 200;
			}
			else if ( viewplayer >= 5 )
			{
				viewpercent = 220;
			}
			else
			{
				viewpercent = 120;
			}
		}

		partylevel = totallevel / viewplayer;
	}
	else
	{
		partylevel = totallevel;
	}

	if ( (lpTargetObj->Level +10) < partylevel )
	{
		level = (level * (lpTargetObj->Level+10) ) / partylevel;
	}

	if ( lpTargetObj->Level >= 65 )
	{
		if ( viewplayer == 1 )
		{
			level += (lpTargetObj->Level - 64) * (lpTargetObj->Level/ 4);
		}
		else
		{
			level += int(200.0 - (lpObj->Level * 0.2));
		}
	}

	if ( level > 0 )
	{
		maxexp = level / 2;
	}
	else
	{
		level = 0;
	}

	if ( maxexp < 1 )
	{
		totalexp = level;
	}
	else
	{
		totalexp = level + Random(0,maxexp);
	}

	if ( lpTargetObj->Type == OBJ_MONSTER )
	{
		lpTargetObj->Money = totalexp;
	}

	for ( n=0;n<MAX_USER_IN_PARTY;n++)
	{
		number = gParty.m_PartyS[partynum].Number[n];

		if ( number >= 0 )
		{
			lpPartyObj = &gObj[number];

			if ( lpTargetObj->MapNumber == lpPartyObj->MapNumber )
			{
				if ( dis[n] < 10 )
				{
					DWORD myexp = gLevelExperience[lpPartyObj->Level];
					exp = ((totalexp * viewpercent* lpPartyObj->Level ) / totallevel ) / 100;

					if ( exp > myexp  )
					{
						exp = myexp;
					}

					if( lpPartyObj->Type == OBJ_USER )
					{
						if ( lpTargetObj->Type == OBJ_USER )
						{
							exp = 0;
						}
					}

					//exp *= (DWORD)gAddExperience;
					exp *= VipSystem_MapExp[lpObj->VipType][lpObj->MapNumber];

					if ( lpPartyObj->m_wExprienceRate == 0 )
						exp = 0;
					else
						exp =  DWORD( (double)exp * ((double)lpPartyObj->m_wExprienceRate  / 100.0) );

					if ( g_CrywolfSync.GetOccupationState() == 1 && g_iCrywolfApplyMvpPenalty != FALSE)
					{
						exp =  (exp * g_CrywolfSync.GetGettingExpPenaltyRate()) / 100;
					}

					if ( exp > 0 )
					{
						if ( lpPartyObj->Type == OBJ_USER )
						{
							if ( lpPartyObj->m_wExprienceRate > 0 )
							{
								lpPartyObj->Experience += exp;
								lpPartyObj->m_nEventExp += exp;
							}

							if ( gObjLevelUp(lpPartyObj, exp, lpTargetObj->Class, EVENT_TYPE_PARTY) == false )
							{
								continue;
							}
						}
					}

					if ( lpPartyObj->Type == OBJ_USER )
					{
						if ( lpPartyObj->m_wExprienceRate > 0 )
						{
							GCKillPlayerExpSend(lpPartyObj->m_Index, lpTargetObj->m_Index, exp, AttackDamage, MSBFlag);
						}
					}
				}
			}
		}
	}
}
示例#7
0
DWORD  CDevilSquare::gObjMonsterExpSingle(LPOBJ lpObj, LPOBJ lpTargetObj, int dmg, int tot_dmg)
{
	DWORD exp;
	DWORD maxexp = 0;
	int level = ((lpTargetObj->Level + 25) * lpTargetObj->Level) / 3;

	if ( (lpTargetObj->Level + 10) < lpObj->Level )
	{
		level = (level*(lpTargetObj->Level + 10))/lpObj->Level;
	}

	if ( lpTargetObj->Level >= 65 )
	{
		level += (lpTargetObj->Level-64)*(lpTargetObj->Level / 4);
	}

	if ( level > 0 )
	{
		maxexp = level / 2;
	}
	else
	{
		level = 0;
	}

	if ( maxexp < 1 )
	{
		exp = level;
	}
	else
	{
		exp = level + Random(0,maxexp-1);
	}

	exp = (dmg * exp)/tot_dmg;
	DWORD mymaxexp = gLevelExperience[lpObj->Level];

	if ( exp > mymaxexp )
	{
		exp = mymaxexp;
	}

	//exp *= (int)gAddExperience;
	exp *= VipSystem_MapExp[lpObj->VipType][lpObj->MapNumber];

	if ( lpObj->m_wExprienceRate == 0 )
		exp = 0;
	else
		exp =  int( (double)exp * ((double)lpObj->m_wExprienceRate  / 100.0) );

	if ( g_CrywolfSync.GetOccupationState() == 1 && g_iCrywolfApplyMvpPenalty != FALSE)
	{
		exp =  (exp * g_CrywolfSync.GetGettingExpPenaltyRate()) / 100;
	}

	if ( exp > 0 )
	{
		if ( lpObj->Type == OBJ_USER )
		{
			if ( lpObj->m_wExprienceRate > 0 )
			{
				lpObj->Experience += exp;
				lpObj->m_nEventExp += exp;
			}

			if ( gObjLevelUp(lpObj, exp, lpTargetObj->Class, 0) == false )
			{
				return 0;
			}
		}
	}

	return exp;
}
示例#8
0
void CDevilSquareGround::SendScore()
{
	if ( this->m_DevilSquareRankList.size() < 1 )
	{
		return;
	}

	BYTE count = 1;
	int iUserCount = this->m_DevilSquareRankList.size();
	int iExp = 0;
	std::vector<OBJECTSTRUCT *>::iterator Itor;

	for (Itor = this->m_DevilSquareRankList.begin() ; Itor != this->m_DevilSquareRankList.end() ; Itor++ )
	{
		memcpy(this->m_DevilSquareScoreInfoTOP10.Score[count].Name , (*(Itor))->Name, MAX_ACCOUNT_LEN);
		this->m_DevilSquareScoreInfoTOP10.Score[count].TotalScore = (*(Itor))->m_nEventScore;

		if ( iUserCount <= 7 )//6
		{
			if ( count < 4 )	// For DS from 0 to 3
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[count-1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[count-1][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[3][1];
			}
		}
		else
		{
			int lc5 = count*100/iUserCount;

			if ( count == 1 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[0][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[0][1];
			}
			else if ( lc5 <= 30 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[1][1];
			}
			else if ( lc5 <= 50 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[2][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[2][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[3][1];
			}
		}

		count++;

		if ( count >= 10 )
		{
			break;
		}
	}

	this->m_DevilSquareScoreInfoTOP10.Count  = count;
	int iSize = count * 24 + 5;

	PHeadSetB((LPBYTE)&this->m_DevilSquareScoreInfoTOP10, 0x93, iSize);
	count = 1;

	Itor = this->m_DevilSquareRankList.begin();

	LogAddTD("[DevilSquare] Rank [%d]", this->m_iIndex);

	for ( ; Itor != this->m_DevilSquareRankList.end(); Itor++ )
	{
		if ( (*(Itor))->Type != OBJ_USER )
			continue;

		if ( iUserCount <= 7 )//6
		{
			if ( count < 3 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[count-1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[count-1][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[3][1];
			}
		}
		else
		{
			int lc7 = count*100/iUserCount;

			if ( count ==1 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[0][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[0][1];
			}
			else if ( lc7 <= 30 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[1][1];
			}
			else if ( lc7 <= 50 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[2][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[2][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[3][1];
			}
		}

		if ( g_CrywolfSync.GetOccupationState() == CRYWOLF_OCCUPATION_FAILED && g_iCrywolfApplyMvpPenalty != FALSE)
		{
#if (PACK_EDITION>=2)
			if ((VipSystem.VipIsApplyCWExpPenalty == 0)&&((*(Itor))->Vip >= 1))
			{
			} else {
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp =  (this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp * g_CrywolfSync.GetGettingExpPenaltyRate()) / 100;
			}
#else
			this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp =  (this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp * g_CrywolfSync.GetGettingExpPenaltyRate()) / 100;
#endif
		}

		if ( ((*(Itor))->m_wExprienceRate + (*(Itor))->MasterCharacterInfo->IncExperience) == 0 )
			iExp = 0;
		else
		{
			if ((*(Itor))->m_btDisableExpGain == 0 )
			{
				iExp = this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp;
				(*(Itor))->Experience += iExp;
			}
		}

		//(*(Itor))->Experience += this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp;
		int ret = -1;
		int LevelUp = 0;

		if ( ((*(Itor))->m_wExprienceRate + (*(Itor))->MasterCharacterInfo->IncExperience) > 0 && (*(Itor))->m_btDisableExpGain == 0 )
		{
			gObjSetExpPetItem((*(Itor))->m_Index, iExp);

			int iMAX_LEVCOUNT = 0;
			ret = iExp;

			while ( ret > 0 )
			{
				if ( ret > 0 )
				{
					ret = gObjLevelUp((*(Itor)), ret, 0, EVENT_TYPE_DEVILSQUARE, LevelUp);
				}

				iMAX_LEVCOUNT++;
				if (iMAX_LEVCOUNT > 5)
					break;
			}

			if ((ret < 0)&&(iMAX_LEVCOUNT > 1))
				ret=0;
		}

		(*(Itor))->m_nEventMoney = this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen;

		if ( (__int64)((*(Itor))->m_Index + (*(Itor))->m_nEventMoney) > (__int64)MAX_ZEN )
		{
			int Zen = MAX_ZEN - (*(Itor))->Money;
			(*(Itor))->Money += Zen;
		}
		else
		{
			(*(Itor))->Money += (*(Itor))->m_nEventMoney;
		}

		GCMoneySend((*(Itor))->m_Index, (*(Itor))->Money);

		if ( ret >= 0 )
		{
			if (  ((*(Itor))->m_wExprienceRate + (*(Itor))->MasterCharacterInfo->IncExperience) > 0 && (*(Itor))->m_btDisableExpGain == 0 )
			{
				if(LevelUp == 0)
					GCKillPlayerExpSend((*(Itor))->m_Index, (WORD)-1, iExp, 0, 0);
			}
		}

		this->SendRankingInfo((*(Itor)));

		LogAddTD("Rank :[%d] : [%s][%s][%d][%d][%d]", count, (*(Itor))->AccountID, (*(Itor))->Name, (*(Itor))->m_nEventMoney, (*(Itor))->m_nEventExp, (*(Itor))->m_nEventScore);
		memcpy(this->m_DevilSquareScoreInfoTOP10.Score[0].Name , (*(Itor))->Name, MAX_ACCOUNT_LEN);
		this->m_DevilSquareScoreInfoTOP10.Score[0].TotalScore = (*(Itor))->m_nEventScore;

		if ( ((*(Itor))->m_wExprienceRate + (*(Itor))->MasterCharacterInfo->IncExperience) == 0 || (*(Itor))->m_btDisableExpGain == 1 )
		{
			this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = 0;
		}
		else
		{
			this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = iExp;
		}

		this->m_DevilSquareScoreInfoTOP10.MyRank = count;
		count++;

		DataSend((*(Itor))->m_Index, (BYTE *)&this->m_DevilSquareScoreInfoTOP10 , iSize);

		(*(Itor))->m_nEventScore = 0;
		(*(Itor))->m_nEventMoney = 0;
		(*(Itor))->m_nEventExp = 0;
	}
}
void CDevilSquareGround::SendScore()
{
	if ( this->m_DevilSquareRankList.size() < 1 )
	{
		return;
	}

	BYTE count = 1;
	int iUserCount = this->m_DevilSquareRankList.size();
	int iExp = 0;
	std::vector<OBJECTSTRUCT *>::iterator Itor = this->m_DevilSquareRankList.begin(); 

	for (Itor = this->m_DevilSquareRankList.begin() ; Itor != this->m_DevilSquareRankList.end() ; Itor++ )
	{
		memcpy(this->m_DevilSquareScoreInfoTOP10.Score[count].Name , (*(Itor))->Name, MAX_ACCOUNT_LEN);
		this->m_DevilSquareScoreInfoTOP10.Score[count].TotalScore = (*(Itor))->m_nEventScore;

		if ( iUserCount <= 6 )
		{
			if ( count < 4 )	// For DS from 0 to 3
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[count-1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[count-1][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[3][1];
			}
		}
		else
		{
			int lc5 = count*100/iUserCount;

			if ( count == 1 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[0][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[0][1];
			}
			else if ( lc5 <= 30 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[1][1];
			}
			else if ( lc5 <= 50 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[2][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[2][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[count].BonusExp = this->m_Bonus[3][1];
			}
		}

		count++;

		if ( count >= 10 )
		{
			break;
		}
	}

	this->m_DevilSquareScoreInfoTOP10.Count  = count;
	int iSize = count * 24 + 5;

	PHeadSetB((LPBYTE)&this->m_DevilSquareScoreInfoTOP10, 0x93, iSize);
	count = 1;

	Itor = this->m_DevilSquareRankList.begin();

	LogAdd("[DevilSquare] Rank [%d]", this->m_iIndex);

	for ( ; Itor != this->m_DevilSquareRankList.end(); Itor++ )
	{
		if ( iUserCount <= 6 )
		{
			if ( count < 3 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[count-1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[count-1][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[3][1];
			}
		}
		else
		{
			int lc7 = count*100/iUserCount;

			if ( count ==1 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[0][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[0][1];
			}
			else if ( lc7 <= 30 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[1][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[1][1];
			}
			else if ( lc7 <= 50 )
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[2][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[2][1];
			}
			else
			{
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen = this->m_Bonus[3][0];
				this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = this->m_Bonus[3][1];
			}
		}

		if ( g_CrywolfSync.GetOccupationState() == 1 && g_iCrywolfApplyMvpPenalty != FALSE)
		{
			this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp =  (this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp * g_CrywolfSync.GetGettingExpPenaltyRate()) / 100;
		}

		/*if ( iExp > 0 )
		{
			if ( lpObj->Type == OBJ_USER )
			{
				if ( lpObj->m_wExprienceRate > 0 )
				{
					lpObj->Experience += iExp;
					lpObj->m_nEventExp += iExp;
				}
			}
		}*/

		if ( (*(Itor))->m_wExprienceRate == 0 )
			iExp = 0;
		else
		{
			iExp = this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp;
			(*(Itor))->Experience += iExp;
		}

		//(*(Itor))->Experience += this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp;
		bool ret = false;

		if (  (*(Itor))->m_wExprienceRate > 0 )
		{
			ret = gObjLevelUp((*(Itor)), iExp, 0, EVENT_TYPE_DEVILSQUARE);
		}

		(*(Itor))->m_nEventMoney = this->m_DevilSquareScoreInfoTOP10.Score[0].BonusZen;

		if ( gObjCheckMaxZen((*(Itor))->m_Index, (*(Itor))->m_nEventMoney) == FALSE )
		{
			int Zen = MAX_ZEN - (*(Itor))->Money;
			(*(Itor))->Money += Zen;
		}
		else
		{
			(*(Itor))->Money += (*(Itor))->m_nEventMoney;
		}

		GCMoneySend((*(Itor))->m_Index, (*(Itor))->Money);

		if ( ret == true )
		{
			if (  (*(Itor))->m_wExprienceRate > 0 )
			{
				GCKillPlayerExpSend((*(Itor))->m_Index, (WORD)-1, iExp, 0, 0);
			}
		}

		this->SendRankingInfo((*(Itor)));

		LogAdd("Rank :[%d] : [%s][%s][%d][%d][%d]", count, (*(Itor))->AccountID, (*(Itor))->Name, (*(Itor))->m_nEventMoney, (*(Itor))->m_nEventExp, (*(Itor))->m_nEventScore);
		memcpy(this->m_DevilSquareScoreInfoTOP10.Score[0].Name , (*(Itor))->Name, MAX_ACCOUNT_LEN);
		this->m_DevilSquareScoreInfoTOP10.Score[0].TotalScore = (*(Itor))->m_nEventScore;

		if ( (*(Itor))->m_wExprienceRate == 0 )
		{
			this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = 0;
		}
		else
		{
			this->m_DevilSquareScoreInfoTOP10.Score[0].BonusExp = iExp;
		}

		this->m_DevilSquareScoreInfoTOP10.MyRank = count;
		count++;

		DataSend((*(Itor))->m_Index, (BYTE *)&this->m_DevilSquareScoreInfoTOP10 , iSize);

		(*(Itor))->m_nEventScore = 0;
		(*(Itor))->m_nEventMoney = 0;
		(*(Itor))->m_nEventExp = 0;
	}
}