mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Fixed a zone crash related to numhits for spells.
Fixed a query related to group leaders logging in. Fixed a world crash related to attempting to join an adventure with Mercenaries.
This commit is contained in:
+5
-2
@@ -768,7 +768,10 @@ uint32 Database::GetCharacterID(const char *name) {
|
||||
std::string query = StringFormat("SELECT `id` FROM `character_data` WHERE `name` = '%s'", name);
|
||||
auto results = QueryDatabase(query);
|
||||
auto row = results.begin();
|
||||
if (row[0]){ return atoi(row[0]); }
|
||||
if (results.RowCount() == 1)
|
||||
{
|
||||
return atoi(row[0]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3277,7 +3280,7 @@ char* Database::GetGroupLeaderForLogin(const char* name, char* leaderbuf) {
|
||||
if (group_id == 0)
|
||||
return leaderbuf;
|
||||
|
||||
query = StringFormat("SELECT `leadername` FROM `group_leader` WHERE `gid` = '%u' AND `groupid` = %u LIMIT 1", group_id);
|
||||
query = StringFormat("SELECT `leadername` FROM `group_leaders` WHERE `gid` = '%u' LIMIT 1", group_id);
|
||||
results = QueryDatabase(query);
|
||||
|
||||
for (auto row = results.begin(); row != results.end(); ++row)
|
||||
|
||||
Reference in New Issue
Block a user