mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-30 00:53:46 +00:00
Instace to return the guid of the gameobject
This commit is contained in:
@@ -22,13 +22,22 @@ class instance_deadmines : public InstanceMapScript
|
||||
memset(&_encounters, 0, sizeof(_encounters));
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data) const override
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
GO_FACTORY_DOOR: return DATA_FACTORY_DOORGUID;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* gameobject)
|
||||
{
|
||||
switch (gameobject->GetEntry())
|
||||
{
|
||||
case GO_FACTORY_DOOR:
|
||||
DATA_FACTORY_DOORGUID = gameobject->GetGUID();
|
||||
if (_encounters[TYPE_RHAHK_ZOR] == DONE)
|
||||
HandleGameObject(30533, true, gameobject);
|
||||
gameobject->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
case GO_IRON_CLAD_DOOR:
|
||||
if (_encounters[TYPE_CANNON] == DONE)
|
||||
@@ -79,6 +88,7 @@ class instance_deadmines : public InstanceMapScript
|
||||
|
||||
private:
|
||||
uint32 _encounters[MAX_ENCOUNTERS];
|
||||
uint64 DATA_FACTORY_DOORGUID;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
|
||||
Reference in New Issue
Block a user