本文整理汇总了C++中GuidList类的典型用法代码示例。如果您正苦于以下问题:C++ GuidList类的具体用法?C++ GuidList怎么用?C++ GuidList使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了GuidList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SelectRandomBunnyGuid
// function to return a random arena bunny for Blizzard spell
ObjectGuid SelectRandomBunnyGuid()
{
if (m_lBunniesGuids.empty())
return ObjectGuid();
GuidList::iterator iter = m_lBunniesGuids.begin();
advance(iter, urand(0, m_lBunniesGuids.size() - 1));
return *iter;
}
示例2: SelectRandomCrowdNpc
ObjectGuid SelectRandomCrowdNpc()
{
if (m_lCrowdGuidList.empty())
return ObjectGuid();
GuidList::iterator iter = m_lCrowdGuidList.begin();
advance(iter, urand(0, m_lCrowdGuidList.size() - 1));
return *iter;
}
示例3: DoDespawnEyeTentacles
// Wrapper to kill the eye tentacles before summoning new ones
void DoDespawnEyeTentacles()
{
for (GuidList::const_iterator itr = m_lEyeTentaclesList.begin(); itr != m_lEyeTentaclesList.end(); ++itr)
{
if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr))
pTemp->DealDamage(pTemp, pTemp->GetHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NONE, nullptr, false);
}
m_lEyeTentaclesList.clear();
}
示例4: DoDespawnVortexes
// Function to handle the Feather Vortexes despawn on phase change
void DoDespawnVortexes()
{
for (GuidList::const_iterator itr = m_lSummonsList.begin(); itr != m_lSummonsList.end(); ++itr)
{
if (Creature* pVortex = m_creature->GetMap()->GetCreature(*itr))
{
pVortex->ForcedDespawn();
}
}
}
示例5: SelectRandomVolunteer
ObjectGuid SelectRandomVolunteer()
{
if (m_lVolunteerGuidList.empty())
return ObjectGuid();
GuidList::iterator iter = m_lVolunteerGuidList.begin();
advance(iter, urand(0, m_lVolunteerGuidList.size() - 1));
return *iter;
}
示例6: DoDespawnSummoned
void DoDespawnSummoned()
{
for (GuidList::const_iterator itr = m_lPriestessList.begin(); itr != m_lPriestessList.end(); ++itr)
{
if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr))
{
pTemp->ForcedDespawn();
}
}
}
示例7: JustDied
void JustDied(Unit* pKiller) override
{
for (GuidList::const_iterator itr = m_lSummonsList.begin(); itr != m_lSummonsList.end(); ++itr)
{
if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr))
pSummoned->ForcedDespawn();
}
npc_escortAI::JustDied(pKiller);
}
示例8: SelectRandomUpperBunny
// function to return a random arena upper Bunny
Creature* SelectRandomUpperBunny()
{
if (m_lUpperBunniesGuids.empty())
return NULL;
GuidList::iterator iter = m_lUpperBunniesGuids.begin();
advance(iter, urand(0, m_lUpperBunniesGuids.size() - 1));
return m_creature->GetMap()->GetCreature(*iter);
}
示例9: EnterEvadeMode
void EnterEvadeMode() override
{
// Kill any player from the stomach on evade - this is becuase C'thun cannot be soloed.
for (GuidList::const_iterator itr = m_lPlayersInStomachList.begin(); itr != m_lPlayersInStomachList.end(); ++itr)
{
if (Player* pPlayer = m_creature->GetMap()->GetPlayer(*itr))
pPlayer->CastSpell(pPlayer, SPELL_PORT_OUT_STOMACH_EFFECT, TRIGGERED_OLD_TRIGGERED);
}
Scripted_NoMovementAI::EnterEvadeMode();
}
示例10: DoUseExplosiveTraps
// Function to use the recently spawned GOs
void DoUseExplosiveTraps()
{
for (GuidList::const_iterator itr = m_lExplosivesGuidsList.begin(); itr != m_lExplosivesGuidsList.end(); ++itr)
{
if (GameObject* pTrap = m_creature->GetMap()->GetGameObject(*itr))
{
pTrap->SendGameObjectCustomAnim(pTrap->GetObjectGuid());
pTrap->SetLootState(GO_JUST_DEACTIVATED);
}
}
}
示例11: JustDied
void JustDied(Unit* /*pKiller*/) override
{
if (m_pInstance)
m_pInstance->SetData(TYPE_SUPREMUS, DONE);
for (GuidList::const_iterator itr = m_lSummonedGUIDs.begin(); itr != m_lSummonedGUIDs.end(); ++itr)
{
if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr))
pSummoned->ForcedDespawn();
}
}
示例12: UnsummonMajordomoAdds
// Unsummon Majordomo adds
void UnsummonMajordomoAdds()
{
for (GuidList::const_iterator itr = m_luiMajordomoAddsGUIDs.begin(); itr != m_luiMajordomoAddsGUIDs.end(); ++itr)
{
if (Creature* pAdd = m_creature->GetMap()->GetCreature(*itr))
if (pAdd->IsTemporarySummon())
((TemporarySpawn*)pAdd)->UnSummon();
}
m_luiMajordomoAddsGUIDs.clear();
}
示例13: DoDespawnBombRiders
// Wrapper to despawn the bomb riders on evade / death
void DoDespawnBombRiders()
{
if (m_lBombRiderGuidsList.empty())
return;
for (GuidList::const_iterator itr = m_lBombRiderGuidsList.begin(); itr != m_lBombRiderGuidsList.end(); ++itr)
{
if (Creature* pRider = m_creature->GetMap()->GetCreature(*itr))
pRider->ForcedDespawn();
}
}
示例14: DespawnAdds
void DespawnAdds(GuidList& List)
{
if (!List.empty())
{
for (GuidList::iterator itr = List.begin(); itr != List.end(); ++itr)
{
if (Creature* pSummon = m_creature->GetMap()->GetCreature(*itr))
pSummon->ForcedDespawn();
}
List.clear();
}
}
示例15: DespawnDwarf
void DespawnDwarf()
{
if (lDwarfGUIDList.empty())
return;
for (GuidList::const_iterator itr = lDwarfGUIDList.begin(); itr != lDwarfGUIDList.end(); ++itr)
{
Creature* temp = ObjectAccessor::GetCreature(*me, instance ? (*itr) : ObjectGuid::Empty);
if (temp && temp->IsAlive())
temp->DespawnOrUnsummon();
}
lDwarfGUIDList.clear();
}