mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
chore: Use string to access SQLite columns (#1535)
* use string to access field name * Update DEVGMCommands.cpp * corrected column name * constexpr array include <array> Revert "constexpr array" This reverts commit 1492e8b1773ed5fbbe767c74466ca263178ecdd4. Revert "include <array>" This reverts commit 2b7a67e89ad673d420f496be97f9bc51fd2d5e59. include <array> constexpr array --------- Co-authored-by: jadebenn <jonahbenn@yahoo.com>
This commit is contained in:
@@ -188,20 +188,20 @@ void PetComponent::OnUse(Entity* originator) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (result.fieldIsNull(0)) {
|
||||
if (result.fieldIsNull("ValidPiecesLXF")) {
|
||||
result.finalize();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
buildFile = std::string(result.getStringField(0));
|
||||
buildFile = std::string(result.getStringField("ValidPiecesLXF"));
|
||||
|
||||
PetPuzzleData data;
|
||||
data.buildFile = buildFile;
|
||||
data.puzzleModelLot = result.getIntField(1);
|
||||
data.timeLimit = result.getFloatField(2);
|
||||
data.numValidPieces = result.getIntField(3);
|
||||
data.imaginationCost = result.getIntField(4);
|
||||
data.puzzleModelLot = result.getIntField("PuzzleModelLot");
|
||||
data.timeLimit = result.getFloatField("Timelimit");
|
||||
data.numValidPieces = result.getIntField("NumValidPieces");
|
||||
data.imaginationCost = result.getIntField("imagCostPerBuild");
|
||||
if (data.timeLimit <= 0) data.timeLimit = 60;
|
||||
imaginationCost = data.imaginationCost;
|
||||
|
||||
|
Reference in New Issue
Block a user