* [Saylinks] Convert all GM Command Saylinks to Silent Saylinks.
- This cleans up all non-silent GM Command Saylinks that we had before due to the way they worked before. All saylinks like this should be silent now.
- Add source short hand capability for say links with same link as text.
* Defaults to r anyway.
* Spacing.
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)
* [Feature] GM State Change Persistance
- Flymode and Invulnerable will now persist over zoning.
- Appended GMSpeed, Flymode and Invulnerable to the hideme message GMs see when they first login.
- Added #godmode [on/off] command to turn on or off hideme, flymode, gmspeed and invulnerable all in one shot.
- /becomenpc will now disable tells to the target player. It will also automatically disable GM States that interfere with its functionality.
- GM Command /toggle will not properly turn tells on/off
- GMs will now be notified if they are ignoring tells when they first zone-in, provided their GM flag is up.
- Added TellsOff variable to the output to #showstats
* [Bug] Fix tells when gmhideme is turned off.
* [Cleanup] Cleanup function and rename for consistancy.
Remove un-needed this->
* Tweaks
* Tweaks
* Update db_update_manifest.txt
* Move string building logic to a vector and use strings join
* Update client_packet.cpp
* Update 2022_07_28_gm_state_changes.sql
* PR comment tweaks
Co-authored-by: Akkadius <akkadius1@gmail.com>
* Delete EQApplicationPacket after use
* Correct issue where Creating EQApplicationPackets in zone/mob.cpp may not free pBuffer[]
* Handle freeing pBuffer[] if exists in zone/mob.cpp Create*Packet functions
* Handle freeing pBuffer[] in zone/object.cpp Create*Packet methods
* Delete leaked outapp variables in zone/trading.cpp
* Make CreateHorseSpawnPacket() safer by freeing pBuffer[] before replacing with new[]
* Prevent initial new ServerPacket from being leaked in command_reload
* Free pack after sending in command_setlsinfo
* Delete new NPC in command_viewnpctype after printing stats
* Fix compile error
* Delete EQApplicationPacket after sending in command_kick
* Remove unneeded safe_delete(outapp) after FastQueuePacket and fix minor whitespace issue
* Delete packet after sending in WorldServer::SendReloadTasks
* Cleanup logic and free leaked NPCType in Client::Doppelganger
* Free RespawnOption in Client::HandleRespawnFromHover in 'unexpected rez from hover request' branch
* Free EQApplicationPacket after sending in Bot::ProcessBotInspectionRequest
* Free Bot when returning from failed Bot::Save() in helper_bot_create()
* Initialize variable to nullptr to prevent garbage initial value
* Undo change in other PR
* [Quest API] Add TrackNPC to Perl/Lua.
- Add quest::tracknpc(entity_id) to Perl.
- Add eq.track_npc(entity_id) to Lua.
- This will allow server operators to arbitrarily Track NPCs for clients with scripts.
- Modified tracking to auto turn off and tell you that you discovered your target if within 10 units, this is to allow scripted Tracking to turn off without the need for the Tracking skill.
* Remove unnecessary DoTracking() call.
* Update client.cpp
* Correct potential read out of bounds on array in Client::Doppelganger
* Correct potential read out of bounds in Client::ChannelMessageSend
* Corrected logic to not read out of bounds on the lower end.
* Remove unused local variable
* Remove another unused variable
* Correct typos and remove unused initialization
* Cleanup some code in OPCharCreate
* Remove unused function in client.cpp and undefined declaration.
Also the function potentially had a null pointer dereference according to Visual Studio.
* [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
* [Commands] #reload Command Overhaul.
- Consolidated #reloadaa, #reloadallrules, #reloadcontentflags, #reloademote, #reloadlevelmods, #reloadmerchants, #reloadperlexportsettings, #reloadqst, #reloadstatic, #reloadtitles, #relaodtraps, #reloadworld, and #reloadzps in to one command.
- #reload has 15 different sub commands you may use, including Log Settings and Tasks reloading.
- All the reload commands are a part of the Developer Tools Menu messages now, as well as part of the documentation.
- Fixes the commands that weren't actually sending their packet to zone server to globally reload stuff.
- Added Variables table reloading to command.
* Consistency.
* Hot reload.
* Final big push.
* [Merchants] Add Merchant Data Bucket capability.
- Allows server operators to limit merchant items based on data bucket values and comparisons.
- Adds 3 columns, bucket_name, bucket_value, and bucket_comparison to merchantlist table.
- Bucket is checked based on GetBucketKey()-bucket_name.
- Buckets are mass loaded when using the merchant so it's not a database call per item, just a grouping of all their buckets from the start.
- This is a nearly year old pull request redone for master.
- bucket_comparison Values are as follows:
- bucket_comparison 0: bucket_name == bucket_value
- bucket_comparison 1: bucket_name != bucket_value
- bucket_comparison 2: bucket_name >= bucket_value
- bucket_comparison 3: bucket_name <= bucket_value
- bucket_comparison 4: bucket_name > bucket_value
- bucket_comparison 5: bucket_name < bucket_value
- bucket_comparison 6: bucket_name is any of pipe(|)-separated bucket_value
- bucket_comparison 7: bucket_name is not any of pipe(|)-separated bucket_value
- bucket_comparison 8: bucket_name is between first and second value of pipe(|)-separated bucket_value
- bucket_comparison 9: bucket_name is not between first and second value of pipe(|)-separated bucket_value
* Revert query change.
* [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.
Added EVENT_SKILL_UP to Perl/Lua
Adds sub EVENT_SKILL_UP output for use.
Exports:
$skill_id - ID of the skill being exported. Will export skill or language as the same so check below.
$skill_value - New skill level
$skill_max - Maximum value of skill
$is_tradeskill - 0 for non-tradeskill, 1 for tradeskill
Example usage:
sub EVENT_SKILL_UP {
if($is_tradeskill == 0) {
quest::shout("Skill Increase! " . $client->GetCleanName() . " has increased their " . quest::getskillname($skill_id) . " to " . $skill_value . " of " . $skill_max . "!"); #deleteme
}
if ($is_tradeskill == 1) {
quest::shout("Tradeskill Increase! " . $client->GetCleanName() . " has increased their " . quest::getskillname($skill_id) . " to " . $skill_value . " of " . $skill_max . "!"); #deleteme
}
}
Adds sub EVENT_LANGUAGE_SKILL_UP output for use.
Exports:
$skill_id - ID of the skill being exported. Will export skill or language as the same so check below.
$skill_value - New skill level
$skill_max - Maximum value of skill
Example usage:
sub EVENT_LANGUAGE_SKILL_UP {
quest::shout("Language Increase! " . $client->GetCleanName() . " has increased their " . quest::getlanguagename($skill_id) . " to " . $skill_value . " of " . $skill_max . "!"); #deleteme
}
Co-authored-by: toxin06 <53322305+toxin06@users.noreply.github.com>
* 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
* [Skills] Exponential Decay Skill Up Formula
Added an exponential decay skill up formula option.
The current, linear, formula results in negative chances to skill up, which
have been mitigated via a multiplier and minimum of 1%
* [Skills]Configurable Exponential Decay Formala for Skill Up
What this fixes:
The existing formula for determining whether or not to skill up could result
in negative chances, and made an assumption around the number 252.
This would ultimately result in an override that would set the chance to 1.
My fix:
I created 2 new rules:
Character:SkillUpMaximumChancePercentage
Character:SkillUpMinimumChancePercentage
I changed the forumla to:
chance = ((max - min + skill_modification) * (.99^skill)) + min
This results in an exponential decay that starts at skill-modified maximum
and approaches minimum.
I decided that max-min+skill_modification should never be less than min
I also decided to continue to apply the Character:SkillUpModifier rule
post-calculation. I do not really think this is necessary anymore, given
this new formula, but we can discuss removing it.
I chose 25 and 2 as default maximum and minimum based on feel.
Related method signature fix:
Client::mod_increase_skill_chance was changed to return a double and
accept a double as an input for chance. This matches the actual data types
provided while calling the method and eliminates some type coersion and
resultant truncation. Right now, this method doesn't do anything, but in the
future we could implement skill-specific training dummies that accelerate
skill ups. I deduce that this is the purpose of this method call.
* [Skills]Configurable Exponential Decay Formula for Skill Up
What this fixes:
The existing formula for determining whether or not to skill up could result
in negative chances, and made an assumption around the number 252.
This would ultimately result in an override that would set the chance to 1.
My fix:
I created 2 new rules:
Character:SkillUpMaximumChancePercentage
Character:SkillUpMinimumChancePercentage
I changed the forumla to:
chance = ((max - min + skill_modification) * (.99^skill)) + min
This results in an exponential decay that starts at skill-modified maximum
and approaches minimum.
I decided that max-min+skill_modification should never be less than min
I also decided to continue to apply the Character:SkillUpModifier rule
post-calculation. I do not really think this is necessary anymore, given
this new formula, but we can discuss removing it.
I chose 25 and 2 as default maximum and minimum based on feel.
Related method signature fix:
Client::mod_increase_skill_chance was changed to return a double and
accept a double as an input for chance. This matches the actual data types
provided while calling the method and eliminates some type coersion and
resultant truncation. Right now, this method doesn't do anything, but in the
future we could implement skill-specific training dummies that accelerate
skill ups. I deduce that this is the purpose of this method call.
* fixup! [Skills]Configurable Exponential Decay Formula for Skill Up
* fixup! [Skills]Configurable Exponential Decay Formula for Skill Up
Removed a conditional that was rendered obsolete by moving the addition of a
mob to the auto haters list to fire after an IsValidXTarget check. This
made an entity_list call unnecessary. [zone/client.cpp]
Removed said unnecessary entity_list call. [zone/client.cpp]
Removed a superfluous call to ProcessXTargetAutoHaters [zone/attack.cpp]
* [XTarget] Disallow Corpses in XTarget Auto Slots
Why:
There exists an odd state where corpses will fill up your XTarget window.
This is reproducable using a combination of a pet to kill a mob
and timely feign death to wipe the owner's aggro.
What:
Added an IsCorpse check to IsXTarget.
Added a block to mark corpse XTargets as dirty to ProcessXTargetAutoHaters
* fixup! [XTarget] Disallow Corpses in XTarget Auto Slots
* fixup! [XTarget] Disallow Corpses in XTarget Auto Slots
* [XTarget] Disallow Corpses Code Cleanup
Added some safety, performance, and code readability changes per PR request.
Added 1 rule per class that defines tracking distance multiplier for that class
Kept the defaults of 12 for ranger, 10 for druid, and 7 for bard
Created 1 method for determining class tracking distance multiplier
Created 1 method for determining if a class can track, based on multiplier
Updated tracking logic to use these methods to determine whether a tracking
packet should and can be sent or not.
* [Bux Fix] Pick Lock was allowing skillups on doors above player skill
* Fixed indentation
* Fix indentation #2 - I am not so bright :(
* Further refine messages for pick lock to match live
* sql to make pot pick locks book pickable by skill 1 and skillup
- Cleanup messages and logic.
- Adds GetGuildNameByID, GetGuildRankName, GetGuildIDByCharacterID, and IsCharacterInGuild helper methods for guild stuff.
- Convert #guild info message to a popup display to tidy it up and make it more legible.
* [Commands] Add #setaltcurrency Command.
- Add #setaltcurrency [Currency ID] [Amount] command to allow you to set a specific alternate currency to a value.
- Add Zone::GetCurrencyID() and Zone::GetCurrencyItemID() helper methods.
- Cleanup loops through zone->AlternateCurrencies.
- Utilize helper methods where necessary.
- Convert old methods parameters and return values from int to uint32 where necessary.
* Typo.
- Invisibility vs. Undead and Invisibility vs. Animals were not breaking charm.
- Add Invisibility enumerator.
- Add special identifier for Invisibility vs. Undead and Invisibility vs. Animals.
* [Spells] SPA 310 SE_ReduceReuseTimer will now work on spell recast time
[Spells] SPA 310 SE_ReduceReuseTimer will now work on spell recast time
* [Spells] SPA 310 SE_ReduceReuseTimer will now work on spell recast time
[Spells] SPA 310 SE_ReduceReuseTimer will now work on spell recast time
- Cleanup messages and logic.
- Add RULE_INT(Zone, PEQZoneHPRatio, 75, "Required HP Ratio to use #peqzone")
- Modify #peqzone Timer rule to allow it to be disabled.