|
|
@ -1607,15 +1607,18 @@ namespace MWMechanics
|
|
|
|
player->restoreSkillsAttributes();
|
|
|
|
player->restoreSkillsAttributes();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
npcStats.setWerewolf(werewolf);
|
|
|
|
// Equipped items other than WerewolfRobe may reference bones that do not even
|
|
|
|
|
|
|
|
// exist with the werewolf object root, so make sure to unequip all items
|
|
|
|
// This is a bit dangerous. Equipped items other than WerewolfRobe may reference
|
|
|
|
// *before* we become a werewolf.
|
|
|
|
// bones that do not even exist with the werewolf object root.
|
|
|
|
|
|
|
|
// Therefore, make sure to unequip everything at once, and only fire the change event
|
|
|
|
|
|
|
|
// (which will rebuild the animation parts) afterwards. unequipAll will do this for us.
|
|
|
|
|
|
|
|
MWWorld::InventoryStore& invStore = actor.getClass().getInventoryStore(actor);
|
|
|
|
MWWorld::InventoryStore& invStore = actor.getClass().getInventoryStore(actor);
|
|
|
|
invStore.unequipAll(actor);
|
|
|
|
invStore.unequipAll(actor);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Werewolfs can not cast spells, so we need to unset the prepared spell if there is one.
|
|
|
|
|
|
|
|
if (npcStats.getDrawState() == MWMechanics::DrawState_Spell)
|
|
|
|
|
|
|
|
npcStats.setDrawState(MWMechanics::DrawState_Nothing);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
npcStats.setWerewolf(werewolf);
|
|
|
|
|
|
|
|
|
|
|
|
if(werewolf)
|
|
|
|
if(werewolf)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
MWWorld::InventoryStore &inv = actor.getClass().getInventoryStore(actor);
|
|
|
|
MWWorld::InventoryStore &inv = actor.getClass().getInventoryStore(actor);
|
|
|
|