當前位置: 首頁>>代碼示例>>C++>>正文


C++ GossipHello函數代碼示例

本文整理匯總了C++中GossipHello函數的典型用法代碼示例。如果您正苦於以下問題:C++ GossipHello函數的具體用法?C++ GossipHello怎麽用?C++ GossipHello使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GossipHello函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: GossipSelectOption

	void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char * EnteredCode)
	{
		if(!plr)
			return;

		Creature *windwatcher = (Creature*)(pObject);
		if (windwatcher == NULL)
			return;

		switch (IntId)
		{
			case 0:
				GossipHello(pObject, plr, true);
				break;

			case 1:
			{
			if(plr == NULL || plr->GetMapMgr() == NULL || plr->GetMapMgr()->GetInterface() == NULL)
				return;
				Creature *whirlwind = plr->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ(), 6239);
				if(whirlwind != NULL)
				{
					if(!whirlwind->isAlive())
					{
						whirlwind->Delete();
					}
					else
						return;
				}

				whirlwind = EAS::SpawnCreature(plr, 6239, plr->GetPositionX()+7, plr->GetPositionY()+7, plr->GetPositionZ(), plr->GetOrientation(), 0);
				whirlwind->Despawn(5*60*1000, 0);
			}break;
		}
	}
開發者ID:wow4all,項目名稱:wowtbc,代碼行數:35,代碼來源:Warrior.cpp

示例2: GossipSelectOption

	void GossipSelectOption(Object* pObject, Player* pPlayer, uint32 Id, uint32 IntId, const char * EnteredCode)
	{
		if(pPlayer == NULL || !pObject->IsCreature())
			return;

		switch(IntId)
		{
		case 0:
			{
				GossipHello(pObject, pPlayer, true);
			}break;
		case 1:
			{
				GameObject* Door = pObject->GetMapMgr()->GetInterface()->GetGameObjectForce(120, 1603, 44, 186728);
				if(Door)
				{	
					Door->SetUInt32Value(GAMEOBJECT_STATE, 0);
					Door->SaveState();
					dynamic_cast<TIMEDEVENT*>(TO_CREATURE(pObject)->GetScript())->StartEvent();
				}
			}break;
		}

		pPlayer->Gossip_Complete();
	}	
開發者ID:Tulba,項目名稱:wowtbc,代碼行數:25,代碼來源:TimedEvent.cpp

示例3: GossipSelect

    bool GossipSelect(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action, std::string code)
    {
        CPlayer* pCPlayer = pPlayer->ToCPlayer();
        pCPlayer->PlayerTalkClass->CloseGossip();

        if (sender == 0)
        {
            if (action == 0)
                GossipHello(pPlayer, pCreature);
            else if (action == 1)
                TeleportPlayerToTeleName(pCPlayer, "tele_mall");
            else if (action == 2)
                TeleportPlayerToTeleName(pCPlayer, "tele_guru");
            else if (action == 3)
                pCPlayer->SendTalentWipeConfirm(pCreature->GetObjectGuid());
            else if (action == 4)
                pCPlayer->SendPetSkillWipeConfirm();
			else if (action == 5)
				TeleportPlayerToTeleName(pCPlayer, "tele_hearth");
        }


        if (!pPlayer->PlayerTalkClass->GetGossipMenu().Empty())
            pPlayer->PlayerTalkClass->SendGossipMenu("Your wish, my law!", pCreature->GetObjectGuid());
        return true;
    }
開發者ID:Lillecarl,項目名稱:mangos-classic,代碼行數:26,代碼來源:npc_teleporter.cpp

示例4: GossipSelectOption

    void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char * Code)
    {
        GossipMenu * Menu;
        switch(IntId)
        {
        case 0:     // Return to start
            GossipHello(pObject, Plr, true);
            break;

        //////////////////////
        // Main menu handlers
        /////

        case 1:    // Arena Vendor
            Plr->Gossip_SendPOI(5757, 583, 7, 6, 0, "Arena Vendor");
            Plr->Gossip_Complete();
            break;

        case 2:    // Arena Battlemaster
            Plr->Gossip_SendPOI(5852, 609, 7, 6, 0, "Arena Battlemaster");
            Plr->Gossip_Complete();
            break;

        case 3:    // Black Market
            Plr->Gossip_SendPOI(5919, 569, 7, 6, 0, "Black Market");
            Plr->Gossip_Complete();
            break;

        case 4:    // Exit of Dalaran
            Plr->Gossip_SendPOI(5765, 753, 7, 6, 0, "Exit of dalaran");
            SendQuickMenu(14020);
            break;

        }
    }
開發者ID:AscNHalf,項目名稱:AscNHalf,代碼行數:35,代碼來源:Underbelly_Guard.cpp

示例5: GossipSelectOption

	void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char * EnteredCode)
    {
		Creature *Lump = (Creature*)(pObject);
		if (Lump == NULL)
			return;

		switch (IntId)
		{
		case 0:
			GossipHello(pObject, plr, true);
			break;
		case 1:
			if(plr->GetQuestLogForEntry(9918))
			{
				QuestLogEntry *en = plr->GetQuestLogForEntry(9918);
				if(en && en->GetMobCount(0) < en->GetQuest()->required_mobcount[0])
				{
					uint32 newcount = en->GetMobCount(0) + 1;
					en->SetMobCount(0, newcount);
					en->SendUpdateAddKill(0);
					en->UpdatePlayerFields();
				}
			}
			break;
		}
	}
開發者ID:Chero,項目名稱:abcwow,代碼行數:26,代碼來源:Nagrand.cpp

示例6: GossipSelectOption

    void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char* EnteredCode)
    {
        if (!plr)
            return;

        Creature* Prisoner12 = TO_CREATURE(pObject);
        if (Prisoner12 == nullptr)
            return;

        switch (IntId)
        {
        case 0:
            GossipHello(pObject, plr);
            break;

        case 1:
        {
            QuestLogEntry* en = plr->GetQuestLogForEntry(9164);
            if (en && en->GetMobCount(0) < en->GetQuest()->required_mobcount[0])
            {
                en->SetMobCount(0, en->GetMobCount(0) + 1);
                en->SendUpdateAddKill(0);
                en->UpdatePlayerFields();

                Prisoner12->Despawn(5000, 6 * 60 * 1000);
                Prisoner12->SetStandState(STANDSTATE_STAND);
                Prisoner12->SetEmoteState(7);
                return;
            }
            break;
        }
        }
    }
開發者ID:TheGhostGroup,項目名稱:AscEmu,代碼行數:33,代碼來源:Quest_Ghostlands.cpp

示例7: GossipSelectOption

	void GossipSelectOption(Object * pObject, Player * plr, uint32 Id, uint32 IntId, const char * EnteredCode)
	{
		if(!plr)
			return;

		Creature * general = TO_CREATURE(pObject);
		if (general == NULL)
			return;

		switch (IntId)
		{
			case 0:
				GossipHello(pObject, plr, true);
				break;
 
			case 1:
			{
				Creature * spawncheckcr = plr->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ(), 7750);

				if(!spawncheckcr)
				{
					Creature * general = sEAS.SpawnCreature(plr, 7750, -10619, -2997, 28.8, 4, 0);
					general->Despawn(3*60*1000, 0);
				}

				GameObject * spawncheckgobj = plr->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords(plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ(), 141980);

				if(!spawncheckgobj)
				{
					GameObject * generalsbox = sEAS.SpawnGameobject(plr, 141980, -10622, -2994, 28.6, 4, 4, 0, 0, 0, 0);
					sEAS.GameobjectDelete(generalsbox, 3*60*1000);
				}
			}
		}
	}
開發者ID:AscNHalf,項目名稱:AscNHalf,代碼行數:35,代碼來源:BlastedLands.cpp

示例8: GossipSelectOption

    void GossipSelectOption(Object* pObject, Player * plr, uint32 Id, uint32 IntId, const char * Code)
    {
		if(pObject->GetTypeId()!=TYPEID_UNIT)
			return;
		
		GossipMenu * Menu;
        switch(IntId)
        {
		case 0:
			GossipHello(pObject, plr, true);
			break;

        case 1:
			{
				objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 1, plr); // Text of status [The Alchemy lab is not quite yet ready, $N. Mar'nah says she is (percentual) percent done with its assembly.$Bhowever.$B$BIf you wold like to help her with that, you will find her inside the inn at the Sun's Reach Harbor.]
				Menu->AddItem( 0, GOSSIP_EXARCH_NASUUN_3, 0);
				Menu->SendTo(plr);
            }break;
		case 2:
			{
				objmgr.CreateGossipMenuForPlayer(&Menu, pObject->GetGUID(), 12305, plr);
				Menu->AddItem( 0, GOSSIP_EXARCH_NASUUN_3, 0);
				Menu->SendTo(plr);
            }break;
		}
    }
開發者ID:wow4all,項目名稱:wowtbc,代碼行數:26,代碼來源:Gossip_Shattrath.cpp

示例9: GossipSelectOption

	void GossipSelectOption(ObjectPointer pObject, PlayerPointer plr, uint32 Id, uint32 IntId, const char * EnteredCode)
	{
		if(!plr)
			return;

		CreaturePointer spirit = TO_CREATURE(pObject);
		if (spirit == NULL)
			return;

		switch (IntId)
		{
			case 0:
				GossipHello(pObject, plr, true);
				break;

			case 1:
				{
					QuestLogEntry *en = plr->GetQuestLogForEntry(3520);
					if(en && en->GetMobCount(0) < en->GetQuest()->required_mobcount[0])
					{
						en->SetMobCount(0, en->GetMobCount(0) + 1);
						en->SendUpdateAddKill(0);
						en->UpdatePlayerFields();
					}
					if(!spirit)
						return;

					spirit->Despawn(1, 0);
					return;

				}
		}
	}
開發者ID:Vanj-crew,項目名稱:HearthStone-Emu,代碼行數:33,代碼來源:Tanaris.cpp

示例10: GossipSelectOption

	void GossipSelectOption(Object* pObject, Player* Plr, uint32 Id, uint32 IntId, const char* Code)
	{

		switch(IntId)
		{
			case 0:  
			GossipHello(pObject, Plr);
			return;
				break;
			case 1:
			Plr->CastSpell(Plr, 67834, true);
				break;
			case 2:
			Plr->CastSpell(Plr, 67838, true);
				break;
			case 3:
			Plr->CastSpell(Plr, 67835, true);
				break;
			case 4:
			Plr->CastSpell(Plr, 67836, true);
				break;
			case 5:
			Plr->CastSpell(Plr, 67837, true);
				break;
			case 6:
			Plr->CastSpell(Plr, 68081, true);
				break;
		}
		Plr->Gossip_Complete();
	}
開發者ID:Asandru,項目名稱:Script-Land,代碼行數:30,代碼來源:RandomScripts.cpp

示例11: GossipSelectOption

	void GossipSelectOption(Object* pObject, Player* pPlayer, uint32 Id, uint32 IntId, const char * EnteredCode)
    	{
		if(!pPlayer)
			return;

		Creature *Prisoner1 = (Creature*)(pObject);
		if (Prisoner1 == NULL)
			return;

		switch (IntId)
		{
			case 0:
				GossipHello(pObject, pPlayer, true);
				break;
 
			case 1:
			{
			QuestLogEntry *en = pPlayer->GetQuestLogForEntry(10368);
			if(en && en->GetMobCount(0) < en->GetQuest()->required_mobcount[0])
			{
				en->SetMobCount(0, en->GetMobCount(0) + 1);
				en->SendUpdateAddKill(0);
				en->UpdatePlayerFields();

				if(!Prisoner1)
					return;

				Prisoner1->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "You've freed me! The winds speak to my people one again and grant us their strength. I thank you, stranger.");
				Prisoner1->Despawn(5000, 6*60*1000);
				Prisoner1->SetStandState(STANDSTATE_STAND);
				return;
			}break;
			}
		}
	}
開發者ID:AegisEmu,項目名稱:AegisEmu,代碼行數:35,代碼來源:Hellfire_Peninsula.cpp

示例12: GossipSelectOption

	void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char * EnteredCode)
	{
		if(!plr)
			return;

		Creature *Prisoner32 = (Creature*)(pObject);
		if (Prisoner32 == NULL)
			return;

		switch (IntId)
		{
			case 0:
				GossipHello(pObject, plr, true);
				break;
 
			case 1:
			{
			QuestLogEntry *en = plr->GetQuestLogForEntry(9164);
			if(en && en->GetMobCount(2) < en->GetQuest()->required_mobcount[2])
			{
				en->SetMobCount(2, en->GetMobCount(2) + 1);
				en->SendUpdateAddKill(2);
				en->UpdatePlayerFields();

				if(!Prisoner32)
					return;

				Prisoner32->Despawn(5000, 6*60*1000);
				Prisoner32->SetStandState(STANDSTATE_STAND);
				Prisoner32->SetUInt32Value(UNIT_NPC_EMOTESTATE, 7);
				return;
			}break;
			}
		}
	}
開發者ID:wow4all,項目名稱:wowtbc,代碼行數:35,代碼來源:Ghostlands.cpp

示例13: GossipSelectOption

		void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char* EnteredCode)
		{
			if(!plr)
				return;

			Creature* highchief = TO_CREATURE(pObject);
			if(highchief == NULL)
				return;

			switch(IntId)
			{
				case 0:
					GossipHello(pObject, plr);
					break;

				case 1:
					{
						QuestLogEntry* en = plr->GetQuestLogForEntry(9663);
						if(en && en->GetMobCount(0) < en->GetQuest()->required_mobcount[0])
						{
							en->SetMobCount(0, en->GetMobCount(0) + 1);
							en->SendUpdateAddKill(0);
							en->UpdatePlayerFields();
							return;
						}
						break;
					}
			}
		}
開發者ID:Refuge89,項目名稱:Edge-of-Chaos,代碼行數:29,代碼來源:Quest_BloodmystIsle.cpp

示例14: GossipSelectOption

	void GossipSelectOption(ObjectPointer pObject, PlayerPointer plr, uint32 Id, uint32 IntId, const char * EnteredCode)
	{
		if(!plr)
			return;

		CreaturePointer doctor = TO_CREATURE(pObject);
		if (doctor == NULL)
			return;

		switch (IntId)
		{
			case 0:
				GossipHello(pObject, plr, true);
				break;

			case 1:
			{
				plr->GetItemInterface()->RemoveItemAmt(2799, 1);
				doctor->CastSpell(doctor, dbcSpell.LookupEntry(12380), true);
				if( !plr || !plr->GetMapMgr() || !plr->GetMapMgr()->GetInterface() )
					return;
				CreaturePointer firstenemy = sEAS.SpawnCreature(plr, 1511, -13770.5, -6.79, 42.8, 5.7 , 0);
				firstenemy->GetAIInterface()->MoveTo(-13727.8, -26.2, 46.15, 4.07);
				firstenemy->Despawn(10*60*1000, 0);
			}break;
		}
	}
開發者ID:Vanj-crew,項目名稱:HearthStone-Emu,代碼行數:27,代碼來源:StranglethornVale.cpp

示例15: GossipSelectOption

	void GossipSelectOption(Object* pObject, Player* plr, uint32 Id, uint32 IntId, const char * EnteredCode)
	{
		if(!plr)
			return;

		Creature* doctor = TO_CREATURE(pObject);
		if (doctor == NULL)
			return;

		switch (IntId)
		{
			case 0:
				GossipHello(pObject, plr, true);
				break;

			case 1:
			{
				plr->GetItemInterface()->RemoveItemAmt(2799, 1);
				QuestLogEntry *qle = plr->GetQuestLogForEntry(10201);
				if(qle && qle->GetMobCount(0) < qle->GetQuest()->required_mobcount[0])
				{
					qle->SetMobCount(0, qle->GetMobCount(0)+1);
					qle->SendUpdateAddKill(0);
					qle->UpdatePlayerFields();
				}
			}break;
		}
	}
開發者ID:vata,項目名稱:wowice,代碼行數:28,代碼來源:Quest_Terrokar_Forest.cpp


注:本文中的GossipHello函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。