kimokimo
Kimo
I added a small edit to function combatHealth in game.cpp
here's what happened
Code:
if (targetPlayer = dynamic_cast<Player*> (target)) {
std::string value;
double damageReduction = 0;
uint32_t storage[33];
sprintf(storage, "%d", g_config.getNumber(ConfigManager::DAMAGE_REDUCTION_STORAGE));
targetPlayer->getStorage(storage, value);
if (atoi(value.c_str()) < 0) {
actualDamage = initialDamage;
} else {
damageReduction = atof(value.c_str());
actualDamage = initialDamage * (1 - (damageReduction / 100));
}
#ifdef __CUSTOM_DEBUG__
std::cout << "Player named " << targetPlayer->getName() << " has a damage reductin of " << damageReduction << "%.\n";
std::cout << "Incoming damage: " << initialDamage << ", actual damage dealt: " << actualDamage << "\n";
#endif
}
here's what happened
Gyazo
gyazo.com