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
6a80bcecc7
[Quest API] Add missing Item Methods to Perl/Lua. ( #3464 )
...
# Perl
- Add `$questitem->AddEXP(exp)`.
- Add `$questitem->ClearTimers()`.
- Add `$questitem->Clone()`.
- Add `$questitem->DeleteCustomData(identifier)`.
- Add `$questitem->GetAugmentItemID(slot_id)`.
- Add `$questitem->GetAugmentType()`.
- Add `$questitem->GetColor()`.
- Add `$questitem->GetCustomData(identifier)`.
- Add `$questitem->GetCustomDataString()`.
- Add `$questitem->GetEXP()`.
- Add `$questitem->GetItem(slot_id)`.
- Add `$questitem->GetItemID(slot_id)`.
- Add `$questitem->GetItemScriptID()`.
- Add `$questitem->GetKillsNeeded()`.
- Add `$questitem->GetMaxEvolveLevel()`.
- Add `$questitem->GetPrice()`.
- Add `$questitem->GetTotalItemCount()`.
- Add `$questitem->IsAmmo()`.
- Add `$questitem->IsAugmentable()`.
- Add `$questitem->IsAugmented()`.
- Add `$questitem->IsEquipable(slot_id)`.
- Add `$questitem->IsEquipable(race_bitmask, class_bitmask)`.
- Add `$questitem->IsExpendable()`.
- Add `$questitem->IsInstanceNoDrop()`.
- Add `$questitem->IsWeapon()`.
- Add `$questitem->SetAttuned(is_attuned)`.
- Add `$questitem->SetColor(color)`.
- Add `$questitem->SetCustomData(identifier, bool_value)`.
- Add `$questitem->SetCustomData(identifier, float_value)`.
- Add `$questitem->SetCustomData(identifier, int_value)`.
- Add `$questitem->SetCustomData(identifier, string_value)`.
- Add `$questitem->SetEXP(exp)`.
- Add `$questitem->SetInstanceNoDrop(is_attuned)`.
- Add `$questitem->SetPrice(price)`.
- Add `$questitem->SetScaling(is_scaling)`.
- Add `$questitem->SetTimer(timer_name, timer)`.
- Add `$questitem->StopTimer(timer_name)`.
# Lua
- Add `iteminst:GetName()`.
- Add `iteminst:IsAttuned()`.
- Add `iteminst:ItemSay(text)`.
- Add `iteminst:ItemSay(text, language_id)`.
- Add `iteminst:SetAttuned(is_attuned)`.
# Notes
- Cleaned up return types and parameter types that were mismatched.
- Removed `SetItem` from Lua as it wasn't used.
- Removed unused parameter in `GetUnscaledItem` in Lua.
- I plan to add Perl ItemData support after this makes its way in, so the missing methods like the `GetItem` overload will be added then.
2023-07-02 10:27:05 -04:00
Alex King
5ba33b88bd
[Cleanup] Set GetAugmentType() to int again ( #3335 )
...
# Notes
- Augment type can be `-1` for all augment types.
2023-05-07 21:40:45 -04:00
Alex King
5475615448
[Bug Fix] #augmentitem bypasses augment restrictions ( #3332 )
...
* [Bug Fix] #augmentitem bypasses augment restrictions
# Notes
- `Object::HandleAugmentation` did not properly check for `augrestrict` values. This allowed augment restrictions to be bypassed with `#augmentitem` or anything else that uses this method.
- `Client::SummonItem` already properly checked these, so I just broke it out into a `Client::IsAugmentRestricted()` method.
* Update item_instance.h
2023-05-07 11:40:04 -04:00
Aeadoin
a4e006fbfb
[Bug Fix] Correct Forward Declaration compilation warning ( #3176 )
...
* [Bug Fix] Correct Forward Declaration compilation warning
* no need for include
2023-04-02 12:19:43 -04:00
Aeadoin
7f7ba2e6c2
[Cleanup] Remove unused Includes under zone files ( #3162 )
2023-04-01 22:55:28 -04:00
Alex
5a6314e1a9
[Fix] Fixes for corpses not properly saving some item instance data correctly. ( #3123 )
...
* Convert ZoneDb::LoadCharacterCorpseData to use a cleaner api that has a better layout.
* Update corpse save methods to use a new cleaner api.
* Add item to corpse will use a few new fields that don't yet save.
* Fix for some issues moving data to corpses.
* Make CreateItem more explicit to avoid overlooking places it's used and add more arguments.
* DB changes
* Revert of the changes to the database.CreateItem api change.
* Missed one.
* Fixes for mr Krab
* Small formatting
---------
Co-authored-by: KimLS <KimLS@peqtgc.com>
Co-authored-by: Akkadius <akkadius1@gmail.com>
2023-03-23 01:16:52 -05:00
hg
e01ac39887
[Quest API] Send delivered task items in trade events ( #2518 )
...
This restores sending items to EVENT_TRADE that are updated by source
controlled delivery tasks which was removed in 7cf96ca2d8.
That patch filtered out items consumed by task updates to fix a few bugs
with items being returned despite incrementing a task:
- If an npc without a quest trade event handler was the target of a
delivery task for a NoDrop/non-Quest item, the npc would auto return
it due to the `ReturnNonQuestNoDropItems` rule.
- If an npc without a quest trade event handler was the target of a
delivery task for a non-NoDrop item, the item would be added to the
npc's loot.
- If an npc with an EVENT_ITEM/EVENT_TRADE quest handler used the Lua
or Perl trade plugins, the plugins would return task items unless
specific checks for the turned in slots existed.
The quest plugin item returns are problematic for this since they just
summon to return items not handled by the script
e.g. For a task to deliver N Large Fruit Bat Wings (item id 19616),
if a player turned in 1 Wing in slot 1 and a stack of 20 Wings in slot
2, the task would be incremented 21 times and the following Lua trade
handler would return the stack of 20 from the 2nd trade slot:
```lua
function event_trade(e)
local item_lib = require("items")
if item_lib.check_turn_in(e.trade, { item1 = 19616 }) then
eq.debug("Lua consumed 1 slot and will return other slots")
end
item_lib.return_items(e.self, e.other, e.trade)
end
```
This also occured with the perl plugin though slightly differently
since that plugin returns all slots unless the exact handin slot count
matches (requiring check_handin conditions for all slots):
```perl
sub EVENT_ITEM {
if (plugin::check_handin(\%itemcount, 19616 => 1)) {
# No issue if only one slot used for trade (item not returned)
}
# Perl fails handin check if multiple slots not checked and returns all
plugin::return_items(\%itemcount);
}
```
While that patch solved the issue, it's inconvenient and wrong to not
receive items in trade events used in a source task update. It breaks
existing trade scripts for tasks that aren't quest controlled and it
forces tasks to be changed to quest controlled and manually updated to
script any extra behavior.
This patch stores the task update count on the item instance before
dispatching it to quests. The burden is now on quests and plugins to
use that value in order to prevent returning items consumed by tasks.
`ItemInstance::RemoveTaskDeliveredItems` has been added to simplify
handling this in plugins which is also used for non-quest item returns.
2022-11-06 17:10:30 -05:00
Kinglykrab
3a94132749
[Quest API] Add multiple augment related methods to Perl/Lua. ( #1930 )
...
* [Quest API] Add multiple augment related methods to Perl/Lua.
- Add $inventory->CountAugmentEquippedByID(item_id) to Perl.
- Add $inventory->HasAugmentEquippedByID(item_id) to Perl.
- Add $item->ContainsAugmentByID(item_id) to Perl.
- Add $item->CountAugmentByID(item_id) to Perl.
- Add inventory:CountAugmentEquippedByID(item_id) to Perl.
- Add inventory:HasAugmentEquippedByID(item_id) to Perl.
- Add item:ContainsAugmentByID(item_id) to Perl.
- Add item:CountAugmentByID(item_id) to Perl.
* Update inventory_profile.cpp
2022-01-16 18:04:51 -05:00
hg
3c87480553
[Quest API] Add back removed lua class properties ( #1742 )
...
Fixes regression from 7b6decae
2021-11-12 21:16:39 -05:00
Kinglykrab
7b6decaef3
[Quest API] Alphabetize Lua method exports. ( #1673 )
...
- Keeps things tidier.
- Removes unnecessary/outdated comments at the top of files.
2021-11-06 17:36:00 -04:00
KimLS
2fbd5aaccc
Rename namespace EQEmu to namespace EQ (so we don't have two similar but different namespaces anymore)
2020-05-17 18:36:06 -07:00
Uleat
8b5dd58e96
Renamed struct EQEmu::ItemBase to EQEmu::ItemData and class ItemInst to EQEmu::ItemInstance
2016-10-16 05:10:54 -04:00
Uleat
3031365e1f
Moved struct Item_Struct into namespace EQEmu
2016-05-21 04:54:18 -04:00
Trevius
200027bf89
(RoF+) Implemented the 6th Augment Slot for Items.
...
Player Corpses now saved attuned settings for Items.
Renamed IsInstNoDrop() and SetInstNoDrop() to IsAttuned() and SetAttuned() respectively.
2014-12-15 17:55:23 -06:00
Uleat
df47e17c8e
Changed ItemClass enumeration to ItemClassTypes enumeration
2013-10-27 06:38:34 -04:00
KimLS
bb1282de30
encounter events can now watch all events by all npcs/items/quests by registering themselves to watch -1, fix #74
2013-06-22 14:23:07 -07:00
KimLS
2529a7700e
Fix for luabind not compiling (jumbers), bunch of api upgrades for lua, changed where spells and items load quests from, removed some old code. etc etc.
2013-06-22 01:32:41 -07:00
KimLS
d8a1d84a49
Regression fixes, support for new lua arguments for many events
2013-06-19 22:56:46 -07:00
KimLS
a3738dc131
Changed EVENT_TRADE to pass iteminst instead of variable ids, perl will not have changed at all but lua now passes the iteminsts in the trade object. Also redid a bunch of the spell quest stuff
2013-06-05 16:47:49 -07:00
KimLS
d14608356d
Added all lua objects i need for now, a ton of API too
2013-06-02 00:15:26 -07:00
KimLS
79a9d2112a
Retransmit support added back in (stupid compile flags), prelim work on lua_client stuff, took out a few redundant or non-working functions
2013-05-25 01:08:30 -07:00
KimLS
ce63503bab
Changed a bunch of lua stuff, as well as modified a bunch of generic item quest stuff
2013-05-23 12:43:21 -07:00
KimLS
69bad31019
Cleanup of some lua code, initial work on encounter_quests
2013-05-19 12:13:44 -07:00
KimLS
7adcf6d3e5
Some quest item and spell work, took out that stupid multiquesting code -> use your brains that's completely doable entirely in quests even perl
2013-05-17 17:10:38 -07:00