From ea8ee11ff723ec3deb2392347144b98a6baa5a97 Mon Sep 17 00:00:00 2001 From: eduard Date: Thu, 6 Dec 2012 14:25:53 +0100 Subject: [PATCH] tradding skill use --- apps/openmw/mwgui/tradewindow.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/apps/openmw/mwgui/tradewindow.cpp b/apps/openmw/mwgui/tradewindow.cpp index bde8d9b84..945104537 100644 --- a/apps/openmw/mwgui/tradewindow.cpp +++ b/apps/openmw/mwgui/tradewindow.cpp @@ -241,13 +241,8 @@ namespace MWGui } //skill use! - MWWorld::LiveCellRef *ref = playerPtr.get(); - const ESM::Class *class_ = - MWBase::Environment::get().getWorld()->getStore().get().find ( - ref->mBase->mClass - ); - playerSkill.useSkill(ESM::Skill::Mercantile,*class_); - } + MWWorld::Class::get(playerPtr).skillUsageSucceeded(playerPtr, ESM::Skill::Mercantile, 0); + } int iBarterSuccessDisposition = gmst.find("iBarterSuccessDisposition")->getInt(); MWBase::Environment::get().getDialogueManager()->applyTemporaryDispositionChange(iBarterSuccessDisposition);