fix: escape newlines in macro cfg persistence; execute all macro lines

- Macro text is now escaped (\\n, \\\\) on save and unescaped on load,
  fixing multiline macros silently truncating after the first line in
  the character config file.
- executeMacroText() runs every non-comment line of a macro body in
  sequence (WoW behaviour), replacing the firstMacroCommand() approach
  that only fired the first actionable line. The server still enforces
  one spell-cast per click; non-cast commands (target, equip, pet, etc.)
  now all execute correctly in the same macro activation.
This commit is contained in:
Kelsi 2026-03-18 02:44:28 -07:00
parent c676d99fc2
commit ed3bca3d17
3 changed files with 60 additions and 23 deletions

View file

@ -278,6 +278,7 @@ private:
* Send chat message
*/
void sendChatMessage(game::GameHandler& gameHandler);
void executeMacroText(game::GameHandler& gameHandler, const std::string& macroText);
/**
* Get chat type name