本文整理汇总了C++中Group::GetTotalGroupDamage方法的典型用法代码示例。如果您正苦于以下问题:C++ Group::GetTotalGroupDamage方法的具体用法?C++ Group::GetTotalGroupDamage怎么用?C++ Group::GetTotalGroupDamage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Group
的用法示例。
在下文中一共展示了Group::GetTotalGroupDamage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetDamageTop
Mob* HateList::GetDamageTop(Mob* hater)
{
Mob* current = NULL;
Group* grp = NULL;
int32 dmg_amt = 0;
LinkedListIterator<tHateEntry*> iterator(list);
iterator.Reset();
while(iterator.MoreElements())
{
grp = entity_list.GetGroupByMob(iterator.GetData()->ent);
if (iterator.GetData()->ent != NULL && grp != NULL)
{
if (grp->GetTotalGroupDamage(hater) >= dmg_amt)
{
current = iterator.GetData()->ent;
dmg_amt = grp->GetTotalGroupDamage(hater);
}
}
else if (iterator.GetData()->ent != NULL && (int32)iterator.GetData()->damage >= dmg_amt)
{
current = iterator.GetData()->ent;
dmg_amt = iterator.GetData()->damage;
}
iterator.Advance();
}
return current;
}
示例2: GetDamageTop
Mob* HateList::GetDamageTop(Mob* hater)
{
_ZP(HateList_GetDamageTop);
Mob* current = NULL;
Group* grp = NULL;
Raid* r = NULL;
uint32 dmg_amt = 0;
LinkedListIterator<tHateEntry*> iterator(list);
iterator.Reset();
while(iterator.MoreElements())
{
grp = NULL;
r = NULL;
if(iterator.GetData()->ent && iterator.GetData()->ent->IsClient()){
r = entity_list.GetRaidByClient(iterator.GetData()->ent->CastToClient());
}
grp = entity_list.GetGroupByMob(iterator.GetData()->ent);
if(iterator.GetData()->ent && r){
if(r->GetTotalRaidDamage(hater) >= dmg_amt)
{
current = iterator.GetData()->ent;
dmg_amt = r->GetTotalRaidDamage(hater);
}
}
else if (iterator.GetData()->ent != NULL && grp != NULL)
{
if (grp->GetTotalGroupDamage(hater) >= dmg_amt)
{
current = iterator.GetData()->ent;
dmg_amt = grp->GetTotalGroupDamage(hater);
}
}
else if (iterator.GetData()->ent != NULL && (uint32)iterator.GetData()->damage >= dmg_amt)
{
current = iterator.GetData()->ent;
dmg_amt = iterator.GetData()->damage;
}
iterator.Advance();
}
return current;
}
示例3: GetDamageTop
Mob* HateList::GetDamageTop(Mob* hater)
{
Mob* current = nullptr;
Group* grp = nullptr;
Raid* r = nullptr;
uint32 dmg_amt = 0;
auto iterator = list.begin();
while(iterator != list.end())
{
grp = nullptr;
r = nullptr;
if((*iterator)->ent && (*iterator)->ent->IsClient()){
r = entity_list.GetRaidByClient((*iterator)->ent->CastToClient());
}
grp = entity_list.GetGroupByMob((*iterator)->ent);
if((*iterator)->ent && r){
if(r->GetTotalRaidDamage(hater) >= dmg_amt)
{
current = (*iterator)->ent;
dmg_amt = r->GetTotalRaidDamage(hater);
}
}
else if ((*iterator)->ent != nullptr && grp != nullptr)
{
if (grp->GetTotalGroupDamage(hater) >= dmg_amt)
{
current = (*iterator)->ent;
dmg_amt = grp->GetTotalGroupDamage(hater);
}
}
else if ((*iterator)->ent != nullptr && (uint32)(*iterator)->damage >= dmg_amt)
{
current = (*iterator)->ent;
dmg_amt = (*iterator)->damage;
}
++iterator;
}
return current;
}