當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。