本文整理汇总了C++中ZoneServer::isServerShuttingDown方法的典型用法代码示例。如果您正苦于以下问题:C++ ZoneServer::isServerShuttingDown方法的具体用法?C++ ZoneServer::isServerShuttingDown怎么用?C++ ZoneServer::isServerShuttingDown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZoneServer
的用法示例。
在下文中一共展示了ZoneServer::isServerShuttingDown方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: destroyObjectFromWorld
void CityHallZoneComponent::destroyObjectFromWorld(SceneObject* sceneObject, bool sendSelfDestroy) const {
ZoneServer* zoneServer = sceneObject->getZoneServer();
if (zoneServer == NULL || zoneServer->isServerShuttingDown()) {
ZoneComponent::destroyObjectFromWorld(sceneObject, sendSelfDestroy);
return;
}
ManagedReference<CityRegion*> cityRegion = sceneObject->getCityRegion().get();
if (cityRegion != NULL ) {
Locker clocker(cityRegion, sceneObject);
if (cityRegion->getCityHall() == sceneObject) {
cityRegion->setCityHall(NULL);
}
clocker.release();
CityManager* cityManager = zoneServer->getCityManager();
cityManager->destroyCity(cityRegion);
}
ZoneComponent::destroyObjectFromWorld(sceneObject, sendSelfDestroy);
}
示例2: run
void ScreenPlayTask::run() {
ZoneServer* zoneServer = ServerCore::getZoneServer();
if (zoneServer == NULL || zoneServer->isServerShuttingDown())
return;
if (zoneServer->isServerLoading()) {
schedule(10000);
return;
}
ManagedReference<SceneObject*> obj = this->obj.get();
if (obj != NULL) {
Locker locker(obj);
DirectorManager::instance()->activateEvent(this);
} else {
DirectorManager::instance()->activateEvent(this);
}
setTaskName(String("ScreenPlayTask " + screenPlay + ":" + taskKey + ":" + args).toCharArray());
}