本文整理汇总了C++中Zone::getPlanetCRC方法的典型用法代码示例。如果您正苦于以下问题:C++ Zone::getPlanetCRC方法的具体用法?C++ Zone::getPlanetCRC怎么用?C++ Zone::getPlanetCRC使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zone
的用法示例。
在下文中一共展示了Zone::getPlanetCRC方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeAll
void ThreatMap::removeAll(bool forceRemoveAll) {
Locker locker(&lockMutex);
removeObservers();
for (int i = size() - 1; i >= 0; i--) {
VectorMapEntry<ManagedReference<CreatureObject*> , ThreatMapEntry> *entry = &elementAt(i);
ManagedReference<CreatureObject*> key = entry->getKey();
ThreatMapEntry *value = &entry->getValue();
ManagedReference<TangibleObject*> selfStrong = self.get();
// these checks will determine if we should store the damage from the dropped aggressor
Zone* keyZone = (key != NULL ? key->getZone() : NULL);
Zone* selfZone = (selfStrong != NULL ? selfStrong->getZone() : NULL);
uint32 keyPlanetCRC = (keyZone != NULL ? keyZone->getPlanetCRC() : 0);
uint32 selfPlanetCRC = (selfZone != NULL ? selfZone->getPlanetCRC() : 0);
if (key == NULL || selfStrong == NULL || key->isDead() || !key->isOnline() || keyPlanetCRC != selfPlanetCRC || forceRemoveAll) {
remove(i);
if (threatMapObserver != NULL)
key->dropObserver(ObserverEventType::HEALINGPERFORMED, threatMapObserver);
} else {
value->setNonAggroDamage(value->getTotalDamage());
value->addHeal(-value->getHeal()); // don't need to store healing
value->clearAggro();
}
}
currentThreat = NULL;
threatMatrix.clear();
}
示例2: removeMember
void GroupObjectImplementation::removeMember(CreatureObject* member) {
bool wasLeader = getLeader() == member;
if (hasSquadLeader()) {
if (wasLeader)
removeGroupModifiers();
else
removeGroupModifiers(member);
}
for (int i = 0; i < groupMembers.size(); i++) {
CreatureObject* scno = groupMembers.get(i).get().get();
if (scno == member) {
GroupObjectDeltaMessage6* grp = new GroupObjectDeltaMessage6(_this.getReferenceUnsafeStaticCast());
grp->startUpdate(1);
groupMembers.remove(i, grp);
grp->close();
broadcastMessage(grp);
}
}
if (member->isPlayerCreature()) {
// Remove member's pets
RemovePetsFromGroupTask* task = new RemovePetsFromGroupTask(member, _this.getReferenceUnsafeStaticCast());
task->execute();
//Close any open Group SUIs.
ManagedReference<PlayerObject*> ghost = member->getPlayerObject();
if (ghost != NULL) {
ghost->closeSuiWindowType(SuiWindowType::GROUP_LOOT_RULE);
ghost->closeSuiWindowType(SuiWindowType::GROUP_LOOT_CHANGED);
ghost->closeSuiWindowType(SuiWindowType::GROUP_LOOT_PICK_LOOTER);
ghost->removeWaypointBySpecialType(WaypointObject::SPECIALTYPE_NEARESTMISSIONFORGROUP);
}
//Reset Master Looter if needed.
if (getMasterLooterID() == member->getObjectID()) {
ManagedReference<CreatureObject*> groupLeader = getLeader();
GroupManager::instance()->changeMasterLooter(_this.getReferenceUnsafeStaticCast(), groupLeader, false);
}
if (wasLeader && hasSquadLeader()) {
addGroupModifiers();
}
Zone* zone = member->getZone();
if (zone != NULL) {
scheduleUpdateNearestMissionForGroup(zone->getPlanetCRC());
}
}
updatePvPStatusNearCreature(member);
calcGroupLevel();
}