本文整理匯總了C++中DoorOpen函數的典型用法代碼示例。如果您正苦於以下問題:C++ DoorOpen函數的具體用法?C++ DoorOpen怎麽用?C++ DoorOpen使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DoorOpen函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: SpawnBGObject
void BattlegroundAB::StartingEventOpenDoors()
{
// spawn neutral banners
for (int banner = BG_AB_OBJECT_BANNER_NEUTRAL, i = 0; i < 5; banner += 8, ++i)
SpawnBGObject(banner, RESPAWN_IMMEDIATELY);
for (int i = 0; i < BG_AB_DYNAMIC_NODES_COUNT; ++i)
{
//randomly select buff to spawn
uint8 buff = urand(0, 2);
SpawnBGObject(BG_AB_OBJECT_SPEEDBUFF_STABLES + buff + i * 3, RESPAWN_IMMEDIATELY);
}
DoorOpen(BG_AB_OBJECT_GATE_A);
DoorOpen(BG_AB_OBJECT_GATE_H);
// Achievement: Let's Get This Done
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, AB_EVENT_START_BATTLE);
}
示例2: DoorOpen
void BattlegroundNA::StartingEventOpenDoors()
{
for (uint32 i = BG_NA_OBJECT_DOOR_1; i <= BG_NA_OBJECT_DOOR_2; ++i)
DoorOpen(i);
for (uint32 i = BG_NA_OBJECT_BUFF_1; i <= BG_NA_OBJECT_BUFF_2; ++i)
SpawnBGObject(i, 60);
}
示例3: DoorOpen
void BattlegroundWS::StartingEventOpenDoors()
{
for (uint32 i = BG_WS_OBJECT_DOOR_A_1; i <= BG_WS_OBJECT_DOOR_A_6; ++i)
DoorOpen(i);
for (uint32 i = BG_WS_OBJECT_DOOR_H_1; i <= BG_WS_OBJECT_DOOR_H_4; ++i)
DoorOpen(i);
for (uint32 i = BG_WS_OBJECT_A_FLAG; i <= BG_WS_OBJECT_BERSERKBUFF_2; ++i)
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
SpawnBGObject(BG_WS_OBJECT_DOOR_A_5, RESPAWN_ONE_DAY);
SpawnBGObject(BG_WS_OBJECT_DOOR_A_6, RESPAWN_ONE_DAY);
SpawnBGObject(BG_WS_OBJECT_DOOR_H_3, RESPAWN_ONE_DAY);
SpawnBGObject(BG_WS_OBJECT_DOOR_H_4, RESPAWN_ONE_DAY);
// players joining later are not eligibles
}
示例4: switch
void BattlegroundRV::PostUpdateImpl(uint32 diff)
{
if(GetStatus() != STATUS_IN_PROGRESS)
return;
if (getTimer() < diff)
{
switch (getState())
{
case BG_RV_STATE_OPEN_FENCES:
setTimer(BG_RV_PILAR_TO_FIRE_TIMER);
setState(BG_RV_STATE_CLOSE_FIRE);
break;
case BG_RV_STATE_CLOSE_FIRE:
for (uint8 i = BG_RV_OBJECT_FIRE_1; i <= BG_RV_OBJECT_FIREDOOR_2; ++i)
DoorClose(i);
setTimer(BG_RV_FIRE_TO_PILAR_TIMER);
setState(BG_RV_STATE_OPEN_PILARS);
break;
case BG_RV_STATE_OPEN_PILARS:
for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PULLEY_2; ++i)
DoorOpen(i);
setTimer(BG_RV_PILAR_TO_FIRE_TIMER);
setState(BG_RV_STATE_OPEN_FIRE);
SwitchDynLos();
break;
case BG_RV_STATE_OPEN_FIRE:
// FIXME: after 3.2.0 it's only decorative and should be opened only one time at battle start
for (uint8 i = BG_RV_OBJECT_FIRE_1; i <= BG_RV_OBJECT_FIREDOOR_2; ++i)
DoorOpen(i);
setTimer(BG_RV_FIRE_TO_PILAR_TIMER);
setState(BG_RV_STATE_CLOSE_PILARS);
break;
case BG_RV_STATE_CLOSE_PILARS:
for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PULLEY_2; ++i)
DoorOpen(i);
setTimer(BG_RV_PILAR_TO_FIRE_TIMER);
setState(BG_RV_STATE_CLOSE_FIRE);
SwitchDynLos();
break;
}
}
else
setTimer(getTimer() - diff);
}
示例5: switch
void BattlegroundRV::Update(uint32 diff)
{
Battleground::Update(diff);
if (getTimer() < diff)
{
uint32 i;
switch(getState())
{
case BG_RV_STATE_OPEN_FENCES:
{
setTimer(BG_RV_PILAR_TO_FIRE_TIMER);
setState(BG_RV_STATE_CLOSE_FIRE);
break;
}
case BG_RV_STATE_CLOSE_FIRE:
for (i = BG_RV_OBJECT_FIRE_1; i <= BG_RV_OBJECT_FIREDOOR_2; ++i)
DoorClose(i);
setTimer(BG_RV_FIRE_TO_PILAR_TIMER);
setState(BG_RV_STATE_OPEN_PILARS);
break;
case BG_RV_STATE_OPEN_PILARS:
for (i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PULLEY_2; ++i)
DoorOpen(i);
setTimer(BG_RV_PILAR_TO_FIRE_TIMER);
setState(BG_RV_STATE_OPEN_FIRE);
break;
case BG_RV_STATE_OPEN_FIRE:
for (i = BG_RV_OBJECT_FIRE_1; i <= BG_RV_OBJECT_FIREDOOR_2; ++i)
DoorOpen(i);
setTimer(BG_RV_FIRE_TO_PILAR_TIMER);
setState(BG_RV_STATE_CLOSE_PILARS);
break;
case BG_RV_STATE_CLOSE_PILARS:
uint32 i;
for (i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PULLEY_2; ++i)
DoorOpen(i);
setTimer(BG_RV_PILAR_TO_FIRE_TIMER);
setState(BG_RV_STATE_CLOSE_FIRE);
break;
}
}
else
setTimer(getTimer() - diff);
}
示例6: DoorOpen
void BattlegroundWS::StartingEventOpenDoors()
{
for (uint32 i = BG_WS_OBJECT_DOOR_A_1; i <= BG_WS_OBJECT_DOOR_A_4; ++i)
DoorOpen(i);
for (uint32 i = BG_WS_OBJECT_DOOR_H_1; i <= BG_WS_OBJECT_DOOR_H_2; ++i)
DoorOpen(i);
SpawnBGObject(BG_WS_OBJECT_DOOR_A_5, RESPAWN_ONE_DAY);
SpawnBGObject(BG_WS_OBJECT_DOOR_A_6, RESPAWN_ONE_DAY);
SpawnBGObject(BG_WS_OBJECT_DOOR_H_3, RESPAWN_ONE_DAY);
SpawnBGObject(BG_WS_OBJECT_DOOR_H_4, RESPAWN_ONE_DAY);
for (uint32 i = BG_WS_OBJECT_A_FLAG; i <= BG_WS_OBJECT_BERSERKBUFF_2; ++i)
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
// players joining later are not egible
StartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, WS_EVENT_START_BATTLE);
}
示例7: DoorOpen
void BattlegroundDS::StartingEventOpenDoors()
{
for (uint32 i = BG_DS_OBJECT_DOOR_1; i <= BG_DS_OBJECT_DOOR_2; ++i)
DoorOpen(i);
for (uint32 i = BG_DS_OBJECT_BUFF_1; i <= BG_DS_OBJECT_BUFF_2; ++i)
SpawnBGObject(i, 60);
setWaterFallTimer(urand(BG_DS_WATERFALL_TIMER_MIN, BG_DS_WATERFALL_TIMER_MAX));
setWaterFallStatus(BG_DS_WATERFALL_STATUS_OFF);
SpawnBGObject(BG_DS_OBJECT_WATER_2, RESPAWN_IMMEDIATELY);
DoorOpen(BG_DS_OBJECT_WATER_2);
// Turn off collision
if (GameObject* gob = GetBgMap()->GetGameObject(BgObjects[BG_DS_OBJECT_WATER_1]))
gob->SetGoState(GO_STATE_ACTIVE);
}
示例8: DoorOpen
void BattlegroundDS::StartingEventOpenDoors()
{
for(uint32 i = BG_DS_OBJECT_DOOR_1; i <= BG_DS_OBJECT_DOOR_2; ++i)
DoorOpen(i);
for(uint32 i = BG_DS_OBJECT_BUFF_1; i <= BG_DS_OBJECT_BUFF_2; ++i)
SpawnBGObject(i, 60);
SpawnBGObject(BG_DS_OBJECT_WATER_1, RESPAWN_ONE_DAY);
SpawnBGObject(BG_DS_OBJECT_WATER_2, RESPAWN_IMMEDIATELY);
DoorOpen(BG_DS_OBJECT_WATER_2);
setWaterFallTimer(urand(BG_DS_WATERFALL_TIMER_MIN, BG_DS_WATERFALL_TIMER_MAX));
setWaterFallStatus(BG_DS_WATERFALL_STATUS_OFF);
setPipeKnockBackTimer(BG_DS_PIPE_KNOCKBACK_FIRST_DELAY);
setPipeKnockBackCount(0);
}
示例9: OpenDoorEvent
void BattleGroundIC::StartingEventOpenDoors()
{
OpenDoorEvent(BG_EVENT_DOOR); // used for activating teleport effects + opening tower gates
for (int i = BG_IC_GO_T_ALLIANCE_WEST; i <= BG_IC_GO_T_HORDE_FRONT; ++i)
DoorOpen(m_BgObjects[i]);
// make teleporters clickable
MakeInteractive(IC_EVENT_ADD_TELEPORT, 0, true);
}
示例10: DoorOpen
void BattlegroundDS::StartingEventOpenDoors()
{
for (uint32 i = BG_DS_OBJECT_DOOR_1; i <= BG_DS_OBJECT_DOOR_2; ++i)
DoorOpen(i);
for (uint32 i = BG_DS_OBJECT_BUFF_1; i <= BG_DS_OBJECT_BUFF_2; ++i)
SpawnBGObject(i, 60);
SpawnBGObject(BG_DS_OBJECT_WATER_1, RESPAWN_ONE_DAY);
SpawnBGObject(BG_DS_OBJECT_WATER_2, RESPAWN_IMMEDIATELY);
DoorOpen(BG_DS_OBJECT_WATER_2);
m_knockback = 15 * IN_MILLISECONDS;
m_teleport = 5 * IN_MILLISECONDS;
m_waterFallStatus = 0;
m_waterFall = urand(BG_DS_WATERFALL_TIMER_MIN, BG_DS_WATERFALL_TIMER_MAX);
m_dynamicLOSid = GetBgMap()->AddDynLOSObject(1291.56f, 790.837f, BG_DS_WATERFALL_RADIUS);
}
示例11: ModifyStartDelayTime
void BattleGroundNA::Update(time_t diff)
{
BattleGround::Update(diff);
// after bg start we get there
if (GetStatus() == STATUS_WAIT_JOIN && GetPlayersSize())
{
ModifyStartDelayTime(diff);
if (!(m_Events & 0x01))
{
m_Events |= 0x01;
for(uint32 i = BG_NA_OBJECT_DOOR_1; i <= BG_NA_OBJECT_DOOR_4; i++)
SpawnBGObject(i, RESPAWN_IMMEDIATELY);
SetStartDelayTime(START_DELAY1);
SendMessageToAll(LANG_ARENA_ONE_MINUTE);
}
// After 30 seconds, warning is signalled
else if (GetStartDelayTime() <= START_DELAY2 && !(m_Events & 0x04))
{
m_Events |= 0x04;
SendMessageToAll(LANG_ARENA_THIRTY_SECONDS);
}
// After 15 seconds, warning is signalled
else if (GetStartDelayTime() <= START_DELAY3 && !(m_Events & 0x08))
{
m_Events |= 0x08;
SendMessageToAll(LANG_ARENA_FIFTEEN_SECONDS);
}
// delay expired (1 minute)
else if (GetStartDelayTime() <= 0 && !(m_Events & 0x10))
{
m_Events |= 0x10;
for(uint32 i = BG_NA_OBJECT_DOOR_1; i <= BG_NA_OBJECT_DOOR_2; i++)
DoorOpen(i);
SendMessageToAll(LANG_ARENA_BEGUN);
SetStatus(STATUS_IN_PROGRESS);
SetStartDelayTime(0);
for(std::map<uint64, BattleGroundPlayer>::const_iterator itr = GetPlayers()->begin(); itr != GetPlayers()->end(); ++itr)
{
Player *plr = objmgr.GetPlayer(itr->first);
if(plr)
plr->RemoveAurasDueToSpell(SPELL_ARENA_PREPARATION);
}
}
}
/*if(GetStatus() == STATUS_IN_PROGRESS)
{
// update something
}*/
}
示例12: DoorOpen
void BattleGroundNA::StartingEventOpenDoors()
{
for (uint32 i = BG_NA_OBJECT_DOOR_1; i <= BG_NA_OBJECT_DOOR_2; ++i)
DoorOpen(i);
for (uint32 i = BG_NA_OBJECT_BUFF_1; i <= BG_NA_OBJECT_BUFF_2; ++i)
SpawnBGObject(i, 60);
m_TimeElapsedSinceBeggining = 0;
}
示例13: DoorOpen
void BattlegroundBE::StartBattleground()
{
BattlegroundMap::StartBattleground();
for (uint32 i = BG_BE_OBJECT_DOOR_1; i <= BG_BE_OBJECT_DOOR_2; ++i)
DoorOpen(i);
for (uint32 i = BG_BE_OBJECT_BUFF_1; i <= BG_BE_OBJECT_BUFF_2; ++i)
SpawnGameObject(i, 60);
}
示例14: SpawnBGObject
void BattlegroundRV::StartingEventOpenDoors()
{
// Buff respawn
SpawnBGObject(BG_RV_OBJECT_BUFF_1, 90);
SpawnBGObject(BG_RV_OBJECT_BUFF_2, 90);
// Open Fences
DoorOpen(BG_RV_OBJECT_FENCE_1);
DoorOpen(BG_RV_OBJECT_FENCE_2);
// Elevators
DoorOpen(BG_RV_OBJECT_ELEVATOR_1);
DoorOpen(BG_RV_OBJECT_ELEVATOR_2);
setState(BG_RV_STATE_OPEN_FENCES);
setTimer(BG_RV_FIRST_TIMER);
// Should be false at first, TogglePillarCollision will do it.
SetPillarCollision(true);
TogglePillarCollision();
}
示例15: switch
void BattlegroundRV::PostUpdateImpl(uint32 diff)
{
if (getTimer() < diff)
{
switch (getState())
{
case BG_RV_STATE_OPEN_FENCES:
setTimer(BG_RV_PILAR_TO_FIRE_TIMER);
setState(BG_RV_STATE_CLOSE_FIRE);
break;
case BG_RV_STATE_CLOSE_FIRE:
for (uint8 i = BG_RV_OBJECT_FIRE_1; i <= BG_RV_OBJECT_FIREDOOR_2; ++i)
DoorClose(i);
setTimer(BG_RV_FIRE_TO_PILAR_TIMER);
setState(BG_RV_STATE_OPEN_PILARS);
break;
case BG_RV_STATE_OPEN_PILARS:
for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PULLEY_2; ++i)
DoorOpen(i);
TogglePillarCollision(false);
setTimer(BG_RV_PILAR_TO_FIRE_TIMER);
setState(BG_RV_STATE_OPEN_FIRE);
break;
case BG_RV_STATE_OPEN_FIRE:
// FIXME: after 3.2.0 it's only decorative and should be opened only one time at battle start
for (uint8 i = BG_RV_OBJECT_FIRE_1; i <= BG_RV_OBJECT_FIREDOOR_2; ++i)
DoorOpen(i);
setTimer(BG_RV_FIRE_TO_PILAR_TIMER);
setState(BG_RV_STATE_CLOSE_PILARS);
break;
case BG_RV_STATE_CLOSE_PILARS:
for (uint8 i = BG_RV_OBJECT_PILAR_1; i <= BG_RV_OBJECT_PULLEY_2; ++i)
DoorOpen(i);
TogglePillarCollision(true);
setTimer(BG_RV_PILAR_TO_FIRE_TIMER);
setState(BG_RV_STATE_CLOSE_FIRE);
break;
}
}
else
setTimer(getTimer() - diff);
}