mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 20:51:29 +00:00
More conversion changes to reduce warnings [skip ci]
This commit is contained in:
parent
6a7a78af29
commit
30e0bbb912
@ -161,14 +161,14 @@ public:
|
||||
|
||||
entry.level = atoi(row[0]);
|
||||
entry.class = atoi(row[1]);
|
||||
entry.hp = atof(row[2]);
|
||||
entry.mana = atof(row[3]);
|
||||
entry.end = atof(row[4]);
|
||||
entry.unk1 = atof(row[5]);
|
||||
entry.unk2 = atof(row[6]);
|
||||
entry.hp_fac = atof(row[7]);
|
||||
entry.mana_fac = atof(row[8]);
|
||||
entry.end_fac = atof(row[9]);
|
||||
entry.hp = static_cast<float>(atof(row[2]));
|
||||
entry.mana = static_cast<float>(atof(row[3]));
|
||||
entry.end = static_cast<float>(atof(row[4]));
|
||||
entry.unk1 = static_cast<float>(atof(row[5]));
|
||||
entry.unk2 = static_cast<float>(atof(row[6]));
|
||||
entry.hp_fac = static_cast<float>(atof(row[7]));
|
||||
entry.mana_fac = static_cast<float>(atof(row[8]));
|
||||
entry.end_fac = static_cast<float>(atof(row[9]));
|
||||
|
||||
return entry;
|
||||
}
|
||||
@ -313,14 +313,14 @@ public:
|
||||
|
||||
entry.level = atoi(row[0]);
|
||||
entry.class = atoi(row[1]);
|
||||
entry.hp = atof(row[2]);
|
||||
entry.mana = atof(row[3]);
|
||||
entry.end = atof(row[4]);
|
||||
entry.unk1 = atof(row[5]);
|
||||
entry.unk2 = atof(row[6]);
|
||||
entry.hp_fac = atof(row[7]);
|
||||
entry.mana_fac = atof(row[8]);
|
||||
entry.end_fac = atof(row[9]);
|
||||
entry.hp = static_cast<float>(atof(row[2]));
|
||||
entry.mana = static_cast<float>(atof(row[3]));
|
||||
entry.end = static_cast<float>(atof(row[4]));
|
||||
entry.unk1 = static_cast<float>(atof(row[5]));
|
||||
entry.unk2 = static_cast<float>(atof(row[6]));
|
||||
entry.hp_fac = static_cast<float>(atof(row[7]));
|
||||
entry.mana_fac = static_cast<float>(atof(row[8]));
|
||||
entry.end_fac = static_cast<float>(atof(row[9]));
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
@ -347,14 +347,14 @@ public:
|
||||
|
||||
entry.level = atoi(row[0]);
|
||||
entry.class = atoi(row[1]);
|
||||
entry.hp = atof(row[2]);
|
||||
entry.mana = atof(row[3]);
|
||||
entry.end = atof(row[4]);
|
||||
entry.unk1 = atof(row[5]);
|
||||
entry.unk2 = atof(row[6]);
|
||||
entry.hp_fac = atof(row[7]);
|
||||
entry.mana_fac = atof(row[8]);
|
||||
entry.end_fac = atof(row[9]);
|
||||
entry.hp = static_cast<float>(atof(row[2]));
|
||||
entry.mana = static_cast<float>(atof(row[3]));
|
||||
entry.end = static_cast<float>(atof(row[4]));
|
||||
entry.unk1 = static_cast<float>(atof(row[5]));
|
||||
entry.unk2 = static_cast<float>(atof(row[6]));
|
||||
entry.hp_fac = static_cast<float>(atof(row[7]));
|
||||
entry.mana_fac = static_cast<float>(atof(row[8]));
|
||||
entry.end_fac = static_cast<float>(atof(row[9]));
|
||||
|
||||
all_entries.push_back(entry);
|
||||
}
|
||||
|
||||
@ -414,7 +414,7 @@ public:
|
||||
entry.fog_green = atoi(row[24]);
|
||||
entry.sky = atoi(row[25]);
|
||||
entry.ztype = atoi(row[26]);
|
||||
entry.zone_exp_multiplier = atof(row[27]);
|
||||
entry.zone_exp_multiplier = static_cast<float>(atof(row[27]));
|
||||
entry.walkspeed = static_cast<float>(atof(row[28]));
|
||||
entry.time_type = atoi(row[29]);
|
||||
entry.fog_red1 = atoi(row[30]);
|
||||
@ -867,7 +867,7 @@ public:
|
||||
entry.fog_green = atoi(row[24]);
|
||||
entry.sky = atoi(row[25]);
|
||||
entry.ztype = atoi(row[26]);
|
||||
entry.zone_exp_multiplier = atof(row[27]);
|
||||
entry.zone_exp_multiplier = static_cast<float>(atof(row[27]));
|
||||
entry.walkspeed = static_cast<float>(atof(row[28]));
|
||||
entry.time_type = atoi(row[29]);
|
||||
entry.fog_red1 = atoi(row[30]);
|
||||
@ -977,7 +977,7 @@ public:
|
||||
entry.fog_green = atoi(row[24]);
|
||||
entry.sky = atoi(row[25]);
|
||||
entry.ztype = atoi(row[26]);
|
||||
entry.zone_exp_multiplier = atof(row[27]);
|
||||
entry.zone_exp_multiplier = static_cast<float>(atof(row[27]));
|
||||
entry.walkspeed = static_cast<float>(atof(row[28]));
|
||||
entry.time_type = atoi(row[29]);
|
||||
entry.fog_red1 = atoi(row[30]);
|
||||
|
||||
@ -282,14 +282,10 @@ foreach my $table_to_generate (@tables) {
|
||||
$all_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = atoi(row[%s]);\n", $column_name, $index);
|
||||
$find_one_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = atoi(row[%s]);\n", $column_name, $index);
|
||||
}
|
||||
elsif ($data_type =~ /float/) {
|
||||
elsif ($data_type =~ /float|double|decimal/) {
|
||||
$all_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = static_cast<float>(atof(row[%s]));\n", $column_name, $index);
|
||||
$find_one_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = static_cast<float>(atof(row[%s]));\n", $column_name, $index);
|
||||
}
|
||||
elsif ($data_type =~ /double|decimal/) {
|
||||
$all_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = atof(row[%s]);\n", $column_name, $index);
|
||||
$find_one_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = atof(row[%s]);\n", $column_name, $index);
|
||||
}
|
||||
else {
|
||||
$all_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = row[%s] ? row[%s] : \"\";\n", $column_name, $index, $index);
|
||||
$find_one_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = row[%s] ? row[%s] : \"\";\n", $column_name, $index, $index);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user