forked from insider42/scriptdev2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBSW_instance.h
More file actions
47 lines (38 loc) · 1.8 KB
/
BSW_instance.h
File metadata and controls
47 lines (38 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* This program is free software licensed under GPL version 2
* Please see the included DOCS/LICENSE.TXT for more information */
#ifndef BSW_INSTANCE_H
#define BSW_INSTANCE_H
#define BSW_INSTANCE_VERSION 0.6.20
#include "sc_instance.h"
class MANGOS_DLL_DECL BSWScriptedInstance : public ScriptedInstance
{
public:
BSWScriptedInstance(Map* pMap);
~BSWScriptedInstance();
//sends completed achievments to all players in instance
void DoCompleteAchievement(uint32 uiAchievmentId);
void DoOpenDoor(uint64 guid);
void DoCloseDoor(uint64 guid);
uint64 GetInstanceObjectGUID(uint32 entry);
ObjectGuid const& GetInstanceObjectGuid(uint32 entry);
void SetObject(Object* object);
void SetInstanceObject(GameObject* go) { if (go) SetObject((Object*)go); };
void SetInstanceUnit(Unit* unit) { if (unit) SetObject((Object*)unit); };
void SetInstanceCreature(Creature* creature) { if (creature) SetObject((Object*)creature); };
void SetCriteriaState(uint32 criteria_id, bool state = true, Player* player = NULL);
bool GetCriteriaState(uint32 criteria_id, Player const* player = NULL);
void SetNextEvent(uint32 EventNum, uint32 creatureID, uint32 timer = 1000);
uint32 GetEvent(uint32 creatureID);
bool GetEventTimer(uint32 creatureID, const uint32 diff);
private:
uint32 m_auiEvent;
uint32 m_auiCreatureID;
uint32 m_auiEventTimer;
bool m_auiEventLock;
Map* m_pMap;
std::map<uint32, ObjectGuid> m_objectGuidMap;
std::map<uint32, bool> m_groupCriteriaMap;
std::multimap<uint32, ObjectGuid> m_personalCriteriaMap;
};
#endif