mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 23:20:25 +00:00
[Strings] Refactor Strings Usage (#2305)
* Initial commit checkpoint * More functions converted * Commify * More functions * Fin * Sort declarations * Split functions between files * Bots * Update strings.h * Split * Revert find replaces * Repository template * Money * Misc function * Update CMakeLists.txt * Saylink * Update strings.cpp * Swap Strings::Saylink for Saylink::Create since saylink is coupled to zone database * API casings
This commit is contained in:
+4
-4
@@ -652,7 +652,7 @@ void ZoneDatabase::LoadGlobalLoot()
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
// checking zone limits
|
||||
if (row[10]) {
|
||||
auto zones = SplitString(row[10], '|');
|
||||
auto zones = Strings::Split(row[10], '|');
|
||||
|
||||
auto it = std::find(zones.begin(), zones.end(), zoneid);
|
||||
if (it == zones.end()) { // not in here, skip
|
||||
@@ -683,21 +683,21 @@ void ZoneDatabase::LoadGlobalLoot()
|
||||
}
|
||||
|
||||
if (row[7]) {
|
||||
auto races = SplitString(row[7], '|');
|
||||
auto races = Strings::Split(row[7], '|');
|
||||
|
||||
for (auto &r : races)
|
||||
e.AddRule(GlobalLoot::RuleTypes::Race, std::stoi(r));
|
||||
}
|
||||
|
||||
if (row[8]) {
|
||||
auto classes = SplitString(row[8], '|');
|
||||
auto classes = Strings::Split(row[8], '|');
|
||||
|
||||
for (auto &c : classes)
|
||||
e.AddRule(GlobalLoot::RuleTypes::Class, std::stoi(c));
|
||||
}
|
||||
|
||||
if (row[9]) {
|
||||
auto bodytypes = SplitString(row[9], '|');
|
||||
auto bodytypes = Strings::Split(row[9], '|');
|
||||
|
||||
for (auto &b : bodytypes)
|
||||
e.AddRule(GlobalLoot::RuleTypes::BodyType, std::stoi(b));
|
||||
|
||||
Reference in New Issue
Block a user