mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 18:38:26 +00:00
make the setmaptier query not error
This commit is contained in:
parent
b6a81e04e3
commit
e32b79c941
@ -441,7 +441,7 @@ public void SQL_FillTierCache_Callback(Database db, DBResultSet results, const c
|
|||||||
{
|
{
|
||||||
char sQuery[512];
|
char sQuery[512];
|
||||||
FormatEx(sQuery, sizeof(sQuery), "REPLACE INTO %smaptiers (map, tier) VALUES ('%s', %d);", gS_MySQLPrefix, gS_Map, gI_Tier);
|
FormatEx(sQuery, sizeof(sQuery), "REPLACE INTO %smaptiers (map, tier) VALUES ('%s', %d);", gS_MySQLPrefix, gS_Map, gI_Tier);
|
||||||
gH_SQL.Query(SQL_SetMapTier_Callback, sQuery, gI_Tier, DBPrio_High);
|
gH_SQL.Query(SQL_SetMapTier_Callback, sQuery, 0, DBPrio_High);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -747,12 +747,17 @@ public void SQL_SetMapTier_Callback(Database db, DBResultSet results, const char
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
data.Reset();
|
int client;
|
||||||
int client = data.ReadCell();
|
|
||||||
char map[PLATFORM_MAX_PATH];
|
char map[PLATFORM_MAX_PATH];
|
||||||
data.ReadString(map, sizeof(map));
|
|
||||||
|
|
||||||
if (StrEqual(map, gS_Map))
|
if (data != null)
|
||||||
|
{
|
||||||
|
data.Reset();
|
||||||
|
client = data.ReadCell();
|
||||||
|
data.ReadString(map, sizeof(map));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data == null || StrEqual(map, gS_Map))
|
||||||
{
|
{
|
||||||
ReallyRecalculateCurrentMap();
|
ReallyRecalculateCurrentMap();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user