Exemple #1
0
		BOOL StdImpact013_T::GetIntAttrRefix(OWN_IMPACT & rImp, Obj_Character& rMe, CharIntAttrRefixs_T::Index_T nIdx, INT & rIntAttrRefix) const
		{
			__ENTER_FUNCTION
			INT nRefixRate = GetRefixRate(rImp);
			nRefixRate += 100;
			INT nValue = 0;
			switch (nIdx)
			{
				case CharIntAttrRefixs_T::REFIX_HIT:
					{
						if(0!=GetHitRefix(rImp))
						{
							nValue = Float2Int((GetHitRefix(rImp)*nRefixRate)/100.0f);
							rIntAttrRefix += nValue;
							return TRUE;
						}
					}
					break;
				case CharIntAttrRefixs_T::REFIX_MISS:
					{
						if(0!=GetMissRefix(rImp))
						{
							nValue = Float2Int((GetMissRefix(rImp)*nRefixRate)/100.0f);
							rIntAttrRefix += nValue;
							return TRUE;
						}
					}
					break;
				case CharIntAttrRefixs_T::REFIX_CRITICAL:
					{
						if(0!=GetCriticalRefix(rImp))
						{
							nValue = Float2Int((GetCriticalRefix(rImp)*nRefixRate)/100.0f);
							rIntAttrRefix += nValue;
							return TRUE;
						}
					}
					break;
				case CharIntAttrRefixs_T::REFIX_TOUGHNESS:
					{
						if(0!=GetToughnessRefix(rImp))
						{
							nValue = Float2Int((GetToughnessRefix(rImp)*nRefixRate)/100.0f);
							rIntAttrRefix += nValue;
							return TRUE;
						}
					}
					break;
					
				default:
					break;
			}
			__LEAVE_FUNCTION
			return FALSE;
		}
Exemple #2
0
 BOOL StdImpact056_T::GetIntAttrRefix(OWN_IMPACT & rImp, Obj_Character& rMe, CharIntAttrRefixs_T::Index_T nIdx, INT & rIntAttrRefix) const
 {
     __ENTER_FUNCTION
     INT nRefixRate = GetRefixRate(rImp);
     nRefixRate += 100;
     INT nValue = 0;
     switch (nIdx)
     {
         case CharIntAttrRefixs_T::REFIX_HIT:
             {
                 if(0!=GetHitRefix(rImp))
                 {
                     nValue = Float2Int((GetHitRefix(rImp)*nRefixRate)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         case CharIntAttrRefixs_T::REFIX_MISS:
             {
                 if(0!=GetMissRefix(rImp))
                 {
                     nValue = Float2Int((GetMissRefix(rImp)*nRefixRate)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         case CharIntAttrRefixs_T::REFIX_CRITICAL:
             {
                 if(0!=GetCriticalRefix(rImp))
                 {
                     nValue = Float2Int((GetCriticalRefix(rImp)*nRefixRate)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;                
         //Attacks
         case CharIntAttrRefixs_T::REFIX_ATTACK_PHY:
             {
                 if(0!=GetAttackPhysicsRefix(rImp))
                 {
                     nValue = Float2Int((GetAttackPhysicsRefix(rImp)*nRefixRate)/100.0f);
                     nValue = Float2Int((rMe.GetBaseAttackPhysics()*nValue)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         case CharIntAttrRefixs_T::REFIX_ATTACK_MAGIC:
             {
                 if(0!=GetAttackMagicRefix(rImp))
                 {
                     nValue = Float2Int((GetAttackMagicRefix(rImp)*nRefixRate)/100.0f);
                     nValue = Float2Int((rMe.GetBaseAttackMagic()*nValue)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         //Defences
         case CharIntAttrRefixs_T::REFIX_DEFENCE_PHY:
             {
                 if(0!=GetDefencePhysicsRefix(rImp))
                 {
                     nValue = Float2Int((GetDefencePhysicsRefix(rImp)*nRefixRate)/100.0f);
                     nValue = Float2Int((rMe.GetBaseDefencePhysics()*nValue)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         case CharIntAttrRefixs_T::REFIX_DEFENCE_MAGIC:
             {
                 if(0!=GetDefenceMagicRefix(rImp))
                 {
                     nValue = Float2Int((GetDefenceMagicRefix(rImp)*nRefixRate)/100.0f);
                     nValue = Float2Int((rMe.GetBaseDefenceMagic()*nValue)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         // Maxes
         case CharIntAttrRefixs_T::REFIX_MAX_HP:
             {
                 if(0!=GetMaxHpRefix(rImp))
                 {
                     nValue = Float2Int((GetMaxHpRefix(rImp)*nRefixRate)/100.0f);
                     nValue = Float2Int((rMe.GetBaseMaxHP()*nValue)/100.0f);
                     rIntAttrRefix += nValue;
                     return TRUE;
                 }
             }
             break;
         default:
             break;
     }
     __LEAVE_FUNCTION
     return FALSE;
 }