本文整理汇总了C++中shared_ptr::CastSpellOnPlayers方法的典型用法代码示例。如果您正苦于以下问题:C++ shared_ptr::CastSpellOnPlayers方法的具体用法?C++ shared_ptr::CastSpellOnPlayers怎么用?C++ shared_ptr::CastSpellOnPlayers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类shared_ptr
的用法示例。
在下文中一共展示了shared_ptr::CastSpellOnPlayers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateTowerCount
// updates clients visual counter, and adds the buffs to players if needed
inline void UpdateTowerCount(shared_ptr<MapMgr> mgr)
{
mgr->GetStateManager().UpdateWorldState(WORLDSTATE_TEROKKAR_ALLIANCE_TOWERS_CONTROLLED, TFg_allianceTowers);
mgr->GetStateManager().UpdateWorldState(WORLDSTATE_TEROKKAR_HORDE_TOWERS_CONTROLLED, TFg_hordeTowers);
if(TFg_superiorTeam == 0 && TFg_allianceTowers != 5)
{
mgr->RemovePositiveAuraFromPlayers(0, BLESSING_OF_AUCHINDOUND);
TFg_superiorTeam = -1;
}
if(TFg_superiorTeam == 1 && TFg_hordeTowers != 5)
{
mgr->RemovePositiveAuraFromPlayers(1, BLESSING_OF_AUCHINDOUND);
TFg_superiorTeam = -1;
}
if(TFg_allianceTowers == 5 && TFg_superiorTeam != 0)
{
TFg_superiorTeam = 0;
mgr->CastSpellOnPlayers(0, BLESSING_OF_AUCHINDOUND);
}
if(TFg_hordeTowers == 5 && TFg_superiorTeam != 1)
{
TFg_superiorTeam = 1;
mgr->CastSpellOnPlayers(1, BLESSING_OF_AUCHINDOUND);
}
}
示例2: UpdateTowerCount
// updates clients visual counter, and adds the buffs to players if needed
HEARTHSTONE_INLINE void UpdateTowerCount(shared_ptr<MapMgr> mgr)
{
if(!mgr)
return;
mgr->GetStateManager().UpdateWorldState(WORLDSTATE_HELLFIRE_ALLIANCE_TOWERS_CONTROLLED, g_allianceTowers);
mgr->GetStateManager().UpdateWorldState(WORLDSTATE_HELLFIRE_HORDE_TOWERS_CONTROLLED, g_hordeTowers);
if(g_superiorTeam == 0 && g_allianceTowers != 3)
{
mgr->RemovePositiveAuraFromPlayers(0, HELLFIRE_SUPERORITY_ALLIANCE);
g_superiorTeam = -1;
}
if(g_superiorTeam == 1 && g_hordeTowers != 3)
{
mgr->RemovePositiveAuraFromPlayers(1, HELLFIRE_SUPERORITY_HORDE);
g_superiorTeam = -1;
}
if(g_allianceTowers == 3 && g_superiorTeam != 0)
{
g_superiorTeam = 0;
mgr->CastSpellOnPlayers(0, HELLFIRE_SUPERORITY_ALLIANCE);
}
if(g_hordeTowers == 3 && g_superiorTeam != 1)
{
g_superiorTeam = 1;
mgr->CastSpellOnPlayers(1, HELLFIRE_SUPERORITY_HORDE);
}
}