mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 00:58:33 +00:00
Removed unnecessary spaces
This commit is contained in:
@@ -308,25 +308,25 @@ ItemIds ChatHelper::parseItems(std::string const text)
|
||||
ItemWithRandomProperty ChatHelper::parseItemWithRandomProperty(std::string const text)
|
||||
{
|
||||
ItemWithRandomProperty res;
|
||||
|
||||
|
||||
size_t itemStart = text.find("Hitem:");
|
||||
if (itemStart == std::string::npos)
|
||||
return res;
|
||||
|
||||
|
||||
itemStart += 6;
|
||||
if (itemStart >= text.length())
|
||||
return res;
|
||||
|
||||
|
||||
size_t colonPos = text.find(':', itemStart);
|
||||
if (colonPos == std::string::npos)
|
||||
return res;
|
||||
|
||||
|
||||
std::string itemIdStr = text.substr(itemStart, colonPos - itemStart);
|
||||
res.itemId = atoi(itemIdStr.c_str());
|
||||
|
||||
|
||||
std::vector<std::string> params;
|
||||
size_t currentPos = colonPos + 1;
|
||||
|
||||
|
||||
while (currentPos < text.length()) {
|
||||
size_t nextColon = text.find(':', currentPos);
|
||||
if (nextColon == std::string::npos) {
|
||||
@@ -336,15 +336,15 @@ ItemWithRandomProperty ChatHelper::parseItemWithRandomProperty(std::string const
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
params.push_back(text.substr(currentPos, nextColon - currentPos));
|
||||
currentPos = nextColon + 1;
|
||||
}
|
||||
|
||||
|
||||
if (params.size() >= 6) {
|
||||
res.randomPropertyId = atoi(params[5].c_str());
|
||||
}
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -364,7 +364,7 @@ std::string const ChatHelper::FormatQuest(Quest const* quest)
|
||||
|
||||
if (questTitle.empty())
|
||||
questTitle = quest->GetTitle();
|
||||
|
||||
|
||||
out << "|cFFFFFF00|Hquest:" << quest->GetQuestId() << ':' << quest->GetQuestLevel() << "|h[" << questTitle << "]|h|r";
|
||||
return out.str();
|
||||
}
|
||||
@@ -432,7 +432,7 @@ std::string const ChatHelper::FormatItem(ItemTemplate const* proto, uint32 count
|
||||
|
||||
if (locale && locale->Name.size() > sWorld->GetDefaultDbcLocale())
|
||||
itemName = locale->Name[sWorld->GetDefaultDbcLocale()];
|
||||
|
||||
|
||||
if (itemName.empty())
|
||||
itemName = proto->Name1;
|
||||
|
||||
@@ -677,7 +677,7 @@ std::set<uint32> extractGeneric(std::string_view text, std::string_view prefix)
|
||||
std::string_view number_str = text_view.substr(pos, end_pos - pos);
|
||||
|
||||
uint32 number = 0;
|
||||
|
||||
|
||||
auto [ptr, ec] = std::from_chars(number_str.data(), number_str.data() + number_str.size(), number);
|
||||
|
||||
if (ec == std::errc())
|
||||
|
||||
Reference in New Issue
Block a user