當前位置: 首頁>>代碼示例>>C++>>正文


C++ AddCapturePoint函數代碼示例

本文整理匯總了C++中AddCapturePoint函數的典型用法代碼示例。如果您正苦於以下問題:C++ AddCapturePoint函數的具體用法?C++ AddCapturePoint怎麽用?C++ AddCapturePoint使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了AddCapturePoint函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: RegisterZone

bool OutdoorPvPEP::SetupOutdoorPvP()
{
    for (uint8 i = 0; i < EPBuffZonesNum; ++i)
        RegisterZone(EPBuffZones[i]);

    AddCapturePoint(new OPvPCapturePointEP_EWT(this));
    AddCapturePoint(new OPvPCapturePointEP_PWT(this));
    AddCapturePoint(new OPvPCapturePointEP_CGT(this));
    AddCapturePoint(new OPvPCapturePointEP_NPT(this));
    return true;
}
開發者ID:Alluring,項目名稱:TrinityCore,代碼行數:11,代碼來源:OutdoorPvPEP.cpp

示例2: RegisterZone

bool OutdoorPvPHP::SetupOutdoorPvP() {
	m_AllianceTowersControlled = 0;
	m_HordeTowersControlled = 0;
	// add the zones affected by the pvp buff
	for (int i = 0; i < OutdoorPvPHPBuffZonesNum; ++i)
		RegisterZone(OutdoorPvPHPBuffZones[i]);

	AddCapturePoint(new OPvPCapturePointHP(this, HP_TOWER_BROKEN_HILL));

	AddCapturePoint(new OPvPCapturePointHP(this, HP_TOWER_OVERLOOK));

	AddCapturePoint(new OPvPCapturePointHP(this, HP_TOWER_STADIUM));

	return true;
}
開發者ID:FrenchCORE,項目名稱:OLD_FrenchCORE,代碼行數:15,代碼來源:OutdoorPvPHP.cpp

示例3: RegisterZone

bool OutdoorPvPAzshara::SetupOutdoorPvP()
{
    m_AllianceTowersControlled = 0;
    m_HordeTowersControlled = 0;
    // add the zones affected by the pvp buff
    for (int i = 0; i < OutdoorPvPAzsharaBuffZonesNum; ++i)
        RegisterZone(OutdoorPvPAzsharaBuffZones[i]);

    AddCapturePoint(new OPvPCapturePointAzshara(this, Azshara_TOWER_ALLIANCE));

    AddCapturePoint(new OPvPCapturePointAzshara(this, Azshara_TOWER_HORDE));

    AddCapturePoint(new OPvPCapturePointAzshara(this, Azshara_TOWER_NEUTRAL));

    return true;
}
開發者ID:MrZechY,項目名稱:Project-Justice,代碼行數:16,代碼來源:OutdoorPvPAzshara.cpp

示例4: OutdoorPvPObjective

OutdoorPvPObjectiveNA::OutdoorPvPObjectiveNA(OutdoorPvP *pvp) :
    OutdoorPvPObjective(pvp), m_capturable(true), m_GuardsAlive(0), m_ControllingFaction(0),
    m_HalaaState(HALAA_N), m_WyvernStateSouth(0), m_WyvernStateNorth(0), m_WyvernStateWest(0),
    m_WyvernStateEast(0), m_RespawnTimer(NA_RESPAWN_TIME), m_GuardCheckTimer(NA_GUARD_CHECK_TIME)
{
    AddCapturePoint(182210,530,-1572.57,7945.3,-22.475,2.05949,0,0,0.857167,0.515038);
}
開發者ID:mangos-gameaction,項目名稱:mangos,代碼行數:7,代碼來源:OutdoorPvPNA.cpp

示例5: OutdoorPvPObjective

OutdoorPvPObjectiveHP::OutdoorPvPObjectiveHP(OutdoorPvP *pvp,OutdoorPvPHPTowerType type)
: OutdoorPvPObjective(pvp), m_TowerType(type)
{
    AddCapturePoint(HPCapturePoints[type].entry,
            HPCapturePoints[type].map,
            HPCapturePoints[type].x,
            HPCapturePoints[type].y,
            HPCapturePoints[type].z,
            HPCapturePoints[type].o,
            HPCapturePoints[type].rot0,
            HPCapturePoints[type].rot1,
            HPCapturePoints[type].rot2,
            HPCapturePoints[type].rot3);
    AddObject(type,
            HPTowerFlags[type].entry,
            HPTowerFlags[type].map,
            HPTowerFlags[type].x,
            HPTowerFlags[type].y,
            HPTowerFlags[type].z,
            HPTowerFlags[type].o,
            HPTowerFlags[type].rot0,
            HPTowerFlags[type].rot1,
            HPTowerFlags[type].rot2,
            HPTowerFlags[type].rot3);
}
開發者ID:mangos-gameaction,項目名稱:mangos,代碼行數:25,代碼來源:OutdoorPvPHP.cpp

示例6: RegisterZone

bool OutdoorPvPEP::SetupOutdoorPvP()
{
    m_AllianceTowersControlled = 0;
    m_HordeTowersControlled = 0;

    // add the zones affected by the pvp buff
    for (uint8 i = 0; i < OutdoorPvPEPBuffZonesNum; ++i)
        RegisterZone(OutdoorPvPEPBuffZones[i]);

    AddCapturePoint(new OPvPCapturePointEP(this,EP_TOWER_CROWNGUARD));
    AddCapturePoint(new OPvPCapturePointEP(this,EP_TOWER_EASTWALL));
    AddCapturePoint(new OPvPCapturePointEP(this,EP_TOWER_NORTHPASS));
    AddCapturePoint(new OPvPCapturePointEP(this,EP_TOWER_PLAGUEWOOD));

    return true;
}
開發者ID:japtenks,項目名稱:blizzlikecore,代碼行數:16,代碼來源:OutdoorPvPEP.cpp

示例7: RegisterZone

bool OutdoorPvPZM::SetupOutdoorPvP()
{
    m_AllianceTowersControlled = 0;
    m_HordeTowersControlled = 0;

    // add the zones affected by the pvp buff
    for (uint8 i = 0; i < OutdoorPvPZMBuffZonesNum; ++i)
        RegisterZone(OutdoorPvPZMBuffZones[i]);

    AddCapturePoint(new OPvPCapturePointZM_Beacon(this, ZM_BEACON_WEST));
    AddCapturePoint(new OPvPCapturePointZM_Beacon(this, ZM_BEACON_EAST));
    m_GraveYard = new OPvPCapturePointZM_GraveYard(this);
    AddCapturePoint(m_GraveYard); // though the update function isn't used, the handleusego is!

    return true;
}
開發者ID:XEQT,項目名稱:SkyFireEMU,代碼行數:16,代碼來源:OutdoorPvPZM.cpp

示例8: RegisterZone

bool OutdoorPvPGH::SetupOutdoorPvP() {
	RegisterZone(GH_OUTDOORPVP_ZONE);
	m_obj = new OPvPCapturePointGH(this);
	if (!m_obj)
		return false;
	AddCapturePoint(m_obj);
	return true;
}
開發者ID:FrenchCORE,項目名稱:Server,代碼行數:8,代碼來源:OutdoorPvPGH.cpp

示例9: RegisterZone

bool OutdoorPvPGH::SetupOutdoorPvP()
{
    RegisterZone(GH_ZONE);
    if (m_obj = new OPvPCapturePointGH(this))
    {
        AddCapturePoint(m_obj);
        return true;
    }
    return false;
}
開發者ID:boom8866,項目名稱:azerothcore-wotlk,代碼行數:10,代碼來源:OutdoorPvPGH.cpp

示例10: RegisterZone

bool OutdoorPvPNA::SetupOutdoorPvP()
{
//    m_TypeId = OUTDOOR_PVP_NA; _MUST_ be set in ctor, because of spawns cleanup
    // add the zones affected by the pvp buff
    RegisterZone(NA_BUFF_ZONE);

    // halaa
    m_obj = new OPvPCapturePointNA(this);

    AddCapturePoint(m_obj);
    return true;
}
開發者ID:oMadMano,項目名稱:MistyWorld_6xx,代碼行數:12,代碼來源:OutdoorPvPNA.cpp

示例11: RegisterZone

bool OutdoorPvPTF::SetupOutdoorPvP() {
	m_AllianceTowersControlled = 0;
	m_HordeTowersControlled = 0;

	m_IsLocked = false;
	m_LockTimer = TF_LOCK_TIME;
	m_LockTimerUpdate = 0;
	hours_left = 6;
	second_digit = 0;
	first_digit = 0;

	// add the zones affected by the pvp buff
	for (uint8 i = 0; i < OutdoorPvPTFBuffZonesNum; ++i)
		RegisterZone(OutdoorPvPTFBuffZones[i]);

	AddCapturePoint(new OPvPCapturePointTF(this, TF_TOWER_NW));
	AddCapturePoint(new OPvPCapturePointTF(this, TF_TOWER_N));
	AddCapturePoint(new OPvPCapturePointTF(this, TF_TOWER_NE));
	AddCapturePoint(new OPvPCapturePointTF(this, TF_TOWER_SE));
	AddCapturePoint(new OPvPCapturePointTF(this, TF_TOWER_S));

	return true;
}
開發者ID:jsj2008,項目名稱:StarGate-Plus-EMU,代碼行數:23,代碼來源:OutdoorPvPTF.cpp

示例12: RegisterZone

bool OutdoorPvPHS::SetupOutdoorPvP()
{
    m_PlayerCount    = 0;
    m_HordeCount    = 0;
    m_AllianceCount    = 0;

    m_HordeBuff = 0;
    m_AllianceBuff = 0;

    m_ChestTimer = HS_FFA_CHEST_TIMER;
    m_ChestAnnounceTimer = HS_FFA_CHEST_ANNOUNCE_TIMER;
    m_ChestDebugTimer = 60000;
    m_ChestGUID = 0;

    m_TenacityTimer = HS_TENACITY_TIME;
    m_LastResurrectTime = 0;

    m_DurnholdeOwner = 0;
    m_DurnholdeLockout = 0;

    m_TowerStateEast = 0;
    m_TowerStateWest = 0;
    m_TowerStateMain = 0;

    RegisterZone(HS_ZONE);
    
    AddCapturePoint(new OPvPCapturePointHS(this,HS_TOWER_LOWER));

    AddCapturePoint(new OPvPCapturePointHS(this,HS_TOWER_LOWER_EAST));

    AddCapturePoint(new OPvPCapturePointHS(this,HS_TOWER_MAIN));

    sLog->outString("HillsbradMGR : Loaded.");

    return true;
}
開發者ID:MrZomble,項目名稱:TrinityCore,代碼行數:36,代碼來源:OutdoorPvPHS.cpp

示例13: switch

void BattlefieldWG::OnGameObjectCreate(GameObject* go)
{
    bool isWorkshop = false;
    uint8 workshopId = 0;

    switch (go->GetEntry())
    {
        case GO_WINTERGRASP_FACTORY_BANNER_NE:
            isWorkshop = true;
            workshopId = BATTLEFIELD_WG_WORKSHOP_NE;
            break;
        case GO_WINTERGRASP_FACTORY_BANNER_NW:
            isWorkshop = true;
            workshopId = BATTLEFIELD_WG_WORKSHOP_NW;
            break;
        case GO_WINTERGRASP_FACTORY_BANNER_SE:
            isWorkshop = true;
            workshopId = BATTLEFIELD_WG_WORKSHOP_SE;
            break;
        case GO_WINTERGRASP_FACTORY_BANNER_SW:
            isWorkshop = true;
            workshopId = BATTLEFIELD_WG_WORKSHOP_SW;
            break;

    }

    if (!isWorkshop)
        return;

    for (Workshop::const_iterator itr = WorkshopsList.begin(); itr != WorkshopsList.end(); ++itr)
    {
        if (WGWorkshop* workshop = (*itr))
        {
            if (workshop->workshopId == workshopId)
            {
                WintergraspCapturePoint* capturePoint = new WintergraspCapturePoint(this, GetAttackerTeam());

                capturePoint->SetCapturePointData(go);
                capturePoint->LinkToWorkshop(workshop);
                AddCapturePoint(capturePoint);
                break;
            }
        }
    }
}
開發者ID:Szone,項目名稱:TrinityCore,代碼行數:45,代碼來源:BattlefieldWG.cpp

示例14: OutdoorPvPObjective

// PWT
OutdoorPvPObjectiveEP_PWT::OutdoorPvPObjectiveEP_PWT(OutdoorPvP *pvp)
: OutdoorPvPObjective(pvp), m_TowerState(EP_TS_N), m_FlightMasterSpawned(0)
{
    AddCapturePoint(EPCapturePoints[EP_PWT].entry,EPCapturePoints[EP_PWT].map,EPCapturePoints[EP_PWT].x,EPCapturePoints[EP_PWT].y,EPCapturePoints[EP_PWT].z,EPCapturePoints[EP_PWT].o,EPCapturePoints[EP_PWT].rot0,EPCapturePoints[EP_PWT].rot1,EPCapturePoints[EP_PWT].rot2,EPCapturePoints[EP_PWT].rot3);
    AddObject(EP_PWT_FLAGS,EPTowerFlags[EP_PWT].entry,EPTowerFlags[EP_PWT].map,EPTowerFlags[EP_PWT].x,EPTowerFlags[EP_PWT].y,EPTowerFlags[EP_PWT].z,EPTowerFlags[EP_PWT].o,EPTowerFlags[EP_PWT].rot0,EPTowerFlags[EP_PWT].rot1,EPTowerFlags[EP_PWT].rot2,EPTowerFlags[EP_PWT].rot3);
}
開發者ID:Zekom,項目名稱:NeoCore,代碼行數:7,代碼來源:OutdoorPvPEP.cpp

示例15: TeamId


//.........這裏部分代碼省略.........
        // add capture point
        uint32 capturePointEntry = 0;

        //192028 192029
        //192030 192031
        //192032 192033

        //190475 190487 not sure
        //192626 192627
        //194959 194960

        switch(goData->id)
        {
            case 192028: capturePointEntry = 190475; break;
            case 192029: capturePointEntry = 190487; break;
            case 192030: capturePointEntry = 190475; break;
            case 192031: capturePointEntry = 190487; break;
            case 192032: capturePointEntry = 190475; break;
            case 192033: capturePointEntry = 190487; break;
        }
        if(capturePointEntry)
        {
            uint32 engGuid = 0;

            QueryResult *result = WorldDatabase.PQuery("SELECT `guid` FROM `creature`"
                " WHERE `creature`.`map`=571"
                " AND `creature`.`id` IN (%u, %u);", CRE_ENG_A, CRE_ENG_H);

            if(!result)
            {
                sLog.outError("Cannot find siege workshop master in creature!"); 
                continue;
            }

            float minDist = 100;
            do
            {
                Field *fields = result->Fetch();
                uint32 guid = fields[0].GetUInt32();
                const CreatureData *creData = objmgr.GetCreatureData(guid);
                if(!creData)
                    continue;

                float dist = (abs(creData->posX - x) + abs(creData->posY - y));
                if(minDist > dist)
                {
                    minDist = dist;
                    engGuid = guid;
                }
            }while(result->NextRow());
            delete result;

            if(!engGuid)
            {
                sLog.outError("Cannot find nearby siege workshop master!");
                continue;
            }

            SiegeWorkshop *workshop = new SiegeWorkshop(this, m_buildingStates[guid]);
            if(!workshop->SetCapturePointData(capturePointEntry, goData->mapid, goData->posX, goData->posY, goData->posZ))
            {
                delete workshop;
                sLog.outError("Cannot add capture point!");
                continue;
            }
            const CreatureData *creData = objmgr.GetCreatureData(engGuid);
            if(!creData)
                continue;

            workshop->m_engEntry = const_cast<uint32*>(&creData->id);
            const_cast<CreatureData*>(creData)->displayid = 0;
            workshop->m_workshopGuid = guid;
            workshop->m_engGuid = engGuid;
            //workshop->AddGO(0, guid, goData->id);
            //workshop->AddCre(0, engGuid, creData->id);
            //sLog.outDebug("Demolisher Engineerer lowguid %u is linked to workshop lowguid %u.", engGuid, guid);
            AddCapturePoint(workshop);
            m_buildingStates[guid]->type = BUILDING_WORKSHOP;
            workshop->SetStateByBuildingState();
        }
    }while(result->NextRow());
    delete result;

    //for(AreaPOIList::iterator itr = areaPOIs.begin(); itr != areaPOIs.end(); ++itr)
    //    sLog.outError("not assigned %u %f %f", (*itr)->id, (*itr)->x, (*itr)->y);

    //gameeventmgr.StartInternalEvent(GameEventWintergraspDefender[m_defender]);

    //Titan Relic eventid = 19982
    objmgr.AddGOData(192829, 571, 5440, 2840.8, 420.43, 0);

    LoadTeamPair(m_goDisplayPair, GODisplayPair);
    LoadTeamPair(m_creEntryPair, CreatureEntryPair);

    m_wartime = false;
    m_timer = sWorld.getConfig(CONFIG_OUTDOORPVP_WINTERGRASP_START_TIME) * MINUTE * IN_MILISECONDS;

    RegisterZone(ZONE_WINTERGRASP);
    return true;
}
開發者ID:pfchrono,項目名稱:mangos-mods,代碼行數:101,代碼來源:Wintergrasp.cpp


注:本文中的AddCapturePoint函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。