173 Commits

Author SHA1 Message Date
Alex King
9e07d90664
[Quest API] Add Zone Support to Perl and Lua (#4662)
* [Quest API] Add Zone Support to Perl and Lua

* Final
2025-02-08 23:21:15 -06:00
Mitch Freeman
f21cc170df
[Feature] Evolving Item Support for RoF2 (#4496)
* basic evolving items framework created

* Implement evolving tab in the inventory window

* Implement experience and number of kills

* Move zone evolving map to a evolvingitemsmanager class

* rework gm commands

* rework GetInventory

* wip

* wip loot testing

* Fix Duplicate Message

* reworked evolving item looting, swapping, etc

* reworked const functions for evolving methods

* Functioning Player Trade of evolving items test item_id is 89550

* First pass of Final Result link working

* First pass of item upgrading when reaching 100%

* Add strings and logic for displaying the evolving item xp transfer window in Corathus

* Prototype of xp transfer window sending items

* WIP for evolve xp transfer

* WIP for evolve xp transfer.  First tests passed

* XP Transfer Cleanup

* XP Transfer Cleanup

* Add Rule for evolving items equip timer/  default is 30 secs

* Add logging and player events

Add logging and player events

* Formatting

* Database updates

* Updates for linux build

* Perl/Cleanup

* Command cleanup

* Lua

* Added a crash condition check if final item id is blank or not found.

* Review Changes

Updates to resolve review comments and a rebase.

* migrate to content_db for items_evolving_details

migrate to content_db for items_evolving_details

* Simplify, don't hit database unless evolving

* Update 2025_01_19_items_evolving_details.sql

* Update client.cpp

* Update manifest with items_evolving_details

* character_id vs char_id

* Remove _Struct from structs

* Remove license header in evolving.cpp

* Move evolving constants from eq_constants.h to evolving.h since it is more specific

* Update database_schema.h

* General cleanup

* Be more specific with `evolving_items` vs `evolving`

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
Co-authored-by: Akkadius <akkadius1@gmail.com>
2025-01-19 18:10:19 -06:00
hg
bcedfe7032
[Quest API] Add Native Database Querying Interface (#4531)
* Add database quest API

API functions are named to be similar to LuaSQL and perl DBI

New connections are made for Database objects. These can either use
credentials from the server eqemu_config or manual connections.

* Add option to use zone db connections
2024-11-12 20:01:18 -06:00
Alex King
448a33a60c
[Quest API] Add Scripting Support to Mercenaries (#4500)
* [Quest API] Add Scripting Support to Mercenaries

* Cleanup

* Cleanup

* Update lua_merc.h

* Update mob.cpp

* XYZH

* Final

* Update attack.cpp

* Update attack.cpp

* Simplify event invocation

* Inline example

* Nullptr init example

* EVENT_TIMER simplify add EventPlayerNpcBotMerc

* EVENT_TIMER_START

* Remove has_start_event

* EVENT_TIMER_START with settimerMS

* EVENT_POPUP_RESPONSE

* Consolidation

* Update attack.cpp

* Push

* Update quest_parser_collection.h

* Comments

* Cleanup per comments

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-10-10 21:29:29 -04:00
Mitch Freeman
fcffc6b3d4
[Feature] Add Parcel Feature for RoF2 Clients (#4198)
* Add Parcel Feature

Add the parcel system for RoF2 client

* Fixed a duplicate define

* Reformat

reformating and review changes

* Further Formatting

* Memory Mgmt Updates

Refactored to using unique_ptr/make_unique/etc to avoid manual memory mgmt.

Other format changes

* Refactor db structure

Refactor for db structure of parcels to character_parcels
Removal of parcel_merchants
Addition of npc_types.is_parcel_merchant
Cleanup as a result

* Refactor to use item id 99990 for money transfers.  Removed the money string function as a result, though simplified the messaging related to money.  Other updates based on feedback.

* Move prune routine out of scheduler and into a world process.
Removed RuleI from #define

* Update

* Update database.cpp

* Update database_update_manifest.cpp

* Update main.cpp

* Update client_process.cpp

* Update parcels.cpp

* Remove parcel merchant content to optional sql instead of manifest.

---------

Co-authored-by: Akkadius <akkadius1@gmail.com>
2024-04-20 21:15:56 -05:00
Chris Miles
cf7f0f4321
[Skill Caps] Further improvements (#4205) 2024-03-24 13:04:26 -04:00
Alex King
d7ea290b6b
[Skill Caps] Remove from shared memory and simplify (#4069)
* [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
2024-03-23 18:52:40 -05:00
Alex King
161c13f457
[Quest API] Add Buff Support to Perl/Lua (#4182)
* [Quest API] Add Buff Support to Perl/Lua

- Add `$mob->GetCasterID()`.
- Add `$mob->GetCasterLevel()`.
- Add `$mob->GetCasterName()`.
- Add `$mob->GetCastOnX()`.
- Add `$mob->GetCastOnY()`.
- Add `$mob->GetCastOnZ()`.
- Add `$mob->GetCounters()`.
- Add `$mob->GetDOTRune()`.
- Add `$mob->GetExtraDIChance()`.
- Add `$mob->GetInstrumentModi()`.
- Add `$mob->GetMagicRune()`.
- Add `$mob->GetMeleeRune()`.
- Add `$mob->GetNumberOfHits()`.
- Add `$mob->GetRootBreakChanc()`.
- Add `$mob->GetSpellID()`.
- Add `$mob->GetTicsRemaining()`.
- Add `$mob->GetVirusSpreadTim()`.
- Add `$mob->IsCasterClient()`.
- Add `$mob->IsPersistentBuff()`.
- Add `$mob->SendsClientUpdate()`.

- Add `mob:GetCasterID()`.
- Add `mob:GetCasterLevel()`.
- Add `mob:GetCasterName()`.
- Add `mob:GetCastOnX()`.
- Add `mob:GetCastOnY()`.
- Add `mob:GetCastOnZ()`.
- Add `mob:GetCounters()`.
- Add `mob:GetDOTRune()`.
- Add `mob:GetExtraDIChance()`.
- Add `mob:GetInstrumentModi()`.
- Add `mob:GetMagicRune()`.
- Add `mob:GetMeleeRune()`.
- Add `mob:GetNumberOfHits()`.
- Add `mob:GetRootBreakChanc()`.
- Add `mob:GetSpellID()`.
- Add `mob:GetTicsRemaining()`.
- Add `mob:GetVirusSpreadTim()`.
- Add `mob:IsCasterClient()`.
- Add `mob:IsPersistentBuff()`.
- Add `mob:SendsClientUpdate()`.

- Adds support for `Buffs_Struct` to Perl/Lua.
- Allows operators to read a mob's buff data directly to determine caster, melee rune, etc.

* Fix GetCasterID() to proper data type.

* Remove Lua_Buffs, return table instead.

* Cleanup
2024-03-13 23:38:15 -04:00
Alex King
8edf7a07e3
[Base Data] Remove from shared memory and simplify (#4045)
* [Base Data] Remove from shared memory and simplify

- Removes Base Data loading from shared memory and puts it into zone.
- Changes type of `level` and `class` to `uint8_t` from `uint32_t` for consistency since we're renaming fields here anyway.
- Renames `unk1` to `hp_regen` in `base_data` table.
- Renames `unk2` to `end_regen` in `base_data` table.
- These changed fields were already mapped, we just hadn't renamed them for whatever reason.
- Regenerates Base Data repository.
- Adds `#reload base_data` to reload base data in real time.

* Cleanup

* Update shareddb.h

* Cleanup.

* Update shareddb.cpp

* Update main.cpp
2024-02-05 17:11:20 -06:00
Chris Miles
c654c1d674
[Loot] Remove from shared memory, simplification (#3988)
* First pass of pulling loot out of shared memory, functional

* More code cleanup

* More cleanup

* More cleanup

* More cleanup

* Add loot reload type

* Reload, logging

* Update npc.h

* Cleanup

* Logging, don't load attempt to load loottable id 0

* Update worldserver.cpp

* Update client.cpp

* Update zone_loot.cpp

* PR feedback

* Update zone.cpp

* Memory leak suggestion

* Update CMakeLists.txt

* Post rebase issues
2024-02-05 15:17:53 -06:00
Alex King
297e358c02
[Factions] Remove from shared memory and simplify (#3999)
* [Factions] Remove from shared memory and simplify

- Removes factions from shared memory and moves to zone based storage of repositories and changes the NPC `faction_list` to also use repositories.
- This affects NPC Factions and Faction Associations.

* Bug fixes.

* Update client.cpp

* Update client.cpp

* Update client.cpp

* Cleanup

* Update client.cpp

* Update client.cpp

* Update client.cpp

* Final push

* Update CMakeLists.txt

* Consolidate reloading.

* [Cleanup] PR # 3999 (#4039)

* [Fixes for PR # 3999

* [Reload actual in game factions, not just the umbrella data.

* syntax

* Fix typo

* Foix bug where primary_faction not filled in when no hits

* Fix typos

* Fix splash factions for kills.

* Fix typo

* Fix more variable names to be accurate

* Fix Loads to load new ones as they come in.

* Load npc_factions without primary (tasks) and support old task faction

* Rename to make way for new LoadFactionAssocition (by faction_id)

* Fix some review comments

* Add code to load factions for splash tasks and quests.

* Fix issue with sign and RewardFaction, fix Log Message

---------

Co-authored-by: Paul Coene <noudess@gmail.com>
2024-02-04 10:38:38 -05:00
Alex King
53169ae217
[Cleanup] Delete errmsg.h in common and zone (#3821)
* [Cleanup] Delete errmsg.h in common and zone

# Notes
- These files were mostly unused.
- Moved the stuff that was used to the `dbcore.h` file since it's already used.

* Remove references
2023-12-30 11:21:57 -05:00
Chris Miles
286479198f
[Compilation] Use pre-compiled headers for Windows (speed) (#3778)
* Experiment with PCH

* Another run

* GCC test

* Different test

* Another one

* Another one

* Lua headers

* PCH main zone primitives

* Tweaks

* Tweaks

* Tweaks

* Add EQEMU_BUILD_PCH option default to ON
2023-12-17 19:04:21 -06:00
Chris Miles
b027edd21e
[API] Implement Zone Sidecar (#3635)
* Zone sidecar work

* Process management work

* Merge

* Sidecar work

* API config option

* Request proxy work

* Proxy headers and params

* Change port

* Remove code

* Sim work

* Sidecar work

* Update loot_simulator_controller.cpp

* Update loot_simulator_controller.cpp

* Formatting

* Post merge change

* Windows compile fix

* Update sidecar_api.cpp

* Update strings.cpp
2023-10-23 22:39:37 -05:00
Alex King
251993c61b
[Quest API] Add ItemData Class to Perl (#3465)
* [Quest API] Add ItemData Class to Perl

- Add `$questitem->GetItem()`.
- Add `$questitem->GetUnscaledItem()`.
- Add `$questitemdata->GetAGI()`.
- Add `$questitemdata->GetAC()`.
- Add `$questitemdata->GetCHA()`.
- Add `$questitemdata->GetDEX()`.
- Add `$questitemdata->GetINT()`.
- Add `$questitemdata->GetSTA()`.
- Add `$questitemdata->GetSTR()`.
- Add `$questitemdata->GetAWis()`.
- Add `$questitemdata->GetAccuracy()`.
- Add `$questitemdata->GetArtifactFlag()`.
- Add `$questitemdata->GetAttack()`.
- Add `$questitemdata->GetAttuneable()`.
- Add `$questitemdata->GetAugmentDistiller()`.
- Add `$questitemdata->GetAugmentRestrict()`.
- Add `$questitemdata->GetAugmentSlotType(slot_id)`.
- Add `$questitemdata->GetAugmentSlotUnk2(slot_id)`.
- Add `$questitemdata->GetAugmentSlotVisible(slot_id)`.
- Add `$questitemdata->GetAugmentType()`.
- Add `$questitemdata->GetAvoidance()`.
- Add `$questitemdata->GetBackstabDamage()`.
- Add `$questitemdata->GetBagSize()`.
- Add `$questitemdata->GetBagSlots()`.
- Add `$questitemdata->GetBagType()`.
- Add `$questitemdata->GetBagWeightReduction()`.
- Add `$questitemdata->GetBaneDamageAmount()`.
- Add `$questitemdata->GetBaneDamageBody()`.
- Add `$questitemdata->GetBaneDamageRace()`.
- Add `$questitemdata->GetBaneDamageRaceAmount()`.
- Add `$questitemdata->GetBardEffect()`.
- Add `$questitemdata->GetBardLevel()`.
- Add `$questitemdata->GetBardLevel2()`.
- Add `$questitemdata->GetBardType()`.
- Add `$questitemdata->GetBardSkillType()`.
- Add `$questitemdata->GetBardSkillValue()`.
- Add `$questitemdata->GetBenefitFlag()`.
- Add `$questitemdata->GetBook()`.
- Add `$questitemdata->GetBookType()`.
- Add `$questitemdata->GetCR()`.
- Add `$questitemdata->GetCastTime()`.
- Add `$questitemdata->GetCastTime_()`.
- Add `$questitemdata->GetCharmFile()`.
- Add `$questitemdata->GetCharmFileID()`.
- Add `$questitemdata->GetClairvoyance()`.
- Add `$questitemdata->GetClasses()`.
- Add `$questitemdata->GetClickName()`.
- Add `$questitemdata->GetClickEffect()`.
- Add `$questitemdata->GetClickLevel()`.
- Add `$questitemdata->GetClickLevel2()`.
- Add `$questitemdata->GetClickType()`.
- Add `$questitemdata->GetColor()`.
- Add `$questitemdata->GetCombatEffects()`.
- Add `$questitemdata->GetCorruption()`.
- Add `$questitemdata->GetDR()`.
- Add `$questitemdata->GetDSMitigation()`.
- Add `$questitemdata->GetDamage()`.
- Add `$questitemdata->GetDamageShield()`.
- Add `$questitemdata->GetDeity()`.
- Add `$questitemdata->GetDelay()`.
- Add `$questitemdata->GetDOTShielding()`.
- Add `$questitemdata->GetElementalDamageAmount()`.
- Add `$questitemdata->GetElementalDamageType()`.
- Add `$questitemdata->GetEliteMaterial()`.
- Add `$questitemdata->GetEndurance()`.
- Add `$questitemdata->GetEnduranceRegen()`.
- Add `$questitemdata->GetExpendableArrow()`.
- Add `$questitemdata->GetExtraDamageAmount()`.
- Add `$questitemdata->GetExtraDamageSkill()`.
- Add `$questitemdata->GetFR()`.
- Add `$questitemdata->GetFVNoDrop()`.
- Add `$questitemdata->GetFactionAmount1()`.
- Add `$questitemdata->GetFactionAmount2()`.
- Add `$questitemdata->GetFactionAmount3()`.
- Add `$questitemdata->GetFactionAmount4()`.
- Add `$questitemdata->GetFactionModifier1()`.
- Add `$questitemdata->GetFactionModifier2()`.
- Add `$questitemdata->GetFactionModifier3()`.
- Add `$questitemdata->GetFactionModifier4()`.
- Add `$questitemdata->GetFavor()`.
- Add `$questitemdata->GetFilename()`.
- Add `$questitemdata->GetFocusEffect()`.
- Add `$questitemdata->GetFocusName()`.
- Add `$questitemdata->GetFocusLevel()`.
- Add `$questitemdata->GetFocusLevel2()`.
- Add `$questitemdata->GetFocusType()`.
- Add `$questitemdata->GetFulfilment()`.
- Add `$questitemdata->GetGuildFavor()`.
- Add `$questitemdata->GetHP()`.
- Add `$questitemdata->GetHaste()`.
- Add `$questitemdata->GetHealAmount()`.
- Add `$questitemdata->GetHeroicAGI()`.
- Add `$questitemdata->GetHeroicCR()`.
- Add `$questitemdata->GetHeroicCHA()`.
- Add `$questitemdata->GetHeroicCorruption()`.
- Add `$questitemdata->GetHeroicDR()`.
- Add `$questitemdata->GetHeroicDEX()`.
- Add `$questitemdata->GetHeroicFR()`.
- Add `$questitemdata->GetHeroicINT()`.
- Add `$questitemdata->GetHeroicMR()`.
- Add `$questitemdata->GetHeroicPR()`.
- Add `$questitemdata->GetHeroicSTA()`.
- Add `$questitemdata->GetHeroicSTR()`.
- Add `$questitemdata->GetHeroicWIS()`.
- Add `$questitemdata->GetID()`.
- Add `$questitemdata->GetIDFile()`.
- Add `$questitemdata->GetIcon()`.
- Add `$questitemdata->GetItemClass()`.
- Add `$questitemdata->GetItemType()`.
- Add `$questitemdata->GetLDoNPrice()`.
- Add `$questitemdata->GetLDoNSellBackRate()`.
- Add `$questitemdata->GetLDoNSold()`.
- Add `$questitemdata->GetLDoNTheme()`.
- Add `$questitemdata->GetLight()`.
- Add `$questitemdata->GetLore()`.
- Add `$questitemdata->GetLoreFlag()`.
- Add `$questitemdata->GetLoreGroup()`.
- Add `$questitemdata->GetMR()`.
- Add `$questitemdata->GetMagic()`.
- Add `$questitemdata->GetMana()`.
- Add `$questitemdata->GetManaRegen()`.
- Add `$questitemdata->GetMaterial()`.
- Add `$questitemdata->GetMaximumCharges()`.
- Add `$questitemdata->GetMinimumStatus()`.
- Add `$questitemdata->GetName()`.
- Add `$questitemdata->GetNoDrop()`.
- Add `$questitemdata->GetNoPet()`.
- Add `$questitemdata->GetNoRent()`.
- Add `$questitemdata->GetNoTransfer()`.
- Add `$questitemdata->GetPR()`.
- Add `$questitemdata->GetPendingLoreFlag()`.
- Add `$questitemdata->GetPointType()`.
- Add `$questitemdata->GetPotionBelt()`.
- Add `$questitemdata->GetPotionBeltSlots()`.
- Add `$questitemdata->GetPrice()`.
- Add `$questitemdata->GetProcEffect()`.
- Add `$questitemdata->GetProcName()`.
- Add `$questitemdata->GetProcRate()`.
- Add `$questitemdata->GetProcLevel()`.
- Add `$questitemdata->GetProcLevel2()`.
- Add `$questitemdata->GetProcType()`.
- Add `$questitemdata->GetPurity()`.
- Add `$questitemdata->GetQuestItemFlag()`.
- Add `$questitemdata->GetRaces()`.
- Add `$questitemdata->GetRange()`.
- Add `$questitemdata->GetRecLevel()`.
- Add `$questitemdata->GetRecSkill()`.
- Add `$questitemdata->GetRecastDelay()`.
- Add `$questitemdata->GetRecastType()`.
- Add `$questitemdata->GetRegen()`.
- Add `$questitemdata->GetReqLevel()`.
- Add `$questitemdata->GetScriptFileID()`.
- Add `$questitemdata->GetScrollEffect()`.
- Add `$questitemdata->GetScrollName()`.
- Add `$questitemdata->GetScrollLevel()`.
- Add `$questitemdata->GetScrollLevel2()`.
- Add `$questitemdata->GetScrollType()`.
- Add `$questitemdata->GetSellRate()`.
- Add `$questitemdata->GetShielding()`.
- Add `$questitemdata->GetSize()`.
- Add `$questitemdata->GetSkillModifierType()`.
- Add `$questitemdata->GetSkillModifierValue()`.
- Add `$questitemdata->GetSlots()`.
- Add `$questitemdata->GetSpellDamage()`.
- Add `$questitemdata->GetSpellShield()`.
- Add `$questitemdata->GetStackSize()`.
- Add `$questitemdata->GetStackable()`.
- Add `$questitemdata->GetStrikeThrough()`.
- Add `$questitemdata->GetStunResist()`.
- Add `$questitemdata->GetSummonedFlag()`.
- Add `$questitemdata->GetTradeskills()`.
- Add `$questitemdata->GetWeight()`.
- Add `$questitemdata->GetWornName()`.
- Add `$questitemdata->GetWornEffect()`.
- Add `$questitemdata->GetWornLevel()`.
- Add `$questitemdata->GetWornLevel2()`.
- Add `$questitemdata->GetWornType()`.

- Fixed data type of parameters in a handful of methods.

- Allows operators to directly interact with item data without the need for `quest::getitemstat` or DBI or anything of the sort.

* Update perl_questitem.cpp

* Update lua_iteminst.cpp

* Update lua_iteminst.h

* Update lua_iteminst.h
2023-07-02 11:26:49 -04:00
Alex King
d16ac99033
[Quest API] Add StatBonuses Class to Perl (#3460)
* [Quest API] Add StatBonuses Class to Perl

# Perl
- Add `$mob->GetAABonuses()`.
- Add `$mob->GetItemBonuses()`.
- Add `$mob->GetSpellBonuses()`.
- Add `$statbonuses->GetAbsorbMagicAttack(slot)`.
- Add `$statbonuses->GetAC()`.
- Add `$statbonuses->GetAccuracy(slot)`.
- Add `$statbonuses->GetAdjustedCastingSkill()`.
- Add `$statbonuses->GetAggroRange()`.
- Add `$statbonuses->GetAGI()`.
- Add `$statbonuses->GetAGICapModifier()`.
- Add `$statbonuses->GetAlterNPCLevel()`.
- Add `$statbonuses->GetAmbidexterity()`.
- Add `$statbonuses->GetAmplification()`.
- Add `$statbonuses->GetAntiGate()`.
- Add `$statbonuses->GetArcheryDamageModifier()`.
- Add `$statbonuses->GetAssassinate(slot)`.
- Add `$statbonuses->GetAssassinateLevel(slot)`.
- Add `$statbonuses->GetAssistRange()`.
- Add `$statbonuses->GetAStacker(slot)`.
- Add `$statbonuses->GetATK()`.
- Add `$statbonuses->GetAvoidMeleeChance()`.
- Add `$statbonuses->GetAvoidMeleeChanceEffect()`.
- Add `$statbonuses->GetBaseMovementSpeed()`.
- Add `$statbonuses->GetBerserkSPA()`.
- Add `$statbonuses->GetBindWound()`.
- Add `$statbonuses->GetBlockBehind()`.
- Add `$statbonuses->GetBrassModifier()`.
- Add `$statbonuses->GetBStacker(slot)`.
- Add `$statbonuses->GetBuffSlotIncrease()`.
- Add `$statbonuses->GetCHA()`.
- Add `$statbonuses->GetCHACapModifier()`.
- Add `$statbonuses->GetChannelChanceItems()`.
- Add `$statbonuses->GetChannelChanceSpells()`.
- Add `$statbonuses->GetCharmBreakChance()`.
- Add `$statbonuses->GetClairvoyance()`.
- Add `$statbonuses->GetCombatStability()`.
- Add `$statbonuses->GetConsumeProjectile()`.
- Add `$statbonuses->GetCorrup()`.
- Add `$statbonuses->GetCorrupCapModifier()`.
- Add `$statbonuses->GetCR()`.
- Add `$statbonuses->GetCRCapModifier()`.
- Add `$statbonuses->GetCripplingBlowChance()`.
- Add `$statbonuses->GetCriticalDamageModifier(slot)`.
- Add `$statbonuses->GetCriticalDoTChance()`.
- Add `$statbonuses->GetCriticalDOTDecay()`.
- Add `$statbonuses->GetCriticalHealChance()`.
- Add `$statbonuses->GetCriticalHealDecay()`.
- Add `$statbonuses->GetCriticalHealOverTime()`.
- Add `$statbonuses->GetCriticalHitChance(slot)`.
- Add `$statbonuses->GetCriticalMend()`.
- Add `$statbonuses->GetCriticalRegenDecay()`.
- Add `$statbonuses->GetCriticalSpellChance()`.
- Add `$statbonuses->GetCStacker(slot)`.
- Add `$statbonuses->GetDamageModifier(slot)`.
- Add `$statbonuses->GetDamageModifier2(slot)`.
- Add `$statbonuses->GetDamageShield()`.
- Add `$statbonuses->GetDamageShieldSpellID()`.
- Add `$statbonuses->GetDamageShieldType()`.
- Add `$statbonuses->GetDeathSave(slot)`.
- Add `$statbonuses->GetDelayDeath()`.
- Add `$statbonuses->GetDEX()`.
- Add `$statbonuses->GetDEXCapModifier()`.
- Add `$statbonuses->GetDistanceRemoval()`.
- Add `$statbonuses->GetDivineAura()`.
- Add `$statbonuses->GetDivineSaveChance(slot)`.
- Add `$statbonuses->GetDodgeChance()`.
- Add `$statbonuses->GetDOTCriticalDamageIncrease()`.
- Add `$statbonuses->GetDoTShielding()`.
- Add `$statbonuses->GetDoubleAttackChance()`.
- Add `$statbonuses->GetDoubleRangedAttack()`.
- Add `$statbonuses->GetDoubleRiposte()`.
- Add `$statbonuses->GetDoubleSpecialAttack()`.
- Add `$statbonuses->GetDR()`.
- Add `$statbonuses->GetDRCapModifier()`.
- Add `$statbonuses->GetDSMitigation()`.
- Add `$statbonuses->GetDSMitigationOffHand()`.
- Add `$statbonuses->GetDStacker(slot)`.
- Add `$statbonuses->GetDualWieldChance()`.
- Add `$statbonuses->GetEffectiveCastingLevel()`.
- Add `$statbonuses->GetEndurancePercentCap(slot)`.
- Add `$statbonuses->GetEndurance()`.
- Add `$statbonuses->GetEnduranceReduction()`.
- Add `$statbonuses->GetEnduranceRegen()`.
- Add `$statbonuses->GetExtraXTargets()`.
- Add `$statbonuses->GetExtraAttackChance()`.
- Add `$statbonuses->GetFactionModifierPercent()`.
- Add `$statbonuses->GetFearless()`.
- Add `$statbonuses->GetFeignedCastOnChance()`.
- Add `$statbonuses->GetFinishingBlow(slot)`.
- Add `$statbonuses->GetFinishingBlowLevel(slot)`.
- Add `$statbonuses->GetFlurryChance()`.
- Add `$statbonuses->GetFocusEffects(slot)`.
- Add `$statbonuses->GetFocusEffectsWorn(slot)`.
- Add `$statbonuses->GetForageAdditionalItems()`.
- Add `$statbonuses->GetFR()`.
- Add `$statbonuses->GetFRCapModifier()`.
- Add `$statbonuses->GetFrenziedDevastation()`.
- Add `$statbonuses->GetFrontalBackstabChance()`.
- Add `$statbonuses->GetFrontalBackstabMinimumDamage()`.
- Add `$statbonuses->GetFrontalStunResist()`.
- Add `$statbonuses->GetGiveDoubleAttack()`.
- Add `$statbonuses->GetGiveDoubleRiposte(slot)`.
- Add `$statbonuses->GetGivePetGroupTarget()`.
- Add `$statbonuses->GetGravityEffect()`.
- Add `$statbonuses->GetHaste()`.
- Add `$statbonuses->GetHasteType2()`.
- Add `$statbonuses->GetHasteType3()`.
- Add `$statbonuses->GetHateModifier()`.
- Add `$statbonuses->GetHeadShot(slot)`.
- Add `$statbonuses->GetHeadShotLevel(slot)`.
- Add `$statbonuses->GetHealAmt()`.
- Add `$statbonuses->GetHealRate()`.
- Add `$statbonuses->GetHeroicAGI()`.
- Add `$statbonuses->GetHeroicCHA()`.
- Add `$statbonuses->GetHeroicCorrup()`.
- Add `$statbonuses->GetHeroicCR()`.
- Add `$statbonuses->GetHeroicDEX()`.
- Add `$statbonuses->GetHeroicDR()`.
- Add `$statbonuses->GetHeroicFR()`.
- Add `$statbonuses->GetHeroicINT()`.
- Add `$statbonuses->GetHeroicMR()`.
- Add `$statbonuses->GetHeroicPR()`.
- Add `$statbonuses->GetHeroicSTA()`.
- Add `$statbonuses->GetHeroicSTR()`.
- Add `$statbonuses->GetHeroicWIS()`.
- Add `$statbonuses->GetHitChance()`.
- Add `$statbonuses->GetHitChanceEffect(slot)`.
- Add `$statbonuses->GetHP()`.
- Add `$statbonuses->GetHPPercentCap(slot)`.
- Add `$statbonuses->GetHPRegen()`.
- Add `$statbonuses->GetHPToManaConvert()`.
- Add `$statbonuses->GetHundredHands()`.
- Add `$statbonuses->GetIllusionPersistence()`.
- Add `$statbonuses->GetImmuneToFlee()`.
- Add `$statbonuses->GetImprovedReclaimEnergy()`.
- Add `$statbonuses->GetImprovedTauntslot()`.
- Add `$statbonuses->GetIncreaseBlockChance()`.
- Add `$statbonuses->GetIncreaseChanceMemoryWipe()`.
- Add `$statbonuses->GetIncreaseRunSpeedCap()`.
- Add `$statbonuses->GetInhibitMelee()`.
- Add `$statbonuses->GetINT()`.
- Add `$statbonuses->GetINTCapModifier()`.
- Add `$statbonuses->GetIsBlind()`.
- Add `$statbonuses->GetIsFeared()`.
- Add `$statbonuses->GetItemATKCap()`.
- Add `$statbonuses->GetItemHPRegenCap()`.
- Add `$statbonuses->GetItemManaRegenCap()`.
- Add `$statbonuses->GetLimitToSkill(slot)`.
- Add `$statbonuses->GetMagicWeapon()`.
- Add `$statbonuses->GetMana()`.
- Add `$statbonuses->GetManaAbsorbPercentDamage(slot)`.
- Add `$statbonuses->GetManaPercentCap(slot)`.
- Add `$statbonuses->GetManaRegen()`.
- Add `$statbonuses->GetMasteryOfPast()`.
- Add `$statbonuses->GetMaxBindWound()`.
- Add `$statbonuses->GetMaxHP()`.
- Add `$statbonuses->GetMaxHPChange()`.
- Add `$statbonuses->GetMeleeLifetap()`.
- Add `$statbonuses->GetMeleeMitigation()`.
- Add `$statbonuses->GetMeleeMitigationEffect()`.
- Add `$statbonuses->GetMeleeRune(slot)`.
- Add `$statbonuses->GetMeleeSkillCheck()`.
- Add `$statbonuses->GetMeleeSkillCheckSkill()`.
- Add `$statbonuses->GetMeleeThresholdGuard(slot)`.
- Add `$statbonuses->GetMetabolism()`.
- Add `$statbonuses->GetMinimumDamageModifier(slot)`.
- Add `$statbonuses->GetMitigateDOTRune(slot)`.
- Add `$statbonuses->GetMitigateMeleeRune(slot)`.
- Add `$statbonuses->GetMitigateSpellRune(slot)`.
- Add `$statbonuses->GetMovementSpeed()`.
- Add `$statbonuses->GetMR()`.
- Add `$statbonuses->GetMRCapModifier()`.
- Add `$statbonuses->GetNegateAttacks(slot)`.
- Add `$statbonuses->GetNegateEffects()`.
- Add `$statbonuses->GetNegateIfCombat()`.
- Add `$statbonuses->GetNoBreakAESneak()`.
- Add `$statbonuses->GetOffhandRiposteFail()`.
- Add `$statbonuses->GetPackrat()`.
- Add `$statbonuses->GetParryChance()`.
- Add `$statbonuses->GetPCPetFlurry(slot)`.
- Add `$statbonuses->GetPCPetRampage(slot)`.
- Add `$statbonuses->GetPercussionModifier()`.
- Add `$statbonuses->GetPersistentCasting()`.
- Add `$statbonuses->GetPetAvoidance()`.
- Add `$statbonuses->GetPetCriticalHit()`.
- Add `$statbonuses->GetPetFlurry()`.
- Add `$statbonuses->GetPetMaxHP()`.
- Add `$statbonuses->GetPetMeleeMitigation()`.
- Add `$statbonuses->GetPR()`.
- Add `$statbonuses->GetPRCapModifier()`.
- Add `$statbonuses->GetProcChance()`.
- Add `$statbonuses->GetProcChanceSPA()`.
- Add `$statbonuses->GetRaiseSkillCap(slot)`.
- Add `$statbonuses->GetReduceFallDamage()`.
- Add `$statbonuses->GetReduceTradeskillFail(slot)`.
- Add `$statbonuses->GetReflectChance()`.
- Add `$statbonuses->GetResistFearChance()`.
- Add `$statbonuses->GetResistSpellChance()`.
- Add `$statbonuses->GetReverseDamageShield()`.
- Add `$statbonuses->GetReverseDamageShieldSpellID()`.
- Add `$statbonuses->GetReverseDamageShieldType()`.
- Add `$statbonuses->GetRiposteChance()`.
- Add `$statbonuses->GetRoot(slot)`.
- Add `$statbonuses->GetRootBreakChance()`.
- Add `$statbonuses->GetSalvageChance()`.
- Add `$statbonuses->GetSanctuary()`.
- Add `$statbonuses->GetScreech()`.
- Add `$statbonuses->GetSecondaryDamageIncrease()`.
- Add `$statbonuses->GetSeeInvis()`.
- Add `$statbonuses->GetSEResist(slot)`.
- Add `$statbonuses->GetShieldBlock()`.
- Add `$statbonuses->GetShieldEquipDamageModifier()`.
- Add `$statbonuses->GetShroudOfStealth()`.
- Add `$statbonuses->GetSingingModifier()`.
- Add `$statbonuses->GetSkillAttackProc(slot)`.
- Add `$statbonuses->GetSkillDamageAmount(slot)`.
- Add `$statbonuses->GetSkillDamageAmount2(slot)`.
- Add `$statbonuses->GetSkillDamageTaken(slot)`.
- Add `$statbonuses->GetSkillModifier(slot)`.
- Add `$statbonuses->GetSkillModifierMax(slot)`.
- Add `$statbonuses->GetSkillProc(slot)`.
- Add `$statbonuses->GetSkillProcSuccess(slot)`.
- Add `$statbonuses->GetSkillReuseTime(slot)`.
- Add `$statbonuses->GetSlayUndead(slot)`.
- Add `$statbonuses->GetSongModifierCap()`.
- Add `$statbonuses->GetSongRange()`.
- Add `$statbonuses->GetSpellCriticalDamageIncreaseNOStack()`.
- Add `$statbonuses->GetSpellCriticalDamageIncrease()`.
- Add `$statbonuses->GetSpellDamageShield()`.
- Add `$statbonuses->GetSpellDamage()`.
- Add `$statbonuses->GetSpellOnDeath(slot)`.
- Add `$statbonuses->GetSpellOnKill(slot)`.
- Add `$statbonuses->GetSpellProcChance()`.
- Add `$statbonuses->GetSpellShield()`.
- Add `$statbonuses->GetSpellThresholdGuard(slot)`.
- Add `$statbonuses->GetSpellTriggers(slot)`.
- Add `$statbonuses->GetSTA()`.
- Add `$statbonuses->GetSTACapModifier()`.
- Add `$statbonuses->GetSTR()`.
- Add `$statbonuses->GetSTRCapModifier()`.
- Add `$statbonuses->GetStrikeThrough()`.
- Add `$statbonuses->GetStringedModifier()`.
- Add `$statbonuses->GetStunBashChance()`.
- Add `$statbonuses->GetStunResist()`.
- Add `$statbonuses->GetTradeSkillMastery()`.
- Add `$statbonuses->GetTriggerMeleeThreshold()`.
- Add `$statbonuses->GetTriggerOnValueAmount()`.
- Add `$statbonuses->GetTriggerSpellThreshold()`.
- Add `$statbonuses->GetTripleAttackChance()`.
- Add `$statbonuses->GetTripleBackstab()`.
- Add `$statbonuses->GetTwoHandBluntBlock()`.
- Add `$statbonuses->GetUnfailingDivinity()`.
- Add `$statbonuses->GetVampirism()`.
- Add `$statbonuses->GetVoiceGraft()`.
- Add `$statbonuses->GetWindModifier()`.
- Add `$statbonuses->GetWIS()`.
- Add `$statbonuses->GetWISCapModifier()`.
- Add `$statbonuses->GetXPRateModifier()`.

# Notes
- Adds methods to get mob's stat bonuses to Mob methods.
- Adds support for stat bonuses class to Perl similar to Lua.

* Update perl_stat_bonuses.cpp

* Update perl_stat_bonuses.cpp
2023-07-02 10:26:46 -04:00
Alex King
a13fa07e68
[Quest API] Add Spawn2 Class to Perl (#3456)
# Perl
- Add `$spawn->Depop()`.
- Add `$spawn->Disable()`.
- Add `$spawn->Enable()`.
- Add `$spawn->ForceDespawn()`.
- Add `$spawn->GetCurrentNPCID()`.
- Add `$spawn->GetHeading()`.
- Add `$spawn->GetID()`.
- Add `$spawn->GetKillCount()`.
- Add `$spawn->GetRespawnTimer()`.
- Add `$spawn->GetSpawnCondition()`.
- Add `$spawn->GetSpawnGroupID()`.
- Add `$spawn->GetVariance()`.
- Add `$spawn->GetX()`.
- Add `$spawn->GetY()`.
- Add `$spawn->GetZ()`.
- Add `$spawn->IsEnabled()`.
- Add `$spawn->IsNPCPointerValid()`.
- Add `$spawn->LoadGrid()`.
- Add `$spawn->Repop()`.
- Add `$spawn->Repop(delay)`.
- Add `$spawn->Reset()`.
- Add `$spawn->SetCurrentNPCID(npc_id)`.
- Add `$spawn->SetNPCPointer(npc_pointer)`.
- Add `$spawn->SetRespawnTimer(new_respawn_time)`.
- Add `$spawn->SetTimer(duration)`.
- Add `$spawn->SetVariance(variance)`.

# Notes
- Adds support for Spawn2 class to Perl.
2023-07-02 10:26:32 -04:00
Alex King
20bed20f47
[Cleanup] Delete message.h (#3348)
# Notes
- This is unsued.
2023-05-17 09:00:38 -04:00
Alex King
a7e95d7818
[Cleanup] Delete embxs.cpp/embxs.h (#3284)
* [Cleanup] Delete embxs.cpp/embxs.h

# Notes
- These files and the one method in them are unused.

* Update embperl.cpp
2023-04-14 19:40:51 -04:00
Mitch Freeman
45da8cab61
[Bots] Add Basic Bot Raiding Functionality (#2782)
* Fix for GENERIC_9_STRINGS

* Add Bot Heal Message Display

Creates a new rule to display Bot heal messages to the Bot Owner

* 2021-03-25 11L04pm

Spell and Heal Rule added to allow for Bot spell and heal damage to be sent to the Bot Owner's Group.  Also added a check to remove duplicate message for #damage on self.

* Update .gitignore

* BOT work

Added BOT logging damage/heals to owner
Added BOT message to owner for harmony fails
Made var Critical global to remove duplicate crit messages
Added a NULL check to Mob:GetCleanname()

* Bot Group Work

Fixed botid=charid spawn on zone issue
Added a group_list update on zone to refresh from database to fix a dangling pointer to a Bot object that was camped but was previously in a group within the zone being entered.
Modified Bot::ProcessBotGroupInvite to use the client of the bot when doing the Bot initialization so that a leader can invite another owner's Bot

* Jan 4

Basic structure in place for Raid::AddBot though not working

* Basement Jan 5

* End of day Jan 5
Working Raid Invite to a Bot.

* Update to Client::QueuePacket to not attempt to send a packet to a BoT.  Not clean, but a broad solution.

* Updated Raid::VerifyRaid

* Some Bot Raid working

* Before VS Crash

* Use Case 1, 2, 3,4,7 working.
Need to fix 5, 6, 8

* Work on usecase 5

* A few more use cases working

* New work on Raid invite with a invitor having a group

* Bot Raid inviting working for all use cases

* A few changes

* end of day jan 10

* Jan 11

* end of day Jan 11

* Bot Invite/Accept cleanup

* Start of moving raid bot functions to their own methods

* More bot raid changes

* More raid spell work

* end of day Jan 16

* spawn work

* Spawn on login working

* End of Day Jan 18

* Raid leader and mana/hp updates fixed

* Spell Tracking

* Issue with Bot Death in raid when casted upon.  1741 raid.cpp

* Bot Death fixed and few other crashes

* Working on botgroup removal

* Bot Disbanding Work 90%

* Looks like BOTs are working

* Fixed a bot crash

* bug tracing on entity list mismatch

* safe_delete resoves problem.  No to track down leak

* seems to be working

* Memory corruption found - sending packets to BoTs using Client class

* added Raid::IsRaidMemberBot()

* Update p_raid_instance

* g3

* Final - Bot Raid Working

* Fixed IsRaidMemberBot to remove memory leak
Fixed altcombat crash though RaidMainAssist (428) needs fixing

* add RaidMember.IsBot

* Repaired IsBot function to be more preformant.  Now works on standard performance machine

* Fixed Bard AE Target Spells
Removed assert for buffs

* updated based on Feb 2022 master updates

* Added bot_db_updates and version increment

* Cleanup of bot raid work and inclusion of bot_raid in cmake

* Delete .gitignore

* Revert "Delete .gitignore"

This reverts commit 8523658d3bacdc068bcafaa652d2100afecddfc2.

* Fixed a packet issue

* Merged upstream/master

Merged upstream/master and removed ifdef BOTS as per recent dev approach for BOTS.  Functionality is there, compiles and tests ok.  A few problems to be resolved though this is a good baseline.

* Added sql update for raid_members to add isbot

* Updated Bot Follow Function

Bot will now follow the Group Leader if IsClient, otherwise follows the Bot Owner

* Updates to Bot Raid System

When camping a client, remove them from the raid.  If they are leader, place leadership to the next client.
Update a few crash checks in bot_raid.cpp

* [BOTS] Added RuleB Enabled checks and updated base repo for raid_members

Updated several RuleB(Bots, Enabled) checks
Updated the base repo to be autogenerated.
Raid functionality should work with a non-bots enabled database.

* Few quick updates

* Updates

Corrected a number of comments.  Compiled and tested against bot and non-bot database though requires the isbot column in raid_members for both.
Moved the db update out of the bot stream to make bot check code easier.

* Formatting and other small updates

* A few more RuleB(Bots, Enabled) additions

* Fix issue with conflict of bot ID versus character ID.

* Delete CMakeSettings.json

* Comment Updates and other

Several updates including
- fixed comments from PR
- added id to raid_members and unique index on name to avoid botid and charid conflicts
- updated a few raid functions for iterators
- reordered several raid operations to ensure send leader packet to be the last item to ensure proper updating on the client
- update sql to use Replace instead of Insert for botid conflicting with charid

* Exploit fix for Raid Bots

Added item from @Nite to disallow spawning or camping bots if Raid is engaged.  Avoids abusive situations.

* Initial Commit

* fix Raid Window after zoning

The raid window was not fully updating for clients not in the zone.

* Cleanup

* Update

Fixed comments

* Resolve crash for MOTD

Fixed a crash situation sending a raid MOTD to BOTS.

* Update ruletypes.h

* Updated to resolve a few recent comments

Fixed some comments within attack.cpp

* fix sql query

* update repository

* prevent duplicate entries in raid after group invite, and cleanup

* fixes for botgroups not following, and add already in raid messages.

* fix messagestring

* fixes

* Cleanup, and resolving issues with disbanding

* refactoring

* more cleanup/fixing.

* fixes for removing from ground in raid

* Refactoring/fixing multiple clients

* fix for compiling

* Bugs from refactoring fixed

* Testing completed, cleaning up unwanted items/duplicate code.

* Cleaned up AICastSpell

* fix typos

* Refactoring

* Adding Raid checks to AI_Process/cleanup

* Fix a typo

Was getting a SQL error on BOT spawn.  Fixed typo.

* fix for crash

* Fixed crash when inviting player, more refactoring

* AI_Process Refactoring work

* More Refactoring/fixes for follow

* Finish Refactoring AI_Process

* cleanup

* cleanup

* cleanup

* cleanup

* fix melee attack loop

* fix for leashowner.

* fix for leashowner.

* Bots persist in raid after client death/LD/Camp

* Fix Bot Groups when zoning after death.

* Fix Bots in group following after client death

* remove unnecessary query

* Allow Raid members to invite Bots if owner is in raid. cleanup

* optimization of raid verification

* remove this

* Code Cleanup

* formatting

* formatting

* formatting

* fix for macro

* add return for TryClassAttacks

* fix query

* fix for crash

* restrict camping/spawn in combat.

* Fix other crash issue.

* update learnmembers to use Strings::To, cleanup magic numbers

* fix for merge.

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
Co-authored-by: Aeadoin <109764533+Aeadoin@users.noreply.github.com>
2023-03-17 11:19:59 -04:00
Alex King
c0055cf357
[Cleanup] Remove npc_ai.cpp/npc_ai.cpp (#3081)
# Notes
- These files were unused.
2023-03-16 21:17:23 -04:00
Alex King
774a7fa779
[Cleanup] Delete unused zone/skills.h (#3007)
# Notes
- This is unused.
2023-02-26 21:35:49 -05:00
Alex King
85f7b10f90
[Cleanup] Remove Unused Mod Hooks (#2856)
- Removes old `mod_` hooks that have gone unused for years in favor of Lua mods.
2023-02-13 00:24:23 -06:00
Alex King
f8afadf0a9
[Cleanup] Remove unused basic_functions.h (#2729)
# Notes
- This file is unused and not included in any other files.
2023-01-13 04:52:32 -06:00
Alex King
9c23882d67
[Cleanup] Remove unused maxskill.h. (#2728)
# Notes
- This file is unused, noticed it when looking through source. Nothing calls this method or includes this file.
2023-01-13 04:52:08 -06:00
Chris Miles
c236c57a2c
[C++20] Enable C++20 + Fixes + FMT 9.1 (#2664)
* [CPP] Enable and build compliance with cpp20

* Windows build fix

* bump fmt version

* Updated fmt to 9.1, updated cmake minimum and verified preprocessor stuff works.

* Missing :

* Fix warning: top-level comma expression in array subscript is deprecated

* Fix warning: top-level comma expression in array subscript is deprecated

Co-authored-by: KimLS <KimLS@peqtgc.com>
2022-12-20 21:52:36 -06:00
Kinglykrab
7ea77ee027
[Bots] Add Quest API Support for Limits. (#2522)
* [Bots] Add Quest API Support for Limits.

# Perl
- Add `$client->GetBotCreationLimit()` to Perl.
- Add `$client->GetBotCreationLimit(class_id)` to Perl.
- Add `$client->GetBotRequiredLevel()` to Perl.
- Add `$client->GetBotRequiredLevel(class_id)` to Perl.
- Add `$client->GetBotSpawnLimit()` to Perl.
- Add `$client->GetBotSpawnLimit(class_id)` to Perl.
- Add `$client->SetBotCreationLimit(creation_limit)` to Perl.
- Add `$client->SetBotCreationLimit(creation_limit, class_id)` to Perl.
- Add `$client->SetBotRequiredLevel(required_level)` to Perl.
- Add `$client->SetBotRequiredLevel(required_level, class_id)` to Perl.
- Add `$client->SetBotSpawnLimit(spawn_limit)` to Perl.
- Add `$client->SetBotSpawnLimit(spawn_limit, class_id)` to Perl.
- Add `$entity_list->GetBotListByCharacterID(character_id, class_id)` to Perl.

# Lua
- Add `client:GetBotCreationLimit()` to Lua.
- Add `client:GetBotCreationLimit(class_id)` to Lua.
- Add `client:GetBotRequiredLevel()` to Lua.
- Add `client:GetBotRequiredLevel(class_id)` to Lua.
- Add `client:GetBotSpawnLimit()` to Lua.
- Add `client:GetBotSpawnLimit(class_id)` to Lua.
- Add `client:SetBotCreationLimit(creation_limit)` to Lua.
- Add `client:SetBotCreationLimit(creation_limit, class_id)` to Lua.
- Add `client:SetBotRequiredLevel(required_level)` to Lua.
- Add `client:SetBotRequiredLevel(required_level, class_id)` to Lua.
- Add `client:SetBotSpawnLimit(spawn_limit)` to Lua.
- Add `client:SetBotSpawnLimit(spawn_limit, class_id)` to Lua.
- Add `entity_list:GetBotListByCharacterID(character_id, class_id)` to Lua.

# Notes
- Allows operators to set creation and spawn limits based on class, as well as required level.
- Using the class-inspecific methods sets the global limit or required level.
- Global limits are checked prior to class-specific limits and if they are not met, creation or spawn is disallowed.
- Modified preexisting Quest API to make use of this new stuff under the hood.

* Update bot_command.cpp

* Add client bot file.
2022-11-16 19:51:13 -05:00
hg
e883703b2f
[Tasks] Schema simplification (#2449)
* Combine task_activity item and npc fields

This will make tooling easier.

While denormalizing goallists may not be ideal, it decouples tasks from
rewards which share the table and removes a redundant column in favor
of a using the delimited string which better matches live packet data.

* [Tasks] Deprecate goallists table, migrate reward goal lists, simplify logic

* Update 2022_09_25_task_concat_matchlists.sql

* Update 2022_09_25_task_concat_matchlists.sql

* Tweaks

* Fix reward column name in conversion script

* Task reward stacking

* Update task_client_state.cpp

* Implement stack counts

* Fix reward item instance memory leak

* Validate reward item instance

* Fix item reward message

* Fix findtask

Co-authored-by: Akkadius <akkadius1@gmail.com>
2022-09-28 02:31:05 -05:00
hg
7482cfc066
[Tasks] Replace task goals with explicit fields (#2402)
The task goal system made implementing tasks a little confusing since
the goal could be ambiguous depending on type. This also didn't support
filtering on multiple goals (e.g. looting items from matching npc names
inside an area). Deliver types could specify an npc id in `delivertonpc`
but the database may have multiple npcs with the same name or a task
might want to match partial npc names.

This replaces goalids with explicit fields for npcs, items, proximity
areas, and touch switch ids. These changes make managing task data
easier without needing to update multiple tables and allows filtering
task updates by multiple criteria. To mitigate any performance impact
from merging task proximities, only clients with explore tasks in the
current zone are checked during client movement updates.

Items and npcs still support goallists but it would be possible to
denormalize entries into delimited strings to combine with the match
lists. This would also decouple task goals from reward lists.

The client task update functions were refactored to run through a single
filtering function which significantly reduces duplicated code from the
legacy task system. This will also make it easier to later implement
any unhandled types.

Since the new fields will handle filtering single entries and lists
based on having values set, `goalmethod` now only distinguishes quest
controlled from source controlled.

This is a breaking api change, `taskexploredarea` has been removed
since explore ids no longer exist.
2022-09-01 19:18:21 -05:00
Chris Miles
89fdd842e1
[Code Cleanup] Zone Data Loading Refactor (#2388)
* [Code Cleanup] Zone data loading refactor

* Update client_packet.cpp

* strcpy adjustments

* Ensure safe points get reloaded properly

* Simplify GetPEQZone and getZoneShutDownDelay

* Bring in zone_store where needed

* Update client.cpp

* Signature

* Signature

* Convert helpers to using pointers

* PR comment

* Update worlddb.cpp

* Fix loading for instances

* Fix zoning with fallback as well

* Another place for instance fallback
2022-09-01 18:48:28 -05:00
Kinglykrab
d59dcb68ca
[Commands] Add additional #peqzone functionality. (#2085)
* [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.
2022-05-01 19:39:52 -04:00
Chris Miles
c7dbdfae58
[Combat] Basic Combat Recording (#2090)
* Basic combat recording

* Update combat_record.h
2022-05-01 18:08:12 -05:00
Chris Miles
71ae03d5bc
[Compile] Decrease build times using unity build strategy (#2089) 2022-05-01 15:53:21 -05:00
Paul Coene
2a5ddde78a
[Feature] Client Checksum Verification (Resubmit old 1678) (#1922)
* [Feature] Client Checksum Verification (Resubmit old 1678)

* Updated db version

* Add new updatechecksum to CmakeLists.txt

* Removed magic number and used constant

* Fix new command to have access to worldserver

* spacing, more venbose desc and remove unneeded check

* Cleanup, refactoring

Co-authored-by: Akkadius <akkadius1@gmail.com>
2022-03-06 20:26:29 -06:00
KimLS
dd6cde68bb Small change to order of a couple of files in zone cmakefile, added the gm commands to their own source group so they are cleanly separated in any IDEs cmake supports 2022-02-12 23:31:51 -08:00
Chris Miles
9815f50efa
[Expansion] Content Filtering Adjustments (#1910)
* Change default expansion values for ALL to -1 from 0

* Adjust content_filter_criteria

* Refactor content filtering logic

* Allow flag strings to also just be empty instead of null

* Formatting

* Editor oops
2022-01-02 20:52:29 -06:00
KayenEQ
8de410ebb7
[Features] Appearance Effects will now be sent to clients upon zone in. GM commands. (#1874)
* start

* working

* Update perl_mob.cpp

* updates

* Update perl_mob.cpp

* illusion behavior

* rework start

* fix later

* Update mob.cpp

* rework

* updates

* Update mob.cpp

* update

* gm command updates

* updates

* Update CMakeLists.txt

* [Features] Appearance Effects will now be sent to clients upon zone in. GM commands.

remove debugs

* [Features] Appearance Effects will now be sent to clients upon zone in. GM commands.

perl fix

* [Features] Appearance Effects will now be sent to clients upon zone in. GM commands.

space fix

* [Features] Appearance Effects will now be sent to clients upon zone in. GM commands.

minor fix

* Update CMakeLists.txt

* [Features] Appearance Effects will now be sent to clients upon zone in. GM commands.

cleaned up some inconsistency

* [Features] Appearance Effects will now be sent to clients upon zone in. GM commands.
2021-12-10 13:46:23 -05:00
Kinglykrab
294e51fca7
[Commands] Add #setaltcurrency Command. (#1850)
* [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.
2021-12-08 18:58:06 -05:00
Kinglykrab
94166e0f95
[Commands] Add #unmemspell and #unmemspells Commands. (#1867)
- 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.
2021-12-08 18:18:14 -05:00
Kinglykrab
7cac2e2bc3
[Commands] Add #viewcurrencies Command. (#1844)
* [Commands] Add #viewcurrencies Command.
- Add #viewcurrencies command to view your or your target's currencies (Money, Crystals, Alternate Currency, LDoN, and PVP).
- Add GetLDoNThemeName() helper method.

* Update viewcurrencies.cpp

* Cleanup name of map method.

* Cleanup.
2021-11-28 00:09:07 -05:00
Kinglykrab
2be1321aa9
[Commands] Add #removeitem Command. (#1847)
- Add #removeitem [Item ID] [Amount] command to remove items by amount versus nuking them all, removes all if amount is greater than what you or your target have.
2021-11-27 21:41:54 -05:00
Kinglykrab
d28f902ecc
[Commands] Add #countitem Command. (#1842)
* [Commands] Add #countitem Command.
- Add #countitem [Item ID] command to count an item by ID on yourself or your player/NPC target.

* Cleanup.
2021-11-27 20:52:09 -05:00
Kinglykrab
225497337c
[Commands] Add #setendurance Command. (#1841)
- Add #setendurance [Endurance] command to set an NPC or player's endurance to a specified amount, or to max if the amount is greater than their max.
- Cleanup #endurance command message and logic.
2021-11-27 19:08:07 -05:00
Kinglykrab
a5348e207b
[Commands] Add #sethp Command. (#1840)
- Add #sethp [Health] command to set an NPC or player's health to a specified amount, or to max if the amount is greater than their max.
- Cleanup #heal command message and logic.
2021-11-27 19:08:00 -05:00
Kinglykrab
c4c5256438
[Commands] Add #setmana Command. (#1839)
* [Commands] Add #setmana Command.
- Add #setmana [Mana] command to set an NPC or player's mana to a specified amount, or to max if the amount is greater than their max.
- Cleanup #mana command message and logic.

* Update mana.cpp
2021-11-27 19:07:47 -05:00
Kinglykrab
e474b2a280
[Commands] Add #petitems Command. (#1823)
- Add #petitems command to show a person's pet items if they have access to the command.
- Adds a default false parameter to QueryLoot for NPCs that keeps messages and logic from being ran on pets for no reason.
- Cleaned up message a bit for loot and stuff.
- Remove check for loottable ID when using #npcstats for NPCs that get items from a script or otherwise.
2021-11-25 14:50:05 -05:00
Kinglykrab
8d3a179ecc
[Commands] Remove #zuwcoords Command. (#1810)
- Remove duplicate command of #zunderworld
2021-11-23 06:03:09 -05:00
Kinglykrab
1935ea60d0
[Commands] Remove #zonespawn Command. (#1811)
* [Commands] Remove #zonespawn Command.
- Remove unimplemented command.

* Remove from CMakeLists.txt.

* Fix.
2021-11-23 05:48:39 -05:00
Chris Miles
0550fcfd3f
[GM Commands] Split GM Commands Into Separate Files (#1766)
* Split GM commands into their own files

* Code cleanup
2021-11-14 22:48:47 -06:00
Kinglykrab
17aaab1f9d
[Quest API] Add Spell methods to Perl. (#1631)
* [Quest API] Add Spell methods to Perl.
- Add quest::getspell(spell_id) to Perl.
- Add eq.get_spell(spell_id) to Lua.
These methods return a spell object.

Exports $spell object references to spell events.

* Formatting.

* Remove comment.

* Update spdat.cpp

* Amplication typo.

* Fix conflicts.

* Remove repository changes.

* Fix typing.

* Update spell_effects.cpp
2021-11-03 17:47:15 -04:00