Spelling errors and revised my cle change to put it much lower so it shouldn't have any side effects other than avoiding the crash

This commit is contained in:
KimLS 2015-01-30 15:03:02 -08:00
parent faaa98d3f0
commit f388a605dd
12 changed files with 29 additions and 32 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -55,7 +55,7 @@
#ifndef DEF_eConnectionType
#define DEF_eConnectionType
enum eConnectionType {Incomming, Outgoing};
enum eConnectionType {Incoming, Outgoing};
#endif

View File

@ -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);

View File

@ -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();

View File

@ -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);

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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);