本文整理汇总了C++中PointPath::resize方法的典型用法代码示例。如果您正苦于以下问题:C++ PointPath::resize方法的具体用法?C++ PointPath::resize怎么用?C++ PointPath::resize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PointPath
的用法示例。
在下文中一共展示了PointPath::resize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateAI
//.........这里部分代码省略.........
}
}
break;
}
case TYPE_VALKIRIES:
{
switch(encounterStage)
{
case 1:
DoScriptText(SAY_STAGE_3_01, m_pInstance->GetCreature(NPC_TIRION));
cooldown = 12000;
break;
case 2:
SummonToCBoss(NPC_LIGHTBANE, NPC_DARKBANE);
for(uint8 i = 0; i < 4; ++i)
DoSpawnTocBoss(i/2 ? NPC_LIGHT_ESSENCE : NPC_DARK_ESSENCE, SpawnLoc[LOC_D_ESSENCE_1+i], 0);
cooldown = 2000;
break;
case 3:
{
if (!encounterCreature || !encounterCreature2)
break;
DoScriptText(SAY_STAGE_3_02, m_pInstance->GetCreature(NPC_TIRION));
uint32 travelTime[2];
for(uint8 second = 0; second < 2; ++second)
{
Creature* crt = second ? encounterCreature2 : encounterCreature;
((ScriptedAI*)crt->AI())->EnableAttack(false);
PointPath path;
path.resize(3);
path.set(0, crt->GetPosition());
path.set(1, second ? SpawnLoc[LOC_D_VALKYR_1] : SpawnLoc[LOC_L_VALKYR_1]);
path.set(2, second ? SpawnLoc[LOC_D_VALKYR_2] : SpawnLoc[LOC_L_VALKYR_2]);
//path.set(3, second ? SpawnLoc[LOC_D_VALKYR_3] : SpawnLoc[LOC_L_VALKYR_3]);
travelTime[second] = path.GetTotalLength()/(crt->GetSpeed(MOVE_RUN)*0.001f);
crt->GetMotionMaster()->Clear(false, true);
crt->ChargeMonsterMove(path, SPLINETYPE_FACINGANGLE, crt->GetSplineFlags(), travelTime[second], M_PI_F*1.5f);
}
cooldown = (travelTime[0] > travelTime[1] ? travelTime[0] : travelTime[1]) + 5000;
break;
}
case 4:
{
for(uint8 second = 0; second < 2; ++second)
{
Creature* crt = second ? encounterCreature2 : encounterCreature;
((ScriptedAI*)crt->AI())->EnableAttack(true);
crt->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
cooldown = REALLY_BIG_COOLDOWN;
break;
}
case 51: // outro
if (m_pInstance->GetInstanceSide() == INSTANCE_SIDE_ALI)
DoScriptText(SAY_STAGE_3_03a, m_pInstance->GetCreature(NPC_WRYNN));
else
DoScriptText(SAY_STAGE_3_03h, m_pInstance->GetCreature(NPC_GARROSH));
cooldown = 5000;
break;
case 52: