diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-16 16:15:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-16 16:15:34 +0300 |
commit | fe6a120ea38daaad39f6952a886c20269cfedca6 (patch) | |
tree | 4595d63a2ab9764873657182fbf2ab2b985474bf /src/being | |
parent | 6279b10249efa59b3161b014899465fe4bb08da4 (diff) | |
download | mv-fe6a120ea38daaad39f6952a886c20269cfedca6.tar.gz mv-fe6a120ea38daaad39f6952a886c20269cfedca6.tar.bz2 mv-fe6a120ea38daaad39f6952a886c20269cfedca6.tar.xz mv-fe6a120ea38daaad39f6952a886c20269cfedca6.zip |
Move chatmsgtype into separate file.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/being.cpp | 5 | ||||
-rw-r--r-- | src/being/localplayer.cpp | 7 |
2 files changed, 7 insertions, 5 deletions
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 |