mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-26 16:50:15 +00:00
feat: show 'This Item Begins a Quest' on quest-starting item tooltips
Items with a startQuestId now display "This Item Begins a Quest" in gold text at the bottom of the tooltip, matching WoW's behavior. Helps players identify quest-starting drops in their inventory. Passes startsQuest flag through _GetItemTooltipData from the startQuestId field in ItemQueryResponseData.
This commit is contained in:
parent
b8c33c7d9b
commit
757fc857cd
1 changed files with 6 additions and 0 deletions
|
|
@ -2252,6 +2252,11 @@ static int lua_GetItemTooltipData(lua_State* L) {
|
|||
lua_pushnumber(L, info->itemSetId);
|
||||
lua_setfield(L, -2, "itemSetId");
|
||||
}
|
||||
// Quest-starting item
|
||||
if (info->startQuestId != 0) {
|
||||
lua_pushboolean(L, 1);
|
||||
lua_setfield(L, -2, "startsQuest");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -6277,6 +6282,7 @@ void LuaEngine::registerCoreAPI() {
|
|||
" end\n"
|
||||
" -- Flavor text\n"
|
||||
" if data.description then self:AddLine('\"'..data.description..'\"', 1, 0.82, 0) end\n"
|
||||
" if data.startsQuest then self:AddLine('This Item Begins a Quest', 1, 0.82, 0) end\n"
|
||||
" end\n"
|
||||
" -- Sell price from GetItemInfo\n"
|
||||
" if sellPrice and sellPrice > 0 then\n"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue