本文整理汇总了C++中GetPlayerFlags函数的典型用法代码示例。如果您正苦于以下问题:C++ GetPlayerFlags函数的具体用法?C++ GetPlayerFlags怎么用?C++ GetPlayerFlags使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetPlayerFlags函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: GetPlayerFlags
void Channel::SetOwner(uint64 guid, bool exclaim)
{
if (m_ownerGUID)
{
// [] will re-add player after it possible removed
PlayerList::iterator p_itr = players.find(m_ownerGUID);
if (p_itr != players.end())
p_itr->second.SetOwner(false);
}
m_ownerGUID = guid;
if (m_ownerGUID)
{
uint8 oldFlag = GetPlayerFlags(m_ownerGUID);
players[m_ownerGUID].SetModerator(true);
players[m_ownerGUID].SetOwner(true);
WorldPacket data;
MakeModeChange(&data, m_ownerGUID, oldFlag);
SendToAll(&data);
if (exclaim)
{
MakeOwnerChanged(&data, m_ownerGUID);
SendToAll(&data);
}
if (m_IsSaved && _UpdateIntInDB("m_moderate", m_moderate ? 1 : 0))
sLog->outDebug("Channel(%s) moderate saved", m_name.c_str());
}
}
开发者ID:SkyFireArchives,项目名称:SkyFire_one,代码行数:30,代码来源:Channel.cpp
示例2: MakeNotifyPacket
// done 0x0C
void Channel::MakeModeChange(WorldPacket* data, uint64 guid, uint8 oldflags)
{
MakeNotifyPacket(data, CHAT_MODE_CHANGE_NOTICE);
*data << uint64(guid);
*data << uint8(oldflags);
*data << uint8(GetPlayerFlags(guid));
}
开发者ID:Aesirist,项目名称:TrinityCore,代码行数:8,代码来源:Channel.cpp
示例3: GetPlayerFlags
void Channel::SetOwner(uint64 guid, bool exclaim)
{
if (m_ownerGUID)
{
// [] will re-add player after it possible removed
PlayerList::iterator p_itr = players.find(m_ownerGUID);
if (p_itr != players.end())
p_itr->second.SetOwner(false);
}
m_ownerGUID = guid;
if (m_ownerGUID)
{
uint8 oldFlag = GetPlayerFlags(m_ownerGUID);
players[m_ownerGUID].SetModerator(true);
players[m_ownerGUID].SetOwner(true);
WorldPacket data;
MakeModeChange(&data, m_ownerGUID, oldFlag);
SendToAll(&data);
if (exclaim)
{
MakeOwnerChanged(&data, m_ownerGUID);
SendToAll(&data);
}
UpdateChannelInDB();
}
}
开发者ID:Aesirist,项目名称:TrinityCore,代码行数:30,代码来源:Channel.cpp
示例4: GetPlayerFlags
void Channel::SetOwner(ObjectGuid guid, bool exclaim)
{
if (m_ownerGuid)
{
// [] will re-add player after it possible removed
PlayerList::iterator p_itr = m_players.find(m_ownerGuid);
if (p_itr != m_players.end())
p_itr->second.SetOwner(false);
}
m_ownerGuid = guid;
if (m_ownerGuid)
{
uint8 oldFlag = GetPlayerFlags(m_ownerGuid);
m_players[m_ownerGuid].SetOwner(true);
WorldPacket data;
MakeModeChange(&data, m_ownerGuid, oldFlag);
SendToAll(&data);
if(exclaim)
{
MakeOwnerChanged(&data, m_ownerGuid);
SendToAll(&data);
}
}
}
开发者ID:Agustin1010,项目名称:Mangos-Agustin,代码行数:28,代码来源:Channel.cpp
示例5: GetFlags
void Channel::JoinNotify(Player const* player)
{
ObjectGuid const& guid = player->GetGUID();
if (IsConstant())
{
auto builder = [&](LocaleConstant locale)
{
LocaleConstant localeIdx = sWorld->GetAvailableDbcLocale(locale);
WorldPackets::Channel::UserlistAdd* userlistAdd = new WorldPackets::Channel::UserlistAdd();
userlistAdd->AddedUserGUID = guid;
userlistAdd->_ChannelFlags = GetFlags();
userlistAdd->UserFlags = GetPlayerFlags(guid);
userlistAdd->ChannelID = GetChannelId();
userlistAdd->ChannelName = GetName(localeIdx);
return userlistAdd;
};
SendToAllButOne(builder, guid);
}
else
{
auto builder = [&](LocaleConstant locale)
{
LocaleConstant localeIdx = sWorld->GetAvailableDbcLocale(locale);
WorldPackets::Channel::UserlistUpdate* userlistUpdate = new WorldPackets::Channel::UserlistUpdate();
userlistUpdate->UpdatedUserGUID = guid;
userlistUpdate->_ChannelFlags = GetFlags();
userlistUpdate->UserFlags = GetPlayerFlags(guid);
userlistUpdate->ChannelID = GetChannelId();
userlistUpdate->ChannelName = GetName(localeIdx);
return userlistUpdate;
};
SendToAll(builder);
}
}
开发者ID:Lyill,项目名称:TrinityCore,代码行数:39,代码来源:Channel.cpp
示例6: data
void Channel::JoinNotify(uint64 guid)
{
WorldPacket data(IsConstant() ? SMSG_USERLIST_ADD : SMSG_USERLIST_UPDATE, 8 + 1 + 1 + 4 + GetName().size());
data << uint64(guid);
data << uint8(GetPlayerFlags(guid));
data << uint8(GetFlags());
data << uint32(GetNumPlayers());
data << GetName();
if (IsConstant())
SendToAllButOne(&data, guid);
else
SendToAll(&data);
}
开发者ID:Ayik0,项目名称:DeathCore_5.4.8,代码行数:14,代码来源:Channel.cpp
示例7: GetName
void Channel::JoinNotify(ObjectGuid guid)
{
WorldPacket data;
if (IsConstant())
data.Initialize(SMSG_USERLIST_ADD, 8 + 1 + 1 + 4 + GetName().size() + 1);
else
data.Initialize(SMSG_USERLIST_UPDATE, 8 + 1 + 1 + 4 + GetName().size() + 1);
data << ObjectGuid(guid);
data << uint8(GetPlayerFlags(guid));
data << uint8(GetFlags());
data << uint32(GetNumPlayers());
data << GetName();
SendToAll(&data);
}
开发者ID:BACKUPLIB,项目名称:Infinity_MaNGOS,代码行数:16,代码来源:Channel.cpp
示例8: data
void Channel::FlagsNotify(Player* p)
{
if (_channelRights.flags & CHANNEL_RIGHT_CANT_SPEAK)
return;
if (!AccountMgr::IsPlayerAccount(p->GetSession()->GetSecurity()))
return;
WorldPacket data(SMSG_USERLIST_UPDATE, 8 + 1 + 1 + 4 + GetName().size());
data << uint64(p->GetGUID());
data << uint8(GetPlayerFlags(p->GetGUID()));
data << uint8(GetFlags());
data << uint32(GetNumPlayers());
data << GetName();
SendToAllWatching(&data);
}
开发者ID:Keader,项目名称:Sunwell,代码行数:16,代码来源:Channel.cpp
示例9: GetPlayerWhoNameColor
/*
* GetPlayerWhoNameColor: Return color that player's name should be drawn on
* the who list, depending on player's object flags
*/
COLORREF GetPlayerWhoNameColor(int flags,char*name)
{
switch (GetPlayerFlags(flags))
{
case PF_DM:
return NAME_COLOR_DM_FG;
case PF_CREATOR:
return NAME_COLOR_CREATOR_FG;
case PF_SUPER:
return NAME_COLOR_SUPER_FG;
case PF_EVENTCHAR:
return NAME_COLOR_EVENT_FG;
case PF_KILLER:
return NAME_COLOR_KILLER_FG;
case PF_OUTLAW:
return NAME_COLOR_OUTLAW_FG;
default:
return NAME_COLOR_NORMAL_FG;
}
}
开发者ID:Daenks-newbie,项目名称:Meridian59_103,代码行数:25,代码来源:color.c
示例10: GetPlayerFlags
void Channel::SetOwner(uint64 guid, bool exclaim)
{
if(m_ownerGUID)
{
// [] will re-add player after it possible removed
PlayerList::iterator p_itr = players.find(m_ownerGUID);
if(p_itr != players.end())
p_itr->second.SetOwner(false);
}
m_ownerGUID = guid;
if(m_ownerGUID)
{
uint8 oldFlag = GetPlayerFlags(m_ownerGUID);
players[m_ownerGUID].SetModerator(true);
players[m_ownerGUID].SetOwner(true);
WorldPacket data;
MakeModeChange(&data, m_ownerGUID, oldFlag);
SendToAll(&data);
if(exclaim)
{
MakeOwnerChanged(&data, m_ownerGUID);
SendToAll(&data);
}
/*if(m_IsSaved)
{
std::ostringstream ss;
ss << "UPDATE channels SET m_ownerGUID = '" << guid << "' WHERE m_name = '"<<m_name.c_str()<<"' AND m_team = '"<<m_Team<<"'";
if(CharacterDatabase.PExecute( ss.str( ).c_str( ) ))
{
sLog.outDebug("Channel(%s) owner saved", m_name.c_str());
}
}*/
}
}
开发者ID:pfchrono,项目名称:mangos-mods,代码行数:38,代码来源:Channel.cpp
示例11: GetPlayerNameColor
/*
* GetPlayerNameColor: Return color that player's name should be drawn in,
* depending on player's object flags
*/
COLORREF GetPlayerNameColor(int flags,char*name)
{
if (GetDrawingEffect(flags) == OF_BLACK)
return NAME_COLOR_BLACK_FG;
switch (GetPlayerFlags(flags))
{
case PF_DM:
return NAME_COLOR_DM_FG;
case PF_KILLER:
return NAME_COLOR_KILLER_FG;
case PF_OUTLAW:
return NAME_COLOR_OUTLAW_FG;
case PF_CREATOR:
return NAME_COLOR_CREATOR_FG;
case PF_SUPER:
return NAME_COLOR_SUPER_FG;
case PF_EVENTCHAR:
return NAME_COLOR_EVENT_FG;
default:
return NAME_COLOR_NORMAL_FG;
}
}
开发者ID:Daenks-newbie,项目名称:Meridian59_103,代码行数:28,代码来源:color.c
注:本文中的GetPlayerFlags函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论