mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Display refusal message when weapon/magic icons are clicked as werewolf
This commit is contained in:
parent
997f37700d
commit
37ea0f3fb9
1 changed files with 14 additions and 0 deletions
|
@ -317,11 +317,25 @@ namespace MWGui
|
|||
|
||||
void HUD::onWeaponClicked(MyGUI::Widget* _sender)
|
||||
{
|
||||
const MWWorld::Ptr& player = MWBase::Environment::get().getWorld()->getPlayer().getPlayer();
|
||||
if (MWWorld::Class::get(player).getNpcStats(player).isWerewolf())
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->messageBox("#{sWerewolfRefusal}");
|
||||
return;
|
||||
}
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->toggleVisible(GW_Inventory);
|
||||
}
|
||||
|
||||
void HUD::onMagicClicked(MyGUI::Widget* _sender)
|
||||
{
|
||||
const MWWorld::Ptr& player = MWBase::Environment::get().getWorld()->getPlayer().getPlayer();
|
||||
if (MWWorld::Class::get(player).getNpcStats(player).isWerewolf())
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->messageBox("#{sWerewolfRefusal}");
|
||||
return;
|
||||
}
|
||||
|
||||
MWBase::Environment::get().getWindowManager()->toggleVisible(GW_Magic);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue