Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/game/chars/CCharAct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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));
Expand Down
12 changes: 6 additions & 6 deletions src/game/chars/CCharFight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down