本文整理汇总了C++中Resurrect函数的典型用法代码示例。如果您正苦于以下问题:C++ Resurrect函数的具体用法?C++ Resurrect怎么用?C++ Resurrect使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Resurrect函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateAI
void UpdateAI(const uint32 diff)
{
if (pInstance && pInstance->GetData(DATA_PRINCEKELESETH_EVENT) == IN_PROGRESS)
{
if (isDead)
{
if (Respawn_Time <= diff)
{
Resurrect();
Respawn_Time = 12000;
} else Respawn_Time -= diff;
}
else
{
if (!UpdateVictim())
return;
if (Decrepify_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_DECREPIFY);
Decrepify_Timer = 30000;
} else Decrepify_Timer -= diff;
DoMeleeAttackIfReady();
}
}else
{
if (me->isAlive())
me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
}
}
示例2: SetInCombat
void AMech_RPGCharacter::OutOfCombat() {
TArray<AMech_RPGCharacter*> charactersFound = UMiscLibrary::GetCharactersInRange(1500, this->GetActorLocation());
for (AMech_RPGCharacter* character : charactersFound) {
if (!character->IsDead() && character->IsEnemy(this) && character->inCombat) {
SetInCombat();
return;
}
}
inCombat = false;
OnStopFiring.Broadcast();
if (OnOutOfCombat.IsBound()) OnOutOfCombat.Broadcast();
//if (!isPlayer && !isAlly) {
stats->SetVisibility(false, true);
//}
if (IsDead() && GetGroup()->GetPlayer() != nullptr) {
Resurrect();
}
else if (IsDead()) {
Reset();
GetWorld()->GetTimerManager().SetTimer(TimerHandle_Invunrelbility, this, &AMech_RPGCharacter::RemoveFromPlay, 6.0F);
}
}
示例3: SpellHit
void SpellHit(Unit* /*pWho*/, const SpellEntry* pSpell)
{
if (pSpell->Id == SPELL_RESURRECT && !PhaseTwo)
{
Resurrect(me);
IsResurrecting = false;
ZathDead = false;
}
}
示例4: Reset
void Reset() override
{
Initialize();
if (IsFakingDeath)
{
Resurrect(me);
IsFakingDeath = false;
}
}
示例5: DoScriptText
void boss_romuloAI::UpdateAI(const uint32 diff)
{
if (!UpdateVictim() || IsFakingDeath)
return;
if (JulianneDead)
{
if (ResurrectTimer <= diff)
{
Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID));
if (Julianne && CAST_AI(boss_julianneAI, Julianne->AI())->IsFakingDeath)
{
DoScriptText(SAY_ROMULO_RESURRECT, me);
Resurrect(Julianne);
CAST_AI(boss_julianneAI, Julianne->AI())->IsFakingDeath = false;
JulianneDead = false;
ResurrectTimer = 10000;
}
}
else ResurrectTimer -= diff;
}
if (BackwardLungeTimer <= diff)
{
Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
if (pTarget && !me->HasInArc(M_PI, pTarget))
{
DoCast(pTarget, SPELL_BACKWARD_LUNGE);
BackwardLungeTimer = urand(15000, 30000);
}
}
else BackwardLungeTimer -= diff;
if (DaringTimer <= diff)
{
DoCast(me, SPELL_DARING);
DaringTimer = urand(20000, 40000);
}
else DaringTimer -= diff;
if (DeadlySwatheTimer <= diff)
{
if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(pTarget, SPELL_DEADLY_SWATHE);
DeadlySwatheTimer = urand(15000, 25000);
}
else DeadlySwatheTimer -= diff;
if (PoisonThrustTimer <= diff)
{
DoCastVictim( SPELL_POISON_THRUST);
PoisonThrustTimer = urand(10000, 20000);
}
else PoisonThrustTimer -= diff;
DoMeleeAttackIfReady();
}
示例6: UpdateAI
void UpdateAI(uint32 diff) override
{
if (!UpdateVictim() || IsFakingDeath)
return;
if (JulianneDead)
{
if (ResurrectTimer <= diff)
{
Creature* Julianne = (ObjectAccessor::GetCreature((*me), JulianneGUID));
if (Julianne && ENSURE_AI(boss_julianne::boss_julianneAI, Julianne->AI())->IsFakingDeath)
{
Talk(SAY_ROMULO_RESURRECT);
Resurrect(Julianne);
ENSURE_AI(boss_julianne::boss_julianneAI, Julianne->AI())->IsFakingDeath = false;
JulianneDead = false;
ResurrectTimer = 10000;
}
} else ResurrectTimer -= diff;
}
if (BackwardLungeTimer <= diff)
{
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true);
if (target && !me->HasInArc(float(M_PI), target))
{
DoCast(target, SPELL_BACKWARD_LUNGE);
BackwardLungeTimer = urand(15000, 30000);
}
} else BackwardLungeTimer -= diff;
if (DaringTimer <= diff)
{
DoCast(me, SPELL_DARING);
DaringTimer = urand(20000, 40000);
} else DaringTimer -= diff;
if (DeadlySwatheTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
DoCast(target, SPELL_DEADLY_SWATHE);
DeadlySwatheTimer = urand(15000, 25000);
} else DeadlySwatheTimer -= diff;
if (PoisonThrustTimer <= diff)
{
DoCastVictim(SPELL_POISON_THRUST);
PoisonThrustTimer = urand(10000, 20000);
} else PoisonThrustTimer -= diff;
DoMeleeAttackIfReady();
}
示例7: UpdateAI
void UpdateAI(const uint32 diff)
{
if (m_uiHealTimer)
{
if (m_uiHealTimer <= diff)
{
Resurrect();
m_bHasRessed = true;
m_uiHealTimer = 0;
}
else
{
m_uiHealTimer -= diff;
return;
}
}
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
DoMeleeAttackIfReady();
}
示例8: UpdateAI
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
return;
if (!PhaseTwo)
{
// Transform to Phase 2
if (LorkhanDead && ZathDead && ThekalDead)
{
me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_TIGER_FORM);
Resurrect(me);
me->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
const CreatureTemplate *cinfo = me->GetCreatureTemplate();
me->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg / 100) * 40)));
me->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg / 100) * 40)));
me->UpdateDamagePhysical(BASE_ATTACK);
DoResetThreat();
PhaseTwo = true;
DoScriptText(SAY_TRANSFORM, me);
}
if (ThekalDead)
return;
// Resurrecting
if (LorkhanDead || ZathDead)
if (!IsResurrecting && (CheckDeath_Timer - 2000) <= diff)
{
if (ZathDead)
if (Unit* pZath = Unit::GetUnit(*me, ZathGUID))
pZath->CastSpell(pZath, SPELL_RESURRECT, false, 0, 0, pZath->GetGUID());
if (LorkhanDead)
if (Unit* pLorkhan = Unit::GetUnit(*me, LorkhanGUID))
pLorkhan->CastSpell(pLorkhan, SPELL_RESURRECT, false, 0, 0, pLorkhan->GetGUID());
IsResurrecting = true;
}
else
CheckDeath_Timer -= diff;
// Mortal Cleave Timer
if (MortalCleave_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_MORTALCLEAVE);
MortalCleave_Timer = 15000 + rand()%5000;
}
else
MortalCleave_Timer -= diff;
// Silence Timer
if (Silence_Timer <= diff) // Cast on a random target in range?
{
DoCast(me->getVictim(), SPELL_SILENCE);
Silence_Timer = 20000 + rand()%5000;
}
else
Silence_Timer -= diff;
}
else
// Phase 2 spells
{
// Enrage below 25% health
if (!Enraged && (me->GetHealth() < (me->GetMaxHealth() * 0.25)))
{
DoCast(me, SPELL_ENRAGE);
Enraged = true;
}
// Charge Timer
if (Charge_Timer <= diff)
{
if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
{
DoCast(pTarget, SPELL_CHARGE);
DoResetThreat();
AttackStart(pTarget);
}
Charge_Timer = 15000 + rand()%7000;
}
else
Charge_Timer -= diff;
// Frenzy Timer
if (Frenzy_Timer <= diff)
{
DoCast(me, SPELL_FRENZY);
Frenzy_Timer = 30000;
}
else
Frenzy_Timer -= diff;
// Force Punch Timer
if (ForcePunch_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_SILENCE);
ForcePunch_Timer = 16000 + rand()%5000;
}
else
ForcePunch_Timer -= diff;
//.........这里部分代码省略.........
示例9: Reset
void Reset()
{
m_uiHealTimer = 0;
m_bHasRessed = false;
Resurrect();
}