From 5c7c7dc129d608c69da8854414dba19b5ac2d67a Mon Sep 17 00:00:00 2001 From: bo Date: Sat, 11 Jul 2026 21:23:15 -0500 Subject: [PATCH] spell name fix --- .../Bots/playerbot/strategy/values/SpellIdValue.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/modules/Bots/playerbot/strategy/values/SpellIdValue.cpp b/src/modules/Bots/playerbot/strategy/values/SpellIdValue.cpp index 3ed513a1f..f708b5e6f 100644 --- a/src/modules/Bots/playerbot/strategy/values/SpellIdValue.cpp +++ b/src/modules/Bots/playerbot/strategy/values/SpellIdValue.cpp @@ -13,6 +13,15 @@ SpellIdValue::SpellIdValue(PlayerbotAI* ai) uint32 SpellIdValue::Calculate() { string namepart = qualifier; + + // Strip surrounding quotes passed through from whisper text + if (namepart.size() >= 2 && + (namepart.front() == '"' || namepart.front() == '\'') && + namepart.back() == namepart.front()) + { + namepart = namepart.substr(1, namepart.size() - 2); + } + wstring wnamepart; if (!Utf8toWStr(namepart, wnamepart)) @@ -21,7 +30,7 @@ uint32 SpellIdValue::Calculate() } wstrToLower(wnamepart); - char firstSymbol = tolower(qualifier[0]); + char firstSymbol = tolower(namepart[0]); int spellLength = wnamepart.length(); int loc = bot->GetSession()->GetSessionDbcLocale();