* [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
* [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.
- Add `$mob->IsBoat()`.
- Add `$mob->IsControllableBoat()`.
- Add `mob:IsBoat()`.
- Add `mob:IsControllableBoat()`.
- Allows operators to determine if a mob is a boat or a controllable boat.
# Perl
- Add `$mob-.IsDestructibleObject()`.
# Lua
- Add `mob:IsDestructibleObject()`.
# Notes
- Allows operators to determine if a mob is a destructible object.
* [Quest API] Add Bot Special Attacks for Immune Aggro/Damage
# Notes
- Adds `IMMUNE_AGGRO_BOT` and `IMMUNE_DAMAGE_BOT` for uses in special abilities.
* Cleanup
* Update attack.cpp
# Perl
- Add `$mob->GetHateListCount()`.# Perl
- Add `$mob->GetHateListCount()`.
- Add `$mob->GetHateListBotCount()`.
- Add `$mob->GetHateListClientCount()`.
- Add `$mob->GetHateListNPCCount()`.
# Lua
- Add `mob:GetHateListCount()`.
- Add `mob:GetHateListBotCount()`.
- Add `mob:GetHateListClientCount()`.
- Add `mob:GetHateListNPCCount()`.
# Notes
- Allows operators to more easily get a total entity count of a Mob's hate list, can do an overall count, or specifically bots, clients, or NPCs.
* [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 `$mob->GMMove(x, y, z, heading, save_guard_spot)`.
# Lua
- Add `mob:GMMove(x, y, z, heading, save_guard_spot)`.
# Notes
- Operators weren't able to disable saving guard spots, so moving with `GMMove` meant NPCs stayed where they were moved.
* [Quest API] Add Caster ID Parameter to FindBuff in Perl/Lua
# Perl
- Add `$mob->FindBuff(spell_id, caster_id)`.
# Lua
- Add `mob:FindBuff(spell_id, caster_id)`.
# Notes
- Allows operators to check if the spell ID is cast by a specific entity ID.
- We don't use `Mob*` reference here since the mob may have died, left zone, etc.
* Formatting.
* [Bug Fix] Fix Appearance Issues
# Notes
- Changing race, gender, or texture of a Mob could result in it changing sizes due to use not sending the size as part of the appearance packet.
- Also converts the parameterized method to a struct parameter so that we can optionally send things without back-filling multiple arguments.
* Gender cleanup.
* Fix.
* Formatting.
* [Feature] Add Support for item textures higher than 65,535
# Notes
- We were previously using `uint16` which has a max of `65,535`, but some of the new Live textures that are being used have values way beyond this.
- Updates quest API, commands, and database tables that also used `uint16`.
* Update version.h
* [Quest API] Add GetClassPlural() and GetRacePlural() to Perl/Lua
# Perl
- Add `$mob->GetClassPlural()`.
- Add `$mob->GetRacePlural()`.
# Lua
- Add `mob:GetClassPlural()`.
- Add `mob:GetRacePlural()`.
# Notes
- Allows operators to get the plural of a player class or race, example being `Warrior` as `Warriors` or `Dark Elf` as `Dark Elves`.
* Update mob.cpp
* [Quest API] Add HasSpellEffect() to Perl/Lua
# Perl
- Add `$mob->HasSpellEffect(effect_id)`.
# Lua
- Add `mob:HasSpellEffect(effect_id)`.
# Notes
- Allows operators to see if a Mob has an effect ID from any of their buffs.
* Update mob.cpp
# Perl
- Add `$mob->GetDefaultRaceSize(race_id)`.
- Add `$mob->GetDefaultRaceSize(race_id, gender_id)`.
# Lua
- Add `mob:GetDefaultRaceSize(race_id)`.
- Add `mob:GetDefaultRaceSize(race_id, gender_id)`.
# Notes
- This allows you to get a default size for a race and gender that isn't the current mob's race and gender.
# Perl
- Add `$mob->GetBuffSpellIDs()`.
# Lua
- Add `$mob->GetBuffSpellIDs()`.
# Notes
- These methods allow operators to get a list of a mob's buff IDs without having to loop through their buffs themselves.
* [Bug Fix] Fix issues with Lua tables not starting at index 1
# Notes
- This would cause the first item in the table to be inaccessible since Lua tables start at index `1` instead of index `0`.
- All other spots using Lua tables have their indexes starting at `1`.
* Update lua_general.cpp
* [Feature] Add support for -1 extradmgskill to allow all skills to be scaled.
- `$mob->GetSkillDmgAmt(skill_id)` now uses `int` instead of `uint16`.
- `statbonuses:GetSkillDamageAmount(skill_id)` now uses `-1` properly.
- `mob:GetSkillDmgAmt(skill_id)` now uses `int` instead of `uint16`.
- A `-1` value in `extradmgskill` denotes the ability to scale all skills at once.
- Consolidated `AddItemBonuses()`, `AdditiveWornBonuses()`, `CalcItemBonuses()`, and `CalcRecommendedLevelBonus()` to mob-based methods to avoid code duplication.
- Bots, NPCs, and Mercs can now use additive worn effects if the rule is enabled, as well as all other proper stat bonuses that only clients had before.
- No SQL update required to change `extradmgskill` and `extradmgamt` to `int` as they already are this type in the database, just had to adjust `item_data.h` and `shareddb.cpp`.
* Update mob.cpp
* Cleanup.
* Cleanup.
* Move #include <vector> to header.
* Add method for GetExtraDamageSkills
* fix additembonuses
* Update bonuses.cpp
* Update mob.cpp
* Out of bounds.
* Update bonuses.cpp
---------
Co-authored-by: Aeadoin <109764533+Aeadoin@users.noreply.github.com>
# Perl
- Add `$mob->IsFindable()`.
- Add `$mob->IsTrackable()`.
# Lua
- Add `mob:IsFindable()`.
- Add `mob:IsTrackable()`.
# Notes
- Allows operators to see if a mob is findable or trackable.
# Perl
- Add `$mob->GetDefaultRaceSize()`.
# Lua
- Add `mob:GetDefaultRaceSize()`.
# Notes
- Allows operators to get the default race size of a race if they want to use it in a script.