mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Bug Fix] GLAA fix after database.cpp updates (#4277)
* Hopefully fix glaa * Potential Fix for GroupAA Issues This seems to resolve the GroupAA issue. Tested with two characters joining a group. Functions the same as previous builds like 22.45, 22.46, etc. * Fix for GLAA issue - For testing. * Redo fix for GLAA * Cleanup GLAA fix and move savng to repo --------- Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
@@ -260,6 +260,9 @@ foreach my $table_to_generate (@tables) {
|
||||
elsif ((trim($column_default) eq "" || $column_default eq "NULL") && $column_type =~ /text|varchar/i) {
|
||||
$default_value = '""';
|
||||
}
|
||||
elsif ((trim($column_default) eq "" || $column_default eq "NULL") && $column_type =~ /blob/i) {
|
||||
$default_value = '""';
|
||||
}
|
||||
|
||||
# for datetime values that set default value all zeroed out
|
||||
if ($default_value =~ /0000-00-00 00:00:00/i) {
|
||||
@@ -296,6 +299,9 @@ foreach my $table_to_generate (@tables) {
|
||||
elsif ($data_type =~ /datetime|timestamp/) {
|
||||
$query_value = sprintf('FROM_UNIXTIME(" + (e.%s > 0 ? std::to_string(e.%s) : "null") + ")");', $column_name_formatted, $column_name_formatted);
|
||||
}
|
||||
elsif ($data_type =~ /blob/) {
|
||||
$query_value = sprintf('\'" + e.%s + "\'");', $column_name_formatted);
|
||||
}
|
||||
|
||||
$update_one_entries .= sprintf(
|
||||
"\t\t" . 'v.push_back(columns[%s] + " = %s' . "\n",
|
||||
@@ -312,6 +318,9 @@ foreach my $table_to_generate (@tables) {
|
||||
elsif ($data_type =~ /datetime|timestamp/) {
|
||||
$value = sprintf('"FROM_UNIXTIME(" + (e.%s > 0 ? std::to_string(e.%s) : "null") + ")"', $column_name_formatted, $column_name_formatted);
|
||||
}
|
||||
elsif ($data_type =~ /blob/) {
|
||||
$value = sprintf("\"'\" + e.%s + \"'\"", $column_name_formatted);
|
||||
}
|
||||
|
||||
$insert_one_entries .= sprintf("\t\tv.push_back(%s);\n", $value);
|
||||
$insert_many_entries .= sprintf("\t\t\tv.push_back(%s);\n", $value);
|
||||
|
||||
Reference in New Issue
Block a user