当前位置: 首页>>代码示例>>C++>>正文


C++ SummonList::clear方法代码示例

本文整理汇总了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);
		}
开发者ID:DSlayerMan,项目名称:Sunwell,代码行数:33,代码来源:boss_anubarak_trial.cpp

示例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);

			}
		}
开发者ID:AlexHjelm,项目名称:sunwell,代码行数:27,代码来源:boss_black_knight.cpp

示例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();
}
开发者ID:OMARTINEZ210,项目名称:server,代码行数:57,代码来源:creature_type.cpp


注:本文中的SummonList::clear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。