From c4825cdb4300391cb84963abdc63c3e9f35df9fb Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 16 Apr 2012 20:20:18 +0200 Subject: [PATCH] fixed gold pickup sound for international MW versions, fix npc tooltip --- apps/openmw/mwclass/misc.cpp | 5 +++-- apps/openmw/mwgui/tooltips.cpp | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwclass/misc.cpp b/apps/openmw/mwclass/misc.cpp index 84099caaaf..5963440423 100644 --- a/apps/openmw/mwclass/misc.cpp +++ b/apps/openmw/mwclass/misc.cpp @@ -7,6 +7,7 @@ #include "../mwworld/ptr.hpp" #include "../mwworld/actiontake.hpp" +#include "../mwworld/world.hpp" #include "../mwworld/environment.hpp" #include "../mwrender/objects.hpp" @@ -90,7 +91,7 @@ namespace MWClass ESMS::LiveCellRef *ref = ptr.get(); - if (ref->base->name =="Gold") + if (ref->base->name == environment.mWorld->getStore().gameSettings.search("sGold")->str) { return std::string("Item Gold Up"); } @@ -102,7 +103,7 @@ namespace MWClass ESMS::LiveCellRef *ref = ptr.get(); - if (ref->base->name =="Gold") + if (ref->base->name == environment.mWorld->getStore().gameSettings.search("sGold")->str) { return std::string("Item Gold Down"); } diff --git a/apps/openmw/mwgui/tooltips.cpp b/apps/openmw/mwgui/tooltips.cpp index 25361ffcc6..ce31741689 100644 --- a/apps/openmw/mwgui/tooltips.cpp +++ b/apps/openmw/mwgui/tooltips.cpp @@ -158,7 +158,12 @@ IntSize ToolTips::getToolTipViaPtr () /// \todo We don't want tooltips for NPCs in combat mode. ESMS::LiveCellRef* ref = mFocusObject.get(); - tooltipSize = createToolTip(ref->base->name, ""); + std::string text; + if (mFullHelp) { + text += "\n Script: " + ref->base->script; + } + + tooltipSize = createToolTip(ref->base->name, text); } // -------------------- Creature ------------------------------- @@ -167,7 +172,12 @@ IntSize ToolTips::getToolTipViaPtr () /// \todo We don't want tooltips for Creatures in combat mode. ESMS::LiveCellRef* ref = mFocusObject.get(); - tooltipSize = createToolTip(ref->base->name, ""); + std::string text; + if (mFullHelp) { + text += "\n Script: " + ref->base->script; + } + + tooltipSize = createToolTip(ref->base->name, text); } // -------------------- Container -------------------------------