diff options
author | Rat <none@none> | 2009-04-04 18:07:05 +0200 |
---|---|---|
committer | Rat <none@none> | 2009-04-04 18:07:05 +0200 |
commit | 3fd4f3d4b342a838b312ecc6bee4837c9a5584dd (patch) | |
tree | 5b30d9b9e697bc45f1e8959326995d50a4be0821 /src/game/InstanceData.cpp | |
parent | 1f9efc82ca07ca2d2306f4b5c1887e9024f1b307 (diff) |
*added HandleGameObject function to instance, use this to simply open/close doors from scripts
--HG--
branch : trunk
Diffstat (limited to 'src/game/InstanceData.cpp')
-rw-r--r-- | src/game/InstanceData.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/InstanceData.cpp b/src/game/InstanceData.cpp index 28145973bc0..ac607bfd7ac 100644 --- a/src/game/InstanceData.cpp +++ b/src/game/InstanceData.cpp @@ -30,3 +30,13 @@ void InstanceData::SaveToDB() CharacterDatabase.PExecute("UPDATE instance SET data = '%s' WHERE id = '%d'", data.c_str(), instance->GetInstanceId()); } +void InstanceData::HandleGameObject(uint64 GUID, bool open, GameObject *go) +{ + if(!go) + go = instance->GetGameObjectInMap(GUID); + if(go) + go->SetGoState(open ? 0 : 1); + else + debug_log("SD2: InstanceData: HandleGameObject failed"); +} + |