mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 13:06:43 +00:00
Set appropriate weapon icon when player is a werewolf
This commit is contained in:
parent
d054366460
commit
ddc92d1fbd
1 changed files with 9 additions and 1 deletions
|
@ -10,6 +10,7 @@
|
||||||
#include "../mwworld/class.hpp"
|
#include "../mwworld/class.hpp"
|
||||||
|
|
||||||
#include "../mwmechanics/creaturestats.hpp"
|
#include "../mwmechanics/creaturestats.hpp"
|
||||||
|
#include "../mwmechanics/npcstats.hpp"
|
||||||
|
|
||||||
#include "inventorywindow.hpp"
|
#include "inventorywindow.hpp"
|
||||||
#include "console.hpp"
|
#include "console.hpp"
|
||||||
|
@ -477,7 +478,14 @@ namespace MWGui
|
||||||
MyGUI::Gui::getInstance().destroyWidget(mWeapImage->getChildAt(0));
|
MyGUI::Gui::getInstance().destroyWidget(mWeapImage->getChildAt(0));
|
||||||
mWeapStatus->setProgressRange(100);
|
mWeapStatus->setProgressRange(100);
|
||||||
mWeapStatus->setProgressPosition(0);
|
mWeapStatus->setProgressPosition(0);
|
||||||
mWeapImage->setImageTexture("icons\\k\\stealth_handtohand.dds");
|
|
||||||
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||||
|
MWWorld::Ptr player = world->getPlayer().getPlayer();
|
||||||
|
if (MWWorld::Class::get(player).getNpcStats(player).isWerewolf())
|
||||||
|
mWeapImage->setImageTexture("icons\\k\\tx_werewolf_hand.dds");
|
||||||
|
else
|
||||||
|
mWeapImage->setImageTexture("icons\\k\\stealth_handtohand.dds");
|
||||||
|
|
||||||
mWeapBox->clearUserStrings();
|
mWeapBox->clearUserStrings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue