mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
[Feature] Add Comment to Item Data/Quest API (#3669)
* [Feature] Add Comment to Item Data/Quest API # Perl - Add `quest::getitemcomment(item_id)`. - Add `quest::getitemlore(item_id)`. - Add `$questitemdata->GetComment()`. # Lua - Add `eq.get_item_comment(item_id)`. - Add `eq.get_item_lore(item_id)`. - Add `item:Comment()`. # Notes - Added the ability for operators to pull these fields from item data without a database hit. - Fixed a bug in `embparser_api.cpp` where `GetZoneGravity` was connected to the wrong methods. * Update embparser_api.cpp
This commit is contained in:
+22
-1
@@ -3198,8 +3198,29 @@ std::string QuestManager::varlink(
|
||||
|
||||
return linker.GenerateLink();
|
||||
}
|
||||
|
||||
std::string QuestManager::getitemcomment(uint32 item_id) {
|
||||
const auto* item_data = database.GetItem(item_id);
|
||||
if (!item_data) {
|
||||
return "INVALID ITEM ID IN GETITEMCOMMENT";
|
||||
}
|
||||
|
||||
std::string item_comment = item_data->Comment;
|
||||
return item_comment;
|
||||
}
|
||||
|
||||
std::string QuestManager::getitemlore(uint32 item_id) {
|
||||
const auto* item_data = database.GetItem(item_id);
|
||||
if (!item_data) {
|
||||
return "INVALID ITEM ID IN GETITEMLORE";
|
||||
}
|
||||
|
||||
std::string item_lore = item_data->Lore;
|
||||
return item_lore;
|
||||
}
|
||||
|
||||
std::string QuestManager::getitemname(uint32 item_id) {
|
||||
const EQ::ItemData* item_data = database.GetItem(item_id);
|
||||
const auto* item_data = database.GetItem(item_id);
|
||||
if (!item_data) {
|
||||
return "INVALID ITEM ID IN GETITEMNAME";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user