mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-01 11:36:36 +00:00
[Quest API] Modify GetItemStat() and GetSpellStat() functionality. (#1509)
- Added quest::getitemstat(item_id, stat_identifier) to Perl. - Added quest::getspellstat(spell_id, stat_identifier, slot) to Perl. - Added eq.get_item_stat(item_id, stat_identifier) to Lua. - Added eq.get_spell_stat(spell_id, stat_identifier, slot) to Lua. Wasn't sure where to put the GetItemStatValue() method so I put it in inventory profile, I can move it wherever is preferred. These additions will allow people to grab item and spell stat values in plugins without needing a mob object.
This commit is contained in:
@@ -4646,4 +4646,12 @@ std::string QuestManager::getinventoryslotname(int16 slot_id) {
|
||||
return EQ::invslot::GetInvPossessionsSlotName(slot_id);
|
||||
}
|
||||
|
||||
int QuestManager::getitemstat(uint32 item_id, std::string stat_identifier) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
return EQ::InventoryProfile::GetItemStatValue(item_id, stat_identifier.c_str());
|
||||
}
|
||||
|
||||
int QuestManager::getspellstat(uint32 spell_id, std::string stat_identifier, uint8 slot) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
return GetSpellStatValue(spell_id, stat_identifier.c_str(), slot);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user