* [Spells] Add Unblockable Spell Table and Spell Blocked Event
- Add `EVENT_SPELL_BLOCKED`, exports `$blocking_spell_id`, `$cast_spell_id`, `$blocking_spell`, and `$cast_spell`.
- Add `event_spell_blocked`, exports `e.blocking_spell_id`, `e.cast_spell_id`, `e.blocking_spell`, and `e.cast_spell`.
- Adds `spells_unblockable` table with a `spell_id` and `is_unblockable` column.
- This table will need to be populated based on known spells that should be unblockable.
- This event will allow operators to perform events when spells are blocked.
* Cleanup
* Cleanup
* Update spells.cpp
* Remove unused repositories.
* Finalize
* Update lua_parser_events.cpp
If a mob has a target when a zone is shutdown it will crash while trying
to dispatch EVENT_TARGET_CHANGE when the Mob destructor cleans up hatelists
if a quest interface isn't loaded for the type (in this case no bot scripts):
zone.exe!fmt::v10::format<std::string const &,char const *>(fmt::v10::basic_format_string<char,std::string const &,char const *> fmt={...}, const std::string & <args_0>={...}, const char * && <args_1>=0x0000000000000000) Line 2835 C++
> zone.exe!QuestParserCollection::GetQIByBotQuest(std::string & filename={...}) Line 1138 C++
zone.exe!QuestParserCollection::BotHasQuestSubLocal(QuestEventID event_id=EVENT_TARGET_CHANGE) Line 353 C++
zone.exe!QuestParserCollection::BotHasQuestSub(QuestEventID event_id=EVENT_TARGET_CHANGE) Line 389 C++
zone.exe!Mob::SetTarget(Mob * mob=0x0000000000000000) Line 5431 C++
zone.exe!NPC::SetTarget(Mob * mob=0x0000000000000000) Line 575 C++
zone.exe!Mob::RemoveFromHateList(Mob * mob=0x000001bfbdc66040) Line 4894 C++
zone.exe!EntityList::RemoveFromTargets(Mob * mob=0x000001bfbdc66040, bool RemoveFromXTargets=true) Line 1530 C++
zone.exe!Mob::~Mob() Line 547 C++
zone.exe!NPC::~NPC() Line 537 C++
zone.exe!NPC::`scalar deleting destructor'(unsigned int) C++
zone.exe!EntityList::RemoveAllMobs() Line 2678 C++
zone.exe!EntityList::Clear() Line 3090 C++
zone.exe!Zone::~Zone() Line 1103 C++
zone.exe!Zone::`scalar deleting destructor'(unsigned int) C++
zone.exe!Zone::Shutdown(bool quiet=false) Line 928 C++
This is caused by the Zone destructor deleting short_name before calling
entity_list.Clear(). With an unloaded quest interface BotHasQuestSubLocal
calls GetQIByBotQuest which gets a null zone->GetShortName() and crashes
while formatting strings.
The immediate regressing commit for this crash is because a check for
zone->IsLoaded() was removed in 74f1eac4 with others that were removed
to fix a regression by #4025. GetQIByBotQuest and GetQIByPlayerQuest
always had this check and should have remained for them.
This restores the zone->IsLoaded() checks for GetQIByBotQuest/PlayerQuest.
The other functions cannot have that check added until the other issues
mentioned in #4149 are addressed.
## Type of change
Please delete options that are not relevant.
- [x] Bug fix (non-breaking change which fixes an issue)
# Checklist:
- [x] I have performed a self-review of my code. Ensuring variables, functions and methods are named in a human-readable way, comments are added only where naming of variables, functions and methods can't give enough context.
- [x] I have tested my changes
- [x] I own the changes of my code take responsibilities for the potential issues that occur
# Notes
- Bots were reportedly being bypassed by NPCs due to not taking into consideration their raid group's damage.
- Must have been missed when bot raids were implemented.
SPA 463 SE_SHIELD_TARGET
Live description: "Shields your target, taking a percentage of their damage".
Only example spell on live is an NPC who uses it during a raid event "Laurion's Song" expansion. SPA 54492 'Guardian Stance' Described as 100% Melee Shielding
Example of mechanic. Base value = 70. Caster puts buff on target. Each melee hit Buff Target takes 70% less damage, Buff Caster receives 30% of the melee damage.
Added mechanic to cause buff to fade if target or caster are separated by a distance greater than the casting range of the spell. This allows similar mechanics to the /shield ability, without a range removal mechanic it would be too easy to abuse if put on a player spell. *can not confirm live does this currently
Can not be cast on self.
* [Feature] Additive Spell Focus from Worn slot with limits
New rule (UseAdditiveFocusFromWornSlotWithLimits) allows you place to focus effects in worn slots which will apply the focus additively and perform normal limit checks on those focus. This differs from regular focus behavior that only takes highest value.
This is a new version of an old rule "UseAdditiveFocusFromWornSlot"
which allowed similar behavior but ignored focus limits. Thus hindering its full potential for itemization.
* Update spell_effects.cpp
---------
Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
* [Bug Fix] Fix Luabind Double Class Register
# Notes
- These two methods were registering to the same class as another method, causing an error seen by @neckkola and others.
# Error
```
zone: /home/eqemu/source_jas/libs/luabind/src/class_registry.cpp:151: void luabind::detail::class_registry::add_class(const luabind::type_id&, luabind::detail::class_rep*): Assertion `(m_classes.find(info) == m_classes.end()) && "you are trying to register a class twice"' failed.
```
* Update lua_general.cpp
* [Bug Fix] Fix Group Leadership
# Notes
- We were not sending anything to `group_leaders` table if we did not already have an existing row.
# Video
* Update database.cpp
* [LUA] Add Zone and Language Constants
This will add Zone:
```lua
if eq.get_zone_id() == Zone.Qeynos then
foo()
end
```
It will also add Language:
```lua
if e.language == Language.ElderElvish and e.other:GetLanguageSkill(Language.ElderElvish) >= 100 then
e.self:Say("You know my language!", Language.ElderElvish);
end
```
These changes should help avoid magic numbers in quests and aide in readability without the need for -- comments to clarify.
* Adjust to lower case
* [Bug Fix] Fix Auto Login Issue
# Notes
- We were setting `live_name` value regardless of if we were zoning, causing us to automatically log in to the last character we'd logged in to before.
* Remove &
Update to SPA148 which acts to block spells buffs that are of lesser value than the current buff for specific effect slots. This effected was preventing detrimental debuffs from being applied that were using same effect slot. This bug affected a very small amount of spell interactions and was fixed on live in 2018. Example being Vishmitars Corruption (6642) being blocked by SteelOak Skin (5352)
I confirmed the behavior on live myself. The detrimental buff if in conflict should now be applied instead of blocked.
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()