Diff
checker
Testo
Testo
Immagini
Documenti
Excel
Cartelle
Legal
Enterprise
Applicazione per desktop
Prezzi
Accedi
Scarica Diffchecker Desktop
Confronta il testo
Trova la differenza tra due file di testo
Strumenti
Cronologia
Editor live
Comprimi invariate
Senza a capo
Layout
Diviso
Unificato
Livello di dettaglio
Intelligente
Parola
Carattere
Evidenziazione sintassi
Scegli sintassi
Ignora
Trasforma testo
Vai alla prima modifica
Modifica input
Diffchecker Desktop
Il modo più sicuro per usare Diffchecker. Ottieni l'app Diffchecker Desktop: i tuoi diff non lasciano mai il tuo computer!
Ottieni Desktop
Untitled diff
Creato
9 anni fa
Il diff non scade mai
Eliminare
Esporta
Condividere
Spiegare
0 rimozioni
Linee
Totale
Rimosso
Caratteri
Totale
Rimosso
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
85 linee
Copia tutti
18 aggiunte
Linee
Totale
Aggiunto
Caratteri
Totale
Aggiunto
Per continuare a utilizzare questa funzione, aggiorna a
Diff
checker
Pro
Visualizza prezzi
103 linee
Copia tutti
std::string Player::getDescription(int32_t lookDistance) const
std::string Player::getDescription(int32_t lookDistance) const
{
{
std::ostringstream s;
std::ostringstream s;
if (lookDistance == -1) {
if (lookDistance == -1) {
s << "yourself.";
s << "yourself.";
if (group->access) {
if (group->access) {
s << " You are " << group->name << '.';
s << " You are " << group->name << '.';
} else if (vocation->getId() != VOCATION_NONE) {
} else if (vocation->getId() != VOCATION_NONE) {
s << " You are " << vocation->getVocDescription() << '.';
s << " You are " << vocation->getVocDescription() << '.';
} else {
} else {
s << " You have no vocation.";
s << " You have no vocation.";
}
}
Copia
Copiato
Copia
Copiato
//custom edit: passive damage bonus
if (passiveDamageBonus > 0)
{
s << " Your passive damage bonus is " << passiveDamageBonus << "%.";
}
} else {
} else {
s << name;
s << name;
if (!group->access) {
if (!group->access) {
s << " (Level " << level << ')';
s << " (Level " << level << ')';
}
}
s << '.';
s << '.';
if (sex == PLAYERSEX_FEMALE) {
if (sex == PLAYERSEX_FEMALE) {
s << " She";
s << " She";
} else {
} else {
s << " He";
s << " He";
}
}
if (group->access) {
if (group->access) {
s << " is " << group->name << '.';
s << " is " << group->name << '.';
} else if (vocation->getId() != VOCATION_NONE) {
} else if (vocation->getId() != VOCATION_NONE) {
s << " is " << vocation->getVocDescription() << '.';
s << " is " << vocation->getVocDescription() << '.';
} else {
} else {
s << " has no vocation.";
s << " has no vocation.";
}
}
Copia
Copiato
Copia
Copiato
//custom edit: passive damage bonus
if (passiveDamageBonus > 0)
{
if (sex == PLAYERSEX_FEMALE) {
s << " Her";
}
else {
s << " His";
}
s << " passive damage bonus is " << passiveDamageBonus << "%.";
}
}
}
if (party) {
if (party) {
if (lookDistance == -1) {
if (lookDistance == -1) {
s << " Your party has ";
s << " Your party has ";
} else if (sex == PLAYERSEX_FEMALE) {
} else if (sex == PLAYERSEX_FEMALE) {
s << " She is in a party with ";
s << " She is in a party with ";
} else {
} else {
s << " He is in a party with ";
s << " He is in a party with ";
}
}
size_t memberCount = party->getMemberCount() + 1;
size_t memberCount = party->getMemberCount() + 1;
if (memberCount == 1) {
if (memberCount == 1) {
s << "1 member and ";
s << "1 member and ";
} else {
} else {
s << memberCount << " members and ";
s << memberCount << " members and ";
}
}
size_t invitationCount = party->getInvitationCount();
size_t invitationCount = party->getInvitationCount();
if (invitationCount == 1) {
if (invitationCount == 1) {
s << "1 pending invitation.";
s << "1 pending invitation.";
} else {
} else {
s << invitationCount << " pending invitations.";
s << invitationCount << " pending invitations.";
}
}
}
}
if (!guild || !guildRank) {
if (!guild || !guildRank) {
return s.str();
return s.str();
}
}
if (lookDistance == -1) {
if (lookDistance == -1) {
s << " You are ";
s << " You are ";
} else if (sex == PLAYERSEX_FEMALE) {
} else if (sex == PLAYERSEX_FEMALE) {
s << " She is ";
s << " She is ";
} else {
} else {
s << " He is ";
s << " He is ";
}
}
s << guildRank->name << " of the " << guild->getName();
s << guildRank->name << " of the " << guild->getName();
if (!guildNick.empty()) {
if (!guildNick.empty()) {
s << " (" << guildNick << ')';
s << " (" << guildNick << ')';
}
}
size_t memberCount = guild->getMemberCount();
size_t memberCount = guild->getMemberCount();
if (memberCount == 1) {
if (memberCount == 1) {
s << ", which has 1 member, " << guild->getMembersOnline().size() << " of them online.";
s << ", which has 1 member, " << guild->getMembersOnline().size() << " of them online.";
} else {
} else {
s << ", which has " << memberCount << " members, " << guild->getMembersOnline().size() << " of them online.";
s << ", which has " << memberCount << " members, " << guild->getMembersOnline().size() << " of them online.";
}
}
return s.str();
return s.str();
}
}
Diff salvati
Testo originale
Apri file
std::string Player::getDescription(int32_t lookDistance) const { std::ostringstream s; if (lookDistance == -1) { s << "yourself."; if (group->access) { s << " You are " << group->name << '.'; } else if (vocation->getId() != VOCATION_NONE) { s << " You are " << vocation->getVocDescription() << '.'; } else { s << " You have no vocation."; } } else { s << name; if (!group->access) { s << " (Level " << level << ')'; } s << '.'; if (sex == PLAYERSEX_FEMALE) { s << " She"; } else { s << " He"; } if (group->access) { s << " is " << group->name << '.'; } else if (vocation->getId() != VOCATION_NONE) { s << " is " << vocation->getVocDescription() << '.'; } else { s << " has no vocation."; } } if (party) { if (lookDistance == -1) { s << " Your party has "; } else if (sex == PLAYERSEX_FEMALE) { s << " She is in a party with "; } else { s << " He is in a party with "; } size_t memberCount = party->getMemberCount() + 1; if (memberCount == 1) { s << "1 member and "; } else { s << memberCount << " members and "; } size_t invitationCount = party->getInvitationCount(); if (invitationCount == 1) { s << "1 pending invitation."; } else { s << invitationCount << " pending invitations."; } } if (!guild || !guildRank) { return s.str(); } if (lookDistance == -1) { s << " You are "; } else if (sex == PLAYERSEX_FEMALE) { s << " She is "; } else { s << " He is "; } s << guildRank->name << " of the " << guild->getName(); if (!guildNick.empty()) { s << " (" << guildNick << ')'; } size_t memberCount = guild->getMemberCount(); if (memberCount == 1) { s << ", which has 1 member, " << guild->getMembersOnline().size() << " of them online."; } else { s << ", which has " << memberCount << " members, " << guild->getMembersOnline().size() << " of them online."; } return s.str(); }
Testo modificato
Apri file
std::string Player::getDescription(int32_t lookDistance) const { std::ostringstream s; if (lookDistance == -1) { s << "yourself."; if (group->access) { s << " You are " << group->name << '.'; } else if (vocation->getId() != VOCATION_NONE) { s << " You are " << vocation->getVocDescription() << '.'; } else { s << " You have no vocation."; } //custom edit: passive damage bonus if (passiveDamageBonus > 0) { s << " Your passive damage bonus is " << passiveDamageBonus << "%."; } } else { s << name; if (!group->access) { s << " (Level " << level << ')'; } s << '.'; if (sex == PLAYERSEX_FEMALE) { s << " She"; } else { s << " He"; } if (group->access) { s << " is " << group->name << '.'; } else if (vocation->getId() != VOCATION_NONE) { s << " is " << vocation->getVocDescription() << '.'; } else { s << " has no vocation."; } //custom edit: passive damage bonus if (passiveDamageBonus > 0) { if (sex == PLAYERSEX_FEMALE) { s << " Her"; } else { s << " His"; } s << " passive damage bonus is " << passiveDamageBonus << "%."; } } if (party) { if (lookDistance == -1) { s << " Your party has "; } else if (sex == PLAYERSEX_FEMALE) { s << " She is in a party with "; } else { s << " He is in a party with "; } size_t memberCount = party->getMemberCount() + 1; if (memberCount == 1) { s << "1 member and "; } else { s << memberCount << " members and "; } size_t invitationCount = party->getInvitationCount(); if (invitationCount == 1) { s << "1 pending invitation."; } else { s << invitationCount << " pending invitations."; } } if (!guild || !guildRank) { return s.str(); } if (lookDistance == -1) { s << " You are "; } else if (sex == PLAYERSEX_FEMALE) { s << " She is "; } else { s << " He is "; } s << guildRank->name << " of the " << guild->getName(); if (!guildNick.empty()) { s << " (" << guildNick << ')'; } size_t memberCount = guild->getMemberCount(); if (memberCount == 1) { s << ", which has 1 member, " << guild->getMembersOnline().size() << " of them online."; } else { s << ", which has " << memberCount << " members, " << guild->getMembersOnline().size() << " of them online."; } return s.str(); }
Trovare la differenza