Commit 1520c6c4 authored by fallenstardust's avatar fallenstardust

胜利时支持隐藏昵称

parent 7fa28fbb
...@@ -1158,21 +1158,22 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -1158,21 +1158,22 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
wchar_t vic_buf[256]; wchar_t vic_buf[256];
if(player == 2) if(player == 2)
mainGame->showcardcode = 3; mainGame->showcardcode = 3;
else if(mainGame->LocalPlayer(player) == 0) { else {
mainGame->showcardcode = 1; wchar_t vic_name[20];
if(match_kill) if(mainGame->LocalPlayer(player) == 0) {
myswprintf(vic_buf, dataManager.GetVictoryString(0xffff), dataManager.GetName(match_kill)); mainGame->showcardcode = 1;
else if(type < 0x10) myswprintf(vic_name, L"%ls", mainGame->dInfo.clientname);
myswprintf(vic_buf, L"[%ls] %ls", mainGame->dInfo.clientname, dataManager.GetVictoryString(type)); }
else else {
myswprintf(vic_buf, L"%ls", dataManager.GetVictoryString(type)); mainGame->showcardcode = 2;
mainGame->dInfo.vic_string = vic_buf; myswprintf(vic_name, L"%ls", mainGame->dInfo.hostname);
} else { }
mainGame->showcardcode = 2; if(mainGame->gameConf.hide_player_name)
myswprintf(vic_name, L"********");
if(match_kill) if(match_kill)
myswprintf(vic_buf, dataManager.GetVictoryString(0xffff), dataManager.GetName(match_kill)); myswprintf(vic_buf, dataManager.GetVictoryString(0xffff), dataManager.GetName(match_kill));
else if(type < 0x10) else if(type < 0x10)
myswprintf(vic_buf, L"[%ls] %ls", mainGame->dInfo.hostname, dataManager.GetVictoryString(type)); myswprintf(vic_buf, L"[%ls] %ls", vic_name, dataManager.GetVictoryString(type));
else else
myswprintf(vic_buf, L"%ls", dataManager.GetVictoryString(type)); myswprintf(vic_buf, L"%ls", dataManager.GetVictoryString(type));
mainGame->dInfo.vic_string = vic_buf; mainGame->dInfo.vic_string = vic_buf;
......
...@@ -3052,7 +3052,7 @@ namespace unicode { ...@@ -3052,7 +3052,7 @@ namespace unicode {
//! Hashing algorithm for hashing a ustring. Used for things like unordered_maps. //! Hashing algorithm for hashing a ustring. Used for things like unordered_maps.
//! Algorithm taken from std::hash<std::string>. //! Algorithm taken from std::hash<std::string>.
class hash : public std::unary_function<core::ustring, size_t> { class hash {
public: public:
size_t operator()(const core::ustring& s) const { size_t operator()(const core::ustring& s) const {
size_t ret = 2166136261U; size_t ret = 2166136261U;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment