Diff
checker
Texte
Texte
Images
Documents
Excel
Dossiers
Legal
Enterprise
Application de bureau
Prix
Se connecter
Télécharger Diffchecker Desktop
Comparer le texte
Trouver la différence entre deux fichiers texte
Outils
Historique
Éditeur live
Cacher identiques
Sans retour à la ligne
Vue
Divisé
Unifié
Niveau de précision
Intelligent
Mot
Caractère
Coloration syntaxique
Choisir la syntaxe
Ignorer
Transformer le texte
Aller au premier écart
Modifier l'entrée
Diffchecker Desktop
La façon la plus sécurisée d'utiliser Diffchecker. Obtenez l'application Diffchecker Desktop : vos diffs ne quittent jamais votre ordinateur !
Obtenir Desktop
Untitled diff
Créé
il y a 9 ans
Le diff n'expire jamais
Effacer
Exporter
Partager
Expliquer
0 suppressions
Lignes
Total
Supprimé
Caractères
Total
Supprimé
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
31 lignes
Copier tout
1 ajout
Lignes
Total
Ajouté
Caractères
Total
Ajouté
Pour continuer à utiliser cette fonctionnalité, passez à
Diff
checker
Pro
Voir les prix
31 lignes
Copier tout
int32_t WeaponDistance::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const
int32_t WeaponDistance::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const
{
{
int32_t attackValue = item->getAttack();
int32_t attackValue = item->getAttack();
if (item->getWeaponType() == WEAPON_AMMO) {
if (item->getWeaponType() == WEAPON_AMMO) {
Item* weapon = player->getWeapon(true);
Item* weapon = player->getWeapon(true);
if (weapon) {
if (weapon) {
attackValue += weapon->getAttack();
attackValue += weapon->getAttack();
}
}
}
}
int32_t attackSkill = player->getSkillLevel(SKILL_DISTANCE);
int32_t attackSkill = player->getSkillLevel(SKILL_DISTANCE);
float attackFactor = player->getAttackFactor();
float attackFactor = player->getAttackFactor();
Copier
Copié
Copier
Copié
int32_t maxValue = static_cast<int32_t>(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor
) * player->getVocation()->distDamageMultiplier);
int32_t maxValue = static_cast<int32_t>(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor
, player->getPassiveDamageBonus()
) * player->getVocation()->distDamageMultiplier);
if (maxDamage) {
if (maxDamage) {
return -maxValue;
return -maxValue;
}
}
int32_t minValue;
int32_t minValue;
if (target) {
if (target) {
if (target->getPlayer()) {
if (target->getPlayer()) {
minValue = static_cast<int32_t>(std::ceil(player->getLevel() * 0.1));
minValue = static_cast<int32_t>(std::ceil(player->getLevel() * 0.1));
} else {
} else {
minValue = static_cast<int32_t>(std::ceil(player->getLevel() * 0.2));
minValue = static_cast<int32_t>(std::ceil(player->getLevel() * 0.2));
}
}
} else {
} else {
minValue = 0;
minValue = 0;
}
}
return -normal_random(minValue, maxValue);
return -normal_random(minValue, maxValue);
}
}
Différences enregistrées
Texte d'origine
Ouvrir un fichier
int32_t WeaponDistance::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const { int32_t attackValue = item->getAttack(); if (item->getWeaponType() == WEAPON_AMMO) { Item* weapon = player->getWeapon(true); if (weapon) { attackValue += weapon->getAttack(); } } int32_t attackSkill = player->getSkillLevel(SKILL_DISTANCE); float attackFactor = player->getAttackFactor(); int32_t maxValue = static_cast<int32_t>(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor) * player->getVocation()->distDamageMultiplier); if (maxDamage) { return -maxValue; } int32_t minValue; if (target) { if (target->getPlayer()) { minValue = static_cast<int32_t>(std::ceil(player->getLevel() * 0.1)); } else { minValue = static_cast<int32_t>(std::ceil(player->getLevel() * 0.2)); } } else { minValue = 0; } return -normal_random(minValue, maxValue); }
Texte modifié
Ouvrir un fichier
int32_t WeaponDistance::getWeaponDamage(const Player* player, const Creature* target, const Item* item, bool maxDamage /*= false*/) const { int32_t attackValue = item->getAttack(); if (item->getWeaponType() == WEAPON_AMMO) { Item* weapon = player->getWeapon(true); if (weapon) { attackValue += weapon->getAttack(); } } int32_t attackSkill = player->getSkillLevel(SKILL_DISTANCE); float attackFactor = player->getAttackFactor(); int32_t maxValue = static_cast<int32_t>(Weapons::getMaxWeaponDamage(player->getLevel(), attackSkill, attackValue, attackFactor, player->getPassiveDamageBonus()) * player->getVocation()->distDamageMultiplier); if (maxDamage) { return -maxValue; } int32_t minValue; if (target) { if (target->getPlayer()) { minValue = static_cast<int32_t>(std::ceil(player->getLevel() * 0.1)); } else { minValue = static_cast<int32_t>(std::ceil(player->getLevel() * 0.2)); } } else { minValue = 0; } return -normal_random(minValue, maxValue); }
Trouver la différence