예제 #1
0
bool EyeOfTheStorm::HookHandleRepop(Player* plr)
{
    uint32 i;
    uint32 t = plr->GetTeam();
    float dist = 999999.0f;
    float distcur;
    LocationVector dest;

    dest.ChangeCoords( EOTSStartLocations[t][0], EOTSStartLocations[t][1], EOTSStartLocations[t][2], 0 );

    for(i = 0; i < EOTS_TOWER_COUNT; i++)
    {
        if( m_CPBanner[i] && m_CPBanner[i]->GetEntry() == EOTS_BANNER_ALLIANCE && t == 0 ||
              m_CPBanner[i]->GetEntry() == EOTS_BANNER_HORDE && t == 1 ||
              m_CPBanner2[i] && m_CPBanner2[i]->GetEntry() == EOTS_BANNER_ALLIANCE && t == 0 ||
              m_CPBanner2[i]->GetEntry() == EOTS_BANNER_HORDE && t == 1 ||
              m_CPBanner3[i] && m_CPBanner3[i]->GetEntry() == EOTS_BANNER_ALLIANCE && t == 0 ||
              m_CPBanner3[i]->GetEntry() == EOTS_BANNER_HORDE && t == 1 )
        {
            distcur = plr->GetPositionNC().Distance2DSq( EOTSGraveyardLocations[i][0], EOTSGraveyardLocations[i][1] );
            if( distcur < dist )
            {
                dist = distcur;
                dest.ChangeCoords( EOTSGraveyardLocations[i][0], EOTSGraveyardLocations[i][1], EOTSGraveyardLocations[i][2], 0 );
            }
        }
    }

    plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest);
    return true;
}
예제 #2
0
bool EyeOfTheStorm::HookHandleRepop(Player * plr)
{
	uint32 i;
	int32 sval;
	uint32 t = plr->GetTeam();
	float dist = 999999.0f;
	float distcur;
	LocationVector dest;

	if(plr->GetTeam() == 0)
		sval = 100;
	else
		sval = 0;

	dest.ChangeCoords( EOTSStartLocations[t][0], EOTSStartLocations[t][1], EOTSStartLocations[t][2], 0 );

	for(i = 0; i < EOTS_TOWER_COUNT; ++i)
	{
		if( m_CPStatus[i] == sval )
		{
			distcur = plr->GetPositionNC().Distance2DSq( EOTSGraveyardLocations[i][0], EOTSGraveyardLocations[i][1] );
			if( distcur < dist )
			{
				dist = distcur;
				dest.ChangeCoords( EOTSGraveyardLocations[i][0], EOTSGraveyardLocations[i][1], EOTSGraveyardLocations[i][2], 0 );
			}
		}
	}

	plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest);
	return true;
}
예제 #3
0
bool WarsongGulch::HookHandleRepop(Player * plr)
{
    LocationVector dest;
	if(plr->GetTeam())
		dest.ChangeCoords(1032.644775f, 1388.316040f, 340.559937f, 0.043200f);
	else
		dest.ChangeCoords(1423.218872f, 1554.663574f, 342.833801f, 3.124139f);
	plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest);
	return true;
}
예제 #4
0
bool CircleOfBlood::HookHandleRepop(Player* plr)
{
    LocationVector dest;
    dest.ChangeCoords(6241.171875f, 261.067322f, 0.891833f);
    plr->SafeTeleport(m_mapMgr->GetMapId(), m_mapMgr->GetInstanceID(), dest);
    return true;
}
예제 #5
0
void StrandOfTheAncient::OnStart()
{
	sLog.outDebug("OnStart: SOTA Battleground\n");

	LocationVector dest;
	m_started = true;

	for(list<Player*>::iterator itr = sota_players.begin(); itr != sota_players.end(); ++itr)
	{
		Player *plr = *itr;
		dest.ChangeCoords(sotaStopBoatsPlayer[plr->GetTeam()][0], sotaStopBoatsPlayer[plr->GetTeam()][1],
			sotaStopBoatsPlayer[plr->GetTeam()][2], sotaStopBoatsPlayer[plr->GetTeam()][3]);

		plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest);
	}

	SetWorldState(WORLDSTATE_SOTA_CAPTURE_BAR_DISPLAY, (uint32)-1);
	SetWorldState(WORLDSTATE_SOTA_CAPTURE_BAR_VALUE, (uint32)-1);
	SetWorldState(WORLDSTATE_SOTA_BONUS_TIME, 1);
	SetWorldState(WORLDSTATE_SOTA_TIMER_1, 10); // 10 Minute Timer

	//SetTime(ROUND_LENGTH, 0);
	sEventMgr.AddEvent( this, &StrandOfTheAncient::TimeTick, EVENT_SOTA_TIMER, MSTIME_SECOND * 5, 0, EVENT_FLAG_DO_NOT_EXECUTE_IN_WORLD_CONTEXT );

	UpdatePvPData();
}
예제 #6
0
void StrandOfTheAncient::OnPlatformTeleport(Player *plr)
{
	LocationVector dest;
	uint32 closest_platform = 0;

	for (uint32 i = 0; i < GATE_COUNT; i++)
	{
		float distance = CalculateDistance(plr->GetPositionX(),
			plr->GetPositionY(), plr->GetPositionZ(),
			sotaTransporterDestination[i][0],
			sotaTransporterDestination[i][1],
			sotaTransporterDestination[i][2]);
		if (distance < 75)
		{
			closest_platform = i;
			break;
		}
	}
	dest.ChangeCoords(sotaTransporterDestination[closest_platform][0],
		sotaTransporterDestination[closest_platform][1],
		sotaTransporterDestination[closest_platform][2],
		sotaTransporterDestination[closest_platform][3]);

	plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest);
}
예제 #7
0
bool RingOfTrials::HookHandleRepop(Player* plr)
{
	LocationVector dest;
	dest.ChangeCoords(4057.042725f, 2918.686523f, 13.051933f);
	plr->SafeTeleport(m_mapMgr->GetMapId(), m_mapMgr->GetInstanceID(), dest);
	return true;
}
예제 #8
0
// 54640
bool SOTATeleporter( uint32 i, Spell *s ){
	Player *plr = s->GetPlayerTarget();
	if( plr == NULL )
		return true;

	LocationVector dest;
	uint32 closest_platform = 0;
	
	for(uint32 i = 0; i < 5; i++){
		float distance = plr->GetDistanceSq( sotaTransporterDestination[i][0], sotaTransporterDestination[i][1], sotaTransporterDestination[i][2]);
		
		if(distance < 75){
			closest_platform = i;
			break;
		}
	}
	
	dest.ChangeCoords(sotaTransporterDestination[closest_platform][0],
                      sotaTransporterDestination[closest_platform][1],
					  sotaTransporterDestination[closest_platform][2],
					  sotaTransporterDestination[closest_platform][3]);
	
	plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest);
	return true;
}
예제 #9
0
bool DalaranSewers::HookHandleRepop(Player* plr)
{
    LocationVector dest;
    dest.ChangeCoords(1292.51f, 792.05f, 9.34f);
    plr->SafeTeleport(m_mapMgr->GetMapId(), m_mapMgr->GetInstanceID(), dest);
    return true;
}
예제 #10
0
void IsleOfConquest::OnPlatformTeleport(Player* plr)
{
	LocationVector dest;
	uint32 closest_platform = 0;

	if(plr->GetTeam() == TEAM_ALLIANCE)
	{
		for (uint32 i = 0; i < 6; i++)
		{
			float distance = CalcDistance(plr->GetPositionX(),
				plr->GetPositionY(), plr->GetPositionZ(),
				iocTransporterDestination[i][0],
				iocTransporterDestination[i][1],
				iocTransporterDestination[i][2]);
			if (distance < 75 && distance > 10)
			{
				closest_platform = i;
				break;
			}
		}
		dest.ChangeCoords(iocTransporterDestination[closest_platform][0],
			iocTransporterDestination[closest_platform][1],
			iocTransporterDestination[closest_platform][2],
			iocTransporterDestination[closest_platform][3]);
	}
	else		// HORDE
	{
		for (uint32 i = 6; i < 12; i++)
		{
			float distance = CalcDistance(plr->GetPositionX(),
				plr->GetPositionY(), plr->GetPositionZ(),
				iocTransporterDestination[i][0],
				iocTransporterDestination[i][1],
				iocTransporterDestination[i][2]);
			if (distance < 75 && distance > 10)
			{
				closest_platform = i;
				break;
			}
		}
		dest.ChangeCoords(iocTransporterDestination[closest_platform][0],
			iocTransporterDestination[closest_platform][1],
			iocTransporterDestination[closest_platform][2],
			iocTransporterDestination[closest_platform][3]);
	}
	plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest);
}
예제 #11
0
bool StrandOfTheAncient::HookHandleRepop(Player * plr)
{
	LocationVector dest;

	dest.ChangeCoords(sotaRepop[plr->GetTeam()][0], sotaRepop[plr->GetTeam()][1],
		sotaRepop[plr->GetTeam()][2], sotaRepop[plr->GetTeam()][3]);

	plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest);
	return true;
}
예제 #12
0
void WorldSession::HandleTeleportCheatOpcode(WorldPacket & recv_data)
{
	float x,y,z,o;
	LocationVector vec;

	if(!HasGMPermissions())
	{
		SendNotification("You do not have permission to use this function.");
		return;
	}

	recv_data >> x >> y >> z >> o;
	vec.ChangeCoords(x,y,z,o);
	_player->SafeTeleport(_player->GetMapId(),_player->GetInstanceID(),vec);
}
예제 #13
0
bool RingOfValor::HookHandleRepop( Player *plr ){
	LocationVector dest;
	dest.ChangeCoords(762.91f, -284.28f, 28.28f);
	plr->SafeTeleport(m_mapMgr->GetMapId(), m_mapMgr->GetInstanceID(), dest);
	return true;
}