From fe6a120ea38daaad39f6952a886c20269cfedca6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 16 May 2014 16:15:34 +0300 Subject: Move chatmsgtype into separate file. --- src/being/being.cpp | 5 +++-- src/being/localplayer.cpp | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src/being') diff --git a/src/being/being.cpp b/src/being/being.cpp index 0d72585f1..d3df414c5 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -562,14 +562,15 @@ void Being::takeDamage(Being *const attacker, const int amount, if (attacker->mType == ActorType::PLAYER || amount) { chatWindow->battleChatLog(strprintf("%s : Hit you -%d", - attacker->getName().c_str(), amount), BY_OTHER); + attacker->getName().c_str(), amount), + ChatMsgType::BY_OTHER); } } else if (attacker == player_node && amount) { chatWindow->battleChatLog(strprintf("%s : You hit %s -%d", attacker->getName().c_str(), getName().c_str(), amount), - BY_PLAYER); + ChatMsgType::BY_PLAYER); } } if (font && particleEngine) diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 8d921d8dd..08a74ad8b 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -853,7 +853,7 @@ void LocalPlayer::pickedUp(const ItemInfo &itemInfo, const int amount, break; } if (localChatTab && config.getBoolValue("showpickupchat")) - localChatTab->chatLog(gettext(msg), BY_SERVER); + localChatTab->chatLog(gettext(msg), ChatMsgType::BY_SERVER); if (mMap && config.getBoolValue("showpickupparticle")) { @@ -875,7 +875,8 @@ void LocalPlayer::pickedUp(const ItemInfo &itemInfo, const int amount, // [@@%d|%s@@] - here player can see link to item localChatTab->chatLog(strprintf(ngettext("You picked up %d " "[@@%d|%s@@].", "You picked up %d [@@%d|%s@@].", amount), - amount, itemInfo.getId(), str.c_str()), BY_SERVER); + amount, itemInfo.getId(), str.c_str()), + ChatMsgType::BY_SERVER); } if (mMap && config.getBoolValue("showpickupparticle")) @@ -3023,7 +3024,7 @@ void LocalPlayer::afkRespond(ChatTab *const tab, const std::string &nick) if (localChatTab) { localChatTab->chatLog(std::string(getName()).append( - " : ").append(msg), ACT_WHISPER, false); + " : ").append(msg), ChatMsgType::ACT_WHISPER, false); } } else -- cgit v1.2.3-60-g2f50