本文整理汇总了C++中instance_naxxramas::GetChamberCenterCoords方法的典型用法代码示例。如果您正苦于以下问题:C++ instance_naxxramas::GetChamberCenterCoords方法的具体用法?C++ instance_naxxramas::GetChamberCenterCoords怎么用?C++ instance_naxxramas::GetChamberCenterCoords使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类instance_naxxramas
的用法示例。
在下文中一共展示了instance_naxxramas::GetChamberCenterCoords方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SummonIntroCreatures
void SummonIntroCreatures(uint32 packId)
{
if (!m_pInstance)
return;
float fAngle = GetLocationAngle(packId + 1);
float fX, fY, fZ;
m_pInstance->GetChamberCenterCoords(fX, fY, fZ);
fX += M_F_RANGE * cos(fAngle);
fY += M_F_RANGE * sin(fAngle);
fZ += M_F_HEIGHT;
MaNGOS::NormalizeMapCoord(fX);
MaNGOS::NormalizeMapCoord(fY);
uint32 uiNpcEntry = NPC_SOUL_WEAVER;
for (uint8 uiI = 0; uiI < 14; ++uiI)
{
if (uiI > 0)
{
if (uiI < 4)
uiNpcEntry = NPC_UNSTOPPABLE_ABOM;
else
uiNpcEntry = NPC_SOLDIER_FROZEN;
}
float fNewX, fNewY, fNewZ;
m_creature->GetRandomPoint(fX, fY, fZ, 12.0f, fNewX, fNewY, fNewZ);
m_creature->SummonCreature(uiNpcEntry, fNewX, fNewY, fNewZ, fAngle + M_PI_F, TEMPSPAWN_CORPSE_DESPAWN, 5000);
}
}
示例2: SummonMob
void SummonMob(uint32 uiType)
{
if (!m_pInstance)
return;
float fAngle = GetLocationAngle(urand(1, 7));
float fX, fY, fZ;
m_pInstance->GetChamberCenterCoords(fX, fY, fZ);
fX += M_F_RANGE * cos(fAngle);
fY += M_F_RANGE * sin(fAngle);
fZ += M_F_HEIGHT;
MaNGOS::NormalizeMapCoord(fX);
MaNGOS::NormalizeMapCoord(fY);
m_creature->SummonCreature(uiType, fX, fY, fZ, 0.0f, TEMPSPAWN_CORPSE_DESPAWN, 5000);
}
示例3: JustSummoned
void JustSummoned(Creature* pSummoned) override
{
switch (pSummoned->GetEntry())
{
case NPC_GUARDIAN:
{
DoScriptText(EMOTE_GUARDIAN, m_creature);
m_lAddsSet.insert(pSummoned->GetObjectGuid());
++m_uiGuardiansCount;
pSummoned->SetInCombatWithZone();
break;
}
case NPC_SOLDIER_FROZEN:
case NPC_UNSTOPPABLE_ABOM:
case NPC_SOUL_WEAVER:
{
if (m_uiIntroPackCount < 7)
m_lIntroMobsSet.insert(pSummoned->GetObjectGuid());
else
{
m_lAddsSet.insert(pSummoned->GetObjectGuid());
if (m_pInstance)
{
float fX, fY, fZ;
m_pInstance->GetChamberCenterCoords(fX, fY, fZ);
pSummoned->GetMotionMaster()->MovePoint(0, fX, fY, fZ);
}
}
break;
}
}
}