mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 16:46:37 +00:00
clang-tidy modernize-use-auto
This commit is contained in:
+22
-18
@@ -365,7 +365,7 @@ void Client::DoZoneSuccess(ZoneChange_Struct *zc, uint16 zone_id, uint32 instanc
|
||||
if (zone_id == zone->GetZoneID() && instance_id == zone->GetInstanceID()) {
|
||||
// No need to ask worldserver if we're zoning to ourselves (most
|
||||
// likely to a bind point), also fixes a bug since the default response was failure
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_ZoneChange,sizeof(ZoneChange_Struct));
|
||||
auto outapp = new EQApplicationPacket(OP_ZoneChange, sizeof(ZoneChange_Struct));
|
||||
ZoneChange_Struct* zc2 = (ZoneChange_Struct*) outapp->pBuffer;
|
||||
strcpy(zc2->char_name, GetName());
|
||||
zc2->zoneID = zone_id;
|
||||
@@ -378,19 +378,19 @@ void Client::DoZoneSuccess(ZoneChange_Struct *zc, uint16 zone_id, uint32 instanc
|
||||
} else {
|
||||
// vesuvias - zoneing to another zone so we need to the let the world server
|
||||
//handle things with the client for a while
|
||||
ServerPacket* pack = new ServerPacket(ServerOP_ZoneToZoneRequest, sizeof(ZoneToZone_Struct));
|
||||
ZoneToZone_Struct* ztz = (ZoneToZone_Struct*) pack->pBuffer;
|
||||
ztz->response = 0;
|
||||
ztz->current_zone_id = zone->GetZoneID();
|
||||
ztz->current_instance_id = zone->GetInstanceID();
|
||||
ztz->requested_zone_id = zone_id;
|
||||
ztz->requested_instance_id = instance_id;
|
||||
ztz->admin = admin;
|
||||
ztz->ignorerestrictions = ignore_r;
|
||||
strcpy(ztz->name, GetName());
|
||||
ztz->guild_id = GuildID();
|
||||
worldserver.SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
auto pack = new ServerPacket(ServerOP_ZoneToZoneRequest, sizeof(ZoneToZone_Struct));
|
||||
ZoneToZone_Struct *ztz = (ZoneToZone_Struct *)pack->pBuffer;
|
||||
ztz->response = 0;
|
||||
ztz->current_zone_id = zone->GetZoneID();
|
||||
ztz->current_instance_id = zone->GetInstanceID();
|
||||
ztz->requested_zone_id = zone_id;
|
||||
ztz->requested_instance_id = instance_id;
|
||||
ztz->admin = admin;
|
||||
ztz->ignorerestrictions = ignore_r;
|
||||
strcpy(ztz->name, GetName());
|
||||
ztz->guild_id = GuildID();
|
||||
worldserver.SendPacket(pack);
|
||||
safe_delete(pack);
|
||||
}
|
||||
|
||||
//reset to unsolicited.
|
||||
@@ -582,7 +582,8 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
|
||||
zone_mode = zm;
|
||||
if (zm == ZoneToBindPoint) {
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_ZonePlayerToBind, sizeof(ZonePlayerToBind_Struct) + iZoneNameLength);
|
||||
auto outapp = new EQApplicationPacket(OP_ZonePlayerToBind,
|
||||
sizeof(ZonePlayerToBind_Struct) + iZoneNameLength);
|
||||
ZonePlayerToBind_Struct* gmg = (ZonePlayerToBind_Struct*) outapp->pBuffer;
|
||||
|
||||
// If we are SoF and later and are respawning from hover, we want the real zone ID, else zero to use the old hack.
|
||||
@@ -607,7 +608,8 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
safe_delete(outapp);
|
||||
}
|
||||
else if(zm == ZoneSolicited || zm == ZoneToSafeCoords) {
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_RequestClientZoneChange, sizeof(RequestClientZoneChange_Struct));
|
||||
auto outapp =
|
||||
new EQApplicationPacket(OP_RequestClientZoneChange, sizeof(RequestClientZoneChange_Struct));
|
||||
RequestClientZoneChange_Struct* gmg = (RequestClientZoneChange_Struct*) outapp->pBuffer;
|
||||
|
||||
gmg->zone_id = zoneID;
|
||||
@@ -623,7 +625,8 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
safe_delete(outapp);
|
||||
}
|
||||
else if(zm == EvacToSafeCoords) {
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_RequestClientZoneChange, sizeof(RequestClientZoneChange_Struct));
|
||||
auto outapp =
|
||||
new EQApplicationPacket(OP_RequestClientZoneChange, sizeof(RequestClientZoneChange_Struct));
|
||||
RequestClientZoneChange_Struct* gmg = (RequestClientZoneChange_Struct*) outapp->pBuffer;
|
||||
|
||||
// if we are in the same zone we want to evac to, client will not send OP_ZoneChange back to do an actual
|
||||
@@ -665,7 +668,8 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
||||
SendPosition();
|
||||
}
|
||||
|
||||
EQApplicationPacket* outapp = new EQApplicationPacket(OP_RequestClientZoneChange, sizeof(RequestClientZoneChange_Struct));
|
||||
auto outapp =
|
||||
new EQApplicationPacket(OP_RequestClientZoneChange, sizeof(RequestClientZoneChange_Struct));
|
||||
RequestClientZoneChange_Struct* gmg = (RequestClientZoneChange_Struct*) outapp->pBuffer;
|
||||
|
||||
gmg->zone_id = zoneID;
|
||||
|
||||
Reference in New Issue
Block a user