1 #ifndef OPENMW_MECHANICS_DISEASE_H
2 #define OPENMW_MECHANICS_DISEASE_H
6 #include "../mwbase/windowmanager.hpp"
7 #include "../mwbase/environment.hpp"
8 #include "../mwbase/world.hpp"
10 #include "../mwworld/ptr.hpp"
11 #include "../mwworld/class.hpp"
12 #include "../mwworld/esmstore.hpp"
29 float fDiseaseXferChance =
55 int x =
static_cast<int>(fDiseaseXferChance * 100 * resist);
61 std::string msg =
"sMagicContractDisease";
63 if (msg.find(
"%s") != std::string::npos)
64 msg.replace(msg.find(
"%s"), 2, spell->
mName);
bool hasSpell(const std::string &spell) const
Definition: spells.cpp:76
virtual MWMechanics::CreatureStats & getCreatureStats(const Ptr &ptr) const
Definition: class.cpp:63
World * getWorld() const
Definition: environment.cpp:82
const Class & getClass() const
Definition: ptr.hpp:40
Effects currently affecting a NPC or creature.
Definition: magiceffects.hpp:83
Definition: loadmgef.hpp:141
static const Environment & get()
Return instance of this class.
Definition: environment.cpp:171
Definition: loadspel.hpp:14
const MagicEffects & getMagicEffects() const
Definition: creaturestats.cpp:90
WindowManager * getWindowManager() const
Definition: environment.cpp:100
virtual const MWWorld::ESMStore & getStore() const =0
std::string mName
Definition: loadspel.hpp:45
void add(const std::string &spell)
Adding a spell that is already listed in *this is a no-op.
Definition: spells.cpp:119
Definition: loadgmst.hpp:19
float getMagnitude() const
Get the total magnitude including base and modifier.
Definition: magiceffects.cpp:43
float getFloat() const
Throws an exception if GMST is not of type int or float.
Definition: loadgmst.cpp:30
Definition: loadspel.hpp:24
SPDTstruct mData
Definition: loadspel.hpp:44
MWWorld::Ptr getPlayer()
Definition: actorutil.cpp:10
Definition: loadmgef.hpp:202
static int rollDice(int max)
return value in range [0, max) <- note open upper range.
Definition: rng.cpp:23
virtual void messageBox(const std::string &message, enum MWGui::ShowInDialogueMode showInDialogueMode=MWGui::ShowInDialogueMode_IfPossible)=0
Definition: loadmgef.hpp:139
void diseaseContact(MWWorld::Ptr actor, MWWorld::Ptr carrier)
Definition: disease.hpp:24
const Spells & getSpells() const
Definition: creaturestats.cpp:80
EffectParam get(const EffectKey &key) const
This function can safely be used for keys that are not present.
Definition: magiceffects.cpp:148
TIterator begin() const
Definition: spells.cpp:23
TContainer::const_iterator TIterator
Definition: spells.hpp:42
Definition: loadmgef.hpp:140
TIterator end() const
Definition: spells.cpp:28
Definition: loadmgef.hpp:201
const Store< T > & get() const
Definition: esmstore.hpp:164
virtual bool isActor() const
Definition: class.hpp:302
std::string mId
Definition: loadspel.hpp:45
Definition: loadmgef.hpp:203
Definition: loadspel.hpp:25
Spell list.
Definition: spells.hpp:31
Pointer to a LiveCellRef.
Definition: ptr.hpp:19
static bool hasCorprusEffect(const ESM::Spell *spell)
Definition: spells.cpp:326
std::string getString() const
Throwns an exception if GMST is not of type string.
Definition: loadgmst.cpp:35
int mType
Definition: loadspel.hpp:39