diff --git a/src/game/chars/CCharAct.cpp b/src/game/chars/CCharAct.cpp index 85070eed8..673042805 100644 --- a/src/game/chars/CCharAct.cpp +++ b/src/game/chars/CCharAct.cpp @@ -524,6 +524,12 @@ void CChar::OnRemoveObj( CSObjContRec* pObRec ) // Override this = called when r ModPropNum(pCCPChar, PROPCH_RESPOISON, - pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESPOISON, pItemBaseCCPItemEquippable)); ModPropNum(pCCPChar, PROPCH_RESENERGY, - pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESENERGY, pItemBaseCCPItemEquippable)); + ModPropNum(pCCPChar, PROPCH_RESPHYSICALMAX, - pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESPHYSICALMAX, pItemBaseCCPItemEquippable)); + ModPropNum(pCCPChar, PROPCH_RESFIREMAX, - pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESFIREMAX, pItemBaseCCPItemEquippable)); + ModPropNum(pCCPChar, PROPCH_RESCOLDMAX, - pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESCOLDMAX, pItemBaseCCPItemEquippable)); + ModPropNum(pCCPChar, PROPCH_RESPOISONMAX, - pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESPOISONMAX, pItemBaseCCPItemEquippable)); + ModPropNum(pCCPChar, PROPCH_RESENERGYMAX, - pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESENERGYMAX, pItemBaseCCPItemEquippable)); + ModPropNum(pCCPChar, PROPCH_INCREASEDAM, - pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_INCREASEDAM, pItemBaseCCPItemEquippable)); ModPropNum(pCCPChar, PROPCH_INCREASEDEFCHANCE, - pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_INCREASEDEFCHANCE, pItemBaseCCPItemEquippable)); ModPropNum(pCCPChar, PROPCH_FASTERCASTING, - pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_FASTERCASTING, pItemBaseCCPItemEquippable)); @@ -3392,6 +3398,12 @@ bool CChar::ItemEquip( CItem * pItem, CChar * pCharMsg, bool fFromDClick ) ModPropNum(pCCPChar, PROPCH_RESPOISON, + pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESPOISON, pItemBaseCCPItemEquippable)); ModPropNum(pCCPChar, PROPCH_RESENERGY, + pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESENERGY, pItemBaseCCPItemEquippable)); + ModPropNum(pCCPChar, PROPCH_RESPHYSICALMAX, + pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESPHYSICALMAX, pItemBaseCCPItemEquippable)); + ModPropNum(pCCPChar, PROPCH_RESFIREMAX, + pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESFIREMAX, pItemBaseCCPItemEquippable)); + ModPropNum(pCCPChar, PROPCH_RESCOLDMAX, + pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESCOLDMAX, pItemBaseCCPItemEquippable)); + ModPropNum(pCCPChar, PROPCH_RESPOISONMAX, + pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESPOISONMAX, pItemBaseCCPItemEquippable)); + ModPropNum(pCCPChar, PROPCH_RESENERGYMAX, + pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_RESENERGYMAX, pItemBaseCCPItemEquippable)); + ModPropNum(pCCPChar, PROPCH_INCREASEDAM, + pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_INCREASEDAM, pItemBaseCCPItemEquippable)); ModPropNum(pCCPChar, PROPCH_INCREASEDEFCHANCE, + pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_INCREASEDEFCHANCE, pItemBaseCCPItemEquippable)); ModPropNum(pCCPChar, PROPCH_FASTERCASTING, + pItem->GetPropNum(pItemCCPItemEquippable, PROPIEQUIP_FASTERCASTING, pItemBaseCCPItemEquippable)); diff --git a/src/game/chars/CCharFight.cpp b/src/game/chars/CCharFight.cpp index 10e6451f8..7180dcaf2 100644 --- a/src/game/chars/CCharFight.cpp +++ b/src/game/chars/CCharFight.cpp @@ -721,13 +721,13 @@ int CChar::OnTakeDamage( int iDmg, CChar * pSrc, DAMAGE_TYPE uiType, int iDmgPhy if ( iDmgPhysical == 0 ) // if physical damage is not set, let's assume it as the remaining value iDmgPhysical = 100 - (iDmgFire + iDmgCold + iDmgPoison + iDmgEnergy); - int iPhysicalDamage = iDmg * iDmgPhysical * (100 - (int)GetPropNum(pCCPChar, PROPCH_RESPHYSICAL, pBaseCCPChar)); - int iFireDamage = iDmg * iDmgFire * (100 - (int)GetPropNum(pCCPChar, PROPCH_RESFIRE, pBaseCCPChar)); - int iColdDamage = iDmg * iDmgCold * (100 - (int)GetPropNum(pCCPChar, PROPCH_RESCOLD, pBaseCCPChar)); - int iPoisonDamage = iDmg * iDmgPoison * (100 - (int)GetPropNum(pCCPChar, PROPCH_RESPOISON, pBaseCCPChar)); - int iEnergyDamage = iDmg * iDmgEnergy * (100 - (int)GetPropNum(pCCPChar, PROPCH_RESENERGY, pBaseCCPChar)); + int iPhysicalDamage = iDmg * iDmgPhysical * (100 - minimum((int)GetPropNum(pCCPChar, PROPCH_RESPHYSICAL, pBaseCCPChar), (int)GetPropNum(pCCPChar, PROPCH_RESPHYSICALMAX, pBaseCCPChar))); + int iFireDamage = iDmg * iDmgFire * (100 - minimum((int)GetPropNum(pCCPChar, PROPCH_RESFIRE, pBaseCCPChar), (int)GetPropNum(pCCPChar, PROPCH_RESFIREMAX, pBaseCCPChar))); + int iColdDamage = iDmg * iDmgCold * (100 - minimum((int)GetPropNum(pCCPChar, PROPCH_RESCOLD, pBaseCCPChar), (int)GetPropNum(pCCPChar, PROPCH_RESCOLDMAX, pBaseCCPChar))); + int iPoisonDamage = iDmg * iDmgPoison * (100 - minimum((int)GetPropNum(pCCPChar, PROPCH_RESPOISON, pBaseCCPChar), (int)GetPropNum(pCCPChar, PROPCH_RESPOISONMAX, pBaseCCPChar))); + int iEnergyDamage = iDmg * iDmgEnergy * (100 - minimum((int)GetPropNum(pCCPChar, PROPCH_RESENERGY, pBaseCCPChar), (int)GetPropNum(pCCPChar, PROPCH_RESENERGYMAX, pBaseCCPChar))); - iDmg = (iPhysicalDamage + iFireDamage + iColdDamage + iPoisonDamage + iEnergyDamage) / 10000; + iDmg = (iPhysicalDamage + iFireDamage + iColdDamage + iPoisonDamage + iEnergyDamage) / 10000; } else {