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


C++ Creature::GetAIInterface方法代码示例

本文整理汇总了C++中Creature::GetAIInterface方法的典型用法代码示例。如果您正苦于以下问题:C++ Creature::GetAIInterface方法的具体用法?C++ Creature::GetAIInterface怎么用?C++ Creature::GetAIInterface使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Creature的用法示例。


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

示例1: OnQuestStart

    void OnQuestStart(Player* mTarget, QuestLogEntry* /*qLogEntry*/) override
    {
        float SSX = mTarget->GetPositionX();
        float SSY = mTarget->GetPositionY();
        float SSZ = mTarget->GetPositionZ();

        Creature* Dashel = mTarget->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(SSX, SSY, SSZ, 4966);

        if (Dashel == nullptr)
            return;

        Dashel->SetFaction(72);
        Dashel->GetAIInterface()->setMeleeDisabled(false);
        Dashel->GetAIInterface()->SetAllowedToEnterCombat(true);
    }
开发者ID:AscEmu,项目名称:AscEmu,代码行数:15,代码来源:Quest_Dustwallow_Marsh.cpp

示例2: OnQuestStart

		void OnQuestStart(Player* mTarget, QuestLogEntry* qLogEntry)
		{
			float SSX = mTarget->GetPositionX();
			float SSY = mTarget->GetPositionY();
			float SSZ = mTarget->GetPositionZ();

			Creature* Dashel = mTarget->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(SSX, SSY, SSZ, 6784);

			if(Dashel == NULL)
				return;

			Dashel->SetFaction(28);
			Dashel->GetAIInterface()->disable_melee = false;
			Dashel->GetAIInterface()->SetAllowedToEnterCombat(true);
		}
开发者ID:Asandru,项目名称:Script-Land,代码行数:15,代码来源:Quest_TirisfalGlades.cpp

示例3: SummonSuccubusQuest

bool SummonSuccubusQuest(uint8_t /*effectIndex*/, Spell* s)
{
    CreatureProperties const* cp = sMySQLStore.getCreatureProperties(5677);
    if (cp == nullptr)
        return false;

    Creature* pCreature = s->p_caster->GetMapMgr()->CreateCreature(cp->Id);
    pCreature->Load(cp, s->p_caster->GetPositionX(), s->p_caster->GetPositionY(), s->p_caster->GetPositionZ());
    pCreature->GetAIInterface()->Init(pCreature, AI_SCRIPT_AGRO, Movement::WP_MOVEMENT_SCRIPT_NONE);
    pCreature->GetAIInterface()->taunt(s->p_caster, true);
    pCreature->PushToWorld(s->p_caster->GetMapMgr());
    pCreature->Despawn(60000, 0);

    return true;
}
开发者ID:AscEmu,项目名称:AscEmu,代码行数:15,代码来源:WarlockSpells.cpp

示例4: OnQuestStart

		void OnQuestStart(Player* mTarget, QuestLogEntry* qLogEntry)
		{
			float SSX = mTarget->GetPositionX();
			float SSY = mTarget->GetPositionY();
			float SSZ = mTarget->GetPositionZ();

			Creature* creat = mTarget->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(SSX, SSY, SSZ, 9623);
			if(creat == NULL)
				return;
			creat->m_escorter = mTarget;
			creat->GetAIInterface()->setMoveType(11);
			creat->GetAIInterface()->StopMovement(3000);
			creat->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "He-l-p Me... ts.. ts...");
			creat->SetUInt32Value(UNIT_NPC_FLAGS, 0);


			sEAS.CreateCustomWaypointMap(creat);

			sEAS.WaypointCreate(creat, -6305.657715f, -1977.757080f, -268.076447f, 5.564124f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6292.354492f, -1988.233032f, -265.271667f, 4.821922f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6296.333984f, -2004.225342f, -268.766388f, 3.337522f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6329.421387f, -2007.737549f, -258.587250f, 3.769490f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6343.778809f, -2017.559204f, -256.952026f, 3.577064f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6360.504883f, -2030.157959f, -261.204926f, 3.526014f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6381.367676f, -2038.451904f, -262.319946f, 2.713128f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6404.608398f, -2028.813721f, -262.817230f, 1.146257f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6399.632813f, -2018.668091f, -263.569824f, 0.800682f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6383.180664f, -2003.231689f, -270.639984f, 0.631821f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6351.983887f, -1976.397827f, -276.039001f, 1.138403f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6342.651855f, -1958.451050f, -274.056122f, 1.805992f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6353.083008f, -1918.406006f, -264.135101f, 1.515395f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6350.737305f, -1900.465942f, -258.695831f, 2.677785f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6366.535645f, -1892.092651f, -256.424347f, 2.025904f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6378.548828f, -1866.535278f, -260.363281f, 1.154112f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6370.422852f, -1842.526978f, -259.409515f, 1.711744f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6374.264648f, -1825.782349f, -260.584442f, 1.955218f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6382.359375f, -1811.540527f, -266.374359f, 2.901623f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6383.307129f, -1794.137207f, -267.334686f, 1.821700f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6399.292980f, -1710.144897f, -273.734283f, 1.252285f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6361.579102f, -1582.413574f, -272.221008f, 1.798137f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6391.618652f, -1409.568237f, -272.190521f, 1.711742f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6407.588867f, -1305.676880f, -271.632935f, 0.553279f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6349.980469f, -1276.069580f, -266.971375f, 1.236575f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6324.551758f, -1233.252441f, -267.178619f, 0.451176f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6288.604492f, -1215.046265f, -267.426117f, 2.177482f, 1, 256, 8841);
			sEAS.WaypointCreate(creat, -6298.290039f, -1182.650024f, -269.101013f, 3.211410f, 1, 256, 8841);
			sEAS.EnableWaypoints(creat);
		}
开发者ID:Refuge89,项目名称:Edge-of-Chaos,代码行数:48,代码来源:Quest_UnGoro.cpp

示例5: OnQuestStart

	void OnQuestStart(Player* pPlayer, QuestLogEntry* qLogEntry)
	{
		Creature *windwatcher = pPlayer->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 6176);
		if(!windwatcher) return;

		// questgiver will walk to the place where Cyclonian is spawned
		// only walk when we are at home
		if(windwatcher->CalcDistance(250.839996f, -1470.579956f, 55.4491f) > 1) return;
		{
			windwatcher->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Follow me");
			sEAS.CreateCustomWaypointMap(windwatcher);
			sEAS.WaypointCreate(windwatcher, 269.29f, -1433.32f, 50.31f, 0.19f, 0, 0, 0);
			sEAS.WaypointCreate(windwatcher, 328.52f, -1442.03f, 40.5f, 5.65f, 0, 0, 0);
			sEAS.WaypointCreate(windwatcher, 333.31f, -1453.69f, 42.01f, 4.68f, 0, 0, 0);
			sEAS.EnableWaypoints(windwatcher);
			windwatcher->GetAIInterface()->setMoveType(11);
		}
		windwatcher->Despawn(15*60*1000, 0);

		// spawn cyclonian if not spawned already
		Creature *cyclonian = pPlayer->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(323.947f, -1483.68f, 43.1363f, 6239);
		if( cyclonian == NULL)
		{
			cyclonian = sEAS.SpawnCreature(pPlayer, 6239, 323.947f, -1483.68f, 43.1363f, 0.682991f);

			// if spawning cyclonian failed, we have to return.
			if(cyclonian == NULL)
				return;
		}

		// queue cyclonian for despawn
		cyclonian->Despawn(15*60*1000, 0);
	}
开发者ID:Antares84,项目名称:arcemu,代码行数:33,代码来源:Quest_Warrior.cpp

示例6: InducingVision

bool InducingVision(uint32 i, Spell * pSpell)
{
		if(!pSpell->p_caster) return true;
		Player *mTarget = pSpell->p_caster;
		if( mTarget == NULL || mTarget->GetMapMgr() == NULL || mTarget->GetMapMgr()->GetInterface() == NULL )
			return true;
		  Creature *creat = mTarget->GetMapMgr()->GetInterface()->SpawnCreature(2983, -2238.994873f, -408.009552f, -9.424423f, 5.753043f, true, false, 0, 0);
		  creat->GetAIInterface()->setMoveType(11);

		  sEAS.CreateCustomWaypointMap(creat);

		  sEAS.WaypointCreate(creat,-2240.521729f, -407.114532f, -9.424648f, 5.753043f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-2225.764404f, -419.251404f, -9.360950f, 5.575544f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-2200.883789f, -440.999634f, -5.606637f, 5.599899f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-2143.712646f, -468.068665f, -9.401191f, 0.797177f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-2100.811279f, -420.980194f, -5.322747f, 0.918914f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-2079.469482f, -392.465576f, -10.262321f, 0.930689f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-2043.699707f, -343.802155f, -6.971242f, 0.934694f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-2001.858521f, -242.533966f, -10.763200f, 0.952265f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1924.751343f, -119.969292f, -11.770116f, 0.754775f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1794.804565f, -7.919222f, -9.326016f, 0.711578f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1755.206421f, 72.430847f, 1.121445f, 1.103484f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1734.550049f, 116.842003f, -4.337420f, 3.350100f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1720.041870f, 125.933235f, -2.325089f, 0.903206f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1704.406860f, 183.596405f, 12.065074f, 0.691148f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1674.317261f, 201.597565f, 11.235887f, 0.475164f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1624.068726f, 223.555389f, 2.074259f, 0.416259f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1572.863403f, 234.714813f, 2.305119f, 0.781471f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1542.866943f, 277.896759f, 20.543165f, 1.256637f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1541.813232f, 316.415649f, 49.910889f, 1.248783f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1526.979126f, 329.664001f, 61.835552f, 1.182024f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1524.173584f, 335.237610f, 63.325703f, 1.173092f, 0, 256, 0);
		  sEAS.WaypointCreate(creat,-1513.968506f, 355.759338f, 63.064487f, 1.119193f, 0, 256, 0);
		  return true;
}
开发者ID:Chero,项目名称:abcwow,代码行数:35,代码来源:Mulgore.cpp

示例7: 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);
				doctor->CastSpell(doctor, dbcSpell.LookupEntry(12380), true);
				if( !plr || !plr->GetMapMgr() || !plr->GetMapMgr()->GetInterface() )
					return;
				Creature* 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:arcticdev,项目名称:arctic-test,代码行数:27,代码来源:StranglethornVale.cpp

示例8: OnQuestComplete

	void OnQuestComplete(Player* pPlayer, QuestLogEntry *qLogEntry)
	{
		if (!pPlayer)
			return;
		
		GameObject* obj = NULL;

		for(uint8 i = 0; i < 9; i++)
		{
			obj = sEAS.SpawnGameobject(pPlayer, GO_MEAT, MeatSpawnPoints[i].x, MeatSpawnPoints[i].y, MeatSpawnPoints[i].z, MeatSpawnPoints[i].o, 1, 0, 0, 0, 0);
			sEAS.GameobjectDelete(obj, 2*60*1000);
		}
		for(uint8 i = 0; i < 5; i++)
		{
			obj = sEAS.SpawnGameobject(pPlayer, GO_BOTTLE, BottleSpawnPoints[i].x, BottleSpawnPoints[i].y, BottleSpawnPoints[i].z, BottleSpawnPoints[i].o, 1, 0, 0, 0, 0);
			sEAS.GameobjectDelete(obj, 2*60*1000);
		}
		for(uint8 i = 0; i < 3; i++)
		{
			obj = sEAS.SpawnGameobject(pPlayer, GO_BREAD, BreadSpawnPoints[i].x, BreadSpawnPoints[i].y, BreadSpawnPoints[i].z, BreadSpawnPoints[i].o, 1, 0, 0, 0, 0);
			sEAS.GameobjectDelete(obj, 2*60*1000);
		}	
     	
		Creature* Negolash = sEAS.SpawnCreature(pPlayer, 1494, -14657.400391, 155.115997, 4.081050, 0.353429);
		Negolash->GetAIInterface()->MoveTo(-14647.526367, 143.710052, 1.164550, 1.909);
	}
开发者ID:arcticdev,项目名称:arctic-test,代码行数:26,代码来源:StranglethornVale.cpp

示例9: SummonSuccubusQuest

bool SummonSuccubusQuest(uint32 i, Spell* s)
{
    CreatureInfo* ci = CreatureNameStorage.LookupEntry(5677);
    CreatureProto* cp = CreatureProtoStorage.LookupEntry(5677);
    if (!ci || !cp)
        return false;

    Creature* pCreature = s->p_caster->GetMapMgr()->CreateCreature(cp->Id);
    pCreature->Load(cp, s->p_caster->GetMapMgr(), s->p_caster->GetPositionX(), s->p_caster->GetPositionY(), s->p_caster->GetPositionZ());
    pCreature->GetAIInterface()->Init(pCreature, AITYPE_AGRO, MOVEMENTTYPE_NONE);
    pCreature->GetAIInterface()->taunt(s->p_caster, true);
    pCreature->PushToWorld(s->p_caster->GetMapMgr());
    pCreature->Despawn(60000, 0);

    return true;
}
开发者ID:lev1976g,项目名称:easywow,代码行数:16,代码来源:WarlockSpells.cpp

示例10: OnCombatStart

    void OnCombatStart(Unit* mTarget)
    {
		_unit->SendChatMessage( CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, "You wish to confront the master? You must weather the storm!");
		spark_timer = 0;
		last_creation_hp = 100;
		RegisterAIUpdateEvent(_unit->GetUInt32Value(UNIT_FIELD_BASEATTACKTIME));
		for( uint8 i=0; i<SPARKS_COUNT; i++)
		{
			CreatureProto *cp = CreatureProtoStorage.LookupEntry(28926);
			CreatureInfo *ci = CreatureNameStorage.LookupEntry(28926);
			Creature* c = NULL;
			if (cp && ci)
			{
				c = _unit->GetMapMgr()->CreateCreature( 28926 );
				if (c)
				{
					c->Load(cp,_unit->GetPositionX(), _unit->GetPositionY(), _unit->GetPositionZ(), _unit->GetOrientation());
					c->PushToWorld(_unit->GetMapMgr());
					sparks[i] = c->GetGUID();
					c->Root();
					c->GetAIInterface()->disable_combat = true;
					for( uint8 i=0; i<7; i++ )
						c->SchoolImmunityList[i] = 1;
				}
			}
		}
    }
开发者ID:arcticdev,项目名称:arcticdev,代码行数:27,代码来源:Instance_HallsOfLightning.cpp

示例11: HandleWPShowCommand

bool ChatHandler::HandleWPShowCommand(const char* args, WorldSession *m_session)
{
	uint64 guid = m_session->GetPlayer()->GetSelection();
	if (guid == 0)
	{
		SystemMessage(m_session, "No selection.");
		return true;
	}

	Creature* pCreature = m_session->GetPlayer()->GetMapMgr()->GetCreature(GET_LOWGUID_PART(guid));
	if(!pCreature)
	{
		SystemMessage(m_session, "You should select a Creature.");
		return true;
	}

	if( pCreature->m_spawn == NULL )
	{
		SystemMessage(m_session, "You cannot add waypoints to a creature that is not saved.");
		return true;
	}

	char* pBackwards = strtok((char*)args, " ");
	bool Backwards = (pBackwards)? ((atoi(pBackwards)>0)?true:false) : false;

	AIInterface* ai = pCreature->GetAIInterface();
	Player* pPlayer = m_session->GetPlayer();


	if(pPlayer->waypointunit != ai)
	{
		if(ai->m_WayPointsShowing == true) 
		{
			SystemMessage(m_session, "Some one else is also Viewing this Creatures WayPoints.");
			SystemMessage(m_session, "Viewing WayPoints at the same time as some one else can cause undesireble results.");
			return true;
		}

		if(pPlayer->waypointunit != NULL)
		{
			pPlayer->waypointunit->hideWayPoints(pPlayer);
		}
		pPlayer->waypointunit = ai;
		ai->showWayPoints(pPlayer,Backwards);
		ai->m_WayPointsShowBackwards = Backwards;
	}
	else
	{
		if(ai->m_WayPointsShowing == true) 
		{
			SystemMessage(m_session, "Waypoints Already Showing.");
		}
		else
			ai->showWayPoints(m_session->GetPlayer(),Backwards);
	}

	SystemMessage(m_session, "Showing waypoints for creature %u", pCreature->GetSQL_id());
	return true;
}
开发者ID:Ballwinkle,项目名称:Ascent_NG,代码行数:59,代码来源:WayPoints.cpp

示例12: OnQuestStart

	void OnQuestStart( Player* mTarget, QuestLogEntry * qLogEntry)
	{
		if( mTarget == NULL || mTarget->GetMapMgr() == NULL || mTarget->GetMapMgr()->GetInterface() == NULL )
			return;
		float SSX = mTarget->GetPositionX();
		float SSY = mTarget->GetPositionY();
		float SSZ = mTarget->GetPositionZ();

		Creature* Bartleby = mTarget->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(SSX, SSY, SSZ, 6090);

		if(Bartleby == NULL)
			return;

		Bartleby->SetFaction(168);
		Bartleby->GetAIInterface()->disable_melee = false;
		Bartleby->GetAIInterface()->SetAllowedToEnterCombat(true);
	}
开发者ID:Desch,项目名称:Edge-of-Chaos,代码行数:17,代码来源:Quest_Warrior.cpp

示例13: OnQuestStart

	void OnQuestStart( Player* mTarget, QuestLogEntry * qLogEntry)
	{
		if( mTarget == NULL || mTarget->GetMapMgr() == NULL || mTarget->GetMapMgr()->GetInterface() == NULL )
			return;
		float SSX = mTarget->GetPositionX();
		float SSY = mTarget->GetPositionY();
		float SSZ = mTarget->GetPositionZ();

		Creature* Dashel = mTarget->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(SSX, SSY, SSZ, 6784);

		if(Dashel == NULL)
			return;

		Dashel->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, 28);
		Dashel->GetAIInterface()->disable_melee = false;
		Dashel->GetAIInterface()->SetAllowedToEnterCombat(true);
	}
开发者ID:arcticdev,项目名称:arctic-test,代码行数:17,代码来源:TirisfalGlades.cpp

示例14: SummonSuccubusQuest

bool SummonSuccubusQuest(uint32 i, Spell* s)
{

    CreatureInfo const* ci = sMySQLStore.GetCreatureInfo(5677);
    CreatureProto const* cp = sMySQLStore.GetCreatureProto(5677);
    if(!ci || !cp)
        return false;

    Creature* pCreature = s->p_caster->GetMapMgr()->CreateCreature(cp->Id);
    pCreature->Load(cp, s->p_caster->GetPositionX(), s->p_caster->GetPositionY(), s->p_caster->GetPositionZ());
    pCreature->GetAIInterface()->Init(pCreature, AITYPE_AGRO, Movement::WP_MOVEMENT_SCRIPT_NONE);
    pCreature->GetAIInterface()->taunt(s->p_caster, true);
    pCreature->PushToWorld(s->p_caster->GetMapMgr());
    pCreature->Despawn(60000, 0);

    return true;
}
开发者ID:Lbniese,项目名称:AscEmu,代码行数:17,代码来源:WarlockSpells.cpp

示例15: GossipSelectOption

    void GossipSelectOption(Object* pObject, Player*  pPlayer, uint32 Id, uint32 IntId, const char* Code)
    {
        TheVioletHoldScript* pInstance = (TheVioletHoldScript*)pPlayer->GetMapMgr()->GetScript();

        if (!pInstance)
            return;

        if(!pObject->IsCreature())
            return;

        Creature* pCreature = TO_CREATURE(pObject);

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

            case 1:
            {
                  GossipMenu* menu;
                  objmgr.CreateGossipMenuForPlayer(&menu, pObject->GetGUID(), SINCLARI_ON_FINISH, pPlayer);
                  menu->AddItem(ICON_CHAT, pPlayer->GetSession()->LocalizedGossipOption(SINCLARI_GET_SAFETY), 2);
                  menu->SendTo(pPlayer);

                  // New Encounter State included
                  pInstance->SetInstanceData(Data_EncounterState, MAP_VIOLET_HOLD, State_PreProgress);
            }break;

            case 2:
            {
                      TO_CREATURE(pObject)->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
                      pCreature->GetAIInterface()->setMoveType(MOVEMENTTYPE_NONE);
                      //pCreature->MoveToWaypoint(1);
                      pCreature->GetAIInterface()->StopMovement(10);

            }break;

            case 3:
            {
                  Arcemu::Gossip::Menu::Complete(pPlayer);
                  pPlayer->SafeTeleport(pPlayer->GetInstanceID(), MAP_VIOLET_HOLD, 1830.531006f, 803.939758f, 44.340508f, 6.281611f);
            }break;
        }
    }
开发者ID:Declipe,项目名称:AscEmu,代码行数:45,代码来源:Instance_TheVioletHold.cpp


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