本文整理汇总了C++中PlayerPointer::AddAura方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerPointer::AddAura方法的具体用法?C++ PlayerPointer::AddAura怎么用?C++ PlayerPointer::AddAura使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerPointer
的用法示例。
在下文中一共展示了PlayerPointer::AddAura方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnAddPlayer
void Arena::OnAddPlayer(PlayerPointer plr)
{
plr->m_deathVision = true;
if( plr->m_isGmInvisible )
return;
// remove all buffs (exclude talents, include flasks)
for(uint32 x=0;x<MAX_AURAS;x++)
{
if(plr->m_auras[x])
{
if(plr->m_auras[x] && !plr->m_auras[x]->GetSpellProto()->DurationIndex && plr->m_auras[x]->GetSpellProto()->Flags4 & CAN_PERSIST_AND_CASTED_WHILE_DEAD)
continue;
else
{
plr->m_auras[x]->Remove();
}
}
}
plr->GetItemInterface()->RemoveAllConjured();
plr->ResetAllCooldowns();
if( !m_started )
plr->CastSpell(plr, ARENA_PREPARATION, true);
m_playersCount[plr->GetTeam()]++;
UpdatePlayerCounts();
/* Add the green/gold team flag */
AuraPointer aura(new Aura(dbcSpell.LookupEntry(32724+plr->m_bgTeam), -1, plr, plr));
plr->AddAura(aura);
/* Set FFA PvP Flag */
plr->SetFFAPvPFlag();
hashmap_put(m_playersAlive, plr->GetLowGUID(), (any_t)1);
if(Rated())
{
// Store the players who join so that we can change their rating even if they leave before arena finishes
hashmap_put(m_players2[plr->GetTeam()], plr->GetLowGUID(), (any_t)1);
if(m_teams[plr->GetTeam()] == -1 && plr->m_playerInfo && plr->m_playerInfo->arenaTeam[m_arenateamtype] != NULL)
{
m_teams[plr->GetTeam()] = plr->m_playerInfo->arenaTeam[m_arenateamtype]->m_id;
}
}
}