本文整理汇总了C++中CCharEntity::SetSLevel方法的典型用法代码示例。如果您正苦于以下问题:C++ CCharEntity::SetSLevel方法的具体用法?C++ CCharEntity::SetSLevel怎么用?C++ CCharEntity::SetSLevel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCharEntity
的用法示例。
在下文中一共展示了CCharEntity::SetSLevel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RefreshSync
void CParty::RefreshSync()
{
CCharEntity* sync = (CCharEntity*)m_PSyncTarget;
uint8 syncLevel = sync->jobs.job[sync->GetMJob()];
if (syncLevel < 10)
{
SetSyncTarget(NULL, 554);
}
for (uint32 i = 0; i < members.size(); ++i)
{
if(members.at(i)->objtype != TYPE_PC) continue;
CCharEntity* member = (CCharEntity*)members.at(i);
uint8 NewMLevel = 0;
if (syncLevel < member->jobs.job[member->GetMJob()])
{
NewMLevel = syncLevel;
}else{
NewMLevel = member->jobs.job[member->GetMJob()];
}
if (member->GetMLevel() != NewMLevel)
{
charutils::RemoveAllEquipMods(member);
member->SetMLevel(NewMLevel);
member->SetSLevel(member->jobs.job[member->GetSJob()]);
charutils::ApplyAllEquipMods(member);
blueutils::ValidateBlueSpells(member);
charutils::BuildingCharSkillsTable(member);
charutils::CalculateStats(member);
charutils::BuildingCharTraitsTable(member);
charutils::BuildingCharAbilityTable(member);
charutils::CheckValidEquipment(member); // Handles rebuilding weapon skills as well.
}
member->pushPacket(new CMessageBasicPacket(member, member, 0, syncLevel, 540));
}
m_PSyncTarget = sync;
}