worldimp.hpp 22.4 KB
Newer Older
1 2
#ifndef GAME_MWWORLD_WORLDIMP_H
#define GAME_MWWORLD_WORLDIMP_H
3

Jason Hooks's avatar
Jason Hooks committed
4
#include "../mwrender/debugging.hpp"
5

6
#include "ptr.hpp"
7
#include "scene.hpp"
Artem Kotsynyak's avatar
Artem Kotsynyak committed
8
#include "esmstore.hpp"
Sebastian Wick's avatar
Sebastian Wick committed
9
#include "physicssystem.hpp"
10
#include "cells.hpp"
11
#include "localscripts.hpp"
12
#include "timestamp.hpp"
13
#include "fallback.hpp"
14

15 16
#include "../mwbase/world.hpp"

17 18
#include "contentloader.hpp"

19 20 21 22 23
namespace Ogre
{
    class Vector3;
}

Marc Zinnschlag's avatar
Marc Zinnschlag committed
24 25 26 27 28
namespace ESM
{
    struct Position;
}

29 30 31 32 33
namespace Files
{
    class Collections;
}

34 35 36 37 38 39 40 41 42
namespace Render
{
    class OgreRenderer;
}

namespace MWRender
{
    class SkyManager;
    class CellRender;
43
    class Animation;
44
}
45

46 47
struct ContentLoader;

Marc Zinnschlag's avatar
Marc Zinnschlag committed
48
namespace MWWorld
49
{
50
    class WeatherManager;
51
    class Player;
52

53
    /// \brief The game world and its visual representation
54

55
    class World : public MWBase::World
56
    {
57
            MWWorld::Fallback mFallback;
58
            MWRender::RenderingManager* mRendering;
59

60
            MWWorld::WeatherManager* mWeatherManager;
61

62
            MWWorld::Scene *mWorldScene;
63
            MWWorld::Player *mPlayer;
64
            std::vector<ESM::ESMReader> mEsm;
Artem Kotsynyak's avatar
Artem Kotsynyak committed
65
            MWWorld::ESMStore mStore;
66
            LocalScripts mLocalScripts;
67
            MWWorld::Globals *mGlobalVariables;
Sebastian Wick's avatar
Sebastian Wick committed
68
            MWWorld::PhysicsSystem *mPhysics;
69
            bool mSky;
Marc Zinnschlag's avatar
Marc Zinnschlag committed
70

71
            Cells mCells;
72

73
            OEngine::Physic::PhysicEngine* mPhysEngine;
gugus's avatar
gugus committed
74

mckibbenta's avatar
mckibbenta committed
75 76
            bool mGodMode;

77 78 79
            // not implemented
            World (const World&);
            World& operator= (const World&);
80 81 82

            Ptr getPtrViaHandle (const std::string& handle, Ptr::CellStore& cellStore);

83
            int mActivationDistanceOverride;
scrawl's avatar
scrawl committed
84
            std::string mFacedHandle;
85
            float mFacedDistance;
86

scrawl's avatar
scrawl committed
87 88 89
            std::map<MWWorld::Ptr, int> mDoorStates;
            ///< only holds doors that are currently moving. 0 means closing, 1 opening

90 91 92 93 94 95 96 97 98 99
            struct ProjectileState
            {
                // Id of spell or enchantment to apply when it hits
                std::string mId;

                // Actor who casted this projectile
                std::string mActorHandle;

                // Name of item to display as effect source in magic menu (in case we casted an enchantment)
                std::string mSourceName;
scrawl's avatar
scrawl committed
100 101 102 103 104 105

                ESM::EffectList mEffects;

                float mSpeed;

                bool mStack;
106 107 108
            };

            std::map<MWWorld::Ptr, ProjectileState> mProjectiles;
109
            void updateWeather(float duration);
110
            int getDaysPerMonth (int month) const;
Marc Zinnschlag's avatar
Marc Zinnschlag committed
111

112 113
            void rotateObjectImp (const Ptr& ptr, Ogre::Vector3 rot, bool adjust);

114
            bool moveObjectImp (const Ptr& ptr, float x, float y, float z);
115
            ///< @return true if the active cell (cell player is in) changed
Marc Zinnschlag's avatar
Marc Zinnschlag committed
116

117
            Ptr copyObjectToCell(const Ptr &ptr, CellStore &cell, ESM::Position pos, bool adjustPos=true);
118

119 120
            void updateWindowManager ();
            void performUpdateSceneQueries ();
121
            void updateFacedHandle ();
122

123 124 125 126
            float getMaxActivationDistance ();
            float getNpcActivationDistance ();
            float getObjectActivationDistance ();

127 128
            void removeContainerScripts(const Ptr& reference);
            void addContainerScripts(const Ptr& reference, Ptr::CellStore* cell);
129
            void PCDropped (const Ptr& item);
130

131
            void processDoors(float duration);
scrawl's avatar
scrawl committed
132 133
            ///< Run physics simulation and modify \a world accordingly.

134 135
            void moveProjectiles(float duration);

136 137 138
            void doPhysics(float duration);
            ///< Run physics simulation and modify \a world accordingly.

139 140
            void ensureNeededRecords();

141 142 143 144 145 146 147 148 149
            /**
             * @brief loadContentFiles - Loads content files (esm,esp,omwgame,omwaddon)
             * @param fileCollections- Container which holds content file names and their paths
             * @param content - Container which holds content file names
             * @param contentLoader -
             */
            void loadContentFiles(const Files::Collections& fileCollections,
                const std::vector<std::string>& content, ContentLoader& contentLoader);

scrawl's avatar
scrawl committed
150 151
            int mPlayIntro;

152
            bool mTeleportEnabled;
153
            bool mLevitationEnabled;
scrawl's avatar
scrawl committed
154
            bool mGoToJail;
155

scrawl's avatar
scrawl committed
156 157 158
            /// Called when \a object is moved to an inactive cell
            void objectLeftActiveCell (MWWorld::Ptr object, MWWorld::Ptr movedPtr);

159 160
            float feetToGameUnits(float feet);

161
        public:
162

163
            World (OEngine::Render::OgreRenderer& renderer,
164
                const Files::Collections& fileCollections,
165
                const std::vector<std::string>& contentFiles,
scrawl's avatar
scrawl committed
166
                const boost::filesystem::path& resDir, const boost::filesystem::path& cacheDir,
Marc Zinnschlag's avatar
Marc Zinnschlag committed
167
                ToUTF8::Utf8Encoder* encoder, const std::map<std::string,std::string>& fallbackMap, int mActivationDistanceOverride);
168

169 170
            virtual ~World();

scrawl's avatar
scrawl committed
171 172
            virtual void startNewGame();

173 174
            virtual OEngine::Render::Fader* getFader();
            ///< \ŧodo remove this function. Rendering details should not be exposed.
175

176
            virtual CellStore *getExterior (int x, int y);
Marc Zinnschlag's avatar
Marc Zinnschlag committed
177

178
            virtual CellStore *getInterior (const std::string& name);
Marc Zinnschlag's avatar
Marc Zinnschlag committed
179

180
            virtual void setWaterHeight(const float height);
scrawl's avatar
scrawl committed
181

182
            virtual void toggleWater();
183

184
            virtual void adjustSky();
185

186
            virtual void getTriangleBatchCount(unsigned int &triangles, unsigned int &batches);
187

Marc Zinnschlag's avatar
Marc Zinnschlag committed
188
            virtual const Fallback *getFallback() const;
189

190
            virtual Player& getPlayer();
191
            virtual MWWorld::Ptr getPlayerPtr();
192

Artem Kotsynyak's avatar
Artem Kotsynyak committed
193
            virtual const MWWorld::ESMStore& getStore() const;
Marc Zinnschlag's avatar
Marc Zinnschlag committed
194

195
            virtual std::vector<ESM::ESMReader>& getEsmReader();
196

197
            virtual LocalScripts& getLocalScripts();
198

199
            virtual bool hasCellChanged() const;
200
            ///< Has the player moved to a different cell, since the last frame?
201

202 203 204
            virtual bool isCellExterior() const;

            virtual bool isCellQuasiExterior() const;
205

206
            virtual Ogre::Vector2 getNorthVector (CellStore* cell);
scrawl's avatar
scrawl committed
207 208
            ///< get north vector (OGRE coordinates) for given interior cell

209
            virtual void getDoorMarkers (MWWorld::CellStore* cell, std::vector<DoorMarker>& out);
scrawl's avatar
scrawl committed
210 211 212 213 214 215 216 217
            ///< get a list of teleport door markers for a given cell, to be displayed on the local map

            virtual void getInteriorMapPosition (Ogre::Vector2 position, float& nX, float& nY, int &x, int& y);
            ///< see MWRender::LocalMap::getInteriorMapPosition

            virtual bool isPositionExplored (float nX, float nY, int x, int y, bool interior);
            ///< see MWRender::LocalMap::isPositionExplored

218
            virtual Globals::Data& getGlobalVariable (const std::string& name);
219

220
            virtual Globals::Data getGlobalVariable (const std::string& name) const;
Marc Zinnschlag's avatar
Marc Zinnschlag committed
221

222
            virtual char getGlobalVariableType (const std::string& name) const;
223
            ///< Return ' ', if there is no global variable with this name.
Marc Zinnschlag's avatar
Marc Zinnschlag committed
224

225
            virtual std::vector<std::string> getGlobals () const;
Marc Zinnschlag's avatar
Marc Zinnschlag committed
226

227
            virtual std::string getCurrentCellName () const;
Marc Zinnschlag's avatar
Marc Zinnschlag committed
228

229 230
            virtual void removeRefScript (MWWorld::RefData *ref);
            //< Remove the script attached to ref from mLocalScripts
231

232
            virtual Ptr getPtr (const std::string& name, bool activeOnly);
233 234
            ///< Return a pointer to a liveCellRef with the given name.
            /// \param activeOnly do non search inactive cells.
235

236 237 238 239
            virtual Ptr searchPtr (const std::string& name, bool activeOnly);
            ///< Return a pointer to a liveCellRef with the given name.
            /// \param activeOnly do non search inactive cells.

240
            virtual Ptr getPtrViaHandle (const std::string& handle);
241
            ///< Return a pointer to a liveCellRef with the given Ogre handle.
242

scrawl's avatar
scrawl committed
243 244 245
            virtual Ptr searchPtrViaHandle (const std::string& handle);
            ///< Return a pointer to a liveCellRef with the given Ogre handle or Ptr() if not found

246 247 248
            virtual void adjustPosition (const Ptr& ptr);
            ///< Adjust position after load to be on ground. Must be called after model load.

249
            virtual void enable (const Ptr& ptr);
250

251
            virtual void disable (const Ptr& ptr);
252

253
            virtual void advanceTime (double hours);
254
            ///< Advance in-game time.
255

256
            virtual void setHour (double hour);
257
            ///< Set in-game time hour.
258

259
            virtual void setMonth (int month);
260
            ///< Set in-game time month.
261

262
            virtual void setDay (int day);
263
            ///< Set in-game time day.
264

scrawl's avatar
scrawl committed
265 266 267
            virtual int getDay();
            virtual int getMonth();

268
            virtual TimeStamp getTimeStamp() const;
269 270
            ///< Return current in-game time stamp.

271
            virtual bool toggleSky();
272
            ///< \return Resulting mode
273

274
            virtual void changeWeather (const std::string& region, unsigned int id);
275

276
            virtual int getCurrentWeather() const;
277

278
            virtual int getMasserPhase() const;
279

280
            virtual int getSecundaPhase() const;
281

282
            virtual void setMoonColour (bool red);
283

284 285
            virtual void modRegion(const std::string &regionid, const std::vector<char> &chances);

286
            virtual float getTimeScaleFactor() const;
287

288 289
            virtual void changeToInteriorCell (const std::string& cellName,
                const ESM::Position& position);
290
            ///< Move to interior cell.
291

292
            virtual void changeToExteriorCell (const ESM::Position& position);
293
            ///< Move to exterior cell.
294

295
            virtual const ESM::Cell *getExterior (const std::string& cellName) const;
Marc Zinnschlag's avatar
Marc Zinnschlag committed
296 297
            ///< Return a cell matching the given name or a 0-pointer, if there is no such cell.

298
            virtual void markCellAsUnchanged();
299

300 301
            virtual MWWorld::Ptr getFacedObject();
            ///< Return pointer to the object the player is looking at, if it is within activation range
Marc Zinnschlag's avatar
Marc Zinnschlag committed
302

303 304 305 306
            /// Returns a pointer to the object the provided object would hit (if within the
            /// specified distance), and the point where the hit occurs. This will attempt to
            /// use the "Head" node as a basis.
            virtual std::pair<MWWorld::Ptr,Ogre::Vector3> getHitContact(const MWWorld::Ptr &ptr, float distance);
307

308
            virtual void deleteObject (const Ptr& ptr);
309

310
            virtual void moveObject (const Ptr& ptr, float x, float y, float z);
311
            virtual void moveObject (const Ptr& ptr, CellStore &newCell, float x, float y, float z);
312

gugus's avatar
gugus committed
313
            virtual void scaleObject (const Ptr& ptr, float scale);
314

Artem Kotsynyak's avatar
Artem Kotsynyak committed
315 316
            /// Rotates object, uses degrees
            /// \param adjust indicates rotation should be set or adjusted
317
            virtual void rotateObject (const Ptr& ptr,float x,float y,float z, bool adjust = false);
318

Michał Bień's avatar
Michał Bień committed
319
            virtual void localRotateObject (const Ptr& ptr, float x, float y, float z);
Michał Bień's avatar
Michał Bień committed
320

321
            virtual MWWorld::Ptr safePlaceObject(const MWWorld::Ptr& ptr,MWWorld::CellStore &Cell,ESM::Position pos);
lazydev's avatar
lazydev committed
322
            ///< place an object in a "safe" location (ie not in the void, etc). Makes a copy of the Ptr.
gugus's avatar
gugus committed
323

324 325
            virtual void indexToPosition (int cellX, int cellY, float &x, float &y, bool centre = false)
                const;
326 327
            ///< Convert cell numbers to position.

328
            virtual void positionToIndex (float x, float y, int &cellX, int &cellY) const;
329
            ///< Convert position to cell numbers
330

331 332 333
            virtual void queueMovement(const Ptr &ptr, const Ogre::Vector3 &velocity);
            ///< Queues movement for \a ptr (in local space), to be applied in the next call to
            /// doPhysics.
334

335 336 337
            virtual bool castRay (float x1, float y1, float z1, float x2, float y2, float z2);
            ///< cast a Ray and return true if there is an object in the ray path.

338
            virtual bool toggleCollisionMode();
339 340
            ///< Toggle collision mode for player. If disabled player object should ignore
            /// collisions and gravity.
341
            ///< \return Resulting mode
342

343
            virtual bool toggleRenderMode (RenderMode mode);
344
            ///< Toggle a render mode.
345
            ///< \return Resulting mode
346

347
            virtual const ESM::Potion *createRecord (const ESM::Potion& record);
Michał Bień's avatar
Michał Bień committed
348
            ///< Create a new record (of type potion) in the ESM store.
349
            /// \return pointer to created record
350

351
            virtual const ESM::Spell *createRecord (const ESM::Spell& record);
Michał Bień's avatar
Michał Bień committed
352
            ///< Create a new record (of type spell) in the ESM store.
353
            /// \return pointer to created record
354

355
            virtual const ESM::Class *createRecord (const ESM::Class& record);
Michał Bień's avatar
Michał Bień committed
356
            ///< Create a new record (of type class) in the ESM store.
357
            /// \return pointer to created record
358

359
            virtual const ESM::Cell *createRecord (const ESM::Cell& record);
Michał Bień's avatar
Michał Bień committed
360
            ///< Create a new record (of type cell) in the ESM store.
361
            /// \return pointer to created record
362

Artem Kotsynyak's avatar
Artem Kotsynyak committed
363
            virtual const ESM::NPC *createRecord(const ESM::NPC &record);
Michał Bień's avatar
Michał Bień committed
364
            ///< Create a new record (of type npc) in the ESM store.
365
            /// \return pointer to created record
Artem Kotsynyak's avatar
Artem Kotsynyak committed
366

Michał Bień's avatar
Michał Bień committed
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385
            virtual const ESM::Armor *createRecord (const ESM::Armor& record);
            ///< Create a new record (of type armor) in the ESM store.
            /// \return pointer to created record

            virtual const ESM::Weapon *createRecord (const ESM::Weapon& record);
            ///< Create a new record (of type weapon) in the ESM store.
            /// \return pointer to created record

            virtual const ESM::Clothing *createRecord (const ESM::Clothing& record);
            ///< Create a new record (of type clothing) in the ESM store.
            /// \return pointer to created record

            virtual const ESM::Enchantment *createRecord (const ESM::Enchantment& record);
            ///< Create a new record (of type enchantment) in the ESM store.
            /// \return pointer to created record

            virtual const ESM::Book *createRecord (const ESM::Book& record);
            ///< Create a new record (of type book) in the ESM store.
            /// \return pointer to created record
386

387
            virtual void update (float duration, bool paused);
Jason Hooks's avatar
Jason Hooks committed
388

389 390
            virtual bool placeObject (const MWWorld::Ptr& object, float cursorX, float cursorY, int amount);
            ///< copy and place an object into the gameworld at the specified cursor position
391 392 393
            /// @param object
            /// @param cursor X (relative 0-1)
            /// @param cursor Y (relative 0-1)
394
            /// @param number of objects to place
395 396
            /// @return true if the object was placed, or false if it was rejected because the position is too far away

397 398 399 400 401
            virtual void dropObjectOnGround (const MWWorld::Ptr& actor, const MWWorld::Ptr& object, int amount);
            ///< copy and place an object into the gameworld at the given actor's position
            /// @param actor giving the dropped object position
            /// @param object
            /// @param number of objects to place
402

403
            virtual bool canPlaceObject(float cursorX, float cursorY);
404
            ///< @return true if it is possible to place on object at specified cursor location
scrawl's avatar
scrawl committed
405

406
            virtual void processChangedSettings(const Settings::CategorySettingVector& settings);
407

408
            virtual bool isFlying(const MWWorld::Ptr &ptr) const;
409
            virtual bool isSlowFalling(const MWWorld::Ptr &ptr) const;
PL_kolek's avatar
PL_kolek committed
410 411
            ///Is the head of the creature underwater?
            virtual bool isSubmerged(const MWWorld::Ptr &object) const;
412
            virtual bool isSwimming(const MWWorld::Ptr &object) const;
413
            virtual bool isUnderwater(const MWWorld::Ptr::CellStore* cell, const Ogre::Vector3 &pos) const;
414
            virtual bool isOnGround(const MWWorld::Ptr &ptr) const;
415

416 417 418
            virtual void togglePOV() {
                mRendering->togglePOV();
            }
419 420 421 422 423

            virtual void togglePreviewMode(bool enable) {
                mRendering->togglePreviewMode(enable);
            }

424 425
            virtual bool toggleVanityMode(bool enable) {
                return mRendering->toggleVanityMode(enable);
426 427 428 429 430
            }

            virtual void allowVanityMode(bool allow) {
                mRendering->allowVanityMode(allow);
            }
Artem Kotsynyak's avatar
Artem Kotsynyak committed
431

432 433 434 435
            virtual void togglePlayerLooking(bool enable) {
                mRendering->togglePlayerLooking(enable);
            }

436 437 438 439
            virtual void changeVanityModeScale(float factor) {
                mRendering->changeVanityModeScale(factor);
            }

440
            virtual bool vanityRotateCamera(float * rot);
441
            virtual void setCameraDistance(float dist, bool adjust = false, bool override = true);
442

443
            virtual void setupPlayer();
Artem Kotsynyak's avatar
Artem Kotsynyak committed
444
            virtual void renderPlayer();
lazydev's avatar
lazydev committed
445

scrawl's avatar
scrawl committed
446 447
            virtual bool getOpenOrCloseDoor(const MWWorld::Ptr& door);
            ///< if activated, should this door be opened or closed?
scrawl's avatar
scrawl committed
448 449 450
            virtual void activateDoor(const MWWorld::Ptr& door);
            ///< activate (open or close) an non-teleport door

451 452
            virtual bool getPlayerStandingOn (const MWWorld::Ptr& object); ///< @return true if the player is standing on \a object
            virtual bool getActorStandingOn (const MWWorld::Ptr& object); ///< @return true if any actor is standing on \a object
scrawl's avatar
scrawl committed
453
            virtual float getWindSpeed();
454

scrawl's avatar
scrawl committed
455 456
            virtual void getContainersOwnedBy (const MWWorld::Ptr& npc, std::vector<MWWorld::Ptr>& out);
            ///< get all containers in active cells owned by this Npc
scrawl's avatar
scrawl committed
457 458
            virtual void getItemsOwnedBy (const MWWorld::Ptr& npc, std::vector<MWWorld::Ptr>& out);
            ///< get all items in active cells owned by this Npc
scrawl's avatar
scrawl committed
459

460 461 462
            virtual bool getLOS(const MWWorld::Ptr& npc,const MWWorld::Ptr& targetNpc);
            ///< get Line of Sight (morrowind stupid implementation)

463 464
            virtual void enableActorCollision(const MWWorld::Ptr& actor, bool enable);

465 466 467 468 469 470
            virtual int canRest();
            ///< check if the player is allowed to rest \n
            /// 0 - yes \n
            /// 1 - only waiting \n
            /// 2 - player is underwater \n
            /// 3 - enemies are nearby (not implemented)
scrawl's avatar
scrawl committed
471

472 473 474
            /// \todo Probably shouldn't be here
            virtual MWRender::Animation* getAnimation(const MWWorld::Ptr &ptr);

scrawl's avatar
scrawl committed
475
            /// \todo this does not belong here
476
            virtual void playVideo(const std::string& name, bool allowSkipping);
scrawl's avatar
scrawl committed
477
            virtual void stopVideo();
478
            virtual void frameStarted (float dt, bool paused);
479 480 481 482 483 484 485 486

            /// Find center of exterior cell above land surface
            /// \return false if exterior with given name not exists, true otherwise
            virtual bool findExteriorPosition(const std::string &name, ESM::Position &pos);

            /// Find position in interior cell near door entrance
            /// \return false if interior with given name not exists, true otherwise
            virtual bool findInteriorPosition(const std::string &name, ESM::Position &pos);
487 488 489 490 491 492

            /// Enables or disables use of teleport spell effects (recall, intervention, etc).
            virtual void enableTeleporting(bool enable);

            /// Returns true if teleport spell effects are allowed.
            virtual bool isTeleportingEnabled() const;
493

494 495 496 497 498 499
            /// Enables or disables use of levitation spell effect.
            virtual void enableLevitation(bool enable);

            /// Returns true if levitation spell effect is allowed.
            virtual bool isLevitationEnabled() const;

500
            virtual void setWerewolf(const MWWorld::Ptr& actor, bool werewolf);
501 502

            virtual void applyWerewolfAcrobatics(const MWWorld::Ptr& actor);
503

504 505
            virtual bool getGodModeState();

506
            virtual bool toggleGodMode();
507

508 509 510 511 512 513 514 515 516 517 518
            /**
             * @brief startSpellCast attempt to start casting a spell. Might fail immediately if conditions are not met.
             * @param actor
             * @return true if the spell can be casted (i.e. the animation should start)
             */
            virtual bool startSpellCast (const MWWorld::Ptr& actor);

            /**
             * @brief Cast the actual spell, should be called mid-animation
             * @param actor
             */
519
            virtual void castSpell (const MWWorld::Ptr& actor);
520

scrawl's avatar
scrawl committed
521
            virtual void launchProjectile (const std::string& id, bool stack, const ESM::EffectList& effects,
522
                                           const MWWorld::Ptr& actor, const std::string& sourceName);
scrawl's avatar
scrawl committed
523 524

            virtual void breakInvisibility (const MWWorld::Ptr& actor);
scrawl's avatar
scrawl committed
525 526
            // Are we in an exterior or pseudo-exterior cell and it's night?
            virtual bool isDark() const;
527 528

            virtual bool findInteriorPositionInWorldSpace(MWWorld::CellStore* cell, Ogre::Vector3& result);
529

530
            /// Teleports \a ptr to the closest reference of \a id (e.g. DivineMarker, PrisonMarker, TempleMarker)
531 532
            /// @note id must be lower case
            virtual void teleportToClosestMarker (const MWWorld::Ptr& ptr,
533
                                                  const std::string& id);
534 535 536 537 538 539

            /// List all references (filtered by \a type) detected by \a ptr. The range
            /// is determined by the current magnitude of the "Detect X" magic effect belonging to \a type.
            /// @note This also works for references in containers.
            virtual void listDetectedReferences (const MWWorld::Ptr& ptr, std::vector<MWWorld::Ptr>& out,
                                                  DetectionType type);
540 541 542 543

            /// Update the value of some globals according to the world state, which may be used by dialogue entries.
            /// This should be called when initiating a dialogue.
            virtual void updateDialogueGlobals();
scrawl's avatar
scrawl committed
544 545 546

            /// Moves all stolen items from \a ptr to the closest evidence chest.
            virtual void confiscateStolenItems(const MWWorld::Ptr& ptr);
scrawl's avatar
scrawl committed
547 548

            virtual void goToJail ();
549 550 551

            /// Spawn a random creature from a levelled list next to the player
            virtual void spawnRandomCreature(const std::string& creatureList);
scrawl's avatar
scrawl committed
552 553 554

            /// Spawn a blood effect for \a ptr at \a worldPosition
            virtual void spawnBloodEffect (const MWWorld::Ptr& ptr, const Ogre::Vector3& worldPosition);
555 556 557

            virtual void explodeSpell (const Ogre::Vector3& origin, const MWWorld::Ptr& object, const ESM::EffectList& effects,
                                       const MWWorld::Ptr& caster, const std::string& id, const std::string& sourceName);
558 559 560 561
    };
}

#endif