本文整理汇总了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);
}
示例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;
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例10: LocationVector
LocationVector EyeOfTheStorm::GetStartingCoords(uint32 Team)
{
return LocationVector(EOTSStartLocations[Team][0],
EOTSStartLocations[Team][1],
EOTSStartLocations[Team][2],
EOTSStartLocations[Team][3]);
}
示例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;
}
示例12: LocationVector
LocationVector StrandOfTheAncients::GetStartingCoords(uint32 Team)
{
uint32 sTeam = ( Team == Attackers ? 1 : 0 );
return LocationVector( SOTAStartLocations[sTeam][0],
SOTAStartLocations[sTeam][1],
SOTAStartLocations[sTeam][2] );
}
示例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;
}
示例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;
}
示例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;
}