diff --git a/common/database.h b/common/database.h index 5c4b31d87..b0be7b846 100644 --- a/common/database.h +++ b/common/database.h @@ -109,7 +109,7 @@ public: bool AddBannedIP(char* bannedIP, const char* notes); //Lieka Edit: Add IP address to the Banned_IPs table. bool AddGMIP(char* ip_address, char* name); - bool CheckBannedIPs(const char* loginIP); //Lieka Edit: Check incomming connection against banned IP table. + bool CheckBannedIPs(const char* loginIP); //Lieka Edit: Check incoming connection against banned IP table. bool CheckGMIPs(const char* loginIP, uint32 account_id); bool CheckNameFilter(const char* name, bool surname = false); bool CheckUsedName(const char* name); diff --git a/common/emu_tcp_connection.cpp b/common/emu_tcp_connection.cpp index 2ca55b975..da34f1ee7 100644 --- a/common/emu_tcp_connection.cpp +++ b/common/emu_tcp_connection.cpp @@ -104,7 +104,7 @@ EmuTCPConnection::EmuTCPConnection(uint32 ID, EmuTCPServer* iServer, EmuTCPConne RelayCount = 0; RemoteID = iRemoteID; pOldFormat = false; - ConnectionType = Incomming; + ConnectionType = Incoming; TCPMode = modePacket; PacketMode = packetModeZone; #if TCPN_DEBUG_Memory >= 7 @@ -714,7 +714,7 @@ void EmuTCPConnection::ProcessNetworkLayerPacket(ServerPacket* pack) { SendNetErrorPacket("Switch to RelayServer mode by a Relay Client"); break; } - if (ConnectionType != Incomming) { + if (ConnectionType != Incoming) { SendNetErrorPacket("Switch to RelayServer mode on outgoing connection"); break; } @@ -735,7 +735,7 @@ void EmuTCPConnection::ProcessNetworkLayerPacket(ServerPacket* pack) { SendNetErrorPacket("New RelayClient: wrong size, expected 11"); break; } - if (ConnectionType != Incomming) { + if (ConnectionType != Incoming) { SendNetErrorPacket("New RelayClient: illegal on outgoing connection"); break; } @@ -755,7 +755,7 @@ void EmuTCPConnection::ProcessNetworkLayerPacket(ServerPacket* pack) { } EmuTCPConnection* con = Server->FindConnection(*((uint32*)data)); if (con) { - if (ConnectionType == Incomming) { + if (ConnectionType == Incoming) { if (con->GetRelayLink() != this) { SendNetErrorPacket("Delete RelayClient: RelayLink != this"); break; diff --git a/common/servertalk.h b/common/servertalk.h index 547dda9b1..af39bfaa4 100644 --- a/common/servertalk.h +++ b/common/servertalk.h @@ -51,7 +51,7 @@ #define ServerOP_AcceptWorldEntrance 0x0024 #define ServerOP_ZAAuth 0x0025 #define ServerOP_ZAAuthFailed 0x0026 -#define ServerOP_ZoneIncClient 0x0027 // Incomming client +#define ServerOP_ZoneIncClient 0x0027 // Incoming client #define ServerOP_ClientListKA 0x0028 #define ServerOP_ChangeWID 0x0029 #define ServerOP_IPLookup 0x002A @@ -307,7 +307,7 @@ struct ServerZoneStateChange_struct { bool makestatic; }; -struct ServerZoneIncommingClient_Struct { +struct ServerZoneIncomingClient_Struct { uint32 zoneid; // in case the zone shut down, boot it back up uint16 instanceid; // instance id if it exists for booting up uint32 ip; // client's IP address diff --git a/common/tcp_connection.cpp b/common/tcp_connection.cpp index 7a393c8f5..aa687cc01 100644 --- a/common/tcp_connection.cpp +++ b/common/tcp_connection.cpp @@ -69,7 +69,7 @@ TCPConnection::TCPConnection() //server version TCPConnection::TCPConnection(uint32 ID, SOCKET in_socket, uint32 irIP, uint16 irPort) -: ConnectionType(Incomming), +: ConnectionType(Incoming), connection_socket(in_socket), id(ID), rIP(irIP), @@ -104,7 +104,7 @@ TCPConnection::~TCPConnection() { } #if TCPN_DEBUG_Memory >= 5 else { - std::cout << "Deconstructor on incomming TCP# " << GetID() << std::endl; + std::cout << "Deconstructor on incoming TCP# " << GetID() << std::endl; } #endif safe_delete_array(recvbuf); diff --git a/common/tcp_connection.h b/common/tcp_connection.h index db38c941b..ae02b9c56 100644 --- a/common/tcp_connection.h +++ b/common/tcp_connection.h @@ -55,7 +55,7 @@ #ifndef DEF_eConnectionType #define DEF_eConnectionType -enum eConnectionType {Incomming, Outgoing}; +enum eConnectionType {Incoming, Outgoing}; #endif diff --git a/world/client.cpp b/world/client.cpp index 9037fce42..5d6f07b11 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -1069,10 +1069,6 @@ void Client::EnterWorld(bool TryBootup) { if (zoneID == 0) return; - if(!cle) { - return; - } - ZoneServer* zs = nullptr; if(instanceID > 0) { @@ -1107,7 +1103,7 @@ void Client::EnterWorld(bool TryBootup) { const char *zone_name=database.GetZoneName(zoneID, true); if (zs) { // warn the world we're comming, so it knows not to shutdown - zs->IncommingClient(this); + zs->IncomingClient(this); } else { if (TryBootup) { @@ -1121,13 +1117,17 @@ void Client::EnterWorld(bool TryBootup) { return; } else { - Log.Out(Logs::Detail, Logs::World_Server,"Requested zone %s is no running.",zone_name); + Log.Out(Logs::Detail, Logs::World_Server,"Requested zone %s is not running.",zone_name); ZoneUnavail(); return; } } pwaitingforbootup = 0; + if(!cle) { + return; + } + cle->SetChar(charid, char_name); database.UpdateLiveChar(char_name, GetAccountID()); Log.Out(Logs::Detail, Logs::World_Server,"%s %s (%d:%d)",seencharsel ? "Entering zone" : "Zoning to",zone_name,zoneID,instanceID); diff --git a/world/zoneserver.cpp b/world/zoneserver.cpp index 65c80cac7..3efb7e4be 100644 --- a/world/zoneserver.cpp +++ b/world/zoneserver.cpp @@ -1405,10 +1405,10 @@ void ZoneServer::TriggerBootup(uint32 iZoneID, uint32 iInstanceID, const char* a LSBootUpdate(iZoneID, iInstanceID); } -void ZoneServer::IncommingClient(Client* client) { +void ZoneServer::IncomingClient(Client* client) { BootingUp = true; - auto pack = new ServerPacket(ServerOP_ZoneIncClient, sizeof(ServerZoneIncommingClient_Struct)); - ServerZoneIncommingClient_Struct* s = (ServerZoneIncommingClient_Struct*) pack->pBuffer; + auto pack = new ServerPacket(ServerOP_ZoneIncClient, sizeof(ServerZoneIncomingClient_Struct)); + ServerZoneIncomingClient_Struct* s = (ServerZoneIncomingClient_Struct*) pack->pBuffer; s->zoneid = GetZoneID(); s->instanceid = GetInstanceID(); s->wid = client->GetWID(); diff --git a/world/zoneserver.h b/world/zoneserver.h index 661e03019..1babecc98 100644 --- a/world/zoneserver.h +++ b/world/zoneserver.h @@ -40,7 +40,7 @@ public: bool SetZone(uint32 iZoneID, uint32 iInstanceID = 0, bool iStaticZone = false); void TriggerBootup(uint32 iZoneID = 0, uint32 iInstanceID = 0, const char* iAdminName = 0, bool iMakeStatic = false); void Disconnect() { tcpc->Disconnect(); } - void IncommingClient(Client* client); + void IncomingClient(Client* client); void LSBootUpdate(uint32 zoneid, uint32 iInstanceID = 0, bool startup = false); void LSSleepUpdate(uint32 zoneid); void LSShutDownUpdate(uint32 zoneid); diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index 70ab56400..8cceb5023 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -2976,7 +2976,7 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses* ne //Special custom cases for loading effects on to NPC from 'npc_spels_effects' table if (IsAISpellEffect) { - //Non-Focused Effect to modify incomming spell damage by resist type. + //Non-Focused Effect to modify incoming spell damage by resist type. case SE_FcSpellVulnerability: ModVulnerability(base2, effect_value); break; diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index e3cee409b..9ee1fe3a6 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -473,7 +473,7 @@ void WorldServer::Process() { if (ZoneLoaded) { SetZone(zone->GetZoneID(), zone->GetInstanceID()); if (zst->zoneid == zone->GetZoneID()) { - // This packet also doubles as "incomming client" notification, lets not shut down before they get here + // This packet also doubles as "incoming client" notification, lets not shut down before they get here zone->StartShutdownTimer(AUTHENTICATION_TIMEOUT * 1000); } else { @@ -488,22 +488,19 @@ void WorldServer::Process() { if (!(Zone::Bootup(zst->zoneid, zst->instanceid, zst->makestatic))) { SendChannelMessage(0, 0, 10, 0, 0, "%s:%i Zone::Bootup failed: %s", net.GetZoneAddress(), net.GetZonePort(), database.GetZoneName(zst->zoneid)); } - // Moved annoucement to ZoneBootup() - // else - // SendEmoteMessage(0, 0, 15, "Zone bootup: %s", zone->GetLongName()); break; } case ServerOP_ZoneIncClient: { - if (pack->size != sizeof(ServerZoneIncommingClient_Struct)) { - std::cout << "Wrong size on ServerOP_ZoneIncClient. Got: " << pack->size << ", Expected: " << sizeof(ServerZoneIncommingClient_Struct) << std::endl; + if (pack->size != sizeof(ServerZoneIncomingClient_Struct)) { + std::cout << "Wrong size on ServerOP_ZoneIncClient. Got: " << pack->size << ", Expected: " << sizeof(ServerZoneIncomingClient_Struct) << std::endl; break; } - ServerZoneIncommingClient_Struct* szic = (ServerZoneIncommingClient_Struct*) pack->pBuffer; + ServerZoneIncomingClient_Struct* szic = (ServerZoneIncomingClient_Struct*) pack->pBuffer; if (ZoneLoaded) { SetZone(zone->GetZoneID(), zone->GetInstanceID()); if (szic->zoneid == zone->GetZoneID()) { zone->AddAuth(szic); - // This packet also doubles as "incomming client" notification, lets not shut down before they get here + // This packet also doubles as "incoming client" notification, lets not shut down before they get here zone->StartShutdownTimer(AUTHENTICATION_TIMEOUT * 1000); } } diff --git a/zone/zone.cpp b/zone/zone.cpp index 3c9a68800..444e217da 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -1086,7 +1086,7 @@ bool Zone::SaveZoneCFG() { return database.SaveZoneCFG(GetZoneID(), GetInstanceVersion(), &newzone_data); } -void Zone::AddAuth(ServerZoneIncommingClient_Struct* szic) { +void Zone::AddAuth(ServerZoneIncomingClient_Struct* szic) { ZoneClientAuth_Struct* zca = new ZoneClientAuth_Struct; memset(zca, 0, sizeof(ZoneClientAuth_Struct)); zca->ip = szic->ip; diff --git a/zone/zone.h b/zone/zone.h index adda8f7ff..3d1775718 100644 --- a/zone/zone.h +++ b/zone/zone.h @@ -84,7 +84,7 @@ class PathManager; class WaterMap; extern EntityList entity_list; struct NPCType; -struct ServerZoneIncommingClient_Struct; +struct ServerZoneIncomingClient_Struct; class Zone { @@ -149,7 +149,7 @@ public: void StartShutdownTimer(uint32 set_time = (RuleI(Zone, AutoShutdownDelay))); void ChangeWeather(); bool HasWeather(); - void AddAuth(ServerZoneIncommingClient_Struct* szic); + void AddAuth(ServerZoneIncomingClient_Struct* szic); void RemoveAuth(const char* iCharName); void ResetAuth(); bool GetAuth(uint32 iIP, const char* iCharName, uint32* oWID = 0, uint32* oAccID = 0, uint32* oCharID = 0, int16* oStatus = 0, char* oLSKey = 0, bool* oTellsOff = 0);