void SetInstanceData(uint32 pType, uint32 pIndex, uint32 pData) { switch (pIndex) { case UTGARDE_FORGE_MASTER: { mUtgardeData[UTGARDE_FORGE_MASTER]++; HandleForge(); }; break; case UTGARDE_INGVAR: { mUtgardeData[UTGARDE_INGVAR] = pData; if (pData == State_Finished) { GameObject* pGO = NULL; for (int i = 0; i < 2; ++i) { pGO = GetGameObjectByGuid(mIngvarDoors[i]); if (pGO) pGO->SetState(pGO->GetState() == 1 ? 0 : 1); }; }; } break; } };
void SetLocaleInstanceData(uint32 /*pType*/, uint32 pIndex, uint32 pData) { switch (pIndex) { case UTGARDE_FORGE_MASTER: { mUtgardeData[UTGARDE_FORGE_MASTER]++; HandleForge(); } break; case UTGARDE_INGVAR: { mUtgardeData[UTGARDE_INGVAR] = pData; if (pData == Finished) { GameObject* pGO = nullptr; for (uint8 i = 0; i < 2; ++i) { pGO = GetGameObjectByGuid(mIngvarDoors[i]); if (pGO) { pGO->setState(pGO->getState() == 1 ? 0 : 1); } } } } break; } }