本文整理汇总了C++中instance_naxxramas::GetSingleGameObjectFromStorage方法的典型用法代码示例。如果您正苦于以下问题:C++ instance_naxxramas::GetSingleGameObjectFromStorage方法的具体用法?C++ instance_naxxramas::GetSingleGameObjectFromStorage怎么用?C++ instance_naxxramas::GetSingleGameObjectFromStorage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类instance_naxxramas
的用法示例。
在下文中一共展示了instance_naxxramas::GetSingleGameObjectFromStorage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetupChain
bool SetupChain()
{
// Check, if instance_ script failed or encounter finished
if (!m_pInstance || m_pInstance->GetData(TYPE_THADDIUS) == DONE)
return true;
GameObject* pNoxTeslaFeugen = m_pInstance->GetSingleGameObjectFromStorage(GO_CONS_NOX_TESLA_FEUGEN);
GameObject* pNoxTeslaStalagg = m_pInstance->GetSingleGameObjectFromStorage(GO_CONS_NOX_TESLA_STALAGG);
// Try again, till Tesla GOs are spawned
if (!pNoxTeslaFeugen || !pNoxTeslaStalagg)
return false;
m_bToFeugen = m_creature->GetDistanceOrder(pNoxTeslaFeugen, pNoxTeslaStalagg);
return DoCastSpellIfCan(m_creature, m_bToFeugen ? SPELL_FEUGEN_CHAIN : SPELL_STALAGG_CHAIN) == CAST_OK;
}
示例2: ReApplyChain
void ReApplyChain(uint32 uiEntry)
{
if (uiEntry) // called from Stalagg/Feugen with their entry
{
// Only apply chain to own add
if ((uiEntry == NPC_FEUGEN && !m_bToFeugen) || (uiEntry == NPC_STALAGG && m_bToFeugen))
return;
m_bReapply = true; // Reapply Chains on next tick
}
else // if called from next tick, needed because otherwise the spell doesn't bind
{
m_bReapply = false;
m_creature->InterruptNonMeleeSpells(true);
GameObject* pGo = m_pInstance->GetSingleGameObjectFromStorage(m_bToFeugen ? GO_CONS_NOX_TESLA_FEUGEN : GO_CONS_NOX_TESLA_STALAGG);
if (pGo && pGo->GetGoType() == GAMEOBJECT_TYPE_BUTTON && pGo->getLootState() == GO_ACTIVATED)
pGo->ResetDoorOrButton();
DoCastSpellIfCan(m_creature, m_bToFeugen ? SPELL_FEUGEN_CHAIN : SPELL_STALAGG_CHAIN);
}
}