本文整理汇总了C++中GetSingleCreatureGuid函数的典型用法代码示例。如果您正苦于以下问题:C++ GetSingleCreatureGuid函数的具体用法?C++ GetSingleCreatureGuid怎么用?C++ GetSingleCreatureGuid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetSingleCreatureGuid函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: DEBUG_LOG
void BattleGroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
{
DEBUG_LOG("BattleGroundAV: player destroyed point node %i", node);
MANGOS_ASSERT(m_Nodes[node].Owner != BG_AV_TEAM_NEUTRAL)
BattleGroundTeamIndex ownerTeamIdx = BattleGroundTeamIndex(m_Nodes[node].Owner);
Team ownerTeam = ownerTeamIdx == BG_TEAM_ALLIANCE ? ALLIANCE : HORDE;
// despawn banner
DestroyNode(node);
PopulateNode(node);
UpdateNodeWorldState(node);
if (IsTower(node))
{
uint8 tmp = node - BG_AV_NODES_DUNBALDAR_SOUTH;
// despawn marshal (one of those guys protecting the boss)
SpawnEvent(BG_AV_MARSHAL_A_SOUTH + tmp, 0, false);
UpdateScore(GetOtherTeamIndex(ownerTeamIdx), (-1) * BG_AV_RES_TOWER);
RewardReputationToTeam((ownerTeam == ALLIANCE) ? BG_AV_FACTION_A : BG_AV_FACTION_H, m_RepTowerDestruction, ownerTeam);
RewardHonorToTeam(GetBonusHonorFromKill(BG_AV_KILL_TOWER), ownerTeam);
SendYell2ToAll(LANG_BG_AV_TOWER_TAKEN, LANG_UNIVERSAL, GetSingleCreatureGuid(BG_AV_HERALD, 0), GetNodeName(node), (ownerTeam == ALLIANCE) ? LANG_BG_ALLY : LANG_BG_HORDE);
}
else
{
SendYell2ToAll(LANG_BG_AV_GRAVE_TAKEN, LANG_UNIVERSAL, GetSingleCreatureGuid(BG_AV_HERALD, 0), GetNodeName(node), (ownerTeam == ALLIANCE) ? LANG_BG_ALLY : LANG_BG_HORDE);
}
}
开发者ID:Atari007,项目名称:master,代码行数:29,代码来源:BattleGroundAV.cpp
示例2: MANGOS_ASSERT
void BattleGroundAV::EventPlayerDefendsPoint(Player* player, BG_AV_Nodes node)
{
MANGOS_ASSERT(GetStatus() == STATUS_IN_PROGRESS);
TeamIndex teamIdx = GetTeamIndex(player->GetTeam());
if (m_Nodes[node].Owner == TeamIndex(teamIdx) || m_Nodes[node].State != POINT_ASSAULTED)
return;
if (m_Nodes[node].TotalOwner == TEAM_INDEX_NEUTRAL) // initial snowfall capture
{
// until snowfall doesn't belong to anyone it is better handled in assault - code (best would be to have a special function
// for neutral nodes.. but doing this just for snowfall will be a bit to much i think
MANGOS_ASSERT(node == BG_AV_NODES_SNOWFALL_GRAVE); // currently the only neutral grave
EventPlayerAssaultsPoint(player, node);
return;
}
DEBUG_LOG("BattleGroundAV: player defends node: %i", node);
if (m_Nodes[node].PrevOwner != TeamIndex(teamIdx))
{
sLog.outError("BattleGroundAV: player defends point which doesn't belong to his team %i", node);
return;
}
DefendNode(node, teamIdx); // set the right variables for nodeinfo
PopulateNode(node); // spawn node-creatures (defender for example)
UpdateNodeWorldState(node); // send new mapicon to the player
if (IsTower(node))
{
SendYell2ToAll(LANG_BG_AV_TOWER_DEFENDED, LANG_UNIVERSAL, GetSingleCreatureGuid(BG_AV_HERALD, 0),
GetNodeName(node),
(teamIdx == TEAM_INDEX_ALLIANCE) ? LANG_BG_ALLY : LANG_BG_HORDE);
UpdatePlayerScore(player, SCORE_TOWERS_DEFENDED, 1);
PlaySoundToAll(BG_AV_SOUND_BOTH_TOWER_DEFEND);
}
else
{
SendYell2ToAll(LANG_BG_AV_GRAVE_DEFENDED, LANG_UNIVERSAL, GetSingleCreatureGuid(BG_AV_HERALD, 0),
GetNodeName(node),
(teamIdx == TEAM_INDEX_ALLIANCE) ? LANG_BG_ALLY : LANG_BG_HORDE);
UpdatePlayerScore(player, SCORE_GRAVEYARDS_DEFENDED, 1);
player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE, 1, 65);
// update the statistic for the defending player
PlaySoundToAll((teamIdx == TEAM_INDEX_ALLIANCE) ? BG_AV_SOUND_ALLIANCE_GOOD : BG_AV_SOUND_HORDE_GOOD);
}
}
开发者ID:wuzhupc,项目名称:mangos,代码行数:48,代码来源:BattleGroundAV.cpp
示例3: MANGOS_ASSERT
void BattleGroundAV::ChangeMineOwner(uint8 mine, BattleGroundAVTeamIndex teamIdx)
{
m_Mine_Timer[mine] = BG_AV_MINE_TICK_TIMER;
// TODO implement quest 7122
// mine=0 northmine, mine=1 southmine
// TODO changing the owner should result in setting respawntime to infinite for current creatures (they should fight the new ones), spawning new mine owners creatures and changing the chest - objects so that the current owning team can use them
MANGOS_ASSERT(mine == BG_AV_NORTH_MINE || mine == BG_AV_SOUTH_MINE);
if (m_Mine_Owner[mine] == teamIdx)
return;
m_Mine_PrevOwner[mine] = m_Mine_Owner[mine];
m_Mine_Owner[mine] = teamIdx;
SendMineWorldStates(mine);
SpawnEvent(BG_AV_MINE_EVENT + mine, teamIdx, true);
SpawnEvent(BG_AV_MINE_BOSSES + mine, teamIdx, true);
if (teamIdx != BG_AV_TEAM_NEUTRAL)
{
PlaySoundToAll((teamIdx == BG_AV_TEAM_ALLIANCE) ? BG_AV_SOUND_ALLIANCE_GOOD : BG_AV_SOUND_HORDE_GOOD);
m_Mine_Reclaim_Timer[mine] = BG_AV_MINE_RECLAIM_TIMER;
SendYell2ToAll(LANG_BG_AV_MINE_TAKEN , LANG_UNIVERSAL, GetSingleCreatureGuid(BG_AV_HERALD, 0),
(teamIdx == BG_AV_TEAM_ALLIANCE ) ? LANG_BG_ALLY : LANG_BG_HORDE,
(mine == BG_AV_NORTH_MINE) ? LANG_BG_AV_MINE_NORTH : LANG_BG_AV_MINE_SOUTH);
}
}
开发者ID:BACKUPLIB,项目名称:Darkportalwow,代码行数:27,代码来源:BattleGroundAV.cpp
注:本文中的GetSingleCreatureGuid函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论