106 if (
sConfig.character.allow3edChar)
114 _log(CLIENT__ERROR,
"Called GetCharacterInfo");
124 _log(CLIENT__MESSAGE,
"Sending char creation info reply");
128 PyResult CharUnboundMgrService::Handle_GetCharNewExtraCreationInfo(
PyCallArgs &call) {
131 _log(CLIENT__MESSAGE,
"Sending char new extra creation info reply");
137 CallSelectCharacterID arg;
138 if (!arg.Decode(&call.
tuple)) {
139 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
144 sLog.Error(
"Client::SelectCharacter()",
"CharacterID %u invalid.", arg.charID);
145 call.
client->
SendErrorMsg(
"Character ID %u invalid. Ref: ServerError 00522", arg.charID);
155 CallCreateCharacterWithDoll arg;
156 if (!arg.Decode(&call.
tuple)) {
157 codelog(SERVICE__ERROR,
"%s: Failed to decode arguments.",
GetName());
168 pClient->
SendInfoModalMsg(
"The Portrait for this character was not received. Your character will still be created, but the server will not have their picture.");
170 _log(CLIENT__MESSAGE,
"Calling CreateCharacterWithDoll with schoolID: %i bloodlineID: %i gender: %s ancestryID: %i", \
171 arg.schoolID, arg.bloodlineID, arg.genderID == 1 ?
"male" :
"female", arg.ancestryID);
175 if (char_type ==
nullptr)
181 cdata.
gender = arg.genderID;
188 cdata.
title =
"No Title";
196 _log(CLIENT__MESSAGE,
"Could not find default School ID %u. Using Caldari Military.", cdata.
schoolID);
223 if (
sConfig.character.startCorporation) {
228 _log(CLIENT__MESSAGE,
"Could not find default Corporation ID %u. Using Career Defaults instead.",
sConfig.character.startCorporation);
233 _log(CLIENT__MESSAGE,
"Could not place character in default corporation for school.");
259 if (charRef.
get() ==
nullptr) {
261 _log(CLIENT__ERROR,
"Failed to create character '%s'", cdata.
name.c_str());
279 _log(CLIENT__ERROR,
"Failed to load char create details. Bloodline %u, ancestry %u.", char_type->
bloodlineID(), cdata.
ancestryID);
292 std::map<uint32, uint8> startingSkills;
293 startingSkills.clear();
296 _log(CLIENT__ERROR,
"Failed to load char Base skills. Bloodline %u, Ancestry %u.",
302 _log(CLIENT__ERROR,
"Failed to load char Race skills. Bloodline %u, Ancestry %u.",
313 uint8 skillLevel = 0;
315 for (
auto cur : startingSkills) {
318 if (skill.get() ==
nullptr) {
319 _log(CLIENT__ERROR,
"Failed to add skill %u to char %s(%u) during create.",
320 cur.first, charRef->
name(), charRef->
itemID());
325 skillLevel = cur.second;
327 skillPoints = skill->GetSPForLevel(skillLevel);
352 iData.customInfo += charRef->
itemName();
353 iData.customInfo +=
"(";
354 iData.customInfo += std::to_string(charRef->
itemID());
355 iData.customInfo +=
")";
376 std::string reason =
"DESC: Inheritance Payment to ";
389 _log( CLIENT__MESSAGE,
"Created New Character - Sending charID %u as reply", charRef->
itemID() );
#define sConfig
A macro for easier access to the singleton.
Dispatcher *const m_dispatch
static std::string StringContent(PyRep *pRep)
ShipItemRef GetPod() const
void SendErrorMsg(const char *fmt,...)
#define _log(type, fmt,...)
void InsertCacheHints(hintSet hset, PyDict *into)
PyRep * GetItem(size_t index) const
Returns Python object.
PyRep * GetCharSelectInfo(uint32 charID)
PyRep * GetCharacterList(uint32 accountID)
void SaveSkillHistory(uint16 eventID, double logDate, uint32 characterID, uint16 skillTypeID, uint8 skillLevel, uint32 absolutePoints)
Dispatcher *const m_dispatch
void SendInfoModalMsg(const char *fmt,...)
bool SelectCharacter(int32 char_id=0)
bool DoesCorporationExist(uint32 corpID)
const char * GetName() const
void Move(uint32 new_location=locTemp, EVEItemFlags flag=flagNone, bool notify=false)
void CancelCharacterDeletePrepare(uint32 accountID, uint32 charID)
void DeleteCharacter(uint32 charID)
void addOwnerCache(uint32 ownerID, std::string ownerName, uint32 typeID)
#define sLog
Evaluates to a NewLog instance.
bool GetAttributesFromAncestry(uint32 ancestryID, uint8 &intelligence, uint8 &charisma, uint8 &perception, uint8 &memory, uint8 &willpower)
int64 PrepareCharacterForDelete(uint32 accountID, uint32 charID)
const std::string currentDateTime()
#define codelog(type, fmt,...)
void SetShip(ShipItemRef shipRef)
void CreateChar(bool set)
static void TranserFunds(uint32 fromID, uint32 toID, double amount, std::string reason="", uint8 entryTypeID=Journal::EntryType::Undefined, uint32 referenceID=0, uint16 fromKey=Account::KeyType::Cash, uint16 toKey=Account::KeyType::Cash, Client *pClient=nullptr)
void SetChar(CharacterRef charRef)
uint8 bloodlineID() const
void SetAttribute(uint16 attrID, int num, bool notify=true)
PyServiceMgr *const m_manager
bool GetCareerBySchool(uint32 schoolID, uint8 &raceID, uint32 &careerID)
#define IsCharacterID(itemID)
#define PyCallable_REG_CALL(c, m)
bool GetSkillsByRace(uint32 raceID, std::map< uint32, uint8 > &into)
PyCallable_Make_InnerDispatcher(CharUnboundMgrService) CharUnboundMgrService
void Build(uint32 charID, PyDict *data)
static void GetCharacterData(uint32 charID, std::map< std::string, int64 > &characterDataMap)
const std::string & itemName() const
void Build(uint32 ownerID, PyDict *data)
void GetCharacterData(uint32 characterID, std::map< std::string, int64 > &characterDataMap)
bool GetBaseSkills(std::map< uint32, uint8 > &into)
Handles everything related to creating, deleting and selecting a character.
ObjCacheService * cache_service
ShipItemRef SpawnNewRookieShip(uint32 stationID)
PyRep * ValidateCharNameRep(std::string name)
bool GetSkillsByCareer(uint32 careerID, std::map< uint32, uint8 > &into)
bool GetCorporationBySchool(uint32 schoolID, uint32 &corporationID)
static int64 IntegerValue(PyRep *pRep)
int64 grantableRolesAtBase
int64 grantableRolesAtOther
uint8 intelligence() const
void SetClient(Client *pClient)
bool GetLocationCorporationByCareer(CharacterData &cdata, uint32 &corporationID)
uint32 careerSpecialityID
void ValidateCharName(std::string name)