本文整理汇总了C++中SetFollowPaused函数的典型用法代码示例。如果您正苦于以下问题:C++ SetFollowPaused函数的具体用法?C++ SetFollowPaused怎么用?C++ SetFollowPaused使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了SetFollowPaused函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetFaint
void SetFaint()
{
if (!HasFollowState(STATE_FOLLOW_POSTEVENT))
{
SetFollowPaused(true);
switch(urand(0, 3))
{
case 0:
DoScriptText(SAY_FAINT_1, m_creature);
break;
case 1:
DoScriptText(SAY_FAINT_2, m_creature);
break;
case 2:
DoScriptText(SAY_FAINT_3, m_creature);
break;
case 3:
DoScriptText(SAY_FAINT_4, m_creature);
break;
}
}
//what does actually happen here? Emote? Aura?
m_creature->SetStandState(UNIT_STAND_STATE_SLEEP);
}
示例2: ClearFaint
void ClearFaint()
{
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
if (HasFollowState(STATE_FOLLOW_POSTEVENT))
return;
switch(urand(0, 3))
{
case 0:
DoScriptText(SAY_WAKE_1, m_creature);
break;
case 1:
DoScriptText(SAY_WAKE_2, m_creature);
break;
case 2:
DoScriptText(SAY_WAKE_3, m_creature);
break;
case 3:
DoScriptText(SAY_WAKE_4, m_creature);
break;
}
SetFollowPaused(false);
}
示例3: AddFollowState
void FollowerAI::MovementInform(uint32 uiMotionType, uint32 uiPointId)
{
if (uiMotionType != POINT_MOTION_TYPE || !HasFollowState(STATE_FOLLOW_INPROGRESS))
return;
if (uiPointId == POINT_COMBAT_START)
{
if (GetLeaderForFollower())
{
if (!HasFollowState(STATE_FOLLOW_PAUSED))
AddFollowState(STATE_FOLLOW_RETURNING);
}
else
{
// Ustaag <Nostalrius> : vilain fix des mobs qui voulaient pas respawn à leur point de spawn
SetFollowPaused(false);
float x = 0.0f;
float y = 0.0f;
float z = 0.0f;
float o = 0.0f;
m_creature->GetHomePosition(x, y, z, o);
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, nullptr, false);
m_creature->NearTeleportTo(x, y, z, o);
m_creature->ForcedDespawn();
}
}
}
示例4: UpdateFollowerAI
void UpdateFollowerAI(const uint32 uiDiff)
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
{
if (m_uiWanderTimer)
{
if (m_uiWanderTimer <= uiDiff)
{
// set follow paused and wander in a random point
SetFollowPaused(true);
DoScriptText(EMOTE_WANDER, m_creature);
m_uiWanderTimer = 0;
switch (urand(0, 3))
{
case 0: DoScriptText(SAY_WANDER_1, m_creature); break;
case 1: DoScriptText(SAY_WANDER_2, m_creature); break;
case 2: DoScriptText(SAY_WANDER_3, m_creature); break;
case 3: DoScriptText(SAY_WANDER_4, m_creature); break;
}
float fX, fY, fZ;
m_creature->GetNearPoint(m_creature, fX, fY, fZ, 0, frand(25.0f, 40.0f), frand(0, 2 * M_PI_F));
m_creature->GetMotionMaster()->MoveRandomAroundPoint(fX, fY, fZ, 20.0f);
}
else
m_uiWanderTimer -= uiDiff;
}
return;
}
DoMeleeAttackIfReady();
}
示例5: ClearSleeping
void ClearSleeping() {
me->RemoveAurasDueToSpell(SPELL_SLEEP_VISUAL);
me->SetStandState(UNIT_STAND_STATE_STAND);
DoScriptText(EMOTE_KER_AWAKEN, me);
SetFollowPaused(false);
}
示例6: ClearFaint
void ClearFaint()
{
me->SetStandState(UNIT_STAND_STATE_STAND);
if (HasFollowState(STATE_FOLLOW_POSTEVENT))
return;
DoScriptText(RAND(SAY_WAKE_1, SAY_WAKE_2, SAY_WAKE_3, SAY_WAKE_4), me);
SetFollowPaused(false);
}
示例7: SetSleeping
void SetSleeping()
{
SetFollowPaused(true);
DoScriptText(RAND(EMOTE_KER_SLEEP_1, EMOTE_KER_SLEEP_2, EMOTE_KER_SLEEP_3), me);
DoScriptText(RAND(SAY_KER_SLEEP_1, SAY_KER_SLEEP_2, SAY_KER_SLEEP_3, SAY_KER_SLEEP_4), me);
me->SetStandState(UNIT_STAND_STATE_SLEEP);
DoCast(me, SPELL_SLEEP_VISUAL, false);
}
示例8: SetSleeping
void SetSleeping()
{
SetFollowPaused(true);
Talk(EMOTE_KER_SLEEP);
Talk(SAY_KER_SLEEP);
me->SetStandState(UNIT_STAND_STATE_SLEEP);
DoCast(me, SPELL_SLEEP_VISUAL, false);
}
示例9: ClearFaint
void ClearFaint()
{
me->SetStandState(UNIT_STAND_STATE_STAND);
if (HasFollowState(STATE_FOLLOW_POSTEVENT))
return;
Talk(SAY_WAKE);
SetFollowPaused(false);
}
示例10: SetFaint
void SetFaint()
{
if (!HasFollowState(STATE_FOLLOW_POSTEVENT))
{
SetFollowPaused(true);
DoScriptText(RAND(SAY_FAINT_1, SAY_FAINT_2, SAY_FAINT_3, SAY_FAINT_4), me);
}
//what does actually happen here? Emote? Aura?
me->SetStandState(UNIT_STAND_STATE_SLEEP);
}
示例11: SetFaint
void SetFaint()
{
if (!HasFollowState(STATE_FOLLOW_POSTEVENT))
{
SetFollowPaused(true);
Talk(SAY_FAINT);
}
//what does actually happen here? Emote? Aura?
me->SetStandState(UNIT_STAND_STATE_SLEEP);
}
示例12: ReceiveAIEvent
void ReceiveAIEvent(AIEventType eventType, Creature* /*pSender*/, Unit* pInvoker, uint32 uiMiscValue) override
{
// start following
if (eventType == AI_EVENT_START_EVENT && pInvoker->GetTypeId() == TYPEID_PLAYER)
{
StartFollow((Player*)pInvoker, 0, GetQuestTemplateStore(uiMiscValue));
m_uiWanderTimer = 30000;
}
else if (eventType == AI_EVENT_CUSTOM_A)
{
// resume following
m_bIsRecalled = true;
SetFollowPaused(false);
}
}
示例13: npc_kittenAI
npc_kittenAI(Creature* pCreature) : FollowerAI(pCreature)
{
if (pCreature->GetOwner() && pCreature->GetOwner()->GetTypeId() == TYPEID_PLAYER)
{
StartFollow((Player*)pCreature->GetOwner());
SetFollowPaused(true);
DoScriptText(EMOTE_SAB_JUMP, m_creature);
pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
// find a decent way to move to center of moonwell
}
m_uiMoonwellCooldown = 7500;
Reset();
}
示例14: UpdateFollowerAI
void UpdateFollowerAI(const uint32 uiDiff) override
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
{
if (HasFollowState(STATE_FOLLOW_PAUSED))
{
if (m_uiMoonwellCooldown < uiDiff)
{
m_creature->CastSpell(m_creature, SPELL_CORRUPT_SABER_VISUAL, false);
SetFollowPaused(false);
}
else
m_uiMoonwellCooldown -= uiDiff;
}
return;
}
DoMeleeAttackIfReady();
}
示例15: SetSleeping
void SetSleeping()
{
SetFollowPaused(true);
switch (urand(0, 2))
{
case 0: DoScriptText(EMOTE_KER_SLEEP_1, m_creature); break;
case 1: DoScriptText(EMOTE_KER_SLEEP_2, m_creature); break;
case 2: DoScriptText(EMOTE_KER_SLEEP_3, m_creature); break;
}
switch (urand(0, 3))
{
case 0: DoScriptText(SAY_KER_SLEEP_1, m_creature); break;
case 1: DoScriptText(SAY_KER_SLEEP_2, m_creature); break;
case 2: DoScriptText(SAY_KER_SLEEP_3, m_creature); break;
case 3: DoScriptText(SAY_KER_SLEEP_4, m_creature); break;
}
m_creature->SetStandState(UNIT_STAND_STATE_SLEEP);
m_creature->CastSpell(m_creature, SPELL_SLEEP_VISUAL, false);
}