2014-01-07 03:01:33 +01:00
|
|
|
#ifndef OPENMW_MECHANICS_PICKPOCKET_H
|
|
|
|
#define OPENMW_MECHANICS_PICKPOCKET_H
|
|
|
|
|
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
|
|
|
|
namespace MWMechanics
|
|
|
|
{
|
|
|
|
|
|
|
|
class Pickpocket
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Pickpocket (const MWWorld::Ptr& thief, const MWWorld::Ptr& victim);
|
|
|
|
|
|
|
|
/// Steal some items
|
|
|
|
/// @return Was the thief detected?
|
2021-06-23 23:13:59 +02:00
|
|
|
bool pick (const MWWorld::Ptr& item, int count);
|
2014-01-07 03:01:33 +01:00
|
|
|
/// End the pickpocketing process
|
|
|
|
/// @return Was the thief detected?
|
|
|
|
bool finish ();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool getDetected(float valueTerm);
|
|
|
|
float getChanceModifier(const MWWorld::Ptr& ptr, float add=0);
|
|
|
|
MWWorld::Ptr mThief;
|
|
|
|
MWWorld::Ptr mVictim;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|