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


C++ Emote函数代码示例

本文整理汇总了C++中Emote函数的典型用法代码示例。如果您正苦于以下问题:C++ Emote函数的具体用法?C++ Emote怎么用?C++ Emote使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了Emote函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: OnDied

		void OnDied(Unit* pKiller)
		{
			if(pSkarvald != NULL && pSkarvald->IsAlive())
			{
				Emote("See... you... soon.", Text_Yell, 0);
				pSkarvald->Emote("Pagh! What sort of necromancer lets death stop him? I knew you were worthless!", Text_Yell, 13233);
				SpawnCreature(CN_DALRONN_GHOST, true);
				_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
			}
			else if(pSkarvald != NULL && !pSkarvald->IsAlive())
			{
				Emote("There's no... greater... glory.", Text_Yell, 13201);

				pSkarvaldGhost = GetNearestCreature(CN_SKARVALD_GHOST);

				if(pSkarvaldGhost != NULL)
				{
					pSkarvaldGhost->Despawn(1000, 0);
					pSkarvaldGhost = NULL;
				}
			}

			ParentClass::OnDied(pKiller);
		};
开发者ID:Antares84,项目名称:arcemu,代码行数:24,代码来源:Instance_UtgardeKeep.cpp

示例2: OnReachWP

		void OnReachWP(uint32 iWaypointId, bool bForwards)
		{
			if(iWaypointId == 1)
			{
				switch(RandomUInt(2))
				{
					case 0:
						Emote("Life from the lifelessness... death for you.",			Text_Yell, 13961);
						break;
					case 1:
						Emote("Nothing is wasted in the process. You will see....",	Text_Yell, 13962);
						break;
				};

				MoonScriptCreatureAI* pAnvil = GetNearestCreature(CN_VOLKHANS_ANVIL);
				if(pAnvil)
					_unit->CastSpell(pAnvil->GetUnit(), SPELL_TEMPER, true);
				else
					_unit->CastSpell(GetUnit(), SPELL_TEMPER, true);

				SetCanEnterCombat(true);
				_unit->GetAIInterface()->AttackReaction(GetNearestPlayer() , 1);   // hackfix
			};
		};
开发者ID:Refuge89,项目名称:Edge-of-Chaos,代码行数:24,代码来源:Instance_HallsOfLightning.cpp

示例3: AIUpdate

		void AIUpdate()
		{
			if(IsTimerFinished(mNovaTimer))
			{
				switch(RandomUInt(2))
				{
					case 0:
						Emote("You cannot hide from fate!",			Text_Yell,	14163);
						break;
					case 1:
						Emote("Come closer. I will make it quick.",	Text_Yell,	14164);
						break;
					case 2:
						Emote("Your flesh cannot hold out for long.",	Text_Yell,	14165);
						break;
				};

				Announce("Loken begins to cast Lightning Nova!");
				CastSpellNowNoScheduling(mNova);
				ResetTimer(mNovaTimer, TIMER_NOVA + (RandomUInt(8) * 1000));
			};

			if(mSpeech == 4)
				return;

			if(GetHealthPercent() <= (100 - (25 * mSpeech)))
			{
				switch(mSpeech)
				{
					case 1:
						Emote("You stare blindly into the abyss!",	                                    Text_Yell, 14169);
						break;
					case 2:
						Emote("Your ignorance is profound. Can you not see where this path leads?",    Text_Yell, 14170);
						break;
					case 3:
						Emote("You cross the precipice of oblivion!",                                  Text_Yell, 14171);
						break;
						++mSpeech;
				};
			};

			if(IsTimerFinished(mRespondTimer))
			{
				Emote("My master has shown me the future, and you have no place in it. Azeroth will be reborn in darkness. Yogg-Saron shall be released! The Pantheon shall fall!", Text_Yell, 14161);
				RemoveTimer(mRespondTimer);
				RemoveAIUpdateEvent();
			};

			ParentClass::AIUpdate();
		};
开发者ID:Refuge89,项目名称:Edge-of-Chaos,代码行数:51,代码来源:Instance_HallsOfLightning.cpp

示例4: AIUpdate

	void AIUpdate()
	{
		if(IsTimerFinished(mRessTimer))
		{
			SetPhase(2);
			
			_unit->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
			_unit->SetUInt32Value(UNIT_FIELD_DISPLAYID, 26351);
			_unit->SetUInt32Value(UNIT_FIELD_HEALTH,_unit->GetUInt32Value(UNIT_FIELD_MAXHEALTH));
			_unit->setDeathState(ALIVE);
			_unit->WipeTargetList();
			_unit->WipeHateList();
		
			Emote("I return! A second chance to carve out your skull!", Text_Yell, 13209);
			RemoveTimer(mRessTimer);
		}
	} 	
开发者ID:AtVirus,项目名称:Descent-Scripts,代码行数:17,代码来源:Instance_UtgardeKeep.cpp

示例5: Merge

	void Merge()
	{
		if( mLynx )
		{
			mLynx->Despawn(0, 0);
			mLynx = NULL;
			Emote("Spirit, come back to me!", Text_Yell, 12022);
		}
			
		if(CurrentHealth)
			_unit->SetHealth(CurrentHealth);
		if(MaxHealth)
			_unit->SetUInt32Value(UNIT_FIELD_MAXHEALTH, MaxHealth);
		SetDisplayId(21632);
		
		SplitCount++;
		SetPhase(1);
	}
开发者ID:Desch,项目名称:Edge-of-Chaos,代码行数:18,代码来源:Raid_ZulAman.cpp

示例6: LokenAI

	LokenAI(Creature* pCreature) : MoonScriptCreatureAI(pCreature)
	{
		mInstance = GetInstanceScript();
		mNova = AddSpell( LIGHTNING_NOVA, Target_Self, 0, 4.0f, 0 );
		AddSpell( ARC_LIGHTNING, Target_RandomPlayer, 25, 0, 6 );

		Emote( "I have witnessed the rise and fall of empires. The birth and extinction of entire species. Over countless millennia the foolishness of mortals has remained the only constant. Your presence here confirms this.", Text_Yell, 14160 );

		AddEmote( Event_OnCombatStart, "What hope is there for you? None!", Text_Yell, 14162 );
		AddEmote( Event_OnTargetDied, "Only mortal...", Text_Yell, 14166 );
		AddEmote( Event_OnTargetDied, "I... am... FOREVER!", Text_Yell, 14167 );
		AddEmote( Event_OnTargetDied, "What little time you had, you wasted!", Text_Yell, 14168 );
		AddEmote( Event_OnDied, "My death... heralds the end of this world.", Text_Yell, 14172 );

		mNovaTimer = INVALIDATE_TIMER;
		mRespondTimer = AddTimer( TIMER_RESPOND );
		RegisterAIUpdateEvent( 1000 );
		mSpeech = 1;
	};
开发者ID:Desch,项目名称:Edge-of-Chaos,代码行数:19,代码来源:Instance_HallsOfLightning.cpp

示例7: AIUpdate

    void AIUpdate()
	{	
        ParentClass::AIUpdate();

		if( IsTimerFinished( mSummonTime ) )
		{
			MoonScriptCreatureAI *Eagle = NULL;
			// Spawn 3 Soaring Eagles
			for(int x=0; x<3; x++)
			{
				Eagle = SpawnCreature(CN_SOARING_EAGLE, ( _unit->GetPositionX() + RandomFloat( 12 ) - 10 ), ( _unit->GetPositionY()+ RandomFloat( 12 ) - 15 ),
				_unit->GetPositionZ(), _unit->GetOrientation(), true);
				if(Eagle)
				{
					Eagle->AggroNearestUnit();
					Eagle->SetDespawnWhenInactive(true);
				}
			}
			Eagle = NULL;
			Emote("Feed, me bruddahs!", Text_Yell, 12019);
			// Restart the timer
			ResetTimer( mSummonTime, 120000);
		}
	}
开发者ID:Desch,项目名称:Edge-of-Chaos,代码行数:24,代码来源:Raid_ZulAman.cpp

示例8: KilJaedenAI

	KilJaedenAI(Creature* pCreature) : MoonScriptBossAI(pCreature)
	{	
		SetCanEnterCombat( false );

		DelayNextAttack( 11600 );
		SetAllowMelee( false );
		SetAllowSpell( false );
		SetAllowTargeting( false );
		SetCanMove( false );
		TriggerCooldownOnAllSpells(); 

		SetCanMove( false );
		Emote( "The expendible have perished... So be it! Now I shall succeed where Sargeras could not! I will bleed this wretched world and secure my place as the true master of the Burning Legion. The end has come! Let the unraveling of this world commence!", Text_Yell, 12500 );
		mStarted = false;
		RegisterAIUpdateEvent( 100 );

		pKJDummy = static_cast<KJDummyAI*>( GetNearestCreature( CN_KIL_JADEN_DUMMY ) );
		if( pKJDummy )
			pKJDummy->AddEncounterCreature( _unit );

		AddPhaseSpell( 1, AddSpell( SOUL_FLAY, Target_Current, 50, 0, 6 ) );
		AddPhaseSpell( 1, AddSpell( LEGION_LIGHTNING, Target_RandomPlayer, 25, 2.0f, 8 ) );
		AddPhaseSpell( 1, AddSpell( FIRE_BLOOM, Target_RandomPlayer, 20, 0, 10 ) );
	};
开发者ID:Tulba,项目名称:wowtbc,代码行数:24,代码来源:kil'jaeden.cpp

示例9: OnCombatStart

	void OnCombatStart(Unit *pTarget)
	{
		Emote("Reckless mortals! None may challenge the Sons of the Living Flame!", Text_Yell, 8035);
		SetPhase(1);
		ParentClass::OnCombatStart(pTarget);
	}
开发者ID:wow4all,项目名称:wowtbc,代码行数:6,代码来源:Raid_MoltenCore.cpp

示例10: OnSpawn

	void OnSpawn()
	{
		Emote("The Runes of Warding have been destroyed! Hunt down the infidels, my brethren!", Text_Yell, 8039);
	}
开发者ID:wow4all,项目名称:wowtbc,代码行数:4,代码来源:Raid_MoltenCore.cpp

示例11: getMSTime

void CreatureTextMgr::LoadCreatureTexts()
{
    uint32 oldMSTime = getMSTime();

    mTextMap.clear(); // for reload case
    //all currently used temp texts are NOT reset

    QueryResult_AutoPtr result = WorldDatabase.Query("SELECT entry, groupid, id, text, type, language, probability, emote, duration, sound, TextRange FROM creature_text");

    if (!result)
    {
        sLog.outString(">> Loaded 0 ceature texts. DB table `creature_text` is empty.");

        return;
    }

    uint32 textCount = 0;

    do
    {
        Field* fields = result->Fetch();
        CreatureTextEntry temp;

        temp.entry           = fields[0].GetUInt32();
        temp.group           = fields[1].GetUInt8();
        temp.id              = fields[2].GetUInt8();
        temp.text            = fields[3].GetString();
        temp.type            = ChatMsg(fields[4].GetUInt8());
        temp.lang            = Language(fields[5].GetUInt8());
        temp.probability     = fields[6].GetFloat();
        temp.emote           = Emote(fields[7].GetUInt32());
        temp.duration        = fields[8].GetUInt32();
        temp.sound           = fields[9].GetUInt32();
        temp.TextRange       = CreatureTextRange(fields[10].GetUInt8());

        if (temp.sound)
        {
            if (!sSoundEntriesStore.LookupEntry(temp.sound))
            {
                sLog.outError("CreatureTextMgr: Entry %u, Group %u in table `creature_text` has Sound %u but sound does not exist.", temp.entry, temp.group, temp.sound);
                temp.sound = 0;
            }
        }

        if (!GetLanguageDescByID(temp.lang))
        {
            sLog.outError("CreatureTextMgr: Entry %u, Group %u in table `creature_text` using Language %u but Language does not exist.", temp.entry, temp.group, uint32(temp.lang));
            temp.lang = LANG_UNIVERSAL;
        }

        if (temp.type >= MAX_CHAT_MSG_TYPE)
        {
            sLog.outError("CreatureTextMgr: Entry %u, Group %u in table `creature_text` has Type %u but this Chat Type does not exist.", temp.entry, temp.group, uint32(temp.type));
            temp.type = CHAT_MSG_SAY;
        }

        if (temp.emote)
        {
            if (!sEmotesStore.LookupEntry(temp.emote))
            {
                sLog.outError("CreatureTextMgr: Entry %u, Group %u in table `creature_text` has Emote %u but emote does not exist.", temp.entry, temp.group, uint32(temp.emote));
                temp.emote = EMOTE_ONESHOT_NONE;
            }
        }

        if (temp.TextRange > TEXT_RANGE_WORLD)
        {
            sLog.outError("CreatureTextMgr: Entry %u, Group %u, Id %u in table `creature_text` has incorrect TextRange %u.", temp.entry, temp.group, temp.id, temp.TextRange);
            temp.TextRange = TEXT_RANGE_NORMAL;
        }

        // add the text into our entry's group
        mTextMap[temp.entry][temp.group].push_back(temp);

        ++textCount;
    }
    while (result->NextRow());

    sLog.outString(">> Loaded %u creature texts for %lu creatures in %u ms", textCount, mTextMap.size(), GetMSTimeDiffToNow(oldMSTime));
}
开发者ID:Zaffy,项目名称:OregonCore,代码行数:80,代码来源:CreatureTextMgr.cpp

示例12: getMSTime

void CreatureTextMgr::LoadCreatureTexts()
{
    uint32 oldMSTime = getMSTime();

    mTextMap.clear(); // for reload case
    //all currently used temp texts are NOT reset

    PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_CREATURE_TEXT);
    PreparedQueryResult result = WorldDatabase.Query(stmt);

    if (!result)
    {
        TC_LOG_INFO("server.loading", ">> Loaded 0 ceature texts. DB table `creature_text` is empty.");

        return;
    }

    uint32 textCount = 0;

    do
    {
        Field* fields = result->Fetch();
        CreatureTextEntry temp;

        temp.creatureId      = fields[0].GetUInt32();
        temp.groupId         = fields[1].GetUInt8();
        temp.id              = fields[2].GetUInt8();
        temp.text            = fields[3].GetString();
        temp.type            = ChatMsg(fields[4].GetUInt8());
        temp.lang            = Language(fields[5].GetUInt8());
        temp.probability     = fields[6].GetFloat();
        temp.emote           = Emote(fields[7].GetUInt32());
        temp.duration        = fields[8].GetUInt32();
        temp.sound           = fields[9].GetUInt32();
        temp.BroadcastTextId = fields[10].GetUInt32();
        temp.TextRange       = CreatureTextRange(fields[11].GetUInt8());

        if (temp.sound)
        {
            if (!sSoundEntriesStore.LookupEntry(temp.sound))
            {
                TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_text` has Sound %u but sound does not exist.", temp.creatureId, temp.groupId, temp.sound);
                temp.sound = 0;
            }
        }

        if (!GetLanguageDescByID(temp.lang))
        {
            TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_text` using Language %u but Language does not exist.", temp.creatureId, temp.groupId, uint32(temp.lang));
            temp.lang = LANG_UNIVERSAL;
        }

        if (temp.type >= MAX_CHAT_MSG_TYPE)
        {
            TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_text` has Type %u but this Chat Type does not exist.", temp.creatureId, temp.groupId, uint32(temp.type));
            temp.type = CHAT_MSG_SAY;
        }

        if (temp.emote)
        {
            if (!sEmotesStore.LookupEntry(temp.emote))
            {
                TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u in table `creature_text` has Emote %u but emote does not exist.", temp.creatureId, temp.groupId, uint32(temp.emote));
                temp.emote = EMOTE_ONESHOT_NONE;
            }
        }

        if (temp.BroadcastTextId)
        {
            if (!sObjectMgr->GetBroadcastText(temp.BroadcastTextId))
            {
                TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u, Id %u in table `creature_text` has non-existing or incompatible BroadcastTextId %u.", temp.creatureId, temp.groupId, temp.id, temp.BroadcastTextId);
                temp.BroadcastTextId = 0;
            }
        }

        if (temp.TextRange > TEXT_RANGE_WORLD)
        {
            TC_LOG_ERROR("sql.sql", "CreatureTextMgr: Entry %u, Group %u, Id %u in table `creature_text` has incorrect TextRange %u.", temp.creatureId, temp.groupId, temp.id, temp.TextRange);
            temp.TextRange = TEXT_RANGE_NORMAL;
        }

        // add the text into our entry's group
        mTextMap[temp.creatureId][temp.groupId].push_back(temp);

        ++textCount;
    }
    while (result->NextRow());

    TC_LOG_INFO("server.loading", ">> Loaded %u creature texts for " SZFMTD " creatures in %u ms", textCount, mTextMap.size(), GetMSTimeDiffToNow(oldMSTime));
}
开发者ID:ElunaLuaEngine,项目名称:ElunaTrinityWotlk,代码行数:91,代码来源:CreatureTextMgr.cpp

示例13: AIUpdate

	void AIUpdate()
	{
		if( i_drakeCount >= 1)
		{
			if( IsTimerFinished(mDrakeTimer) )
			{
				if( b_tenebron == true )
					CallTenebron();
				else if( b_shadron == true )
					CallShadron();
				else if( b_vesperon == true )
					CallVesperon();

				ResetTimer( mDrakeTimer, 45000 );
			};
		};

		if(IsTimerFinished(mTsunamiTimer))
		{
			_unit->SendChatMessage(CHAT_MSG_RAID_BOSS_EMOTE, LANG_UNIVERSAL, "The lava surrounding Sartharion churns!");

			uint32 RandomSpeach = rand()%4;
			switch (RandomSpeach)		
			{
			case 0:
				Emote( "Such flammable little insects....", Text_Yell, 14100);	
				break;
			case 1:
				Emote( "Your charred bones will litter the floor!", Text_Yell, 14101);
				break;
			case 2:
				Emote( "How much heat can you take?", Text_Yell, 14102);
				break;
			case 3:
				Emote( "All will be reduced to ash!", Text_Yell, 14103);
				break;				
			};
			
			uint32 RndSide = rand()%2;
			Creature *Tsunami = NULLCREATURE;

			for(int i = 0; i < 3; ++i)
			{
				switch(RndSide)
				{
				case 0:
					Tsunami = this->GetUnit()->GetMapMgr()->GetInterface()->SpawnCreature(CN_FLAME_TSUNAMI, TSUNAMI_SPAWN[i].positionX, TSUNAMI_SPAWN[i].positionY, TSUNAMI_SPAWN[i].positionZ, TSUNAMI_SPAWN[i].positionO, true, true, NULL, NULL);  
					
					if( Tsunami != NULL )
						Tsunami->GetAIInterface()->MoveTo( TSUNAMI_MOVE[i].positionX, TSUNAMI_MOVE[i].positionY, TSUNAMI_MOVE[i].positionZ, TSUNAMI_MOVE[i].positionO );
					break;
				case 1:
					Tsunami = this->GetUnit()->GetMapMgr()->GetInterface()->SpawnCreature(CN_FLAME_TSUNAMI, TSUNAMI_SPAWN[i + 3].positionX, TSUNAMI_SPAWN[i + 3].positionY, TSUNAMI_SPAWN[i + 3].positionZ, TSUNAMI_SPAWN[i + 3].positionO, true, true, NULL, NULL);  
					
					if( Tsunami != NULL )
						Tsunami->GetAIInterface()->MoveTo( TSUNAMI_MOVE[i + 3].positionX, TSUNAMI_MOVE[i + 3].positionY, TSUNAMI_MOVE[i + 3].positionZ, TSUNAMI_MOVE[i + 3].positionO );
				};
			};

			ResetTimer(mTsunamiTimer, 32000);
		};

		if( IsTimerFinished(mAddTimer) )
		{			
			for(uint32 i = 0; i < 2; ++i)
			{
				uint32 j = rand()%8;
				SpawnCreature(CN_LAVA_BLAZE, LAVA_SPAWNS[j].positionX, LAVA_SPAWNS[j].positionY, LAVA_SPAWNS[j].positionZ, LAVA_SPAWNS[j].positionO, true);
			};

			ResetTimer(mAddTimer, 15000);
		};
			
		if( IsTimerFinished(mAddTimer) && GetHealthPercent() <= 10 ) // enrage phase
		{
			for(uint32 i = 0; i < 6; ++i)
			{
				uint32 j = rand()%8;
				SpawnCreature(CN_LAVA_BLAZE, LAVA_SPAWNS[j].positionX, LAVA_SPAWNS[j].positionY, LAVA_SPAWNS[j].positionZ, LAVA_SPAWNS[j].positionO, true);
			};

			RemoveTimer(mAddTimer);
		};

		ParentClass::AIUpdate();		
	};
开发者ID:AscNHalf,项目名称:AscNHalf,代码行数:86,代码来源:Raid_TheObsidianSanctum.cpp

示例14: OnCombatStart

	void OnCombatStart(Unit *pTarget)
	{
		Emote("Drain... life...", Text_Yell, 12389);
		SetPhase(1);
		ParentClass::OnCombatStart(pTarget);
	}
开发者ID:AtVirus,项目名称:Descent-Scripts,代码行数:6,代码来源:Instance_MagistersTerrace.cpp

示例15: Emote

void ArcScriptCreatureAI::Emote(EmoteDesc* pEmote)
{
	if( pEmote ) Emote(pEmote->mText.c_str(), pEmote->mType, pEmote->mSoundId);
}
开发者ID:AegisEmu,项目名称:AegisEmu,代码行数:4,代码来源:Base.cpp


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