Esempio n. 1
0
void ArathiBasin::OnCreate()
{
	// Alliance Gate
	GameObject* gate = SpawnGameObject(180255, 529, 1284.597290f, 1281.166626f, -15.977916f, 0.76f, 32, 114, 1.5799990f);
	gate->SetByte(GAMEOBJECT_BYTES_1, 3, 100);
	gate->PushToWorld(m_mapMgr);
	m_gates.push_back(gate);

	// horde gate
	gate = SpawnGameObject(180256, 529, 708.0902710f, 708.4479370f, -17.3898964f, 3.92f, 32, 114, 1.5699990f);
	gate->SetByte(GAMEOBJECT_BYTES_1, 3, 100);
	gate->PushToWorld(m_mapMgr);
	m_gates.push_back(gate);

	// spawn (default) control points
	SpawnControlPoint(AB_CONTROL_POINT_STABLE,		AB_SPAWN_TYPE_NEUTRAL);
	SpawnControlPoint(AB_CONTROL_POINT_BLACKSMITH,	AB_SPAWN_TYPE_NEUTRAL);
	SpawnControlPoint(AB_CONTROL_POINT_LUMBERMILL,	AB_SPAWN_TYPE_NEUTRAL);
	SpawnControlPoint(AB_CONTROL_POINT_MINE,		AB_SPAWN_TYPE_NEUTRAL);
	SpawnControlPoint(AB_CONTROL_POINT_FARM,		AB_SPAWN_TYPE_NEUTRAL);

	// spawn buffs
	SpawnBuff(AB_BUFF_STABLES);
	SpawnBuff(AB_BUFF_BLACKSMITH);
	SpawnBuff(AB_BUFF_LUMBERMILL);
	SpawnBuff(AB_BUFF_MINE);
	SpawnBuff(AB_BUFF_FARM);

	// spawn the h/a base spirit guides
	AddSpiritGuide(SpawnSpiritGuide(NoBaseGYLocations[0][0], NoBaseGYLocations[0][1], NoBaseGYLocations[0][2], 0.0f, 0));
	AddSpiritGuide(SpawnSpiritGuide(NoBaseGYLocations[1][0], NoBaseGYLocations[1][1], NoBaseGYLocations[1][2], 0.0f, 1));

	// Let's set this from the config
	SetWorldState( WORLDSTATE_AB_MAX_SCORE, RESOURCES_WINVAL );
}
Esempio n. 2
0
WarsongGulch::WarsongGulch(MapMgr* mgr, uint32 id, uint32 lgroup, uint32 t) : CBattleground(mgr, id, lgroup, t)
{
    int i;

    for(i = 0; i < 2; i++)
    {
        m_players[i].clear();
        m_pendPlayers[i].clear();
    }

    m_pvpData.clear();
    m_resurrectMap.clear();

    m_flagHolders[0] = m_flagHolders[1] = 0;
    m_lgroup = lgroup;

    /* create the buffs */
    for(i = 0; i < 6; ++i)
        SpawnBuff(i);

    /* take note: these are swapped around for performance bonus */
    // warsong flag - horde base
    m_homeFlags[0] = SpawnGameObject(179831, 489, 915.367f, 1433.78f, 346.089f, 3.17301f, 0, 210, 2.5f);
    m_homeFlags[0]->SetByte(GAMEOBJECT_BYTES_1, 0, 1);
    m_homeFlags[0]->SetType(GAMEOBJECT_TYPE_FLAGSTAND);
    m_homeFlags[0]->SetByte(GAMEOBJECT_BYTES_1, 3, 100);

    // silverwing flag - alliance base
    m_homeFlags[1] = SpawnGameObject(179830, 489, 1540.29f, 1481.34f, 352.64f, 3.17301f, 0, 1314, 2.5f);
    m_homeFlags[1]->SetByte(GAMEOBJECT_BYTES_1, 0, 1);
    m_homeFlags[1]->SetType(GAMEOBJECT_TYPE_FLAGSTAND);
    m_homeFlags[1]->SetByte(GAMEOBJECT_BYTES_1, 3, 100);

    // dropped flags
    m_dropFlags[1] = m_mapMgr->CreateGameObject(179786);
    if(!m_dropFlags[1]->CreateFromProto(179785, 489, 0, 0, 0, 0))
        Log.Warning("WarsongGulch", "Could not create dropped flag 1");

    m_dropFlags[0] = m_mapMgr->CreateGameObject(179786);
    if(!m_dropFlags[0]->CreateFromProto(179786, 489, 0, 0, 0, 0))
        Log.Warning("WarsongGulch", "Could not create dropped flag 0");

    for(i = 0; i < 2; ++i)
    {
        m_dropFlags[i]->SetUInt32Value(GAMEOBJECT_DYNAMIC, 1);
        m_dropFlags[i]->SetScale(2.5f);
    }

    m_scores[0] = m_scores[1] = 0;

    m_zoneid = 3277;

}
Esempio n. 3
0
WarsongGulch::WarsongGulch(MapMgr* mgr, uint32 id, uint32 lgroup, uint32 t) : CBattleground(mgr, id, lgroup, t)
{

    m_zoneid = 3277;
    m_scores[0] = m_scores[1] = 0;
    m_time_left = TIME_LEFT;

    for (uint8 i = 0; i < 2; i++)
    {
        m_players[i].clear();
        m_pendPlayers[i].clear();
    }

    m_pvpData.clear();
    m_resurrectMap.clear();

    m_flagHolders[0] = m_flagHolders[1] = 0;
    m_lgroup = lgroup;

    // create the buffs
    for (uint8 i = 0; i < 6; ++i)
        SpawnBuff(i);

    // take note: these are swapped around for performance bonus
    // warsong flag - horde base
    m_homeFlags[0] = SpawnGameObject(179831, 489, 915.367f, 1433.78f, 346.089f, 3.17301f, 0, 210, 2.5f);
    m_homeFlags[0]->SetState(GO_STATE_CLOSED);
    m_homeFlags[0]->SetType(GAMEOBJECT_TYPE_FLAGSTAND);
    m_homeFlags[0]->SetAnimProgress(100);

    // silverwing flag - alliance base
    m_homeFlags[1] = SpawnGameObject(179830, 489, 1540.29f, 1481.34f, 352.64f, 3.17301f, 0, 1314, 2.5f);
    m_homeFlags[1]->SetState(GO_STATE_CLOSED);
    m_homeFlags[1]->SetType(GAMEOBJECT_TYPE_FLAGSTAND);
    m_homeFlags[1]->SetAnimProgress(100);

    // dropped flags
    m_dropFlags[1] = m_mapMgr->CreateGameObject(179786);
    if (!m_dropFlags[1]->CreateFromProto(179785, 489, 0, 0, 0, 0))
        LogWarning("WarsongGulch : Could not create dropped flag 1");

    m_dropFlags[0] = m_mapMgr->CreateGameObject(179786);
    if (!m_dropFlags[0]->CreateFromProto(179786, 489, 0, 0, 0, 0))
        LogWarning("WarsongGulch : Could not create dropped flag 0");

    for (uint8 i = 0; i < 2; ++i)
    {
        m_dropFlags[i]->Activate();
        m_dropFlags[i]->SetScale(2.5f);
    }

}
StrandOfTheAncient::StrandOfTheAncient(MapMgr * mgr, uint32 id, uint32 lgroup, uint32 t) : CBattleground(mgr, id, lgroup, t)
{
	int i;

	for (i=0; i<2; i++) {
		m_players[i].clear();
		m_pendPlayers[i].clear();
	}
	//m_worldStates.clear();
	m_pvpData.clear();
	m_resurrectMap.clear();

	//uint32 mapId = BattlegroundManager.GetMap(BATTLEGROUND_STRAND_OF_THE_ANCIENT);

	// Boats
	for (int i = 0; i < 4; i++)
	{
		m_boats[i] = m_mapMgr->CreateAndSpawnGameObject(20808,
			sotaBoats[i][0], sotaBoats[i][1], sotaBoats[i][2], sotaBoats[i][3], 1.0f);
		m_boats[i]->PushToWorld(mgr);
	}

	/* Relic */
	m_relic = m_mapMgr->CreateAndSpawnGameObject(GO_RELIC, sotaTitanRelic[0],
		sotaTitanRelic[1], sotaTitanRelic[2], sotaTitanRelic[3], 1.0f);

	for (i = 0; i < GATE_COUNT; i++)
	{
		m_gates[i] = m_mapMgr->CreateAndSpawnGameObject(GateGOIds[i],
			sotaGates[i][0], sotaGates[i][1], sotaGates[i][2], sotaGates[i][3], 1.0f);
		m_gateSigils[i] = m_mapMgr->CreateAndSpawnGameObject(GateSigilGOIds[i],
			sotaGateSigils[i][0], sotaGateSigils[i][1], sotaGateSigils[i][2],
			sotaGateSigils[i][3], 1.0f);
		m_gateTransporters[i] = m_mapMgr->CreateAndSpawnGameObject(192819,
			sotaTransporters[i][0], sotaTransporters[i][1], sotaTransporters[i][2],
			sotaTransporters[i][3], 1.0f);
	}

	// Spawn door for Chamber of Ancient Relics
	m_endgate = m_mapMgr->CreateAndSpawnGameObject(GateGOIds[i],
		sotaChamberGate[0], sotaChamberGate[1], sotaChamberGate[2],
		sotaChamberGate[3], 1.0f);


	/* create the buffs */
	for(i = 0; i < BUFF_COUNT; ++i)
		SpawnBuff(i);

}
Esempio n. 5
0
WarsongGulch::WarsongGulch(MapMgr * mgr, uint32 id, uint32 lgroup, uint32 t) : CBattleground(mgr, id, lgroup, t)
{
	m_flagHolders[0] = m_flagHolders[1] = 0;
	
	/* create the buffs */
	for(int i = 0; i < 6; ++i)
		SpawnBuff(i);

	/* take note: these are swapped around for performance bonus */
	// warsong flag - horde base
	m_homeFlags[0] = SpawnGameObject(179831, 489, 915.367f, 1433.78f, 346.089f, 3.17301f, 0, 210, 2.5f);
	m_homeFlags[0]->SetUInt32Value(GAMEOBJECT_STATE, 1);
	m_homeFlags[0]->SetUInt32Value(GAMEOBJECT_TYPE_ID, 24);
	m_homeFlags[0]->SetUInt32Value(GAMEOBJECT_ANIMPROGRESS, 100);

	// silverwing flag - alliance base
	m_homeFlags[1] = SpawnGameObject(179830, 489, 1540.29f, 1481.34f, 352.64f, 3.17301f, 0,1314, 2.5f);
	m_homeFlags[1]->SetUInt32Value(GAMEOBJECT_STATE, 1);
	m_homeFlags[1]->SetUInt32Value(GAMEOBJECT_TYPE_ID, 24);
	m_homeFlags[1]->SetUInt32Value(GAMEOBJECT_ANIMPROGRESS, 100);

	// dropped flags
	m_dropFlags[1] = m_mapMgr->CreateGameObject(179786);
	if(!m_dropFlags[1]->CreateFromProto(179785, 489, 0, 0, 0, 0))
		Log.Warning("WarsongGulch", "Could not create dropped flag 1");

	m_dropFlags[0] = m_mapMgr->CreateGameObject(179786);
	if(!m_dropFlags[0]->CreateFromProto(179786, 489, 0, 0, 0, 0))
		Log.Warning("WarsongGulch", "Could not create dropped flag 0");

	for(int i = 0; i < 2; ++i)
	{
		m_dropFlags[i]->SetUInt32Value(GAMEOBJECT_DYN_FLAGS, 1);
		m_dropFlags[i]->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.5f);
	}

	m_scores[0] = m_scores[1] = 0;

	m_playerCountPerTeam = 10;
}
Esempio n. 6
0
void ArathiBasin::OnCreate()
{
    // Alliance Gate
    GameObject *gate = SpawnGameObject(180255, 529, 1284.597290f, 1281.166626f, -15.977916f, 0.706859f, 32, 114, 1.5799990f);
    gate->SetFloatValue(GAMEOBJECT_ROTATION, 0.0129570f);
    gate->SetFloatValue(GAMEOBJECT_ROTATION_01, -0.0602880f);
    gate->SetFloatValue(GAMEOBJECT_ROTATION_02, 0.3449600f);
    gate->SetFloatValue(GAMEOBJECT_ROTATION_03, 0.9365900f);
    gate->PushToWorld(m_mapMgr);
    m_gates.push_back(gate);

    // horde gate
    gate = SpawnGameObject(180256, 529, 708.0902710f, 708.4479370f, -17.3898964f, -2.3910990f, 32, 114, 1.5699990f);
    gate->SetFloatValue(GAMEOBJECT_ROTATION, 0.0502910f);
    gate->SetFloatValue(GAMEOBJECT_ROTATION_01, 0.0151270f);
    gate->SetFloatValue(GAMEOBJECT_ROTATION_02, 0.9292169f);
    gate->SetFloatValue(GAMEOBJECT_ROTATION_03, -0.3657840f);
    gate->PushToWorld(m_mapMgr);
    m_gates.push_back(gate);

    // spawn (default) control points
    SpawnControlPoint(AB_CONTROL_POINT_STABLE, AB_SPAWN_TYPE_NEUTRAL);
    SpawnControlPoint(AB_CONTROL_POINT_BLACKSMITH, AB_SPAWN_TYPE_NEUTRAL);
    SpawnControlPoint(AB_CONTROL_POINT_LUMBERMILL, AB_SPAWN_TYPE_NEUTRAL);
    SpawnControlPoint(AB_CONTROL_POINT_MINE, AB_SPAWN_TYPE_NEUTRAL);
    SpawnControlPoint(AB_CONTROL_POINT_FARM, AB_SPAWN_TYPE_NEUTRAL);

    // spawn buffs
    SpawnBuff(AB_BUFF_STABLES);
    SpawnBuff(AB_BUFF_BLACKSMITH);
    SpawnBuff(AB_BUFF_LUMBERMILL);
    SpawnBuff(AB_BUFF_MINE);
    SpawnBuff(AB_BUFF_FARM);

    // spawn the h/a base spirit guides
    AddSpiritGuide(SpawnSpiritGuide(NoBaseGYLocations[0][0], NoBaseGYLocations[0][1], NoBaseGYLocations[0][2], 0.0f, 0));
    AddSpiritGuide(SpawnSpiritGuide(NoBaseGYLocations[1][0], NoBaseGYLocations[1][1], NoBaseGYLocations[1][2], 0.0f, 1));

    // urrrgh worldstates
    SetWorldState(0x8D8, 0x00);
    SetWorldState(0x8D7, 0x00);
    SetWorldState(0x8D6, 0x00);
    SetWorldState(0x8D5, 0x00);
    SetWorldState(0x8D4, 0x00);
    SetWorldState(0x8D3, 0x00);

    // AB world state's
    // unknowns, need more research
    SetWorldState(0x7A3, 1800); // unknown
    SetWorldState(0x745, 0x02); // unknown

    // Icon stuff for on the map
    SetWorldState(AB_SHOW_BACKSMITH_ICON, 0x01);
    SetWorldState(AB_SHOW_FARM_ICON, 0x01);
    SetWorldState(AB_SHOW_LUMBERMILL_ICON, 0x01);
    SetWorldState(AB_SHOW_GOLDMINE_ICON, 0x01);
    SetWorldState(AB_SHOW_STABLE_ICON, 0x01);

    // LumberMill
    SetWorldState(AB_CAPTURING_LUMBERMILL_HORDE, 0x00);
    SetWorldState(AB_CAPTURING_LUMBERMILL_ALLIANCE, 0x00);
    SetWorldState(AB_CAPTURED_LUMBERMILL_HORDE, 0x00);
    SetWorldState(AB_CAPTURED_LUMBERMILL_ALLIANCE, 0x00);

    // GoldMine
    SetWorldState(AB_CAPTURING_GOLDMINE_HORDE, 0x00);
    SetWorldState(AB_CAPTURING_GOLDMINE_ALLIANCE, 0x00);
    SetWorldState(AB_CAPTURED_GOLDMINE_HORDE, 0x00);
    SetWorldState(AB_CAPTURED_GOLDMINE_ALLIANCE, 0x00);

    // BlackSmith
    SetWorldState(AB_CAPTURING_BLACKSMITH_HORDE, 0x00);
    SetWorldState(AB_CAPTURING_BLACKSMITH_ALLIANCE, 0x00);
    SetWorldState(AB_CAPTURED_BLACKSMITH_HORDE, 0x00);
    SetWorldState(AB_CAPTURED_BLACKSMITH_ALLIANCE, 0x00);

    SetWorldState(AB_MAX_SCORE, RESOURCES_WINVAL);
    SetWorldState(AB_ALLIANCE_CAPTUREBASE, 0x00);
    SetWorldState(AB_HORDE_CAPTUREBASE, 0x00);
    SetWorldState(AB_HORDE_RESOURCES, 0x00);
    SetWorldState(AB_ALLIANCE_RESOURCES, 0x00);

    // Farm
    SetWorldState(AB_CAPTURING_FARM_ALLIANCE, 0x00);
    SetWorldState(AB_CAPTURING_FARM_HORDE, 0x00);
    SetWorldState(AB_CAPTURED_FARM_HORDE, 0x00);
    SetWorldState(AB_CAPTURED_FARM_ALLIANCE, 0x00);

    // Stables
    SetWorldState(AB_CAPTURING_STABLES_HORDE, 0x00);
    SetWorldState(AB_CAPTURING_STABLES_ALLIANCE, 0x00);
    SetWorldState(AB_CAPTURED_STABLES_HORDE, 0x00);
    SetWorldState(AB_CAPTURED_STABLES_ALLIANCE, 0x00);
}
Esempio n. 7
0
void EyeOfTheStorm::OnCreate()
{
    uint32 i;

    WorldStateManager& sm = m_mapMgr->GetStateManager();

    // create world state templates
    sm.CreateWorldState(2565, 142);
    sm.CreateWorldState(2720, 0);
    sm.CreateWorldState(2719, 0);
    sm.CreateWorldState(2718, 0);
    sm.CreateWorldState(2260, 0);
    sm.CreateWorldState(2264, 0);
    sm.CreateWorldState(2263, 0);
    sm.CreateWorldState(2262, 0);
    sm.CreateWorldState(2261, 0);
    sm.CreateWorldState(2259, 0);
    sm.CreateWorldState(2742, 0);
    sm.CreateWorldState(2741, 0);
    sm.CreateWorldState(2740, 0);
    sm.CreateWorldState(2739, 0);
    sm.CreateWorldState(2738, 0);
    sm.CreateWorldState(2737, 0);
    sm.CreateWorldState(2736, 0);
    sm.CreateWorldState(2735, 0);
    sm.CreateWorldState(2733, 0);
    sm.CreateWorldState(2732, 0);
    sm.CreateWorldState(2731, 1);
    sm.CreateWorldState(2730, 0);
    sm.CreateWorldState(2729, 0);
    sm.CreateWorldState(2728, 1);
    sm.CreateWorldState(2727, 0);
    sm.CreateWorldState(2726, 0);
    sm.CreateWorldState(2725, 1);
    sm.CreateWorldState(2724, 0);
    sm.CreateWorldState(2723, 0);
    sm.CreateWorldState(2722, 1);
    sm.CreateWorldState(2757, 1);
    sm.CreateWorldState(2753, 0);
    sm.CreateWorldState(2752, 0);
    sm.CreateWorldState(2770, 1);
    sm.CreateWorldState(2769, 1);
    sm.CreateWorldState(2750, 0);
    sm.CreateWorldState(2749, 0);
    sm.CreateWorldState(3191, 2);
    sm.CreateWorldState(3218, 0);
    sm.CreateWorldState(3217, 0);
    sm.CreateWorldState(3085, 379);

    // decyphered world states
    sm.CreateWorldState(WORLDSTATE_EOTS_HORDE_VICTORY_POINTS_DISPLAY, 1);
    sm.CreateWorldState(WORLDSTATE_EOTS_ALLIANCE_VICTORY_POINTS_DISPLAY, 1);

    sm.CreateWorldState(WORLDSTATE_EOTS_ALLIANCE_VICTORYPOINTS, 0);
    sm.CreateWorldState(WORLDSTATE_EOTS_HORDE_VICTORYPOINTS, 0);

    sm.CreateWorldState(WORLDSTATE_EOTS_ALLIANCE_BASES, 0);
    sm.CreateWorldState(WORLDSTATE_EOTS_HORDE_BASES, 0);

    sm.CreateWorldState(WORLDSTATE_EOTS_PVP_CAPTURE_BAR_DISPLAY, 0);
    sm.CreateWorldState(WORLDSTATE_EOTS_PVP_CAPTURE_BAR_VALUE, 0);

    sm.CreateWorldState(WORLDSTATE_EOTS_DRAENEI_RUINS_HORDE_DISPLAY, 0);
    sm.CreateWorldState(WORLDSTATE_EOTS_DRAENEI_RUINS_ALLIANCE_DISPLAY, 0);
    sm.CreateWorldState(WORLDSTATE_EOTS_DRAENEI_RUINS_NETURAL_DISPLAY, 1);

    sm.CreateWorldState(WORLDSTATE_EOTS_MAGE_TOWER_ALLIANCE_DISPLAY, 0);
    sm.CreateWorldState(WORLDSTATE_EOTS_MAGE_TOWER_HORDE_DISPLAY, 0);
    sm.CreateWorldState(WORLDSTATE_EOTS_MAGE_TOWER_NETURAL_DISPLAY, 1);

    sm.CreateWorldState(WORLDSTATE_EOTS_FELREAVER_RUINS_HORDE_DISPLAY, 0);
    sm.CreateWorldState(WORLDSTATE_EOTS_FELREAVER_RUINS_ALLIANCE_DISPLAY, 0);
    sm.CreateWorldState(WORLDSTATE_EOTS_FELREAVER_RUINS_NETURAL_DISPLAY, 1);

    sm.CreateWorldState(WORLDSTATE_EOTS_BLOODELF_TOWER_HORDE_DISPLAY, 0);
    sm.CreateWorldState(WORLDSTATE_EOTS_BLOODELF_TOWER_ALLIANCE_DISPLAY, 0);
    sm.CreateWorldState(WORLDSTATE_EOTS_BLOODELF_TOWER_NEUTRAL_DISPLAY, 1);

    sm.CreateWorldState(WORLDSTATE_EOTS_FLAG_NEUTRAL_DISPLAY, 1);

    /* create gameobjects */
    for(i = 0; i < EOTS_TOWER_COUNT; i++)
    {
        m_CPStatusGO[i] = m_mapMgr->CreateGameObject(EOTSTowerIds[i]);
        if(m_CPStatusGO[i] == NULL || !m_CPStatusGO[i]->CreateFromProto( EOTSTowerIds[i], m_mapMgr->GetMapId(), EOTSCPLocations[i][0], EOTSCPLocations[i][1], EOTSCPLocations[i][2], 0.0f))
        {
            sLog.LargeErrorMessage(LARGERRORMESSAGE_ERROR, "EOTS is being created and you are missing gameobject %u.", EOTSTowerIds[i]);
            abort();
            return;
        }
        m_CPStatusGO[i]->PushToWorld( m_mapMgr );

        //Flags set 1
        m_CPBanner[i] = m_mapMgr->CreateGameObject(EOTS_BANNER_NEUTRAL);
        if( m_CPBanner[i] == NULL || !m_CPBanner[i]->CreateFromProto( EOTS_BANNER_NEUTRAL, m_mapMgr->GetMapId(), EOTSCTLocations[i][0], EOTSCTLocations[i][1], EOTSCTLocations[i][2], 0.0f))
        {
            sLog.LargeErrorMessage(LARGERRORMESSAGE_ERROR, "EOTS is being created and you are missing gameobjects %u",EOTS_BANNER_NEUTRAL);
            abort();
            return;
        }
        m_CPBanner[i]->PushToWorld( m_mapMgr );

        //Flags set 2
        m_CPBanner2[i] = m_mapMgr->CreateGameObject(EOTS_BANNER_NEUTRAL);
        if( m_CPBanner2[i] == NULL || !m_CPBanner2[i]->CreateFromProto( EOTS_BANNER_NEUTRAL, m_mapMgr->GetMapId(), EOTSCTLocations2[i][0], EOTSCTLocations2[i][1], EOTSCTLocations2[i][2], 0.0f))
        {
            sLog.LargeErrorMessage(LARGERRORMESSAGE_ERROR, "EOTS is being created and you are missing gameobjects %u",EOTS_BANNER_NEUTRAL);
            abort();
            return;
        }
        m_CPBanner2[i]->PushToWorld( m_mapMgr );

        //Flag set 3
        m_CPBanner3[i] = m_mapMgr->CreateGameObject(EOTS_BANNER_NEUTRAL);
        if( m_CPBanner3[i] == NULL || !m_CPBanner3[i]->CreateFromProto( EOTS_BANNER_NEUTRAL, m_mapMgr->GetMapId(), EOTSCTLocations3[i][0], EOTSCTLocations3[i][1], EOTSCTLocations3[i][2], 0.0f))
        {
            sLog.LargeErrorMessage(LARGERRORMESSAGE_ERROR, "EOTS is being created and you are missing gameobjects %u",EOTS_BANNER_NEUTRAL);
            abort();
            return;
        }
        m_CPBanner3[i]->PushToWorld( m_mapMgr );
    }

    /* BUBBLES! */
    for( i = 0; i < 2; i++ )
    {
        m_bubbles[i] = m_mapMgr->CreateGameObject((uint32)EOTSBubbleLocations[i][0]);
        if( m_bubbles[i] == NULL || !m_bubbles[i]->CreateFromProto( (uint32)EOTSBubbleLocations[i][0], m_mapMgr->GetMapId(), EOTSBubbleLocations[i][1], EOTSBubbleLocations[i][2], EOTSBubbleLocations[i][3], EOTSBubbleLocations[i][4] ) )
        {
            sLog.LargeErrorMessage(LARGERRORMESSAGE_ERROR, "EOTS is being created and you are missing gameobjects. Terminating.");
            abort();
            return;
        }

        m_bubbles[i]->SetFloatValue(OBJECT_FIELD_SCALE_X,0.1f);
        m_bubbles[i]->SetByte(GAMEOBJECT_BYTES_1, GAMEOBJECT_BYTES_STATE, 1);
        m_bubbles[i]->SetUInt32Value(GAMEOBJECT_FLAGS,32);
        m_bubbles[i]->SetUInt32Value(GAMEOBJECT_FACTION, 1375);
        m_bubbles[i]->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_ANIMPROGRESS, 100);

        m_bubbles[i]->PushToWorld( m_mapMgr );
    }

    /* Buffs */
    SpawnBuff(EOTS_TOWER_DRAENEI);
    SpawnBuff(EOTS_TOWER_MAGE);
    SpawnBuff(EOTS_TOWER_FELREAVER);
    SpawnBuff(EOTS_TOWER_BE);

    /* Flag */
    m_standFlag = m_mapMgr->CreateGameObject(EOTS_STANDFLAG);
    if( m_standFlag == NULL ||! m_standFlag->CreateFromProto( EOTS_STANDFLAG, m_mapMgr->GetMapId(), 2174.782227f, 1569.054688f, 1160.361938f, -1.448624f ))
    {
        sLog.LargeErrorMessage(LARGERRORMESSAGE_ERROR, "EOTS is being created and you are missing gameobject %u",EOTS_STANDFLAG);
        abort();
        return;
    }
    m_standFlag->SetFloatValue( OBJECT_FIELD_SCALE_X, 2.5f );
    m_standFlag->PushToWorld( m_mapMgr );

    m_dropFlag = m_mapMgr->CreateGameObject(EOTS_DROPFLAG);
    if( m_dropFlag == NULL || !m_dropFlag->CreateFromProto( EOTS_DROPFLAG, m_mapMgr->GetMapId(), 2174.782227f, 1569.054688f, 1160.361938f, -1.448624f ))
    {
        sLog.LargeErrorMessage(LARGERRORMESSAGE_ERROR, "EOTS is being created and you are missing gameobject %u",EOTS_DROPFLAG);
        abort();
        return;
    }
    m_dropFlag->SetFloatValue( OBJECT_FIELD_SCALE_X, 2.5f );
}
void ArathiBasin::OnCreate()
{
	// Alliance Gate
	GameObjectPointer gate = SpawnGameObject(180255, 1284.597290f, 1281.166626f, -15.977916f, 0.76f, 32, 114, 1.5799990f);
	gate->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_ANIMPROGRESS, 100);
	gate->PushToWorld(m_mapMgr);
	m_gates.push_back(gate);

	// horde gate
	gate = SpawnGameObject(180256, 708.0902710f, 708.4479370f, -17.3898964f, 3.92f, 32, 114, 1.5699990f);
	gate->SetByte(GAMEOBJECT_BYTES_1,GAMEOBJECT_BYTES_ANIMPROGRESS, 100);
	gate->PushToWorld(m_mapMgr);
	m_gates.push_back(gate);

	// spawn (default) control points
	SpawnControlPoint(AB_CONTROL_POINT_STABLE,		AB_SPAWN_TYPE_NEUTRAL);
	SpawnControlPoint(AB_CONTROL_POINT_BLACKSMITH,	AB_SPAWN_TYPE_NEUTRAL);
	SpawnControlPoint(AB_CONTROL_POINT_LUMBERMILL,	AB_SPAWN_TYPE_NEUTRAL);
	SpawnControlPoint(AB_CONTROL_POINT_MINE,		AB_SPAWN_TYPE_NEUTRAL);
	SpawnControlPoint(AB_CONTROL_POINT_FARM,		AB_SPAWN_TYPE_NEUTRAL);

	// spawn buffs
	SpawnBuff(AB_BUFF_STABLES);
	SpawnBuff(AB_BUFF_BLACKSMITH);
	SpawnBuff(AB_BUFF_LUMBERMILL);
	SpawnBuff(AB_BUFF_MINE);
	SpawnBuff(AB_BUFF_FARM);

	// spawn the h/a base spirit guides
	AddSpiritGuide(SpawnSpiritGuide(NoBaseGYLocations[0][0],NoBaseGYLocations[0][1],NoBaseGYLocations[0][2], 0.0f, 0));
	AddSpiritGuide(SpawnSpiritGuide(NoBaseGYLocations[1][0],NoBaseGYLocations[1][1],NoBaseGYLocations[1][2], 0.0f, 1));

	// w00t
	WorldStateManager &sm = m_mapMgr->GetStateManager();

	// urrrgh worldstates
	sm.CreateWorldState(0x8D8, 0x00);
	sm.CreateWorldState(0x8D7, 0x00);
	sm.CreateWorldState(0x8D6, 0x00);
	sm.CreateWorldState(0x8D5, 0x00);
	sm.CreateWorldState(0x8D4, 0x00);
	sm.CreateWorldState(0x8D3, 0x00);

	// AB world state's
	// unknowns, need more research
	sm.CreateWorldState(0x7A3, 1800); // unknown
	sm.CreateWorldState(0x745, 0x02); // unknown

	// Icon stuff for on the map
	sm.CreateWorldState(WORLDSTATE_AB_SHOW_BACKSMITH_ICON, 			 0x01);
	sm.CreateWorldState(WORLDSTATE_AB_SHOW_FARM_ICON, 				  0x01);
	sm.CreateWorldState(WORLDSTATE_AB_SHOW_LUMBERMILL_ICON, 			0x01);
	sm.CreateWorldState(WORLDSTATE_AB_SHOW_GOLDMINE_ICON, 			 0x01);
	sm.CreateWorldState(WORLDSTATE_AB_SHOW_STABLE_ICON, 			0x01);

	// LumberMill
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURING_LUMBERMILL_HORDE, 	   0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURING_LUMBERMILL_ALLIANCE, 	0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURED_LUMBERMILL_HORDE, 		0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURED_LUMBERMILL_ALLIANCE, 	 0x00);

	// GoldMine
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURING_GOLDMINE_HORDE, 		 0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURING_GOLDMINE_ALLIANCE, 	  0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURED_GOLDMINE_HORDE, 		  0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURED_GOLDMINE_ALLIANCE, 	   0x00);

	// BlackSmith
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURING_BLACKSMITH_HORDE, 	   0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURING_BLACKSMITH_ALLIANCE, 	0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURED_BLACKSMITH_HORDE, 		0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURED_BLACKSMITH_ALLIANCE, 	 0x00);

	sm.CreateWorldState(WORLDSTATE_AB_MAX_SCORE, 						RESOURCES_WINVAL);
	sm.CreateWorldState(WORLDSTATE_AB_ALLIANCE_CAPTUREBASE, 			 0x00);
	sm.CreateWorldState(WORLDSTATE_AB_HORDE_CAPTUREBASE, 				0x00);
	sm.CreateWorldState(WORLDSTATE_AB_HORDE_RESOURCES, 				  0x00);
	sm.CreateWorldState(WORLDSTATE_AB_ALLIANCE_RESOURCES, 			   0x00);

	// Farm
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURING_FARM_ALLIANCE, 		 0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURING_FARM_HORDE, 			 0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURED_FARM_HORDE, 			  0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURED_FARM_ALLIANCE, 		   0x00);

	// Stables
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURING_STABLES_HORDE, 		  0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURING_STABLES_ALLIANCE, 	   0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURED_STABLES_HORDE, 		   0x00);
	sm.CreateWorldState(WORLDSTATE_AB_CAPTURED_STABLES_ALLIANCE, 		0x00);
}
Esempio n. 9
0
StrandOfTheAncient::StrandOfTheAncient(MapMgr * mgr, uint32 id, uint32 lgroup, uint32 t) : CBattleground(mgr, id, lgroup, t)
{
	int i;

	printf("\nStack Trace:\n");
	printStackTrace();

	// Lets start using exception handling rather than relying on
	// the crash handler all the time. :)
	try
	{
		// Crash on purpose... :P
		//char *crash = 0;
		//*crash = 10;

		for (i= 0; i<2; i++) {
			m_players[i].clear();
			m_pendPlayers[i].clear();
		}
		//m_worldStates.clear();
		m_pvpData.clear();
		m_resurrectMap.clear();

		//uint32 mapId = BattlegroundManager.GetMap(BATTLEGROUND_STRAND_OF_THE_ANCIENT);

		// Boats
		for (int i = 0; i < 4; i++)
		{
			m_boats[i] = m_mapMgr->CreateAndSpawnGameObject(20808,
				sotaBoats[i][0], sotaBoats[i][1], sotaBoats[i][2], sotaBoats[i][3], 1.0f);
			m_boats[i]->PushToWorld(mgr);
		}

		/* Relic */
		m_relic = m_mapMgr->CreateAndSpawnGameObject(GO_RELIC, sotaTitanRelic[0],
			sotaTitanRelic[1], sotaTitanRelic[2], sotaTitanRelic[3], 1.0f);

		for (i = 0; i < GATE_COUNT; i++)
		{
			m_gates[i] = m_mapMgr->CreateAndSpawnGameObject(GateGOIds[i],
				sotaGates[i][0], sotaGates[i][1], sotaGates[i][2], sotaGates[i][3], 1.0f);
			m_gateSigils[i] = m_mapMgr->CreateAndSpawnGameObject(GateSigilGOIds[i],
				sotaGateSigils[i][0], sotaGateSigils[i][1], sotaGateSigils[i][2],
				sotaGateSigils[i][3], 1.0f);
			m_gateTransporters[i] = m_mapMgr->CreateAndSpawnGameObject(192819,
				sotaTransporters[i][0], sotaTransporters[i][1], sotaTransporters[i][2],
				sotaTransporters[i][3], 1.0f);
		}

		// Spawn door for Chamber of Ancient Relics
		m_endgate = m_mapMgr->CreateAndSpawnGameObject(GateGOIds[i],
			sotaChamberGate[0], sotaChamberGate[1], sotaChamberGate[2],
			sotaChamberGate[3], 1.0f);


		/* create the buffs */
		for(i = 0; i < BUFF_COUNT; ++i)
			SpawnBuff(i);

	}
	catch (...) // Exception handling
	{	
		printf("Exception: StrandOfTheAncient constructor\n");
		printStackTrace();
		throw;
	} 

}
Esempio n. 10
0
void EyeOfTheStorm::OnCreate()
{
	GameObjectInfo* goi;
	uint32 i;

	/* create gameobjects */
	for(i = 0; i < EOTS_TOWER_COUNT; ++i)
	{
		goi = GameObjectNameStorage.LookupEntry(EOTSTowerIds[i]);
		if(goi == NULL)
		{
			Log.LargeErrorMessage("EOTS is being created and you are missing gameobjects. Terminating.", NULL);
			abort();
			return;
		}

		m_CPStatusGO[i] = m_mapMgr->CreateGameObject(goi->ID);
		m_CPStatusGO[i]->CreateFromProto(goi->ID, m_mapMgr->GetMapId(), EOTSTCLocations[i][0], EOTSTCLocations[i][1], EOTSTCLocations[i][2], 0);
		m_CPStatusGO[i]->PushToWorld(m_mapMgr);

		goi = GameObjectNameStorage.LookupEntry(EOTS_BANNER_NEUTRAL);
		if(goi == NULL)
		{
			Log.LargeErrorMessage("EOTS is being created and you are missing gameobjects. Terminating.", NULL);
			abort();
			return;
		}

		m_CPBanner[i] = m_mapMgr->CreateGameObject(goi->ID);
		m_CPBanner[i]->CreateFromProto(goi->ID, m_mapMgr->GetMapId(), EOTSCPLocations[i][0], EOTSCPLocations[i][1], EOTSCPLocations[i][2], 0);
		m_CPBanner[i]->PushToWorld(m_mapMgr);

		m_CPBanner2[i] = m_mapMgr->CreateGameObject(goi->ID);
		m_CPBanner2[i]->CreateFromProto(goi->ID, m_mapMgr->GetMapId(), EOTSCPLocations2[i][0], EOTSCPLocations2[i][1], EOTSCPLocations2[i][2], 0);
		m_CPBanner2[i]->PushToWorld(m_mapMgr);

		m_CPBanner3[i] = m_mapMgr->CreateGameObject(goi->ID);
		m_CPBanner3[i]->CreateFromProto(goi->ID, m_mapMgr->GetMapId(), EOTSCPLocations3[i][0], EOTSCPLocations3[i][1], EOTSCPLocations3[i][2], 0);
		m_CPBanner3[i]->PushToWorld(m_mapMgr);
	}

	/* BUBBLES! */
	for(i = 0; i < 2; ++i)
	{
		m_bubbles[i] = m_mapMgr->CreateGameObject((uint32)EOTSBubbleLocations[i][0]);
		if(!m_bubbles[i]->CreateFromProto((uint32)EOTSBubbleLocations[i][0], m_mapMgr->GetMapId(), EOTSBubbleLocations[i][1], EOTSBubbleLocations[i][2], EOTSBubbleLocations[i][3], EOTSBubbleLocations[i][4]))
		{
			Log.LargeErrorMessage("EOTS is being created and you are missing gameobjects. Terminating.", NULL);
			abort();
			return;
		}

		m_bubbles[i]->SetScale(0.1f);
		m_bubbles[i]->SetByte(GAMEOBJECT_BYTES_1, 0, 1);
		m_bubbles[i]->SetUInt32Value(GAMEOBJECT_FLAGS, 32);
		m_bubbles[i]->SetFaction(114);
		m_bubbles[i]->SetByte(GAMEOBJECT_BYTES_1, 3, 100);

		m_bubbles[i]->PushToWorld(m_mapMgr);
	}

	SpawnBuff(EOTS_TOWER_DRAENEI);
	SpawnBuff(EOTS_TOWER_MAGE);
	SpawnBuff(EOTS_TOWER_FELREAVER);
	SpawnBuff(EOTS_TOWER_BE);

	/* Flag */
	m_standFlag = m_mapMgr->CreateGameObject(184141);
	m_standFlag->CreateFromProto(184141, m_mapMgr->GetMapId(), 2174.782227f, 1569.054688f, 1160.361938f, -1.448624f);
	m_standFlag->SetParentRotation(2, 0.662620f);
	m_standFlag->SetParentRotation(3, -0.748956f);
	m_standFlag->SetScale(2.5f);
	m_standFlag->PushToWorld(m_mapMgr);

	m_dropFlag = m_mapMgr->CreateGameObject(184142);
	m_dropFlag->CreateFromProto(184142, m_mapMgr->GetMapId(), 2174.782227f, 1569.054688f, 1160.361938f, -1.448624f);
	m_dropFlag->SetParentRotation(2, 0.885448f);
	m_dropFlag->SetParentRotation(3, -0.464739f);
	m_dropFlag->SetScale(2.5f);
}
Esempio n. 11
0
void EyeOfTheStorm::OnCreate()
{
	GameObjectInfo* goi;
	uint32 i;


	/* eww worldstates */
	SetWorldState(2565, 142);
	SetWorldState(2720, 40);
	SetWorldState(2719, 0);
	SetWorldState(2718, 0);
	SetWorldState(2260, 0);
	SetWorldState(2264, 0);
	SetWorldState(2263, 0);
	SetWorldState(2262, 0);
	SetWorldState(2261, 0);
	SetWorldState(2259, 0);
	SetWorldState(2742, 0);
	SetWorldState(2741, 0);
	SetWorldState(2740, 0);
	SetWorldState(2739, 0);
	SetWorldState(2738, 0);
	SetWorldState(2737, 0);
	SetWorldState(2736, 0);
	SetWorldState(2735, 0);
	SetWorldState(2733, 0);
	SetWorldState(2732, 0);
	SetWorldState(2731, 1);
	SetWorldState(2730, 0);
	SetWorldState(2729, 0);
	SetWorldState(2728, 1);
	SetWorldState(2727, 0);
	SetWorldState(2726, 0);
	SetWorldState(2725, 1);
	SetWorldState(2724, 0);
	SetWorldState(2723, 0);
	SetWorldState(2722, 1);
	SetWorldState(2757, 1);
	SetWorldState(2753, 0);
	SetWorldState(2752, 0);
	SetWorldState(2770, 1);
	SetWorldState(2769, 1);
	SetWorldState(2750, 0);
	SetWorldState(2749, 0);
	SetWorldState(3218, 0);
	SetWorldState(3217, 0);
	SetWorldState(3085, 379);

	/* create gameobjects */
	for(i = 0; i < EOTS_TOWER_COUNT; ++i)
	{
		goi = GameObjectNameStorage.LookupEntry( EOTSTowerIds[i] );
		if( goi == NULL )
		{
			Log.LargeErrorMessage(LARGERRORMESSAGE_ERROR, "EOTS is being created and you are missing gameobjects. Terminating.");
			abort();
			return;
		}

		m_CPStatusGO[i] = m_mapMgr->CreateGameObject(goi->ID);
		m_CPStatusGO[i]->CreateFromProto( goi->ID, m_mapMgr->GetMapId(), EOTSTCLocations[i][0], EOTSTCLocations[i][1], EOTSTCLocations[i][2], 0);
		m_CPStatusGO[i]->PushToWorld( m_mapMgr );

		goi = GameObjectNameStorage.LookupEntry( EOTS_BANNER_NEUTRAL );
		if( goi == NULL )
		{
			Log.LargeErrorMessage(LARGERRORMESSAGE_ERROR, "EOTS is being created and you are missing gameobjects. Terminating.");
			abort();
			return;
		}

		m_CPBanner[i] = m_mapMgr->CreateGameObject(goi->ID);
		m_CPBanner[i]->CreateFromProto( goi->ID, m_mapMgr->GetMapId(), EOTSCPLocations[i][0], EOTSCPLocations[i][1], EOTSCPLocations[i][2], 0);
		m_CPBanner[i]->PushToWorld( m_mapMgr );

		m_CPBanner2[i] = m_mapMgr->CreateGameObject(goi->ID);
		m_CPBanner2[i]->CreateFromProto( goi->ID, m_mapMgr->GetMapId(), EOTSCPLocations2[i][0], EOTSCPLocations2[i][1], EOTSCPLocations2[i][2], 0);
		m_CPBanner2[i]->PushToWorld( m_mapMgr );

		m_CPBanner3[i] = m_mapMgr->CreateGameObject(goi->ID);
		m_CPBanner3[i]->CreateFromProto( goi->ID, m_mapMgr->GetMapId(), EOTSCPLocations3[i][0], EOTSCPLocations3[i][1], EOTSCPLocations3[i][2], 0);
		m_CPBanner3[i]->PushToWorld( m_mapMgr );
	}

	/* BUBBLES! */
	for( i = 0; i < 2; ++i )
	{
		m_bubbles[i] = m_mapMgr->CreateGameObject((uint32)EOTSBubbleLocations[i][0]);
		if( !m_bubbles[i]->CreateFromProto( (uint32)EOTSBubbleLocations[i][0], m_mapMgr->GetMapId(), EOTSBubbleLocations[i][1], EOTSBubbleLocations[i][2], EOTSBubbleLocations[i][3], EOTSBubbleLocations[i][4] ) )
		{
			Log.LargeErrorMessage(LARGERRORMESSAGE_ERROR, "EOTS is being created and you are missing gameobjects. Terminating.");
			abort();
			return;
		}

		m_bubbles[i]->SetFloatValue(OBJECT_FIELD_SCALE_X,0.1f);
		m_bubbles[i]->SetByte(GAMEOBJECT_BYTES_1, 0,1);
		m_bubbles[i]->SetUInt32Value(GAMEOBJECT_FLAGS,32);
		m_bubbles[i]->SetUInt32Value(GAMEOBJECT_FACTION,114);
		m_bubbles[i]->SetByte(GAMEOBJECT_BYTES_1, 3, 100);

		m_bubbles[i]->PushToWorld( m_mapMgr );
	}

	SpawnBuff(EOTS_TOWER_DRAENEI);
	SpawnBuff(EOTS_TOWER_MAGE);
	SpawnBuff(EOTS_TOWER_FELREAVER);
	SpawnBuff(EOTS_TOWER_BE);

	/* Flag */
	m_standFlag = m_mapMgr->CreateGameObject(184141);
	m_standFlag->CreateFromProto( 184141, m_mapMgr->GetMapId(), 2174.782227f, 1569.054688f, 1160.361938f, -1.448624f );
	m_standFlag->SetFloatValue( GAMEOBJECT_PARENTROTATION_02, 0.662620f );
	m_standFlag->SetFloatValue( GAMEOBJECT_PARENTROTATION_03, -0.748956f );
	m_standFlag->SetFloatValue( OBJECT_FIELD_SCALE_X, 2.5f );
	m_standFlag->PushToWorld( m_mapMgr );

	m_dropFlag = m_mapMgr->CreateGameObject(184142);
	m_dropFlag->CreateFromProto( 184142, m_mapMgr->GetMapId(), 2174.782227f, 1569.054688f, 1160.361938f, -1.448624f );
	m_dropFlag->SetFloatValue( GAMEOBJECT_PARENTROTATION_02, 0.885448f );
	m_dropFlag->SetFloatValue( GAMEOBJECT_PARENTROTATION_03, -0.464739f );
	m_dropFlag->SetFloatValue( OBJECT_FIELD_SCALE_X, 2.5f );
}