mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-28 12:22:25 +00:00
clang-modernize -use-auto convert for world/zoneserver.cpp
This commit is contained in:
parent
c6388d8c5d
commit
b0e59e112d
@ -117,7 +117,7 @@ bool ZoneServer::SetZone(uint32 iZoneID, uint32 iInstanceID, bool iStaticZone) {
|
|||||||
|
|
||||||
void ZoneServer::LSShutDownUpdate(uint32 zoneid){
|
void ZoneServer::LSShutDownUpdate(uint32 zoneid){
|
||||||
if(WorldConfig::get()->UpdateStats){
|
if(WorldConfig::get()->UpdateStats){
|
||||||
ServerPacket* pack = new ServerPacket;
|
auto pack = new ServerPacket;
|
||||||
pack->opcode = ServerOP_LSZoneShutdown;
|
pack->opcode = ServerOP_LSZoneShutdown;
|
||||||
pack->size = sizeof(ZoneShutdown_Struct);
|
pack->size = sizeof(ZoneShutdown_Struct);
|
||||||
pack->pBuffer = new uchar[pack->size];
|
pack->pBuffer = new uchar[pack->size];
|
||||||
@ -134,7 +134,7 @@ void ZoneServer::LSShutDownUpdate(uint32 zoneid){
|
|||||||
}
|
}
|
||||||
void ZoneServer::LSBootUpdate(uint32 zoneid, uint32 instanceid, bool startup){
|
void ZoneServer::LSBootUpdate(uint32 zoneid, uint32 instanceid, bool startup){
|
||||||
if(WorldConfig::get()->UpdateStats){
|
if(WorldConfig::get()->UpdateStats){
|
||||||
ServerPacket* pack = new ServerPacket;
|
auto pack = new ServerPacket;
|
||||||
if(startup)
|
if(startup)
|
||||||
pack->opcode = ServerOP_LSZoneStart;
|
pack->opcode = ServerOP_LSZoneStart;
|
||||||
else
|
else
|
||||||
@ -155,7 +155,7 @@ void ZoneServer::LSBootUpdate(uint32 zoneid, uint32 instanceid, bool startup){
|
|||||||
|
|
||||||
void ZoneServer::LSSleepUpdate(uint32 zoneid){
|
void ZoneServer::LSSleepUpdate(uint32 zoneid){
|
||||||
if(WorldConfig::get()->UpdateStats){
|
if(WorldConfig::get()->UpdateStats){
|
||||||
ServerPacket* pack = new ServerPacket;
|
auto pack = new ServerPacket;
|
||||||
pack->opcode = ServerOP_LSZoneSleep;
|
pack->opcode = ServerOP_LSZoneSleep;
|
||||||
pack->size = sizeof(ServerLSZoneSleep_Struct);
|
pack->size = sizeof(ServerLSZoneSleep_Struct);
|
||||||
pack->pBuffer = new uchar[pack->size];
|
pack->pBuffer = new uchar[pack->size];
|
||||||
@ -189,7 +189,7 @@ bool ZoneServer::Process() {
|
|||||||
struct in_addr in;
|
struct in_addr in;
|
||||||
in.s_addr = GetIP();
|
in.s_addr = GetIP();
|
||||||
zlog(WORLD__ZONE_ERR,"Zone authorization failed.");
|
zlog(WORLD__ZONE_ERR,"Zone authorization failed.");
|
||||||
ServerPacket* pack = new ServerPacket(ServerOP_ZAAuthFailed);
|
auto pack = new ServerPacket(ServerOP_ZAAuthFailed);
|
||||||
SendPacket(pack);
|
SendPacket(pack);
|
||||||
delete pack;
|
delete pack;
|
||||||
Disconnect();
|
Disconnect();
|
||||||
@ -200,7 +200,7 @@ bool ZoneServer::Process() {
|
|||||||
struct in_addr in;
|
struct in_addr in;
|
||||||
in.s_addr = GetIP();
|
in.s_addr = GetIP();
|
||||||
zlog(WORLD__ZONE_ERR,"Zone authorization failed.");
|
zlog(WORLD__ZONE_ERR,"Zone authorization failed.");
|
||||||
ServerPacket* pack = new ServerPacket(ServerOP_ZAAuthFailed);
|
auto pack = new ServerPacket(ServerOP_ZAAuthFailed);
|
||||||
SendPacket(pack);
|
SendPacket(pack);
|
||||||
delete pack;
|
delete pack;
|
||||||
Disconnect();
|
Disconnect();
|
||||||
@ -771,7 +771,7 @@ bool ZoneServer::Process() {
|
|||||||
}
|
}
|
||||||
case ServerOP_Who: {
|
case ServerOP_Who: {
|
||||||
ServerWhoAll_Struct* whoall = (ServerWhoAll_Struct*) pack->pBuffer;
|
ServerWhoAll_Struct* whoall = (ServerWhoAll_Struct*) pack->pBuffer;
|
||||||
Who_All_Struct* whom = new Who_All_Struct;
|
auto whom = new Who_All_Struct;
|
||||||
memset(whom,0,sizeof(Who_All_Struct));
|
memset(whom,0,sizeof(Who_All_Struct));
|
||||||
whom->gmlookup = whoall->gmlookup;
|
whom->gmlookup = whoall->gmlookup;
|
||||||
whom->lvllow = whoall->lvllow;
|
whom->lvllow = whoall->lvllow;
|
||||||
@ -945,7 +945,7 @@ bool ZoneServer::Process() {
|
|||||||
}
|
}
|
||||||
case ServerOP_GetWorldTime: {
|
case ServerOP_GetWorldTime: {
|
||||||
zlog(WORLD__ZONE,"Broadcasting a world time update");
|
zlog(WORLD__ZONE,"Broadcasting a world time update");
|
||||||
ServerPacket* pack = new ServerPacket;
|
auto pack = new ServerPacket;
|
||||||
|
|
||||||
pack->opcode = ServerOP_SyncWorldTime;
|
pack->opcode = ServerOP_SyncWorldTime;
|
||||||
pack->size = sizeof(eqTimeOfDay);
|
pack->size = sizeof(eqTimeOfDay);
|
||||||
@ -1336,7 +1336,7 @@ void ZoneServer::SendEmoteMessage(const char* to, uint32 to_guilddbid, int16 to_
|
|||||||
void ZoneServer::SendEmoteMessageRaw(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message) {
|
void ZoneServer::SendEmoteMessageRaw(const char* to, uint32 to_guilddbid, int16 to_minstatus, uint32 type, const char* message) {
|
||||||
if (!message)
|
if (!message)
|
||||||
return;
|
return;
|
||||||
ServerPacket* pack = new ServerPacket;
|
auto pack = new ServerPacket;
|
||||||
|
|
||||||
pack->opcode = ServerOP_EmoteMessage;
|
pack->opcode = ServerOP_EmoteMessage;
|
||||||
pack->size = sizeof(ServerEmoteMessage_Struct)+strlen(message)+1;
|
pack->size = sizeof(ServerEmoteMessage_Struct)+strlen(message)+1;
|
||||||
@ -1362,7 +1362,7 @@ void ZoneServer::SendEmoteMessageRaw(const char* to, uint32 to_guilddbid, int16
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ZoneServer::SendGroupIDs() {
|
void ZoneServer::SendGroupIDs() {
|
||||||
ServerPacket* pack = new ServerPacket(ServerOP_GroupIDReply, sizeof(ServerGroupIDReply_Struct));
|
auto pack = new ServerPacket(ServerOP_GroupIDReply, sizeof(ServerGroupIDReply_Struct));
|
||||||
ServerGroupIDReply_Struct* sgi = (ServerGroupIDReply_Struct*)pack->pBuffer;
|
ServerGroupIDReply_Struct* sgi = (ServerGroupIDReply_Struct*)pack->pBuffer;
|
||||||
zoneserver_list.NextGroupIDs(sgi->start, sgi->end);
|
zoneserver_list.NextGroupIDs(sgi->start, sgi->end);
|
||||||
SendPacket(pack);
|
SendPacket(pack);
|
||||||
@ -1370,7 +1370,7 @@ void ZoneServer::SendGroupIDs() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ZoneServer::ChangeWID(uint32 iCharID, uint32 iWID) {
|
void ZoneServer::ChangeWID(uint32 iCharID, uint32 iWID) {
|
||||||
ServerPacket* pack = new ServerPacket(ServerOP_ChangeWID, sizeof(ServerChangeWID_Struct));
|
auto pack = new ServerPacket(ServerOP_ChangeWID, sizeof(ServerChangeWID_Struct));
|
||||||
ServerChangeWID_Struct* scw = (ServerChangeWID_Struct*) pack->pBuffer;
|
ServerChangeWID_Struct* scw = (ServerChangeWID_Struct*) pack->pBuffer;
|
||||||
scw->charid = iCharID;
|
scw->charid = iCharID;
|
||||||
scw->newwid = iWID;
|
scw->newwid = iWID;
|
||||||
@ -1384,7 +1384,7 @@ void ZoneServer::TriggerBootup(uint32 iZoneID, uint32 iInstanceID, const char* a
|
|||||||
zoneID = iZoneID;
|
zoneID = iZoneID;
|
||||||
instanceID = iInstanceID;
|
instanceID = iInstanceID;
|
||||||
|
|
||||||
ServerPacket* pack = new ServerPacket(ServerOP_ZoneBootup, sizeof(ServerZoneStateChange_struct));
|
auto pack = new ServerPacket(ServerOP_ZoneBootup, sizeof(ServerZoneStateChange_struct));
|
||||||
ServerZoneStateChange_struct* s = (ServerZoneStateChange_struct *) pack->pBuffer;
|
ServerZoneStateChange_struct* s = (ServerZoneStateChange_struct *) pack->pBuffer;
|
||||||
s->ZoneServerID = ID;
|
s->ZoneServerID = ID;
|
||||||
if (adminname != 0)
|
if (adminname != 0)
|
||||||
@ -1404,7 +1404,7 @@ void ZoneServer::TriggerBootup(uint32 iZoneID, uint32 iInstanceID, const char* a
|
|||||||
|
|
||||||
void ZoneServer::IncommingClient(Client* client) {
|
void ZoneServer::IncommingClient(Client* client) {
|
||||||
BootingUp = true;
|
BootingUp = true;
|
||||||
ServerPacket* pack = new ServerPacket(ServerOP_ZoneIncClient, sizeof(ServerZoneIncommingClient_Struct));
|
auto pack = new ServerPacket(ServerOP_ZoneIncClient, sizeof(ServerZoneIncommingClient_Struct));
|
||||||
ServerZoneIncommingClient_Struct* s = (ServerZoneIncommingClient_Struct*) pack->pBuffer;
|
ServerZoneIncommingClient_Struct* s = (ServerZoneIncommingClient_Struct*) pack->pBuffer;
|
||||||
s->zoneid = GetZoneID();
|
s->zoneid = GetZoneID();
|
||||||
s->instanceid = GetInstanceID();
|
s->instanceid = GetInstanceID();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user