Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix incorrect pawn icons #2436

Merged
merged 2 commits into from
Mar 3, 2017
Merged

fix incorrect pawn icons #2436

merged 2 commits into from
Mar 3, 2017

Conversation

ZeldaZach
Copy link
Member

Fix #2386

The issue came about because we always showed the pawn of "other user's pawn rank" instead of doing a tertiary case (like we do for flags).

This fixes the issue.

@tooomm
Copy link
Member

tooomm commented Mar 2, 2017

@tritoch does this fix the pawns for you?

@@ -115,7 +115,8 @@ void TabMessage::actLeave()
void TabMessage::processUserMessageEvent(const Event_UserMessage &event)
{
const UserLevelFlags userLevel(event.sender_name() == otherUserInfo->name() ? otherUserInfo->user_level() : ownUserInfo->user_level());
chatView->appendMessage(QString::fromStdString(event.message()), 0,QString::fromStdString(event.sender_name()), userLevel, QString::fromStdString(otherUserInfo->privlevel()), true);
const QString userPriv(event.sender_name() == otherUserInfo->name() ? QString::fromStdString(otherUserInfo->privlevel()) : QString::fromStdString(ownUserInfo->privlevel()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor tweak for duplication;

auto userInfo = event.sender_name() == otherUserInfo->name() ? otherUserInfo : ownUserInfo;
const UserLevelFlags userLevel(userInfo->user_level());
const QString userPriv = QString::fromStdString(userInfo->privlevel());

@dev-id
Copy link
Contributor

dev-id commented Mar 2, 2017

Pawns are now correct

@ZeldaZach ZeldaZach merged commit b8334d0 into Cockatrice:master Mar 3, 2017
@ZeldaZach ZeldaZach deleted the fix_2386 branch March 3, 2017 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gummy Privlevel in PM transposed
4 participants