mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +00:00
feat(Core/Chat): new argument parsing and unify chat hyperlink parsing (#6243)
This commit is contained in:
@@ -1287,10 +1287,10 @@ public:
|
||||
if (itr == _gameTeleStore.end()) return nullptr;
|
||||
return &itr->second;
|
||||
}
|
||||
[[nodiscard]] GameTele const* GetGameTele(std::string const& name) const;
|
||||
[[nodiscard]] GameTele const* GetGameTele(std::string_view name) const;
|
||||
[[nodiscard]] GameTeleContainer const& GetGameTeleMap() const { return _gameTeleStore; }
|
||||
bool AddGameTele(GameTele& data);
|
||||
bool DeleteGameTele(std::string const& name);
|
||||
bool DeleteGameTele(std::string_view name);
|
||||
|
||||
[[nodiscard]] TrainerSpellData const* GetNpcTrainerSpells(uint32 entry) const
|
||||
{
|
||||
@@ -1344,6 +1344,13 @@ public:
|
||||
}
|
||||
|
||||
static void AddLocaleString(std::string&& s, LocaleConstant locale, std::vector<std::string>& data);
|
||||
static std::string_view GetLocaleString(std::vector<std::string> const& data, size_t locale)
|
||||
{
|
||||
if (locale < data.size())
|
||||
return data[locale];
|
||||
else
|
||||
return {};
|
||||
}
|
||||
static inline void GetLocaleString(const std::vector<std::string>& data, int loc_idx, std::string& value)
|
||||
{
|
||||
if (data.size() > size_t(loc_idx) && !data[loc_idx].empty())
|
||||
|
||||
Reference in New Issue
Block a user