This removes the separate Expedition class and moves lockout code and
/dz command handlers into DynamicZone classes. It also refactors some
code to reduce bloat and some database usage.
This completes the effort of moving everything to DynamicZone that
started when implementing shared tasks. It also makes sense to do this
since expeditions are just dynamic zones internally despite dzs being
used for other types. Expedition specific things are just handled with
dz type checks.
Functionally nothing should change. This is mainly internal refactoring
and moving code around along with some bug fixes and reduced database
usage.
Main changes:
- The `expeditions` database table has been removed
- Expeditions no longer use a separate id, the expedition id is just the dz id
- Expedition lock state and replay timer option were moved to the
`dynamic_zones` table
- Expeditions no longer have a separate cache from dynamic zones
- Expedition creation no longer has every zone query the database to cache it
- Expedition internal lockouts are now stored on DynamicZone
- The `expedition_lockouts` table has been renamed to `dynamic_zone_lockouts`
- Fixed a small bug with the UpdateLockoutDuration api where the
internal lockout would get the time added twice in memory in the
initiating zone (this api is likely rarely used)
- Fixed an issue where use of the group/raid DoesAnyMemberHaveExpeditionLockout
api would query once for every out of zone character.
- This api now checks all members in the current zone first and only
performs a single bulk query for out of zone members if that check
is exhausted
- Deprecated the max_check_count param of DoesAnyMemberHaveExpeditionLockout,
the quest api still exists to avoid api break but a passed arg has no effect
* [Languages] Cleanup languages constants
# Notes
- Cleanup formatting and logic where necessary.
- Cleaned up constants to use a namespace with `constexpr` instead.
- Changed `LoadCharacterLanguages` to use a repository instead.
* Lua GroupMessage uint8/language_id
* Lua More uint8/language_id
# Perl
- Add `$group->GetAverageLevel()` to Perl.
# Lua
- Add `group:GetAverageLevel()` to Lua.
- Convert `group:GetHighestLevel()` from `int` to `uint32` in Lua.
- Convert `group:GetLowestLevel()` from `int` to `uint32` in Lua.
* [Cleanup] Quest API push methods using invalid types.
- Some push methods were pushing integers as unsigned integers or unsigned integer as integers, this fixes all of that.
- Also cleans up some lines that had multiple function calls on them.
* More cleanup of bools and one expansion name was wrong.
- Keeps things tidier.
Perl script was used to get this in order easily.
```pl
my @perl_file_types = (
"bot",
"client",
"doors",
"entity",
"expedition",
"groups",
"hateentry",
"inventory",
"mob",
"npc",
"object",
"perlpacket",
"player_corpse",
"questitem",
"raids",
"spell"
);
foreach my $file_type (sort {$a cmp $b} @perl_file_types) {
my $perl_file = "perl_$file_type.cpp";
open my $client_file, '<', $perl_file or die "Cannot open file_name $perl_file";
{
local $/;
$content = <$client_file>;
}
close $client_file;
open my $perl_data_file, ">", "perl_$file_type\_data.cpp";
my @variables = ();
foreach my $line (split("\n", $content)) {
if ($line=~/newXSproto\(/i) {
$line =~ s/\s+/ /g;
my @line_data = split(/ /, $line);
push(@variables, join(" ", @line_data));
}
}
foreach my $variable (sort {$a cmp $b} @variables) {
$variable =~ s/^ //ig;
print $perl_data_file "\t$variable\n";
}
close $perl_data_file;
}```
Raid/Group Mana/Endurance updates should now update real-time once again
Fixed an issue with clients looking like they are 'skipping' when they are moving in view of another client
Fixed an issue with NPC's who are ghosted in plain view of a client when they are not really there