diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-05 19:36:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-05 19:36:59 +0300 |
commit | 6c5e393bfa05f3cc42609b91d549e45c55220a6e (patch) | |
tree | 045ddb783b464b0dbf8b762bcc927fadd01330d1 | |
parent | 1a9f3cc7de6e7e304290d2979eefbf9b0239a968 (diff) | |
download | plus-6c5e393bfa05f3cc42609b91d549e45c55220a6e.tar.gz plus-6c5e393bfa05f3cc42609b91d549e45c55220a6e.tar.bz2 plus-6c5e393bfa05f3cc42609b91d549e45c55220a6e.tar.xz plus-6c5e393bfa05f3cc42609b91d549e45c55220a6e.zip |
Replace in Being getter getName to mName.
-rw-r--r-- | src/being/being.cpp | 16 | ||||
-rw-r--r-- | src/being/localplayer.cpp | 33 |
2 files changed, 27 insertions, 22 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp index 127c38232..227570b40 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -743,7 +743,9 @@ void Being::takeDamage(Being *restrict const attacker, else if (attacker == localPlayer && amount) { chatWindow->battleChatLog(strprintf("%s : You hit %s -%d", - attacker->getName().c_str(), getName().c_str(), amount), + attacker->mName.c_str(), + mName.c_str(), + amount), ChatMsgType::BY_PLAYER); } } @@ -766,7 +768,7 @@ void Being::takeDamage(Being *restrict const attacker, if (amount > 0) { if (localPlayer && localPlayer == this) - localPlayer->setLastHitFrom(attacker->getName()); + localPlayer->setLastHitFrom(attacker->mName); mDamageTaken += amount; if (mInfo) @@ -797,9 +799,9 @@ void Being::takeDamage(Being *restrict const attacker, } else if (mType == ActorType::Player && socialWindow && - !getName().empty()) + !mName.empty()) { - socialWindow->updateAvatar(getName()); + socialWindow->updateAvatar(mName); } if (effectManager) @@ -1150,7 +1152,7 @@ void Being::removeGuild(const int id) restrict2 socialWindow->removeTab(mGuilds[id]); if (mGuilds[id]) - mGuilds[id]->removeMember(getName()); + mGuilds[id]->removeMember(mName); mGuilds.erase(id); } @@ -1241,7 +1243,7 @@ void Being::updateGuild() restrict2 updateColors(); return; } - if (guild->getMember(getName())) + if (guild->getMember(mName)) { setGuild(guild); if (!guild->getName().empty()) @@ -2719,7 +2721,7 @@ void Being::addToCache() const restrict2 if (!mLowTraffic) return; - entry->setName(getName()); + entry->setName(mName); entry->setLevel(getLevel()); entry->setPartyName(getPartyName()); entry->setGuildName(getGuildName()); diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index adda425b4..e7139642b 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -418,7 +418,7 @@ void LocalPlayer::nextTile(unsigned char dir A_UNUSED = 0) const Party *const party = Party::getParty(1); if (party) { - PartyMember *const pm = party->getMember(getName()); + PartyMember *const pm = party->getMember(mName); if (pm) { pm->setX(mX); @@ -1942,7 +1942,7 @@ void LocalPlayer::afkRespond(ChatTab *const tab, const std::string &nick) chatHandler->privateMessage(nick, msg); if (localChatTab) { - localChatTab->chatLog(std::string(getName()).append( + localChatTab->chatLog(std::string(mName).append( " : ").append(msg), ChatMsgType::ACT_WHISPER, IgnoreRecord_false); @@ -1953,7 +1953,7 @@ void LocalPlayer::afkRespond(ChatTab *const tab, const std::string &nick) if (tab->getNoAway()) return; chatHandler->privateMessage(nick, msg); - tab->chatLog(getName(), msg); + tab->chatLog(mName, msg); } mAfkTime = time; } @@ -2269,7 +2269,7 @@ void LocalPlayer::imitateEmote(const Being *const being, return; std::string player_imitated = getImitate(); - if (!player_imitated.empty() && being->getName() == player_imitated) + if (!player_imitated.empty() && being->mName == player_imitated) emote(action); } @@ -2279,7 +2279,7 @@ void LocalPlayer::imitateAction(const Being *const being, if (!being) return; - if (!mPlayerImitated.empty() && being->getName() == mPlayerImitated) + if (!mPlayerImitated.empty() && being->mName == mPlayerImitated) { setAction(action); playerHandler->changeAction(action); @@ -2292,7 +2292,7 @@ void LocalPlayer::imitateDirection(const Being *const being, if (!being) return; - if (!mPlayerImitated.empty() && being->getName() == mPlayerImitated) + if (!mPlayerImitated.empty() && being->mName == mPlayerImitated) { if (!PacketLimiter::limitPackets(PacketType::PACKET_DIRECTION)) return; @@ -2326,8 +2326,9 @@ void LocalPlayer::imitateOutfit(const Being *const player, if (!player) return; - if (settings.imitationMode == 1 && !mPlayerImitated.empty() - && player->getName() == mPlayerImitated) + if (settings.imitationMode == 1 && + !mPlayerImitated.empty() && + player->mName == mPlayerImitated) { if (sprite < 0 || sprite >= player->getNumberOfLayers()) return; @@ -2375,8 +2376,9 @@ void LocalPlayer::imitateOutfit(const Being *const player, void LocalPlayer::followMoveTo(const Being *const being, const int x, const int y) { - if (being && !mPlayerFollowed.empty() - && being->getName() == mPlayerFollowed) + if (being && + !mPlayerFollowed.empty() && + being->mName == mPlayerFollowed) { mPickUpTarget = nullptr; setDestination(x, y); @@ -2391,7 +2393,8 @@ void LocalPlayer::followMoveTo(const Being *const being, return; mPickUpTarget = nullptr; - if (!mPlayerFollowed.empty() && being->getName() == mPlayerFollowed) + if (!mPlayerFollowed.empty() && + being->mName == mPlayerFollowed) { switch (settings.followMode) { @@ -2414,7 +2417,7 @@ void LocalPlayer::followMoveTo(const Being *const being, } break; case 3: - if (!mTarget || mTarget->getName() != mPlayerFollowed) + if (!mTarget || mTarget->mName != mPlayerFollowed) { if (actorManager) { @@ -2582,7 +2585,7 @@ void LocalPlayer::checkNewName(Being *const being) if (!being) return; - const std::string &nick = being->getName(); + const std::string &nick = being->mName; if (being->getType() == ActorType::Player) { const Guild *const guild = getGuild(); @@ -2649,10 +2652,10 @@ bool LocalPlayer::checAttackPermissions(const Being *const target) case 0: return true; case 1: - return !(player_relations.getRelation(target->getName()) + return !(player_relations.getRelation(target->mName) == Relation::FRIEND); case 2: - return player_relations.checkBadRelation(target->getName()); + return player_relations.checkBadRelation(target->mName); default: case 3: return false; |