mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
*added HandleGameObject function to instance, use this to simply open/close doors from scripts
--HG-- branch : trunk
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user