summaryrefslogtreecommitdiff
path: root/src/map/clif.cpp
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2025-01-24 10:46:23 +0000
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2025-01-24 10:46:23 +0000
commit2ff2618f8c9a970d1822d5e376fdb67249f63c16 (patch)
treef3c1895c1bb98d49424911ba9d85c7ada9d7bd5f /src/map/clif.cpp
parenteb623dc14cb90273fc3dbe0e3987f84142bfca53 (diff)
downloadtmwa-master.tar.gz
tmwa-master.tar.bz2
tmwa-master.tar.xz
tmwa-master.zip
Access mob_db array only once (same for dropitem)HEADmaster
Note: there were some checks before mob.cpp:3743 that I think applied on empty memory? Plus I moved the std::move right at the end of that loop. I'm not too familiar with move mechanics but it seems to work. YMMV. Approved-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
Diffstat (limited to 'src/map/clif.cpp')
-rw-r--r--src/map/clif.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/clif.cpp b/src/map/clif.cpp
index 4d36f17..1b77be6 100644
--- a/src/map/clif.cpp
+++ b/src/map/clif.cpp
@@ -4020,7 +4020,7 @@ RecvResult clif_parse_GetCharNameRequest(Session *s, dumb_ptr<map_session_data>
dumb_ptr<mob_data> md = bl->is_mob();
nullpo_retr(rv, md);
- if (md->name != MobName() && md->name != get_mob_db(md->mob_class).name && md->name.size() >= 4)
+ if (md->name.size() >= 4)
fixed_95.char_name = stringish<CharName>(md->name);
else
fixed_95.char_name = stringish<CharName>(get_mob_db(md->mob_class).name);