本文整理汇总了C++中SummonList::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ SummonList::clear方法的具体用法?C++ SummonList::clear怎么用?C++ SummonList::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SummonList
的用法示例。
在下文中一共展示了SummonList::clear方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EnterCombat
void EnterCombat(Unit* /*who*/)
{
me->setActive(true);
events.Reset();
events.RescheduleEvent(EVENT_ENRAGE, 600000);
events.RescheduleEvent(EVENT_SPELL_FREEZING_SLASH, urand(7000,15000));
events.RescheduleEvent(EVENT_SPELL_PENETRATING_COLD, urand(15000,20000));
events.RescheduleEvent(EVENT_SUMMON_NERUBIAN, urand(5000,8000));
events.RescheduleEvent(EVENT_SUBMERGE, SUBMERGE_INTERVAL);
if( !IsHeroic() )
events.RescheduleEvent(EVENT_RESPAWN_SPHERE, 4000);
for( std::list<uint64>::iterator itr = summons.begin(); itr != summons.end(); ++itr )
if( Creature* c = pInstance->instance->GetCreature(*itr) )
{
c->GetMotionMaster()->MoveIdle();
c->StopMoving();
c->CastSpell(c, SPELL_SUBMERGE, false);
c->AI()->DoAction(1);
}
summons.clear();
for( uint8 i=0; i<4; ++i )
if( Creature* c = me->SummonCreature(NPC_BURROW, AnubLocs[i+1]) )
BurrowGUID[i] = c->GetGUID();
for( uint8 i=0; i<6; ++i )
if( Creature* c = me->SummonCreature(NPC_FROST_SPHERE, AnubLocs[i+5]) )
SphereGUID[i] = c->GetGUID();
Talk(SAY_AGGRO);
DoZoneInCombat();
if( pInstance )
pInstance->SetData(TYPE_ANUBARAK, IN_PROGRESS);
}
示例2: DamageTaken
void DamageTaken(Unit*, uint32 &damage, DamageEffectType, SpellSchoolMask)
{
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
{
damage = 0;
return;
}
if( Phase < 3 && damage >= me->GetHealth() )
{
damage = 0;
me->SetHealth(me->GetMaxHealth());
events.Reset();
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveAllAuras();
me->SetControlled(true, UNIT_STATE_STUNNED);
me->CastSpell(me, SPELL_BK_GHOUL_EXPLODE, true);
summons.clear();
me->CastSpell(me, SPELL_BK_FEIGN_DEATH, true);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_29);
me->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);
me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
me->AddUnitState(UNIT_STATE_DIED);
}
}
示例3: reset
void InternalCreatureType::reset()
{
experience = 0;
defense = 0;
armor = 0;
canPushItems = false;
canPushCreatures = false;
staticAttackChance = 95;
maxSummons = 0;
targetDistance = 1;
fleeHealth = 0;
pushable = true;
base_speed = 200;
health = 100;
health_max = 100;
outfit.lookHead = 130; // Default man
outfit.lookBody = 0;
outfit.lookLegs = 0;
outfit.lookFeet = 0;
outfit.lookType = 0;
outfit.lookTypeEx = 0;
outfit.lookAddons = 0;
corpseId = 0;
mechanicImmunities = MECHANIC_NONE;
damageImmunities = COMBAT_NONE;
race = RACE_BLOOD;
isSummonable = false;
isIllusionable = false;
isConvinceable = false;
isAttackable = true;
isHostile = true;
isLureable = false;
lightLevel = 0;
lightColor = 0;
manaCost = 0;
summonList.clear();
lootItems.clear();
elementMap.clear();
spellAttackList.clear();
spellDefenseList.clear();
yellSpeedTicks = 0;
yellChance = 0;
voiceVector.clear();
changeTargetSpeed = 0;
changeTargetChance = 0;
//scriptList.clear();
}