本文整理汇总了C++中instance_naxxramas::GetGothSummonPointCreatures方法的典型用法代码示例。如果您正苦于以下问题:C++ instance_naxxramas::GetGothSummonPointCreatures方法的具体用法?C++ instance_naxxramas::GetGothSummonPointCreatures怎么用?C++ instance_naxxramas::GetGothSummonPointCreatures使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类instance_naxxramas
的用法示例。
在下文中一共展示了instance_naxxramas::GetGothSummonPointCreatures方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SummonAdds
void SummonAdds(bool bRightSide, uint32 uiSummonEntry)
{
std::list<Creature*> lSummonList;
m_pInstance->GetGothSummonPointCreatures(lSummonList, bRightSide);
if (lSummonList.empty())
return;
uint8 uiCount = 2;
switch(uiSummonEntry)
{
case NPC_UNREL_TRAINEE:
lSummonList.sort(ObjectDistanceOrder(m_creature));
break;
case NPC_UNREL_DEATH_KNIGHT:
case NPC_UNREL_RIDER:
uiCount = 1;
lSummonList.sort(ObjectDistanceOrderReversed(m_creature));
break;
}
for(std::list<Creature*>::iterator itr = lSummonList.begin(); itr != lSummonList.end(); ++itr)
{
if (uiCount == 0)
break;
m_creature->SummonCreature(uiSummonEntry, (*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ(), (*itr)->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
--uiCount;
}
}
示例2: PrepareSummonPlaces
void PrepareSummonPlaces()
{
std::list<Creature*> lSummonList;
m_pInstance->GetGothSummonPointCreatures(lSummonList, true);
if (lSummonList.empty())
return;
// Trainees and Rider
uint8 index = 0;
uint8 uiTraineeCount = 3;
lSummonList.sort(ObjectDistanceOrder(m_creature));
for (std::list<Creature*>::iterator itr = lSummonList.begin(); itr != lSummonList.end(); ++itr)
{
if (*itr)
{
if (uiTraineeCount == 0)
break;
if (index == 1)
m_lRiderSummonPosGuids.push_back((*itr)->GetObjectGuid());
else
{
m_lTraineeSummonPosGuids.push_back((*itr)->GetObjectGuid());
--uiTraineeCount;
}
index++;
}
}
// DeathKnights
uint8 uiDeathKnightCount = 2;
lSummonList.sort(ObjectDistanceOrderReversed(m_creature));
for (std::list<Creature*>::iterator itr = lSummonList.begin(); itr != lSummonList.end(); ++itr)
{
if (*itr)
{
if (uiDeathKnightCount == 0)
break;
m_lDeathKnightSummonPosGuids.push_back((*itr)->GetObjectGuid());
--uiDeathKnightCount;
}
}
}
示例3: PrepareSummonPlaces
void PrepareSummonPlaces()
{
CreatureList lSummonList;
m_pInstance->GetGothSummonPointCreatures(lSummonList, true);
if (lSummonList.empty())
return;
// Trainees and Rider
uint8 index = 0;
uint8 uiTraineeCount = 3;
lSummonList.sort(ObjectDistanceOrder(m_creature));
for (auto& itr : lSummonList)
{
if (itr)
{
if (uiTraineeCount == 0)
break;
if (index == 1)
m_lRiderSummonPosGuids.push_back(itr->GetObjectGuid());
else
{
m_lTraineeSummonPosGuids.push_back(itr->GetObjectGuid());
--uiTraineeCount;
}
index++;
}
}
// DeathKnights
uint8 uiDeathKnightCount = 2;
lSummonList.sort(ObjectDistanceOrderReversed(m_creature));
for (auto& itr : lSummonList)
{
if (itr)
{
if (uiDeathKnightCount == 0)
break;
m_lDeathKnightSummonPosGuids.push_back(itr->GetObjectGuid());
--uiDeathKnightCount;
}
}
}