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


C++ LocationVector函数代码示例

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


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

示例1: switch

void EyeOfTheStorm::DropFlag2(Player* plr, uint32 id)
{
	if(m_flagHolder != plr->GetLowGUID())
		return;

	switch(id)
	{
		case 4476:			// Blood Elf Tower
			m_dropFlag->SetPosition(LocationVector(2048.83f, 1393.65f, 1194.49f, 0.20944f));
			break;
		case 4514:			// Fel Reaver Tower
			m_dropFlag->SetPosition(LocationVector(2044.28f, 1729.68f, 1189.96f, -0.017453f));
			break;
		case 4518:			// Draenei Tower
			m_dropFlag->SetPosition(LocationVector(2286.56f, 1402.36f, 1197.11f, 3.72381f));
			break;
		case 4516:			// Mage Tower
			m_dropFlag->SetPosition(LocationVector(2284.48f, 1731.23f, 1189.99f, 2.89725f));
			break;
		default:
			m_dropFlag->SetPosition(plr->GetPosition());
			break;
	}

	plr->CastSpell(plr, 42792, true);

	m_dropFlag->SetUInt32Value(GAMEOBJECT_FLAGS, 1);
	m_dropFlag->PushToWorld(m_mapMgr);
	m_flagHolder = 0;
	sEventMgr.AddEvent(this, &EyeOfTheStorm::EventResetFlag, EVENT_EOTS_RESET_FLAG, 10000, 1, EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT);
}
开发者ID:lev1976g,项目名称:NoxicCore,代码行数:31,代码来源:EyeOfTheStorm.cpp

示例2: uint32

void IsleOfConquest::BuildWorkshopVehicle(uint32 delay)
{
    sEventMgr.RemoveEvents(this, EVENT_IOC_BUILD_WORKSHOP_VEHICLE);

    if (delay != 0)
    {
        sEventMgr.AddEvent(this, &IsleOfConquest::BuildWorkshopVehicle, uint32(0), EVENT_IOC_BUILD_WORKSHOP_VEHICLE, delay, 1, 0);
        return;
    }

    ControlPointTypes state = controlpoint[IOC_CONTROL_POINT_WORKSHOP].state;

    switch (state)
    {
        case IOC_SPAWN_TYPE_ALLIANCE_CONTROLLED:
            workshopvehicle[TEAM_ALLIANCE].baselocation = LocationVector(773.72f, -884.15f, 16.727f, 1.553f);
            workshopvehicle[TEAM_ALLIANCE].c = SpawnCreature(34776, workshopvehicle[TEAM_ALLIANCE].baselocation, 1);
            break;

        case IOC_SPAWN_TYPE_HORDE_CONTROLLED:
            workshopvehicle[TEAM_HORDE].baselocation = LocationVector(773.72f, -884.15f, 16.727f, 1.553f);
            workshopvehicle[TEAM_HORDE].c = SpawnCreature(35069, workshopvehicle[TEAM_HORDE].baselocation, 2);
            break;
    }
}
开发者ID:Lbniese,项目名称:AscEmu,代码行数:25,代码来源:IsleOfConquest.cpp

示例3: LocationVector

LocationVector IsleOfConquest::GetStartingCoords(uint32 Team)
{
        if(Team)                // Horde
                return LocationVector(1264.06f, -736.73f, 48.91f, 3.07f);
        else                    // Alliance
                return LocationVector(303.22f, -857.02f, 48.91f, 5.99f);
}
开发者ID:Declipe,项目名称:AscEmu,代码行数:7,代码来源:IsleOfConquest.cpp

示例4: LocationVector

LocationVector RuinsOfLordaeron::GetStartingCoords( uint32 Team ){
	if(Team)
		return LocationVector(1277.105103f, 1743.956177f, 31.603209f);
	else
		return LocationVector(1295.322388f, 1585.953369f, 31.605387f);

}
开发者ID:Antares84,项目名称:arcemu,代码行数:7,代码来源:RuinsOfLordaeron.cpp

示例5: LocationVector

LocationVector WarsongGulch::GetStartingCoords(uint32 Team)
{
	if(Team)		// Horde
		return LocationVector(933.989685f, 1430.735840f, 345.537140f, 3.141593f);
	else			// Alliance
		return LocationVector(1519.530273f, 1481.868408f, 352.023743f, 3.141593f);
}
开发者ID:AegisEmu,项目名称:AegisEmu,代码行数:7,代码来源:WarsongGulch.cpp

示例6: LocationVector

LocationVector CircleOfBlood::GetStartingCoords(uint32 Team)
{
    if (Team)
        return LocationVector(6292.032227f, 287.570343f, 5.003577f);
    else
        return LocationVector(6184.806641f, 236.643463f, 5.037095f);
}
开发者ID:master312,项目名称:AscEmu,代码行数:7,代码来源:CircleOfBlood.cpp

示例7: LocationVector

LocationVector DalaranSewers::GetStartingCoords(uint32 Team)
{
    if (Team)
        return LocationVector(1363.3609f, 817.3569f, 14.8128f);
    else
        return LocationVector(1219.5115f, 765.0264f, 14.8253f);
}
开发者ID:lev1976g,项目名称:AscEmu,代码行数:7,代码来源:DalaranSewers.cpp

示例8: LocationVector

LocationVector RingOfTrials::GetStartingCoords(uint32 Team)
{
    if (Team)
        return LocationVector(4027.004883f, 2976.964844f, 11.600499f);
    else
        return LocationVector(4085.861328f, 2866.750488f, 12.417445f);
}
开发者ID:AriDEV,项目名称:AscEmu,代码行数:7,代码来源:RingOfTrials.cpp

示例9: LocationVector

LocationVector ArathiBasin::GetStartingCoords(uint32 Team)
{
	if(Team)
		return LocationVector(684.75629f, 681.945007f, -12.915456f, 0.881211f);
	else
		return LocationVector(1314.932495f, 1311.246948f, -9.00952f, 3.802896f);
}
开发者ID:Carbinfibre,项目名称:Script-Land,代码行数:7,代码来源:ArathiBasin.cpp

示例10: LocationVector

LocationVector EyeOfTheStorm::GetStartingCoords(uint32 Team)
{
	return LocationVector(EOTSStartLocations[Team][0],
	                      EOTSStartLocations[Team][1],
	                      EOTSStartLocations[Team][2],
	                      EOTSStartLocations[Team][3]);
}
开发者ID:lev1976g,项目名称:NoxicCore,代码行数:7,代码来源:EyeOfTheStorm.cpp

示例11: RedSystemMessage

bool ChatHandler::HandleTriggerCommand(const char* args, WorldSession* m_session)
{
	if(!args)
	{
		RedSystemMessage(m_session, "No information was provided.");
		return true;
	}
	int32 instance_id;
	uint32 trigger_id;
	int valcount = sscanf(args, "%u %d", (unsigned int*)&trigger_id, (int*)&instance_id);
	if(valcount < 1)
		return false;
	if(valcount == 1)
		instance_id = 0;

	AreaTriggerEntry* entry = dbcAreaTrigger.LookupEntryForced(trigger_id);
	if(trigger_id == 0 || entry == NULL)
	{
		RedSystemMessage(m_session, "Could not find trigger %s", args);
		return true;
	}

	m_session->GetPlayer()->SafeTeleport(entry->mapid, instance_id, LocationVector(entry->x, entry->y,
	                                     entry->z, entry->o));

	BlueSystemMessage(m_session, "Teleported to trigger %u on [%u][%.2f][%.2f][%.2f]", entry->id,
	                  entry->mapid, entry->x, entry->y, entry->z);
	return true;
}
开发者ID:dberga,项目名称:arcbliz,代码行数:29,代码来源:Level1.cpp

示例12: LocationVector

LocationVector StrandOfTheAncients::GetStartingCoords(uint32 Team)
{
	uint32 sTeam = ( Team == Attackers ? 1 : 0 );
	return LocationVector( SOTAStartLocations[sTeam][0], 
		SOTAStartLocations[sTeam][1],
		SOTAStartLocations[sTeam][2] );
}
开发者ID:Bootz,项目名称:arcticdev,代码行数:7,代码来源:StrandOfTheAncients.cpp

示例13: GnomishTransporter

bool GnomishTransporter(uint32 i, Spell *pSpell)
{
	if(!pSpell->p_caster) return true;

	pSpell->p_caster->EventAttackStop();
	pSpell->p_caster->SafeTeleport(1, 0, LocationVector(-7169.41f, -3838.63f, 8.72f));
	return true;
}
开发者ID:Bootz,项目名称:arcticdev,代码行数:8,代码来源:ItemSpells.cpp

示例14: uint32

bool ChatHandler::HandleRecallPortPlayerCommand(const char* args, WorldSession * m_session)
{
	char location[255];
	char player[255];
	if(sscanf(args, "%s %s", player, location) != 2)
		return false;

	Player * plr = objmgr.GetPlayer(player, false);
	if(!plr) return false;

	QueryResult *result = WorldDatabase.Query( "SELECT * FROM recall ORDER BY name" );
	if(!result)
		return false;

	do
	{
		Field *fields = result->Fetch();
		const char * locname = fields[1].GetString();
		uint32 locmap = fields[2].GetUInt32();
		float x = fields[3].GetFloat();
		float y = fields[4].GetFloat();
		float z = fields[5].GetFloat();
		float o = fields[6].GetFloat();

		if (strnicmp((char*)location,locname,strlen(args))==0)
		{	//Added Orientation and a rank/invis check for a "ported to" message. --Hemi
			sGMLog.writefromsession( m_session, "ported %s to %s ( Map: %u, X: %f, Y: %f, Z: %f, O: %f )", plr->GetName(), locname, locmap, x, y, z, o );
			if(plr->GetSession() && (plr->GetSession()->CanUseCommand('a') || !m_session->GetPlayer()->m_isGmInvisible))
				plr->GetSession()->SystemMessage("%s teleported you to location %s!", m_session->GetPlayer()->GetName(), locname);

			if(plr->GetInstanceID() != m_session->GetPlayer()->GetInstanceID())
				sEventMgr.AddEvent(plr, &Player::EventSafeTeleport, locmap, uint32(0), LocationVector(x, y, z, o), EVENT_PLAYER_TELEPORT, 1, 1,EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT);
			else
				plr->SafeTeleport(locmap, 0, LocationVector(x, y, z, o));
			delete result;
			return true;
		}
	}
	while (result->NextRow());

	delete result;
	return false;
}
开发者ID:Naqvamp,项目名称:Sandbox,代码行数:43,代码来源:RecallCommands.cpp

示例15: SimCommand

//*NOTE: HORRIBLE bug in GCC 3.x Linux causes a call to cin.seekg() to irreversably corrupt the input stream!
//So I've changed all the cins to use C-style stdin.
bool SimCommand(string &sCommand)
{
	if(fLeftOvers)
	{
		fseek(stdin, 0, SEEK_END);
		fLeftOvers = false;
	}

	cout << "sim> ";
	fflush(NULL);

	//Temporary string storage
	char sTempBuff[MAX_LINE+2];
	char sMessageBuffer[64];
	bool fRetVal = true;

	sTempBuff[MAX_LINE+1] = 1;
	//get a line from the assembly file
	fgets(sTempBuff, MAX_LINE+1, stdin);
	//*NOTE: MSVC's STL version of get() sets the failbit if it gets no characters.
	if(!sTempBuff[0])
		clearerr(stdin);
	fseek(stdin, 0, SEEK_END);

	if(ferror(stdin))
	{
		SimCallBack(Fatal, "Error reading command.");
		clearerr(stdin);
		return false;
	}
	if(feof(stdin))
		clearerr(stdin);
	
	//Check to see if the line was too long
	if(!sTempBuff[MAX_LINE+1])
	{
		sTempBuff[MAX_LINE] = 0;
		sprintf(sMessageBuffer, "Line exceeds %u characters. Excess ignored.", MAX_LINE);
		SimCallBack(Warning, sMessageBuffer);
	}

	//Return the input
	string sTemp = sTempBuff;
	sTemp = sTemp.substr(0, sTemp.find_first_of("\x0A\x0D\x04\xFF"));

	//Check to see if we should run the translator on it
	if(Flags.fOldLC3)
	{
		sCommand = "";
		if(!AsmConvertLC3Line(sTemp, sCommand, LocationVector(), SimMessageCallBack))
			return false;
	}

	return true;
}
开发者ID:bjackson,项目名称:LC3Tools,代码行数:57,代码来源:SimUI.cpp


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