summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-05-12 14:34:33 -0400
committermekolat <mekolat@users.noreply.github.com>2016-05-12 14:34:33 -0400
commita41bf92b1b9f604a8a8527a18d7077dad985b1a8 (patch)
treea4377a2279249aee58b1263bcf3252992377c9dd
parentd17edc2fb98f6c2e177a6252bade155ee88f5979 (diff)
downloadtmwa-a41bf92b1b9f604a8a8527a18d7077dad985b1a8.tar.gz
tmwa-a41bf92b1b9f604a8a8527a18d7077dad985b1a8.tar.bz2
tmwa-a41bf92b1b9f604a8a8527a18d7077dad985b1a8.tar.xz
tmwa-a41bf92b1b9f604a8a8527a18d7077dad985b1a8.zip
don't send hidden part of npc names with npctalk => [fate]
-rw-r--r--src/map/battle.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/battle.cpp b/src/map/battle.cpp
index 031b79d..df01a5c 100644
--- a/src/map/battle.cpp
+++ b/src/map/battle.cpp
@@ -197,7 +197,12 @@ VString<23> battle_get_name(dumb_ptr<block_list> bl)
name = bl->is_player()->status_key.name.to__actual();
break;
case BL::NPC:
- name = bl->is_npc()->name;
+ {
+ name = bl->is_npc()->name;
+ // [fate] elim hashed out/invisible names for the client
+ auto it = std::find(name.begin(), name.end(), '#');
+ name = name.xislice_h(it);
+ }
break;
case BL::MOB:
name = bl->is_mob()->name;