Diff
checker
文本
文本
圖像
文檔
Excel
文件夾
Legal
Enterprise
桌面版
定價
登入
下載 Diffchecker 桌面版
比較文本
尋找兩個文字檔案之間的差異
工具
歷史
即時編輯器
摺疊未變更行
關閉換行
檢視
拆分
統一
比對精度
智能
單詞
字符
語法突出顯示
選擇語法
忽略
文字轉換
前往第一個差異
編輯輸入
Diffchecker Desktop
執行Diffchecker最安全的方式。取得Diffchecker桌面應用程式:您的差異永遠不會離開您的電腦!
取得桌面版
Untitled diff
建立於
9 年前
差異永不過期
清除
匯出
分享
解釋
0 刪除
行
總計
刪除
字符
總計
刪除
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
85 行
全部複製
18 新增
行
總計
新增
字符
總計
新增
要繼續使用此功能,請升級到
Diff
checker
Pro
查看價格
103 行
全部複製
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.";
}
}
複製
已複製
複製
已複製
//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.";
}
}
複製
已複製
複製
已複製
//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();
}
}
已保存差異
原始文本
開啟檔案
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(); }
更改後文本
開啟檔案
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(); }
尋找差異