Fix regression from #4008 where the item count wasn't being incremented
Move the zone table chance to a rule
General cleanup of some initializers and variable types
* [Skill Caps] Remove from shared memory and simplify
- Removes Skill Caps loading from shared memory and puts it into zone.
- Adds `id` column to `skill_caps`.
- Remove primary keys and use `id` as primary key.
- Add unique index using `skill_id`, `class_id`, `level`, and `cap`.
- Renames `class` to `class_id` in `skill_caps` table.
- Renames `skillID` to `skill_id` in `skill_caps` table.
- Regenerates Skill Caps repository.
- Adds `#reload skill_caps` to reload skill caps in real time.
* Update groups.cpp
* Update groups.cpp
* [Bug Fix] Fix Bot/Character ID Overlap in Groups
- Attempt to fix bot/character ID overlap in groups keeping bots with the same unique identifier as players from not spawning on zone.
- Adds `bot_id` to `group_id` to differentiate bots from characters and hopefully alleviate this issue.
* Update base_group_id_repository.h
* Final push
* [Bug] Radiant/Ebon Crystals should only extract to 1000
Creating a stack larger than 1000 can cause potential dupe issues further down the stream if other tasks are performed on the stack.
* Use stacksize instead
---------
Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
* [Rules] Add World:Rules Rule
# Notes
- Adds `World:Rules` rule to take the place of the variables table value.
* Update client.cpp
* Update client.cpp
* [Quest API] Add Restore Methods for Health, Mana, and Endurance to Perl/Lua
- Add `$mob->RestoreEndurance()`.
- Add `$mob->RestoreHealth()`.
- Add `$mob->RestoreMana()`.
- Add `mob:RestoreEndurance()`.
- Add `mob:RestoreHealth()`.
- Add `mob:RestoreMana()`.
- Allows operators to easily restore a mob to full health, mana, or endurance.
- `RestoreHealth` is just a more verbosely named `Heal`.
- Convert spots in source to use these short hands instead of directly using `SetEndurance(GetMaxEndurance())`, `SetHP(GetMaxHP())`, or `SetMana(GetMaxMana())`.
* Update mob.h
* Update mob.h
This uses the book scribe button to learn recipes in SoF+ clients. For
Titanium clients the button is not available so a workaround will need
to be added later.
Note live gives no feedback when scribing books (at least those tested).
# Notes
- We were not passing `override_special_abilities` in the right parameter slot.
- Default `always_scale` to `true` when using the Perl/Lua method.
* [Bug Fix] Fix #serverrules Command
# Notes
- This command was effectively disabled as it was not included nor was the command itself defined within a `command_add`
* Update command.cpp
* [Bug Fix] Fix EVENT_KILLED_MERIT firing before NPC removal
# Notes
- NPCs were parsing this event too early and anything that checked if they were still alive in `EVENT_KILLED_MERIT` would show them still alive because of this.
# Image
* Code cleanup
* Update client.h
* Add GetRaidOrGroupOrSelf() to Perl/Lua
* Update to luabind::object, fix logic per comments.
* Fix
* Fix per comments.
# Perl
- Add `$client->RemoveAlternateCurrencyValue(currency_id, amount)`.
# Lua
- Add `client:RemoveAlternateCurrencyValue(currency_id, amount)`.
# Notes
- Allows operators to more easily remove alternate currencies, returns a `bool`, `false` if failed`, `true` if succeeded.
- Added `Zone::DoesAlternateCurrencyExist` that will reject setting, removing, or adding to a currency that does not exist.
* [Bug Fix] Fix GetLeaderName() for Groups
# Notes
- We were getting bogus data in this.
- Made it its own method.
* Remove ExpeditionRequest::GetGroupLeaderName()
# Perl
- Add `quest::silent_saylink(text)`.
- Add `quest::silent_saylink(text, link_name)`.
# Lua
- Add `eq.silent_say_link(text)`.
- Add `eq.silent_say_link(text, link_name)`.
# Notes
- Allows operators to more easily use silent saylinks without an optional silent parameter in the traditional saylink methods.
- Sets `silent` parameter default to `false` so we do not need to pass `false` when we are not using a a silent saylink.
- Changes all places that used `EQ::SayLinkEngine::GenerateQuestSaylink` to `Saylink::Create` where possible.
- Removed `questmgr` method that is no longer necessary.
- Cleaned up Lua methods to use the strings directly instead of building one out.
* [Bots] IsValidTarget crash fix
This addresses crashes related to IsValidTarget on multiple servers.
Unsure of the exact reason if anyone can explain why changing from const bool to bool in this situation fixes the problem.
Is it because the const is somehow crashing on a bad pointer or is it attempting to be force changed?
* Update bot.cpp
---------
Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
* [Quest API] Add RemoveAAPoints() and AA Loss Event to Perl/Lua
# Perl
- Add `$client->RemoveAAPoints(points)`.
- Add `EVENT_AA_LOSS`, exports `$aa_lost`.
# Lua
- Add `client:RemoveAAPoints(points)`.
- Add `event_aa_loss`, exports `e.aa_lost`.
# Notes
- Allows operators to more easily remove AA Points.
- Has a bool return type that will return false if the player does not have enough AA Points to complete the removal.
* Update client.cpp
### Perl
- Add $bot->DeleteBot().
```
sub EVENT_SAY {
if ($text =~/#deletebot/i && $client->Admin() >= 100) {
my @bot_list = $entity_list->GetBotList();
foreach $ent (@bot_list) {
if ($ent) {
quest::shout("Deleting " . $ent->GetCleanName());
$ent->DeleteBot();
$ent->Camp(0);
}
}
}
}
```
### Lua
- Add bot:DeleteBot().
```
function event_say(e)
if(e.message:findi("#deletebot")) then
local bot_list = eq.get_entity_list():GetBotList();
for ent in bot_list.entries do
if (ent) then
e.self:Message(7,"Deleting " .. ent:GetCleanName() .. "");
ent:DeleteBot();
ent:Camp(false);
end
end
end
end
```
### Notes
- Allows operators to delete bots.
# Notes
- The `-1.0f` was causing these modifiers to be set to `0.0` and when people would enable them they would get no experience.
- We now use the zone based grabbed methods when setting which will default to a value of `1.0f` if there is not a value found.