本文整理汇总了C++中ZoneServer::LSShutDownUpdate方法的典型用法代码示例。如果您正苦于以下问题:C++ ZoneServer::LSShutDownUpdate方法的具体用法?C++ ZoneServer::LSShutDownUpdate怎么用?C++ ZoneServer::LSShutDownUpdate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZoneServer
的用法示例。
在下文中一共展示了ZoneServer::LSShutDownUpdate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Process
void ZSList::Process() {
if(shutdowntimer && shutdowntimer->Check()){
_log(WORLD__ZONELIST, "Shutdown timer has expired. Telling all zones to shut down and exiting. (fake sigint)");
ServerPacket* pack2 = new ServerPacket;
pack2->opcode = ServerOP_ShutdownAll;
pack2->size=0;
SendPacket(pack2);
safe_delete(pack2);
Process();
CatchSignal(2);
}
if(reminder && reminder->Check()){
SendEmoteMessage(0,0,0,15,"<SYSTEMWIDE MESSAGE>:SYSTEM MSG:World coming down, everyone log out now. World will shut down in %i seconds...",shutdowntimer->GetRemainingTime()/1000);
}
LinkedListIterator<ZoneServer*> iterator(list);
iterator.Reset();
while(iterator.MoreElements()) {
if (!iterator.GetData()->Process()) {
ZoneServer* zs = iterator.GetData();
struct in_addr in;
in.s_addr = zs->GetIP();
_log(WORLD__ZONELIST,"Removing zoneserver #%d at %s:%d",zs->GetID(),zs->GetCAddress(),zs->GetCPort());
zs->LSShutDownUpdate(zs->GetZoneID());
if (holdzones){
_log(WORLD__ZONELIST,"Hold Zones mode is ON - rebooting lost zone");
if(!zs->IsStaticZone())
RebootZone(inet_ntoa(in),zs->GetCPort(),zs->GetCAddress(),zs->GetID());
else
RebootZone(inet_ntoa(in),zs->GetCPort(),zs->GetCAddress(),zs->GetID(),database.GetZoneID(zs->GetZoneName()));
}
iterator.RemoveCurrent();
numzones--;
}
else {
iterator.Advance();
}
}
}