本文整理汇总了C++中CheckPlayersFrostResist函数的典型用法代码示例。如果您正苦于以下问题:C++ CheckPlayersFrostResist函数的具体用法?C++ CheckPlayersFrostResist怎么用?C++ CheckPlayersFrostResist使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CheckPlayersFrostResist函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: JustDied
void JustDied(Unit* /*killer*/) override
{
_JustDied();
me->CastSpell(me, SPELL_DIES, true);
CheckPlayersFrostResist();
}
示例2: EnterCombat
void EnterCombat(Unit * /*who*/) {
_EnterCombat();
me->CastSpell(me, SPELL_FROST_AURA, true);
events.ScheduleEvent(EVENT_BERSERK, 15 * 60000);
EnterPhaseGround();
CheckPlayersFrostResist();
}
示例3: EnterCombat
void EnterCombat(Unit* /*who*/) override
{
_EnterCombat();
me->CastSpell(me, SPELL_FROST_AURA, true);
events.ScheduleEvent(EVENT_BERSERK, 15 * MINUTE * IN_MILLISECONDS);
EnterPhaseGround();
CheckPlayersFrostResist();
}
示例4: JustDied
void JustDied(Unit* /*who*/)
{
_JustDied();
me->CastSpell(me, SPELL_DIES, true);
CheckPlayersFrostResist();
if (CanTheHundredClub)
{
AchievementEntry const* AchievTheHundredClub = sAchievementStore.LookupEntry(ACHIEVEMENT_THE_HUNDRED_CLUB);
if (AchievTheHundredClub)
{
if (map && map->IsDungeon())
{
Map::PlayerList const &players = map->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievTheHundredClub);
}
}
}
}
示例5: UpdateAI
void UpdateAI(const uint32 diff)
{
if (!phase)
return;
events.Update(diff);
if ((phase != PHASE_BIRTH && !UpdateVictim()) || !CheckInRoom())
return;
if (CanTheHundredClub)
{
if (CheckFrostResistTimer <= diff)
{
CheckPlayersFrostResist();
CheckFrostResistTimer = (rand() % 5 + 5) * 1000;
} else CheckFrostResistTimer -= diff;
}
if (phase == PHASE_GROUND)
{
while (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_BERSERK:
DoScriptText(EMOTE_ENRAGE, me);
DoCast(me, SPELL_BERSERK);
return;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, 5000+rand()%10000, 0, PHASE_GROUND);
return;
case EVENT_TAIL:
DoCastAOE(SPELL_TAIL_SWEEP);
events.ScheduleEvent(EVENT_TAIL, 5000+rand()%10000, 0, PHASE_GROUND);
return;
case EVENT_DRAIN:
DoCastAOE(SPELL_LIFE_DRAIN);
events.ScheduleEvent(EVENT_DRAIN, 24000, 0, PHASE_GROUND);
return;
case EVENT_BLIZZARD:
{
//DoCastAOE(SPELL_SUMMON_BLIZZARD);
if (Creature* summon = DoSummon(MOB_BLIZZARD, me, 0.0f, urand(25000, 30000), TEMPSUMMON_TIMED_DESPAWN))
summon->GetMotionMaster()->MoveRandom(40);
events.ScheduleEvent(EVENT_BLIZZARD, RAID_MODE(20000, 7000), 0, PHASE_GROUND);
break;
}
case EVENT_FLIGHT:
if (HealthAbovePct(10))
{
phase = PHASE_FLIGHT;
events.SetPhase(PHASE_FLIGHT);
me->SetReactState(REACT_PASSIVE);
me->AttackStop();
float x, y, z, o;
me->GetHomePosition(x, y, z, o);
me->GetMotionMaster()->MovePoint(1, x, y, z);
return;
}
break;
}
}
DoMeleeAttackIfReady();
}
else
{
if (uint32 eventId = events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_LIFTOFF:
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
me->SetLevitate(true);
me->SendMovementFlagUpdate();
events.ScheduleEvent(EVENT_ICEBOLT, 1500);
iceboltCount = RAID_MODE(2, 3);
return;
case EVENT_ICEBOLT:
{
std::vector<Unit*> targets;
std::list<HostileReference*>::const_iterator i = me->getThreatManager().getThreatList().begin();
for (; i != me->getThreatManager().getThreatList().end(); ++i)
if ((*i)->getTarget()->GetTypeId() == TYPEID_PLAYER && !(*i)->getTarget()->HasAura(SPELL_ICEBOLT))
targets.push_back((*i)->getTarget());
if (targets.empty())
iceboltCount = 0;
else
{
std::vector<Unit*>::const_iterator itr = targets.begin();
advance(itr, rand()%targets.size());
iceblocks.insert(std::make_pair((*itr)->GetGUID(), 0));
DoCast(*itr, SPELL_ICEBOLT);
--iceboltCount;
}
if (iceboltCount)
//.........这里部分代码省略.........