Minor file renaming and tweaks

This commit is contained in:
Kayne Ruse
2014-05-13 00:09:37 +10:00
parent 80a26341b1
commit 01244005e9
10 changed files with 14 additions and 37 deletions
+4
View File
@@ -367,7 +367,9 @@ void InWorld::RequestDisconnect() {
//send a disconnect request
packet.meta.type = SerialPacket::Type::DISCONNECT;
packet.clientInfo.clientIndex = clientIndex;
packet.clientInfo.accountIndex = accountIndex;
packet.clientInfo.characterIndex = characterIndex;
serialize(&packet, buffer);
network.Send(Channels::SERVER, buffer, PACKET_BUFFER_SIZE);
}
@@ -378,7 +380,9 @@ void InWorld::RequestShutDown() {
//send a shutdown request
packet.meta.type = SerialPacket::Type::SHUTDOWN;
packet.clientInfo.clientIndex = clientIndex;
packet.clientInfo.accountIndex = accountIndex;
packet.clientInfo.characterIndex = characterIndex;
serialize(&packet, buffer);
network.Send(Channels::SERVER, buffer, PACKET_BUFFER_SIZE);
}
+3 -1
View File
@@ -27,7 +27,7 @@
#include "SDL/SDL_net.h"
#define NETWORK_VERSION 20140506
#define NETWORK_VERSION 20140512
#define PACKET_STRING_SIZE 100
#pragma pack(push, 0)
@@ -42,6 +42,8 @@ union SerialPacket {
PING = 1,
PONG = 2,
//TODO: rejection message
//Searching for a server to join
BROADCAST_REQUEST = 3,
BROADCAST_RESPONSE = 4,
@@ -19,7 +19,7 @@
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#include "server_utility.hpp"
#include "sql_utility.hpp"
#include "utility.hpp"
@@ -186,6 +186,8 @@ void ServerApplication::DeleteUserAccount(int uid) {
throw( std::runtime_error(std::string() + "Unknown SQL error when deleting an account: " + sqlite3_errmsg(database)) );
}
//TODO: delete this account's characters?
//finish the routine
sqlite3_finalize(statement);
accountMap.erase(uid);
-30
View File
@@ -1,30 +0,0 @@
/* Copyright: (c) Kayne Ruse 2014
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software
* in a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
*
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
*
* 3. This notice may not be removed or altered from any source
* distribution.
*/
#ifndef COMBATINSTANCE_HPP_
#define COMBATINSTANCE_HPP_
struct CombatInstance {
//uid
static int uidCounter;
};
#endif
-2
View File
@@ -26,7 +26,6 @@
#include "client_data.hpp"
#include "account_data.hpp"
#include "character_data.hpp"
#include "combat_instance.hpp"
//maps
#include "map_allocator.hpp"
@@ -102,7 +101,6 @@ private:
std::map<int, ClientData> clientMap;
std::map<int, AccountData> accountMap;
std::map<int, CharacterData> characterMap;
std::map<int, CombatInstance> combatMap;
//maps
//TODO: I need to handle multiple map objects
+1 -2
View File
@@ -21,7 +21,7 @@
*/
#include "server_application.hpp"
#include "server_utility.hpp"
#include "sql_utility.hpp"
#include <stdexcept>
#include <iostream>
@@ -33,7 +33,6 @@
int ClientData::uidCounter = 0;
int CharacterData::uidCounter = 0;
int CombatInstance::uidCounter = 0;
//-------------------------
//Define the public members
+3 -1
View File
@@ -1,4 +1,6 @@
I need to keep the documentation up to date. Namely, the GDD is getting out of date.
* I need to keep the documentation up to date. Namely, the GDD is getting out of date.
* How many lookups is the map system using?
* Add the serial packet to the network utility
--Naming conventions--