BOOL StdImpact011_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) { //Attacks case CharIntAttrRefixs_T::REFIX_ATTACK_NEAR: { if(0!=GetAttackNearRefix(rImp)) { nValue = Float2Int((GetAttackNearRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_ATTACK_FAR: { if(0!=GetAttackFarRefix(rImp)) { nValue = Float2Int((GetAttackFarRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_ATTACK_MAGIC_NEAR: { if(0!=GetAttackMagicNearRefix(rImp)) { nValue = Float2Int((GetAttackMagicNearRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_ATTACK_MAGIC_FAR: { if(0!=GetAttackMagicFarRefix(rImp)) { nValue = Float2Int((GetAttackMagicFarRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_ATTACK_GOLD: { if(0!=GetAttackGoldRefix(rImp)) { nValue = Float2Int((GetAttackGoldRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_ATTACK_WOOD: { if(0!=GetAttackWoodRefix(rImp)) { nValue = Float2Int((GetAttackWoodRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_ATTACK_WATER: { if(0!=GetAttackWaterRefix(rImp)) { nValue = Float2Int((GetAttackWaterRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_ATTACK_SOIL: { if(0!=GetAttackSoilRefix(rImp)) { nValue = Float2Int((GetAttackSoilRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_ATTACK_FIRE: { if(0!=GetAttackFireRefix(rImp)) { nValue = Float2Int((GetAttackFireRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; //Defences case CharIntAttrRefixs_T::REFIX_DEFENCE_NEAR: { if(0!=GetDefenceNearRefix(rImp)) { nValue = Float2Int((GetDefenceNearRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_DEFENCE_FAR: { if(0!=GetDefenceFarRefix(rImp)) { nValue = Float2Int((GetDefenceFarRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_DEFENCE_MAGIC_NEAR: { if(0!=GetDefenceMagicNearRefix(rImp)) { nValue = Float2Int((GetDefenceMagicNearRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_DEFENCE_MAGIC_FAR: { if(0!=GetDefenceMagicFarRefix(rImp)) { nValue = Float2Int((GetDefenceMagicFarRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_RESIST_GOLD: { if(0!=GetResistGoldRefix(rImp)) { nValue = Float2Int((GetResistGoldRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_RESIST_WOOD: { if(0!=GetResistWoodRefix(rImp)) { nValue = Float2Int((GetResistWoodRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_RESIST_WATER: { if(0!=GetResistWaterRefix(rImp)) { nValue = Float2Int((GetResistWaterRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_RESIST_FIRE: { if(0!=GetResistFireRefix(rImp)) { nValue = Float2Int((GetResistFireRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_RESIST_SOIL: { if(0!=GetResistSoilRefix(rImp)) { nValue = Float2Int((GetResistSoilRefix(rImp)*nRefixRate)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; default: break; } __LEAVE_FUNCTION return FALSE; }
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; 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; case CharIntAttrRefixs_T::REFIX_MAX_MP: { if(0!=GetMaxMpRefix(rImp)) { nValue = Float2Int((GetMaxMpRefix(rImp)*nRefixRate)/100.0f); nValue = Float2Int((rMe.GetBaseMaxMP()*nValue)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; //Attacks case CharIntAttrRefixs_T::REFIX_ATTACK_NEAR: { if(0!=GetAttackNearRefix(rImp)) { nValue = Float2Int((GetAttackNearRefix(rImp)*nRefixRate)/100.0f); nValue = Float2Int((rMe.GetBaseAttackNear()*nValue)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_ATTACK_MAGIC_NEAR: { if(0!=GetAttackMagicNearRefix(rImp)) { nValue = Float2Int((GetAttackMagicNearRefix(rImp)*nRefixRate)/100.0f); nValue = Float2Int((rMe.GetBaseAttackMagicNear()*nValue)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; //Defences case CharIntAttrRefixs_T::REFIX_DEFENCE_NEAR: { if(0!=GetDefenceNearRefix(rImp)) { nValue = Float2Int((GetDefenceNearRefix(rImp)*nRefixRate)/100.0f); nValue = Float2Int((rMe.GetBaseDefenceNear()*nValue)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; case CharIntAttrRefixs_T::REFIX_DEFENCE_MAGIC_NEAR: { if(0!=GetDefenceMagicNearRefix(rImp)) { nValue = Float2Int((GetDefenceMagicNearRefix(rImp)*nRefixRate)/100.0f); nValue = Float2Int((rMe.GetBaseDefenceMagicNear()*nValue)/100.0f); rIntAttrRefix += nValue; return TRUE; } } break; // Maxes default: break; } __LEAVE_FUNCTION return FALSE; }