mirror of
https://github.com/SWG-Source/src.git
synced 2026-09-11 23:45:01 -04:00
remove the child account stuff
This commit is contained in:
@@ -52,8 +52,6 @@ set(SHARED_SOURCES
|
||||
shared/TaskGetClusterList.h
|
||||
shared/TaskGetValidationData.cpp
|
||||
shared/TaskGetValidationData.h
|
||||
shared/TaskMapAccount.h
|
||||
shared/TaskMapAccount.cpp
|
||||
shared/TaskRegisterNewCluster.cpp
|
||||
shared/TaskRegisterNewCluster.h
|
||||
shared/TaskRenameCharacter.cpp
|
||||
@@ -79,8 +77,7 @@ if(WIN32)
|
||||
)
|
||||
else()
|
||||
set(PLATFORM_SOURCES
|
||||
linux/main.cpp
|
||||
shared/TaskMapAccount.h shared/TaskMapAccount.cpp)
|
||||
linux/main.cpp)
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
|
||||
@@ -257,13 +257,13 @@ void ClientConnection::validateClient(const std::string &id, const std::string &
|
||||
m_stationId = user_id;
|
||||
|
||||
if (!testMode) {
|
||||
REPORT_LOG(true, ("Client connected. Username: %s (%i) \n", uname.c_str(), user_id));
|
||||
REPORT_LOG(true, ("Client connected. Username: %s (%i) \n", id.c_str(), user_id));
|
||||
|
||||
LoginServer::getInstance().onValidateClient(m_stationId, uname, this, true, sessionID.c_str(), 0xFFFFFFFF, 0xFFFFFFFF);
|
||||
} else {
|
||||
LoginServer::getInstance().onValidateClient(m_stationId, uname, this, true, nullptr, 0xFFFFFFFF, 0xFFFFFFFF);
|
||||
}
|
||||
LOG("LoginClientConnection", ("validateClient() for stationId (%i) at IP (%s), id (%s)", user_id, getRemoteAddress().c_str(), uname.c_str()));
|
||||
LOG("LoginClientConnection", ("validateClient() for stationId (%i) at IP (%s), id (%s)", id.c_str(), getRemoteAddress().c_str(), uname.c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "TaskGetCharactersForDelete.h"
|
||||
#include "TaskGetClusterList.h"
|
||||
#include "TaskGetValidationData.h"
|
||||
#include "TaskMapAccount.h"
|
||||
#include "TaskRegisterNewCluster.h"
|
||||
#include "TaskRenameCharacter.h"
|
||||
#include "TaskRestoreCharacter.h"
|
||||
@@ -164,12 +163,6 @@ void DatabaseConnection::getAccountValidationData(const TransferRequestMoveValid
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void DatabaseConnection::upsertAccountRelationship(StationId parentID, StationId childID) {
|
||||
m_taskQueue->asyncRequest(new TaskMapAccount(parentID, childID));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void DatabaseConnection::deleteCharacter(uint32 clusterId, const NetworkId &characterId, StationId stationId)
|
||||
{
|
||||
NOT_NULL(m_taskQueue);
|
||||
|
||||
@@ -47,7 +47,6 @@ class DatabaseConnection : public Singleton<DatabaseConnection>
|
||||
void update ();
|
||||
void getAccountValidationData (StationId stationId, uint32 clusterId, unsigned int track, uint32 subscriptionBits);
|
||||
void getAccountValidationData (const TransferRequestMoveValidation & request, uint32 clusterId);
|
||||
void upsertAccountRelationship (StationId parentID, StationId childID);
|
||||
void deleteCharacter (uint32 clusterId, const NetworkId &characterId, StationId stationId);
|
||||
void deleteAllCharacters (StationId stationId);
|
||||
void renameCharacter (uint32 clusterId, const NetworkId &characterId, const Unicode::String &newName, const TransferCharacterData * requestData);
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// TaskMapAccount.cpp
|
||||
// copyright (c) 2016 StellaBellum
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#include "FirstLoginServer.h"
|
||||
#include "TaskMapAccount.h"
|
||||
|
||||
#include "ClientConnection.h"
|
||||
#include "DatabaseConnection.h"
|
||||
#include "sharedDatabaseInterface/DbSession.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
TaskMapAccount::TaskMapAccount(StationId parentID, StationId childID) :
|
||||
TaskRequest(),
|
||||
m_parentID(parentID),
|
||||
m_childID(childID) {
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool TaskMapAccount::process(DB::Session *session) {
|
||||
MapAccountQuery qry;
|
||||
qry.parentID = m_parentID;
|
||||
qry.childID = m_childID;
|
||||
|
||||
bool rval = session->exec(&qry);
|
||||
|
||||
qry.done();
|
||||
return rval;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void TaskMapAccount::onComplete() {
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
|
||||
TaskMapAccount::MapAccountQuery::MapAccountQuery() :
|
||||
Query(),
|
||||
parentID(),
|
||||
childID() {
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
void TaskMapAccount::MapAccountQuery::getSQL(std::string &sql) {
|
||||
sql = std::string("begin ") + DatabaseConnection::getInstance().getSchemaQualifier() +
|
||||
"merge into account_map am using (select :parentID parent_id, :childID child_id from dual) v on (am.parent_id = v.parent_id and am.child_id = v.child_id) when not matched then insert (parent_id, child_id) values (v.parent_id, v.child_id); end;";
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool TaskMapAccount::MapAccountQuery::bindParameters() {
|
||||
if (!bindParameter(parentID)) return false;
|
||||
if (!bindParameter(childID)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
bool TaskMapAccount::MapAccountQuery::bindColumns() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
DB::Query::QueryMode TaskMapAccount::MapAccountQuery::getExecutionMode() const {
|
||||
return MODE_PROCEXEC;
|
||||
}
|
||||
|
||||
// ======================================================================
|
||||
@@ -1,57 +0,0 @@
|
||||
// ======================================================================
|
||||
//
|
||||
// TaskMapAccount.h
|
||||
// copyright (c) 2016 StellaBellum
|
||||
//
|
||||
// ======================================================================
|
||||
|
||||
#ifndef INCLUDED_TaskMapAccount_H
|
||||
#define INCLUDED_TaskMapAccount_H
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#include "sharedDatabaseInterface/Bindable.h"
|
||||
#include "sharedDatabaseInterface/BindableNetworkId.h"
|
||||
#include "sharedDatabaseInterface/DbQuery.h"
|
||||
#include "sharedDatabaseInterface/DbTaskRequest.h"
|
||||
|
||||
// ======================================================================
|
||||
|
||||
class TaskMapAccount : public DB::TaskRequest
|
||||
{
|
||||
public:
|
||||
TaskMapAccount(StationId parentID, StationId childID);
|
||||
|
||||
public:
|
||||
virtual bool process (DB::Session *session);
|
||||
virtual void onComplete ();
|
||||
|
||||
private:
|
||||
TaskMapAccount(); // disabled default constructor
|
||||
|
||||
class MapAccountQuery : public DB::Query
|
||||
{
|
||||
public:
|
||||
MapAccountQuery();
|
||||
|
||||
DB::BindableLong parentID; //lint !e1925 // public data member
|
||||
DB::BindableLong childID; //lint !e1925 // public data member
|
||||
|
||||
virtual void getSQL(std::string &sql);
|
||||
virtual bool bindParameters();
|
||||
virtual bool bindColumns();
|
||||
virtual QueryMode getExecutionMode() const;
|
||||
|
||||
private: //disable
|
||||
MapAccountQuery(const MapAccountQuery&);
|
||||
MapAccountQuery &operator=(const MapAccountQuery&);
|
||||
};
|
||||
|
||||
private:
|
||||
StationId m_parentID;
|
||||
StationId m_childID;
|
||||
};
|
||||
|
||||
// ======================================================================
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user