Commit 16e1d661 authored by mercury233's avatar mercury233 Committed by DailyShana

update showing alias (#2222)

as long as the card name is different
parent 6052366e
......@@ -1537,8 +1537,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
myswprintf(formatBuffer, L"%ls", dataManager.GetName(mcard->code));
str.append(formatBuffer);
if(mcard->type & TYPE_MONSTER) {
if(mcard->alias && (mcard->alias < mcard->code - 10 || mcard->alias > mcard->code + 10)
&& wcscmp(dataManager.GetName(mcard->code), dataManager.GetName(mcard->alias))) {
if(mcard->alias && wcscmp(dataManager.GetName(mcard->code), dataManager.GetName(mcard->alias))) {
myswprintf(formatBuffer, L"\n(%ls)", dataManager.GetName(mcard->alias));
str.append(formatBuffer);
}
......@@ -1560,7 +1559,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
str.append(formatBuffer);
}
} else {
if(mcard->alias && (mcard->alias < mcard->code - 10 || mcard->alias > mcard->code + 10)) {
if(mcard->alias && wcscmp(dataManager.GetName(mcard->code), dataManager.GetName(mcard->alias))) {
myswprintf(formatBuffer, L"\n(%ls)", dataManager.GetName(mcard->alias));
str.append(formatBuffer);
}
......
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