* [Bug Fix] Fix Silent Saylinks Sending Message to Others.
Silent saylinks wouldn't send to sender, but to everyone else, so they could see what your saylinks were.
Added an optional `is_silent` bool to ChannelMessageReceived to account for this where necessary.
* Nullptr fix.
* [Quest API] Add Player Teleport Methods.
These methods will allow server operators to teleport players directly to other players via the quest API using the #goto command's functionality.
- Add $client->TeleportToPlayerByCharID(character_id) to Perl.
- Add $client->TeleportToPlayerByName(player_name) to Perl.
- Add $client->TeleportGroupToPlayerByCharID(character_id) to Perl.
- Add $client->TeleportGroupToPlayerByName(player_name) to Perl.
- Add $client->TeleportRaidToPlayerByCharID(character_id) to Perl.
- Add $client->TeleportRaidToPlayerByName(player_name) to Perl.
- Add client:TeleportToPlayerByCharID(character_id) to Lua.
- Add client:TeleportToPlayerByName(player_name) to Lua.
- Add client:TeleportGroupToPlayerByCharID(character_id) to Lua.
- Add client:TeleportGroupToPlayerByName(player_name) to Lua.
- Add client:TeleportRaidToPlayerByCharID(character_id) to Lua.
- Add client:TeleportRaidToPlayerByName(player_name) to Lua.
* Simplify by using repositories
* Simplify
Co-authored-by: Akkadius <akkadius1@gmail.com>
* [Feature] Add Instance Version Support to Experience Modifiers.
Allows Operators to set experience modifiers to be instance version specific so that you can have different versions of the same zone have different modifiers. If there is not one found, it defaults to zone_id 0 for global and instance_veresion -1 for global.
* Update zonedb.cpp
* Typo.
This allows shared tasks to create dz instances automatically through
the `dz_template_id` field instead of using quest scripts. Quest apis
were also added to create expeditions from template ids.
This adds the `dz_switch_id` field to doors and dynamic_zones. It will
allow for compasses to be automatically added to dz entrances and will
support moving clients to the dz on use without needing to script it.
These can be imported for switches/doors from live packet dumps.
Also removes compass packet encoders (same struct in all clients)
* Add shared task element locking
This adds the `lock_activity_id` field to the tasks table which will
automatically lock a shared task when that element becomes active.
A method was added to world analogous to zone's UnlockActivities to
determine when an activity is active with respect to task steps.
Also adds quest apis to manually lock or unlock a client's shared task
* Add comment
* [Cleanup] Cleanup spell and max level bucket logic.
- Spell buckets will now allow new mob->SetBucket() buckets since most people use these now.
- Max level bucket will now allow new mob->SetBucket() bucket since most people use these now.
- Clean up GetScribeableSpells() and GetLearnableDisciplines() logic and magic numbers.
- Make GetClientMaxLevel() uint8 instead of int since it can only be 0-255.
* Fix typo from other commit.
* Lua setter.
* Update client.cpp
* [Titles] Cleanup titles, title suffix, and last name methods.
- Use strings instead of const chars*.
- Add optional parameter to SetAATitle in Lua so you can save to the database similar to Perl.
- Cleanup #lastname command.
- Cleanup #title command.
- Cleanup #titlesuffix command.
* Update npc.cpp
* [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.
- Add $client->TaskSelector(task_list) to Perl.
- Add client:TaskSelector({task_list}) to Lua.
- Allow $client->AssignTask(task_id) in Perl.
- Allow client:AssignTask(task_id) in Lua.
- Can now assign tasks in scripts without the NPC ID parameter.
- Add $client->GetHealAmount() to Perl.
- Add $client->GetSpellDamage() to Perl.
- Add client:GetHealAmount() to Lua
- Add client:GetSpellDamage() to Lua.
- Fixes `$client->GetAllMoney()` to use `uint64` and not overflow int value.
- Fixes `$client->GetCarriedMoney()` to use `uint64` and not overflow int value.
* [Commands] Add additional #peqzone functionality.
- Add #peqzone flagging capabilities so operators don't have to blanket allow #peqzone access to zones.
- Allows you to set a zone's `peqzone` column to `2` and disallow use of `#peqzone` until they have been given the appropriate flag.
- Add #peqzone_flags command to list your #peqzone flags similar to #flags command.
- Add `character_peqzone_flags` table to database and database_schema.h.
- Required SQL update to add the new table.
- Add client:ClearPEQZoneFlag(zone_id) to Lua.
- Add client:HasPEQZoneFlag(zone_id) to Lua.
- Add client:LoadPEQZoneFlags() to Lua.
- Add client:LoadZoneFlags() to Lua.
- Add client:SendPEQZoneFlagInfo(client) to Lua.
- Add client:SetPEQZoneFlag(zone_id) to Lua.
- Add $client->ClearPEQZoneFlag(zone_id) to Perl.
- Add $client->HasPEQZoneFlag(zone_id) to Perl.
- Add $client->LoadPEQZoneFlags() to Perl.
- Add $client->SendPEQZoneFlagInfo(client) to Perl.
- Add $client->SetPEQZoneFlag(zone_id) to Perl.
* Fixes.
- Allows you to just directly use Client instead of having to grab reference to inventory.
- Add $client->CountAugmentEquippedByID(item_id) to Perl.
- Add $client->HasAugmentEquippedByID(item_id) to Perl.
- Add $client->CountItemEquippedByID(item_id) to Perl.
- Add $client->HasItemEquippedByID(item_id) to Perl.
- Add client:CountAugmentEquippedByID(item_id) to Lua.
- Add client:HasAugmentEquippedByID(item_id) to Lua
- Add client:CountItemEquippedByID(item_id) to Lua.
- Add client:HasItemEquippedByID(item_id) to Lua.
* [Quest API] Add AddPlatinum(), GetCarriedPlatinum() and TakePlatinum() to Perl/Lua.
- Allows for easier NPC interactions.
- GetCarriedPlatinum() adds together all currencies in inventory based on conversion amounts so it works easily with removals/checks.
- Add $client->AddPlatinum(platinum, update_client) to Perl.
- Add $client->GetCarriedPlatinum() to Perl.
- Add $client->TakePlatinum(platinum, update_client) to Perl.
- Add client:AddPlatinum(platinum, update_client) to Lua.
- Add client:GetCarriedPlatinum() to Lua.
- Add client:TakePlatinum(platinum, update_client) to Lua.
* Formatting.
* invulnerable
* modifier
* fix
* fix
* fix
* [API] Perl functions to set invulnerable to and modify environmental damage.
* [API] Perl and Lua functions to set invulnerable to and modify environmental damage.
credit to kinglykrab for lua
* New function to reset spellbar in perl/lua ResetCastbarCooldownsBySlot -1 for all slots and anything else to do it by slot number
* Add ResetCastbarCooldownsBySlot / ResetCastbarCooldownsBySpellID / ResetAllCastbarCooldowns
- Add #unmemspell [Spell ID] command to unmemorize a spell by ID from you or your target.
- Add #unmemspells command to unmemorize all spells from you or your target.
- Cleanup #memspell command and change arguments from #memspell [Slot] [Spell ID] to #memspell [Spell ID] [Spell Gem] for easier use.
- Add #memspell [Spell ID] functionality to memorize to first open spell gem if there are any using FindEmptyMemSlot helper method.
- Rename client->FindMemmedSpellByID(spell_id) to FindMemmedSpellBySpellID(spell_id).
- Add client->FindEmptyMemSlot() helper method.
- Add $client->FindEmptyMemSlot() to Perl.
- Add client:FindEmptyMemSlot() to Lua.
- Add $client->FindMemmedSpellBySpellID(spell_id) to Perl.
- Add client:FindMemmedSpellBySpellID(spell_id) to Lua.
- 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;
}```
* [Quest API] Simplify bulk Scribe and Train logic.
- Add $client->GetFreeDisciplineSlot(starting_slot) to Perl.
- Add $client->ScribeSpells(min_level, max_level) to Perl.
- Add $client->LearnDisciplines(min_level, max_level) to Perl.
- Add client:GetNextAvailableDisciplineSlot(starting_slot) to Lua.
- Add client:ScribeSpells(min_level, max_level) to Lua.
- Add client:LearnDisciplines(min_level, max_level) to Lua.
Convert quest::scribespells() and quest::traindisc() to use new ScribeSpells and LearnDisciplines methods for consistency.
* Update command.cpp
- Add $client->GetIPExemption() to Perl.
- Add $client->GetIPString() to Perl.
- Add $client->SetIPExemption(exemption_amount) to Perl.
- Add client:GetIPExemption() to Lua.
- Add client:GetIPString() to Lua.
- Add client:SetIPExemption(exemption_amount) to Lua.
Will make plugin::IP unnecessary and allow people to get readable IP string easier, as well as set/get IP exemptions from Perl and Lua.
- Add $client->ReadBookByName(booK_name, book_type) to Perl.
- Add client:ReadBookByName(booK_name, book_type) to Lua.
- Allows server operators to put books in to their database and read from their database instead of storing the values in a script, also allows them to read pre-existing books using a script.
Add hash overload to perl CreateExpedition api
This adds an api to perl similar to the Lua api that accepts a reference
to a hash table with expedition creation info
Usage example:
my $expedition_info = {
expedition => { name => "Perl expedition", min_players => 2, max_players => 6 },
instance => { zone => "crushbone", version => 0, duration => 3600 },
compass => { zone => "gfaydark", x => 238, y => 987, z => -24.90 },
safereturn => { zone => "gfaydark", x => 245.84, y => 987.93, z => -27.6, h => 484.0 },
zonein => { x => 479.44, y => -500.18, z => 5.75, h => 421.8 }
};
$client->CreateExpedition($expedition_info);
Syntax for passing directly from a hash:
my %expedition_info = (...);
$client->CreateExpedition(\%expedition_info);
Add CreateTaskDynamicZone api to perl
Usage example:
sub EVENT_TASKACCEPTED {
if ($task_id == 4795) {
my %dz_hash = (
"instance", { zone=>"thundercrest", version => 11 },
"compass", { zone=>"broodlands", x=>1241.88, y=>511.147, z=>23.4192 },
"safereturn", { zone=>"broodlands", x=>1242.0, y=>526.0, z=>27.0, h=>0.0 }
);
$client->CreateTaskDynamicZone($task_id, \%dz_hash)
}
}
* Fix issue #1469 - remove unused variable in perl_client
* Add SetGMStatus to LUA, clean up naming in client.cpp to be consistent with the perl/lua naming, remove unneeded return in void function
* Delete PERL_CLIENT.ipch
* Add character-specific zone-based experience modifiers.
This will allow server operators to give players individual experience modifiers (regular and AA).
Zone ID 0 will server as a global modifier for players, if no rows are found the modifier defaults to 1.0 so experience is neither increased nor decreased.
Setting a zone-specific modifier will override the zone ID 0 global modifier.
Requires a SQL update: sql/git/required/2021_04_11_character_exp_modifiers.sql
- Add quest::getaaexpmodifierbycharid(character_id, zone_id) to Perl.
- Add eq.get_aa_exp_modifier_by_char_id(character_id, zone_id) to Lua.
- Add quest::getexpmodifierbycharid(character_id, zone_id) to Perl.
- Add eq.get_exp_modifier_by_char_id(character_id, zone_id) to Lua.
- Add quest::setaaexpmodifierbycharid(character_id, zone_id, aa_modifier) to Perl.
- Add eq.set_aa_exp_modifier_by_char_id(character_id, zone_id, aa_modifier) to Lua.
- Add quest::setexpmodifierbycharid(character_id, zone_id, exp_modifier) to Perl.
- Add eq.set_exp_modifier_by_char_id(character_id, zone_id, exp_modifier) to Lua.
- Add $client->GetAAEXPModifier(character_id, zone_id) to Perl.
- Add client:GetAAEXPModifier(character_id, zone_id) to Lua.
- Add $client->GetEXPModifier(character_id, zone_id) to Perl.
- Add client:GetEXPModifier(character_id, zone_id) to Lua.
- Add $client->SetAAEXPModifier(zone_id, aa_modifier) to Perl.
- Add client:SetAAEXPModifier(zone_id, aa_modifier) to Lua.
- Add $client->SetEXPModifier(zone_id, exp_modifier) to Perl.
- Add client:SetEXPModifier(zone_id, exp_modifier) to Lua.
* Removed unneeded [].
* Fix variable name,
* Fix variable name.
* Fix version.h.
* Rename 2021_04_11_character_exp_modifiers.sql to 2021_04_23_character_exp_modifiers.sql
* Update db_update_manifest.txt
* For as long as I can remember people have had issues with zoning in, facing the wrong way, and walking through a zone line.
With this we will be able to set zone's safe heading as well as preserve heading on summon (NPC or GM) and teleports between zones.
This affects several pre-existing quest methods and extends their parameters to allow for the addition of heading.
The following functions have had heading added.
Lua
- client:SetBindPoint()
- client:SetStartZone()
Perl
- $client->SetBindPoint()
- $client->SetStartZone()
- quest::rebind()
SetStartZone parameter list was fixed also.
This converts some pre-existing methods from glm::vec3() to glm::vec4() and has an overload where necessary to use a glm::vec3() method versus glm::vec4() method.
This shouldn't affect any pre-existing servers and will allow PEQ and others to document safe headings for zones properly.
* Removed possible memory leaks.
* Fix SQL.
* Fix client message.
* Fix debug log.
* Fix log message.
* Fix call in rebind overload.
* Fix floats.
* Add default to column.