mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-27 17:26:16 +00:00
Changed: #878 Fix typos in comments/code
This commit is contained in:
parent
6a698ab26c
commit
9a19292137
3 changed files with 183 additions and 186 deletions
|
@ -56,7 +56,7 @@ void CAiWrapperServer::init(NLLIGO::CLigoConfig * ligoConfig)
|
||||||
{
|
{
|
||||||
|
|
||||||
CPrimitiveContext::instance().CurrentLigoConfig = R2::LigoConfigPtr;
|
CPrimitiveContext::instance().CurrentLigoConfig = R2::LigoConfigPtr;
|
||||||
// Read the ligo primitive class file
|
// Read the ligo primitive class file
|
||||||
// NLLIGO::Register();
|
// NLLIGO::Register();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -67,65 +67,65 @@ void CAiWrapperServer::init(NLLIGO::CLigoConfig * ligoConfig)
|
||||||
void CAiWrapperServer::streamToPdr(NLMISC::IStream& stream, const std::string& primName, CPersistentDataRecord& pdr)
|
void CAiWrapperServer::streamToPdr(NLMISC::IStream& stream, const std::string& primName, CPersistentDataRecord& pdr)
|
||||||
{
|
{
|
||||||
H_AUTO_INST( streamToPdr );
|
H_AUTO_INST( streamToPdr );
|
||||||
CAIPrimitiveParser::init(&pdr);
|
CAIPrimitiveParser::init(&pdr);
|
||||||
AI_SHARE::parsePrimStream(stream, primName.c_str());
|
AI_SHARE::parsePrimStream(stream, primName.c_str());
|
||||||
CAIPrimitiveParser::release();
|
CAIPrimitiveParser::release();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAiWrapperServer::primsToPdr(NLLIGO::CPrimitives *prims, const std::string& primName, CPersistentDataRecord& pdr)
|
void CAiWrapperServer::primsToPdr(NLLIGO::CPrimitives *prims, const std::string& primName, CPersistentDataRecord& pdr)
|
||||||
{
|
{
|
||||||
H_AUTO_INST( primsToPdr );
|
H_AUTO_INST( primsToPdr );
|
||||||
CAIPrimitiveParser::init(&pdr);
|
CAIPrimitiveParser::init(&pdr);
|
||||||
AI_SHARE::parsePrimNoStream(prims, primName.c_str());
|
AI_SHARE::parsePrimNoStream(prims, primName.c_str());
|
||||||
CAIPrimitiveParser::release();
|
CAIPrimitiveParser::release();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAiWrapperServer::pdrToFile(CPersistentDataRecord& pdr, const std::string& pdrName)
|
void CAiWrapperServer::pdrToFile(CPersistentDataRecord& pdr, const std::string& pdrName)
|
||||||
{
|
{
|
||||||
CAIPrimitiveParser::init(&pdr);
|
CAIPrimitiveParser::init(&pdr);
|
||||||
CAIPrimitiveParser::getInstance().writeFile(pdrName.c_str());
|
CAIPrimitiveParser::getInstance().writeFile(pdrName.c_str());
|
||||||
CAIPrimitiveParser::release();
|
CAIPrimitiveParser::release();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAiWrapperServer::fileToPdr(const std::string& pdrName, CPersistentDataRecord& pdr)
|
void CAiWrapperServer::fileToPdr(const std::string& pdrName, CPersistentDataRecord& pdr)
|
||||||
{
|
{
|
||||||
CAIPrimitiveParser::init(&pdr);
|
CAIPrimitiveParser::init(&pdr);
|
||||||
CAIPrimitiveParser::getInstance().readFile(pdrName.c_str());
|
CAIPrimitiveParser::getInstance().readFile(pdrName.c_str());
|
||||||
CAIPrimitiveParser::release();
|
CAIPrimitiveParser::release();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAiWrapperServer::displayPdr( CPersistentDataRecord& pdr)
|
void CAiWrapperServer::displayPdr( CPersistentDataRecord& pdr)
|
||||||
{
|
{
|
||||||
CAIPrimitiveParser::init(&pdr);
|
CAIPrimitiveParser::init(&pdr);
|
||||||
CAIPrimitiveParser::getInstance().display();
|
CAIPrimitiveParser::getInstance().display();
|
||||||
CAIPrimitiveParser::release();
|
CAIPrimitiveParser::release();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAiWrapperServer::clearPdr( CPersistentDataRecord& pdr)
|
void CAiWrapperServer::clearPdr( CPersistentDataRecord& pdr)
|
||||||
{
|
{
|
||||||
CAIPrimitiveParser::init(&pdr);
|
CAIPrimitiveParser::init(&pdr);
|
||||||
CAIPrimitiveParser::getInstance().clear();
|
CAIPrimitiveParser::getInstance().clear();
|
||||||
CAIPrimitiveParser::release();
|
CAIPrimitiveParser::release();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAiWrapperServer::primitiveFileToPdr(const std::string& primitiveName, CPersistentDataRecord& pdr)
|
void CAiWrapperServer::primitiveFileToPdr(const std::string& primitiveName, CPersistentDataRecord& pdr)
|
||||||
{
|
{
|
||||||
pdr.clear();
|
pdr.clear();
|
||||||
CAIPrimitiveParser::init(&pdr);
|
CAIPrimitiveParser::init(&pdr);
|
||||||
AI_SHARE::parsePrimFile(primitiveName.c_str());
|
AI_SHARE::parsePrimFile(primitiveName.c_str());
|
||||||
CAIPrimitiveParser::release();
|
CAIPrimitiveParser::release();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAiWrapperServer::stopTest(TSessionId sessionId, uint32 aiInstanceId)
|
void CAiWrapperServer::stopTest(TSessionId sessionId, uint32 aiInstanceId)
|
||||||
{
|
{
|
||||||
nldebug("Stop Test in session %u (aiInstance %u)", sessionId.asInt(), aiInstanceId);
|
nldebug("Stop Test in session %u (aiInstance %u)", sessionId.asInt(), aiInstanceId);
|
||||||
CMessage msgout("R2_STOPLIVE");
|
CMessage msgout("R2_STOPLIVE");
|
||||||
bool isBase = true;
|
bool isBase = true;
|
||||||
|
|
||||||
msgout.serial(aiInstanceId);
|
msgout.serial(aiInstanceId);
|
||||||
msgout.serial(isBase);
|
msgout.serial(isBase);
|
||||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAiWrapperServer::startTest(TSessionId sessionId, uint32 aiInstanceId, CPersistentDataRecord& pdr)
|
void CAiWrapperServer::startTest(TSessionId sessionId, uint32 aiInstanceId, CPersistentDataRecord& pdr)
|
||||||
{
|
{
|
||||||
|
@ -136,7 +136,7 @@ void CAiWrapperServer::startTest(TSessionId sessionId, uint32 aiInstanceId, CPe
|
||||||
if (!pdr.toBuffer(dest, totalDataSize))
|
if (!pdr.toBuffer(dest, totalDataSize))
|
||||||
{
|
{
|
||||||
nlwarning("can't serialise data");
|
nlwarning("can't serialise data");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -155,7 +155,7 @@ void CAiWrapperServer::startInstance(TSessionId sessionId, uint32 aiInstanceId)
|
||||||
{
|
{
|
||||||
nldebug("Start Instance in session %u (aiInstance %u)", sessionId.asInt(), aiInstanceId);
|
nldebug("Start Instance in session %u (aiInstance %u)", sessionId.asInt(), aiInstanceId);
|
||||||
nlinfo("R2An: startInstance %u", aiInstanceId);
|
nlinfo("R2An: startInstance %u", aiInstanceId);
|
||||||
CMessage msgout("R2_STARTINSTANCE");
|
CMessage msgout("R2_STARTINSTANCE");
|
||||||
msgout.serial(aiInstanceId);
|
msgout.serial(aiInstanceId);
|
||||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||||
|
|
||||||
|
@ -164,12 +164,12 @@ void CAiWrapperServer::startInstance(TSessionId sessionId, uint32 aiInstanceId)
|
||||||
void CAiWrapperServer::stopAct(TSessionId sessionId, uint32 aiInstanceId)
|
void CAiWrapperServer::stopAct(TSessionId sessionId, uint32 aiInstanceId)
|
||||||
{
|
{
|
||||||
nldebug("Stop Act in session %u (aiInstance %u)", sessionId.asInt(), aiInstanceId);
|
nldebug("Stop Act in session %u (aiInstance %u)", sessionId.asInt(), aiInstanceId);
|
||||||
CMessage msgout("R2_STOPLIVE");
|
CMessage msgout("R2_STOPLIVE");
|
||||||
msgout.serial(aiInstanceId);
|
msgout.serial(aiInstanceId);
|
||||||
bool isBase = false;
|
bool isBase = false;
|
||||||
msgout.serial(isBase);
|
msgout.serial(isBase);
|
||||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAiWrapperServer::startAct(TSessionId sessionId, uint32 aiInstanceId, CPersistentDataRecord& pdr)
|
void CAiWrapperServer::startAct(TSessionId sessionId, uint32 aiInstanceId, CPersistentDataRecord& pdr)
|
||||||
{
|
{
|
||||||
|
@ -179,7 +179,7 @@ void CAiWrapperServer::startAct(TSessionId sessionId, uint32 aiInstanceId, CPers
|
||||||
if (!pdr.toBuffer(dest, totalDataSize))
|
if (!pdr.toBuffer(dest, totalDataSize))
|
||||||
{
|
{
|
||||||
nlwarning("can't serialise data");
|
nlwarning("can't serialise data");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -209,7 +209,7 @@ namespace
|
||||||
static std::string aliasToString(uint32 alias)
|
static std::string aliasToString(uint32 alias)
|
||||||
{
|
{
|
||||||
uint32 staticPart = alias >> 20;
|
uint32 staticPart = alias >> 20;
|
||||||
uint32 dynPart = alias & ((1 << 21)-1);
|
uint32 dynPart = alias & ((1 << 21)-1);
|
||||||
return NLMISC::toString("(A:%u:%u)", staticPart, dynPart);
|
return NLMISC::toString("(A:%u:%u)", staticPart, dynPart);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -222,14 +222,14 @@ void CAiWrapperServer::despawnEntity(NLMISC::CEntityId entityId, uint32 alias)
|
||||||
|
|
||||||
|
|
||||||
std::string str = NLMISC::toString("()despawnBotByAlias(\"%s\");", aliasToString(alias).c_str());
|
std::string str = NLMISC::toString("()despawnBotByAlias(\"%s\");", aliasToString(alias).c_str());
|
||||||
|
|
||||||
|
|
||||||
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
||||||
msgout.serial(messageVersion);
|
msgout.serial(messageVersion);
|
||||||
msgout.serial(nbString);
|
msgout.serial(nbString);
|
||||||
msgout.serial(eid);
|
msgout.serial(eid);
|
||||||
msgout.serial(str);
|
msgout.serial(str);
|
||||||
|
|
||||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,15 +241,15 @@ void CAiWrapperServer::setGrpHPLevel(NLMISC::CEntityId entityId, uint32 alias,
|
||||||
|
|
||||||
|
|
||||||
std::string hpstr = NLMISC::toString("()setHPScale(%f);", hp);
|
std::string hpstr = NLMISC::toString("()setHPScale(%f);", hp);
|
||||||
|
|
||||||
|
|
||||||
//CMessage msgout("EVENT_NPC_GROUP_SCRIPT");
|
//CMessage msgout("EVENT_NPC_GROUP_SCRIPT");
|
||||||
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
||||||
msgout.serial(messageVersion);
|
msgout.serial(messageVersion);
|
||||||
msgout.serial(nbString);
|
msgout.serial(nbString);
|
||||||
msgout.serial(eid);
|
msgout.serial(eid);
|
||||||
msgout.serial(hpstr);
|
msgout.serial(hpstr);
|
||||||
|
|
||||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||||
|
|
||||||
|
|
||||||
|
@ -264,18 +264,18 @@ void CAiWrapperServer::setHPLevel(NLMISC::CEntityId entityId, uint32 alias, floa
|
||||||
|
|
||||||
|
|
||||||
std::string hpstr = NLMISC::toString("()setBotHPScaleByAlias(%f, \"%s\");", hp, aliasToString(alias).c_str());
|
std::string hpstr = NLMISC::toString("()setBotHPScaleByAlias(%f, \"%s\");", hp, aliasToString(alias).c_str());
|
||||||
|
|
||||||
|
|
||||||
//CMessage msgout("EVENT_NPC_GROUP_SCRIPT");
|
//CMessage msgout("EVENT_NPC_GROUP_SCRIPT");
|
||||||
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
||||||
msgout.serial(messageVersion);
|
msgout.serial(messageVersion);
|
||||||
msgout.serial(nbString);
|
msgout.serial(nbString);
|
||||||
msgout.serial(eid);
|
msgout.serial(eid);
|
||||||
msgout.serial(hpstr);
|
msgout.serial(hpstr);
|
||||||
|
|
||||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,13 +289,13 @@ void CAiWrapperServer::triggerGrpEvent(NLMISC::CEntityId entityId, float eventId
|
||||||
std::string str = NLMISC::toString("()setEvent(%f);", eventId);
|
std::string str = NLMISC::toString("()setEvent(%f);", eventId);
|
||||||
eventId = (float)(int) eventId;
|
eventId = (float)(int) eventId;
|
||||||
if (eventId < 0 || eventId > 10) return;
|
if (eventId < 0 || eventId > 10) return;
|
||||||
|
|
||||||
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
||||||
msgout.serial(messageVersion);
|
msgout.serial(messageVersion);
|
||||||
msgout.serial(nbString);
|
msgout.serial(nbString);
|
||||||
msgout.serial(eid);
|
msgout.serial(eid);
|
||||||
msgout.serial(str);
|
msgout.serial(str);
|
||||||
|
|
||||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -307,13 +307,13 @@ void CAiWrapperServer::controlNpc(NLMISC::CEntityId clientId, NLMISC::CEntityId
|
||||||
uint32 nbString=2;
|
uint32 nbString=2;
|
||||||
std::string eid = npc.toString();
|
std::string eid = npc.toString();
|
||||||
std::string str = NLMISC::toString("()setPlayerController(\"%s\",\"%s\");", npc.toString().c_str(), clientId.toString().c_str());
|
std::string str = NLMISC::toString("()setPlayerController(\"%s\",\"%s\");", npc.toString().c_str(), clientId.toString().c_str());
|
||||||
|
|
||||||
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
||||||
msgout.serial(messageVersion);
|
msgout.serial(messageVersion);
|
||||||
msgout.serial(nbString);
|
msgout.serial(nbString);
|
||||||
msgout.serial(eid);
|
msgout.serial(eid);
|
||||||
msgout.serial(str);
|
msgout.serial(str);
|
||||||
|
|
||||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,13 +324,13 @@ void CAiWrapperServer::stopControlNpc(NLMISC::CEntityId clientId, NLMISC::CEntit
|
||||||
uint32 nbString=2;
|
uint32 nbString=2;
|
||||||
std::string eid = npc.toString();
|
std::string eid = npc.toString();
|
||||||
std::string str = NLMISC::toString("()clearPlayerController(\"%s\");", npc.toString().c_str());
|
std::string str = NLMISC::toString("()clearPlayerController(\"%s\");", npc.toString().c_str());
|
||||||
|
|
||||||
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
||||||
msgout.serial(messageVersion);
|
msgout.serial(messageVersion);
|
||||||
msgout.serial(nbString);
|
msgout.serial(nbString);
|
||||||
msgout.serial(eid);
|
msgout.serial(eid);
|
||||||
msgout.serial(str);
|
msgout.serial(str);
|
||||||
|
|
||||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -339,22 +339,22 @@ void CAiWrapperServer::triggerUserTrigger(const std::string& groupName, uint32 t
|
||||||
/*
|
/*
|
||||||
uint32 messageVersion = 1;
|
uint32 messageVersion = 1;
|
||||||
uint32 nbString=2;
|
uint32 nbString=2;
|
||||||
|
|
||||||
std::string script = NLMISC::toString("()setEvent(%d);", triggerId);
|
std::string script = NLMISC::toString("()setEvent(%d);", triggerId);
|
||||||
|
|
||||||
|
|
||||||
CMessage msgout("R2_NPC_GROUP_SCRIPT_BY_NAME");
|
CMessage msgout("R2_NPC_GROUP_SCRIPT_BY_NAME");
|
||||||
msgout.serial(messageVersion);
|
msgout.serial(messageVersion);
|
||||||
msgout.serial(nbString);
|
msgout.serial(nbString);
|
||||||
msgout.serial(const_cast<std::string&>(groupName));
|
msgout.serial(const_cast<std::string&>(groupName));
|
||||||
msgout.serial(script);
|
msgout.serial(script);
|
||||||
|
|
||||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
std::string script = NLMISC::toString("\"()setEvent(%d);\"", triggerId);
|
std::string script = NLMISC::toString("\"()setEvent(%d);\"", triggerId);
|
||||||
CMessage msgout("EXEC_COMMAND");
|
CMessage msgout("EXEC_COMMAND");
|
||||||
|
@ -388,7 +388,7 @@ void CAiWrapperServer::setPioneerRight(NLMISC::CEntityId entityId, const R2::TPi
|
||||||
msgout.serial(command);
|
msgout.serial(command);
|
||||||
CUnifiedNetwork::getInstance()->send("EGS",msgout);
|
CUnifiedNetwork::getInstance()->send("EGS",msgout);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (right == R2::TPioneerRight::Tester)
|
else if (right == R2::TPioneerRight::Tester)
|
||||||
{
|
{
|
||||||
|
@ -410,7 +410,7 @@ void CAiWrapperServer::setPioneerRight(NLMISC::CEntityId entityId, const R2::TPi
|
||||||
msgout.serial(command);
|
msgout.serial(command);
|
||||||
CUnifiedNetwork::getInstance()->send("EGS",msgout);
|
CUnifiedNetwork::getInstance()->send("EGS",msgout);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -421,7 +421,7 @@ void CAiWrapperServer::askBotDespawnNotification(NLMISC::CEntityId creatureId, T
|
||||||
{
|
{
|
||||||
NLNET::CMessage msgout("ASK_BOT_DESPAWN_NOTIFICATION");
|
NLNET::CMessage msgout("ASK_BOT_DESPAWN_NOTIFICATION");
|
||||||
uint32 messageVersion = 1;
|
uint32 messageVersion = 1;
|
||||||
msgout.serial(messageVersion, alias, creatureId);
|
msgout.serial(messageVersion, alias, creatureId);
|
||||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,6 @@ void foo()
|
||||||
admin_modules_forceLink();
|
admin_modules_forceLink();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
namespace R2
|
namespace R2
|
||||||
{
|
{
|
||||||
// The ligo config
|
// The ligo config
|
||||||
|
@ -59,8 +58,6 @@ namespace R2
|
||||||
CR2LigoConfig R2LigoConfig;
|
CR2LigoConfig R2LigoConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void CDynamicScenarioService::forwardToStringManagerModule (CMessage &msgin)
|
void CDynamicScenarioService::forwardToStringManagerModule (CMessage &msgin)
|
||||||
{
|
{
|
||||||
TDataSetRow senderId;
|
TDataSetRow senderId;
|
||||||
|
|
|
@ -194,7 +194,7 @@ void cbClientConnection(CMessage& msgin, const std::string &serviceName, NLNET::
|
||||||
msgin.serial( userName, userPriv, userExtended, languageId);
|
msgin.serial( userName, userPriv, userExtended, languageId);
|
||||||
msgin.serial( fromAddr );
|
msgin.serial( fromAddr );
|
||||||
msgin.serial( cookie );
|
msgin.serial( cookie );
|
||||||
#ifdef NL_DEBUG
|
#ifdef NL_DEBUG
|
||||||
egs_ecinfo("WEB: received cookie %s from player %u", cookie.toString().c_str(), userId);
|
egs_ecinfo("WEB: received cookie %s from player %u", cookie.toString().c_str(), userId);
|
||||||
#endif
|
#endif
|
||||||
//Bsi.append( StatPath, NLMISC::toString("[UC] %u %s %s %s %s %s", userId, userName.c_str(), userPriv.c_str(), languageId.c_str(), fromAddr.c_str(), cookie.toString().c_str()) );
|
//Bsi.append( StatPath, NLMISC::toString("[UC] %u %s %s %s %s %s", userId, userName.c_str(), userPriv.c_str(), languageId.c_str(), fromAddr.c_str(), cookie.toString().c_str()) );
|
||||||
|
@ -227,7 +227,7 @@ void cbClientConnection(CMessage& msgin, const std::string &serviceName, NLNET::
|
||||||
|
|
||||||
// set the front end id of this player
|
// set the front end id of this player
|
||||||
PlayerManager.setPlayerFrontEndId( userId, serviceId );
|
PlayerManager.setPlayerFrontEndId( userId, serviceId );
|
||||||
|
|
||||||
const bool betaTester = (userExtended.find(":FBT:") != string::npos);
|
const bool betaTester = (userExtended.find(":FBT:") != string::npos);
|
||||||
const bool preOrder = (userExtended.find(":PO:") != string::npos);
|
const bool preOrder = (userExtended.find(":PO:") != string::npos);
|
||||||
const bool windermeerCommunity = (userExtended.find(":WIND:") != string::npos);
|
const bool windermeerCommunity = (userExtended.find(":WIND:") != string::npos);
|
||||||
|
@ -291,19 +291,19 @@ void cbClientConnection(CMessage& msgin, const std::string &serviceName, NLNET::
|
||||||
//
|
//
|
||||||
// msgin.serial( longUserId );
|
// msgin.serial( longUserId );
|
||||||
// userId = (uint32) longUserId;
|
// userId = (uint32) longUserId;
|
||||||
//
|
//
|
||||||
// CCharacter * c = PlayerManager.getActiveChar( userId );
|
// CCharacter * c = PlayerManager.getActiveChar( userId );
|
||||||
// if( c != 0 )
|
// if( c != 0 )
|
||||||
// {
|
// {
|
||||||
// charId = c->getId();
|
// charId = c->getId();
|
||||||
//
|
//
|
||||||
// // send userId/charId association to the FE
|
// // send userId/charId association to the FE
|
||||||
// CMessage msgout("CL_ID");
|
// CMessage msgout("CL_ID");
|
||||||
// msgout.serial(userId);
|
// msgout.serial(userId);
|
||||||
// msgout.serial( charId );
|
// msgout.serial( charId );
|
||||||
// uint16 frontEndId = PlayerManager.getPlayerFrontEndId( userId );
|
// uint16 frontEndId = PlayerManager.getPlayerFrontEndId( userId );
|
||||||
// CUnifiedNetwork::getInstance()->send(frontEndId, msgout);
|
// CUnifiedNetwork::getInstance()->send(frontEndId, msgout);
|
||||||
//
|
//
|
||||||
// // send acknowledge to client for received Enter message
|
// // send acknowledge to client for received Enter message
|
||||||
// CBitMemStream bms;
|
// CBitMemStream bms;
|
||||||
// if ( ! GenericMsgManager.pushNameToStream( "CONNECTION:READY", bms) )
|
// if ( ! GenericMsgManager.pushNameToStream( "CONNECTION:READY", bms) )
|
||||||
|
@ -335,7 +335,7 @@ void cbClientConnection(CMessage& msgin, const std::string &serviceName, NLNET::
|
||||||
void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||||
{
|
{
|
||||||
H_AUTO(cbClientReady);
|
H_AUTO(cbClientReady);
|
||||||
|
|
||||||
// read the player id
|
// read the player id
|
||||||
CEntityId characterId;
|
CEntityId characterId;
|
||||||
msgin.serial( characterId );
|
msgin.serial( characterId );
|
||||||
|
@ -346,7 +346,7 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
||||||
disconnectUser( PlayerManager.getPlayerId( characterId ) );
|
disconnectUser( PlayerManager.getPlayerId( characterId ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// add the character in the GPMS
|
// add the character in the GPMS
|
||||||
COfflineEntityState state;
|
COfflineEntityState state;
|
||||||
PlayerManager.getState( characterId ).setCOfflineEntityState( state ); // state properties with temp storage
|
PlayerManager.getState( characterId ).setCOfflineEntityState( state ); // state properties with temp storage
|
||||||
|
@ -364,7 +364,7 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
||||||
// validate player web account
|
// validate player web account
|
||||||
// \todo this is unsafe, because name is an ucstring which might be fucked up when casted into string
|
// \todo this is unsafe, because name is an ucstring which might be fucked up when casted into string
|
||||||
CMailForumValidator::validateUserEntry( c->getHomeMainlandSessionId(), c->getName().toString(), player->getLoginCookie().toString() );
|
CMailForumValidator::validateUserEntry( c->getHomeMainlandSessionId(), c->getName().toString(), player->getLoginCookie().toString() );
|
||||||
|
|
||||||
NLNET::CMessage msgout( "IMPULSION_ID" );
|
NLNET::CMessage msgout( "IMPULSION_ID" );
|
||||||
CEntityId id = c->getId();
|
CEntityId id = c->getId();
|
||||||
msgout.serial( id );
|
msgout.serial( id );
|
||||||
|
@ -373,11 +373,11 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
||||||
{
|
{
|
||||||
uint32 shardId = IService::getInstance()->getShardId();
|
uint32 shardId = IService::getInstance()->getShardId();
|
||||||
bms.serial(shardId);
|
bms.serial(shardId);
|
||||||
|
|
||||||
CConfigFile::CVar *var = IService::getInstance()->ConfigFile.getVarPtr("WebSrvHost");
|
CConfigFile::CVar *var = IService::getInstance()->ConfigFile.getVarPtr("WebSrvHost");
|
||||||
string webHost = (var != NULL ? var->asString() : "");
|
string webHost = (var != NULL ? var->asString() : "");
|
||||||
bms.serial(webHost);
|
bms.serial(webHost);
|
||||||
|
|
||||||
msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length());
|
msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length());
|
||||||
CUnifiedNetwork::getInstance()->send( NLNET::TServiceId(c->getId().getDynamicId()), msgout ); // sendMessageViaMirror() not needed to FS in general
|
CUnifiedNetwork::getInstance()->send( NLNET::TServiceId(c->getId().getDynamicId()), msgout ); // sendMessageViaMirror() not needed to FS in general
|
||||||
}
|
}
|
||||||
|
@ -385,9 +385,9 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
||||||
{
|
{
|
||||||
nlwarning("Unable to send CONNECTION:SHARD_ID to player %s", id.toString().c_str());
|
nlwarning("Unable to send CONNECTION:SHARD_ID to player %s", id.toString().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add player in the mirror // createEntity() will produce warnings if it fails
|
// Add player in the mirror // createEntity() will produce warnings if it fails
|
||||||
if ( ! Mirror.createEntity( characterId ) )
|
if ( ! Mirror.createEntity( characterId ) )
|
||||||
{
|
{
|
||||||
|
@ -416,7 +416,7 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
||||||
uint32 in = c->getStartupInstance();
|
uint32 in = c->getStartupInstance();
|
||||||
if (in != INVALID_AI_INSTANCE)
|
if (in != INVALID_AI_INSTANCE)
|
||||||
{
|
{
|
||||||
nldebug("Setting player %s in ring instance #%u",
|
nldebug("Setting player %s in ring instance #%u",
|
||||||
c->getId().toString().c_str(), in);
|
c->getId().toString().c_str(), in);
|
||||||
|
|
||||||
// set instance id for ring session
|
// set instance id for ring session
|
||||||
|
@ -435,7 +435,7 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
||||||
nlwarning("user %s is in invalid continent '%s'", c->getId().toString().c_str(), strlwr( CONTINENT::toString(c->getCurrentContinent()) ).c_str() );
|
nlwarning("user %s is in invalid continent '%s'", c->getId().toString().c_str(), strlwr( CONTINENT::toString(c->getCurrentContinent()) ).c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
nldebug("Setting player %s in instance #%u for continent '%s'",
|
nldebug("Setting player %s in instance #%u for continent '%s'",
|
||||||
c->getId().toString().c_str(), in, strlwr( CONTINENT::toString(c->getCurrentContinent())).c_str());
|
c->getId().toString().c_str(), in, strlwr( CONTINENT::toString(c->getCurrentContinent())).c_str());
|
||||||
c->setInstanceNumber( in );
|
c->setInstanceNumber( in );
|
||||||
}
|
}
|
||||||
|
@ -497,26 +497,26 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
||||||
{
|
{
|
||||||
c->setWhoSeesMe(UINT64_CONSTANT(0xffffffffffffffff));
|
c->setWhoSeesMe(UINT64_CONSTANT(0xffffffffffffffff));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsRingShard && player->havePriv(AlwaysInvisiblePriv))
|
if (!IsRingShard && player->havePriv(AlwaysInvisiblePriv))
|
||||||
{
|
{
|
||||||
c->setWhoSeesMe(uint64(0));
|
c->setWhoSeesMe(uint64(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
TheDataset.declareEntity( entityIndex ); // after the writing of properties to mirror
|
TheDataset.declareEntity( entityIndex ); // after the writing of properties to mirror
|
||||||
|
|
||||||
//#ifdef NL_DEBUG
|
//#ifdef NL_DEBUG
|
||||||
egs_ecinfo("Client ready (entity %s (Row %u) added to mirror)", characterId.toString().c_str(), entityIndex.getIndex() );
|
egs_ecinfo("Client ready (entity %s (Row %u) added to mirror)", characterId.toString().c_str(), entityIndex.getIndex() );
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
// player enter the game
|
// player enter the game
|
||||||
PlayerManager.setEnterFlag( characterId, true );
|
PlayerManager.setEnterFlag( characterId, true );
|
||||||
|
|
||||||
// ask backup for offline commands file
|
// ask backup for offline commands file
|
||||||
COfflineCharacterCommand::getInstance()->characterOnline( characterId );
|
COfflineCharacterCommand::getInstance()->characterOnline( characterId );
|
||||||
|
|
||||||
if( CGameEventManager::getInstance().getChannelEventId() != TChanID::Unknown )
|
if( CGameEventManager::getInstance().getChannelEventId() != TChanID::Unknown )
|
||||||
{
|
{
|
||||||
if( c->haveAnyPrivilege() )
|
if( c->haveAnyPrivilege() )
|
||||||
|
@ -538,7 +538,7 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
||||||
|
|
||||||
//---------------------------------------------------
|
//---------------------------------------------------
|
||||||
// finalizeClientReady :
|
// finalizeClientReady :
|
||||||
//
|
//
|
||||||
//---------------------------------------------------
|
//---------------------------------------------------
|
||||||
void finalizeClientReady( uint32 userId, uint32 index )
|
void finalizeClientReady( uint32 userId, uint32 index )
|
||||||
{
|
{
|
||||||
|
@ -546,21 +546,21 @@ void finalizeClientReady( uint32 userId, uint32 index )
|
||||||
|
|
||||||
CPlayer *player = PlayerManager.getPlayer(userId);
|
CPlayer *player = PlayerManager.getPlayer(userId);
|
||||||
BOMB_IF( player == 0,"Failed to get player from user Id",return );
|
BOMB_IF( player == 0,"Failed to get player from user Id",return );
|
||||||
|
|
||||||
BOMB_IF( index==-1, "Failed to find char with given index for this player", return );
|
BOMB_IF( index==-1, "Failed to find char with given index for this player", return );
|
||||||
|
|
||||||
// get the char infos
|
// get the char infos
|
||||||
CCharacter * c = PlayerManager.getChar( userId, index );
|
CCharacter * c = PlayerManager.getChar( userId, index );
|
||||||
BOMB_IF( c == NULL, toString("Character %u of user %u not created", index, userId), return);
|
BOMB_IF( c == NULL, toString("Character %u of user %u not created", index, userId), return);
|
||||||
|
|
||||||
// get character CEntityId
|
// get character CEntityId
|
||||||
CEntityId characterId = c->getId();
|
CEntityId characterId = c->getId();
|
||||||
|
|
||||||
c->sendDynamicSystemMessage( c->getId(), "OPS_WELCOME" );
|
c->sendDynamicSystemMessage( c->getId(), "OPS_WELCOME" );
|
||||||
// c->sendMessageToClient( c->getId(), "OPS_WELCOME" );
|
// c->sendMessageToClient( c->getId(), "OPS_WELCOME" );
|
||||||
|
|
||||||
c->sendMessageOfTheDay();
|
c->sendMessageOfTheDay();
|
||||||
|
|
||||||
c->checkSkillTreeForLockedSkill();
|
c->checkSkillTreeForLockedSkill();
|
||||||
|
|
||||||
c->setDatabase();
|
c->setDatabase();
|
||||||
|
@ -595,7 +595,7 @@ void finalizeClientReady( uint32 userId, uint32 index )
|
||||||
nlwarning("<cbclientReady : user %s is not in his guild>");
|
nlwarning("<cbclientReady : user %s is not in his guild>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c->resetFameDatabase();
|
c->resetFameDatabase();
|
||||||
|
|
||||||
// notify player respawn points system that player is ready
|
// notify player respawn points system that player is ready
|
||||||
|
@ -654,7 +654,7 @@ void finalizeClientReady( uint32 userId, uint32 index )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check sell store
|
// check sell store
|
||||||
c->checkSellStore();
|
c->checkSellStore();
|
||||||
|
|
||||||
|
@ -681,13 +681,13 @@ void finalizeClientReady( uint32 userId, uint32 index )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// for GM player, trigger a 'infos' command to remember their persistent state
|
// for GM player, trigger a 'infos' command to remember their persistent state
|
||||||
if (!PlayerManager.getPlayer(uint32(c->getId().getShortId())>>4)->getUserPriv().empty())
|
if (!PlayerManager.getPlayer(uint32(c->getId().getShortId())>>4)->getUserPriv().empty())
|
||||||
CCommandRegistry::getInstance().execute(toString("infos %s", c->getId().toString().c_str()).c_str(), InfoLog(), true);
|
CCommandRegistry::getInstance().execute(toString("infos %s", c->getId().toString().c_str()).c_str(), InfoLog(), true);
|
||||||
|
|
||||||
} // finalizeClientReady //
|
} // finalizeClientReady //
|
||||||
|
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
// cbClientDisconnection :
|
// cbClientDisconnection :
|
||||||
|
@ -696,7 +696,7 @@ void finalizeClientReady( uint32 userId, uint32 index )
|
||||||
void cbClientDisconnection(CMessage& msgin, const string &serviceName, NLNET::TServiceId serviceId)
|
void cbClientDisconnection(CMessage& msgin, const string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbClientDisconnection);
|
H_AUTO(cbClientDisconnection);
|
||||||
|
|
||||||
// read the player id
|
// read the player id
|
||||||
uint32 userId;
|
uint32 userId;
|
||||||
msgin.serial( userId );
|
msgin.serial( userId );
|
||||||
|
@ -733,7 +733,7 @@ void cbClientDisconnection(CMessage& msgin, const string &serviceName, NLNET::TS
|
||||||
void disconnectUser(uint32 userId)
|
void disconnectUser(uint32 userId)
|
||||||
{
|
{
|
||||||
H_AUTO(disconnectUser);
|
H_AUTO(disconnectUser);
|
||||||
|
|
||||||
PlayerManager.disconnectPlayer( userId );
|
PlayerManager.disconnectPlayer( userId );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -744,7 +744,7 @@ void disconnectUser(uint32 userId)
|
||||||
void cbSelectChar( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
void cbSelectChar( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||||
{
|
{
|
||||||
H_AUTO(cbSelectChar);
|
H_AUTO(cbSelectChar);
|
||||||
|
|
||||||
// read the player id
|
// read the player id
|
||||||
// uint64 longUserId;
|
// uint64 longUserId;
|
||||||
uint32 userId;
|
uint32 userId;
|
||||||
|
@ -770,7 +770,7 @@ void cbSelectChar( CMessage& msgin, const std::string &serviceName, NLNET::TServ
|
||||||
{
|
{
|
||||||
// get the char infos
|
// get the char infos
|
||||||
CCharacter * ch = PlayerManager.getChar( userId, index );
|
CCharacter * ch = PlayerManager.getChar( userId, index );
|
||||||
|
|
||||||
if( ch != 0 )
|
if( ch != 0 )
|
||||||
{
|
{
|
||||||
// Check if not loading an old file with no normal positions
|
// Check if not loading an old file with no normal positions
|
||||||
|
@ -814,11 +814,11 @@ void cbSelectChar( CMessage& msgin, const std::string &serviceName, NLNET::TServ
|
||||||
|
|
||||||
// store the ai instance
|
// store the ai instance
|
||||||
ch->setStartupInstance(instanceId);
|
ch->setStartupInstance(instanceId);
|
||||||
|
|
||||||
// Send userId/charId association to the FE (IMPULSION_ID becomes valid from now on)
|
// Send userId/charId association to the FE (IMPULSION_ID becomes valid from now on)
|
||||||
CEntityId charId = ch->getId();
|
CEntityId charId = ch->getId();
|
||||||
PlayerManager.setActiveCharForPlayer( userId, index, charId );
|
PlayerManager.setActiveCharForPlayer( userId, index, charId );
|
||||||
CMessage msgout2("CL_ID");
|
CMessage msgout2("CL_ID");
|
||||||
msgout2.serial( userId );
|
msgout2.serial( userId );
|
||||||
msgout2.serial( charId );
|
msgout2.serial( charId );
|
||||||
NLNET::TServiceId frontEndId = PlayerManager.getPlayerFrontEndId( userId );
|
NLNET::TServiceId frontEndId = PlayerManager.getPlayerFrontEndId( userId );
|
||||||
|
@ -849,10 +849,10 @@ void cbSelectChar( CMessage& msgin, const std::string &serviceName, NLNET::TServ
|
||||||
// Continue on same shard => send user char data (start pos, etc.)
|
// Continue on same shard => send user char data (start pos, etc.)
|
||||||
ch->sendUserChar( userId, 0 /*auto*/, R2::TUserRole::ur_player );
|
ch->sendUserChar( userId, 0 /*auto*/, R2::TUserRole::ur_player );
|
||||||
}
|
}
|
||||||
|
|
||||||
// send CEntityId/name association to the IOS
|
// send CEntityId/name association to the IOS
|
||||||
// ch->registerName();
|
// ch->registerName();
|
||||||
|
|
||||||
// send acknowledge to client for received Enter message (new: it includes version handshake)
|
// send acknowledge to client for received Enter message (new: it includes version handshake)
|
||||||
CBitMemStream bms2;
|
CBitMemStream bms2;
|
||||||
nlverify(GenericMsgManager.pushNameToStream( "CONNECTION:READY", bms2));
|
nlverify(GenericMsgManager.pushNameToStream( "CONNECTION:READY", bms2));
|
||||||
|
@ -861,12 +861,12 @@ void cbSelectChar( CMessage& msgin, const std::string &serviceName, NLNET::TServ
|
||||||
msgout3.serial( charId );
|
msgout3.serial( charId );
|
||||||
msgout3.serialBufferWithSize((uint8*)bms2.buffer(), bms2.length());
|
msgout3.serialBufferWithSize((uint8*)bms2.buffer(), bms2.length());
|
||||||
CUnifiedNetwork::getInstance()->send( frontEndId, msgout3 );
|
CUnifiedNetwork::getInstance()->send( frontEndId, msgout3 );
|
||||||
|
|
||||||
// // Remove user language from IOS, we don't need it anymore
|
// // Remove user language from IOS, we don't need it anymore
|
||||||
// CMessage msgout4("REMOVE_USER_LANGUAGE");
|
// CMessage msgout4("REMOVE_USER_LANGUAGE");
|
||||||
// msgout4.serial(userId);
|
// msgout4.serial(userId);
|
||||||
// CUnifiedNetwork::getInstance()->send("IOS", msgout4);
|
// CUnifiedNetwork::getInstance()->send("IOS", msgout4);
|
||||||
|
|
||||||
if( CPVPManager2::getInstance()->inSafeZone( ch->getPosition() ) )
|
if( CPVPManager2::getInstance()->inSafeZone( ch->getPosition() ) )
|
||||||
{
|
{
|
||||||
// character must be safe in PVP until he leave safe zone
|
// character must be safe in PVP until he leave safe zone
|
||||||
|
@ -903,11 +903,11 @@ void cbSelectChar( CMessage& msgin, const std::string &serviceName, NLNET::TServ
|
||||||
void cbCheckName( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
void cbCheckName( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||||
{
|
{
|
||||||
H_AUTO(cbCheckName);
|
H_AUTO(cbCheckName);
|
||||||
|
|
||||||
uint64 longUid;
|
uint64 longUid;
|
||||||
uint32 userId;
|
uint32 userId;
|
||||||
CCheckNameMsg checkNameMsg;
|
CCheckNameMsg checkNameMsg;
|
||||||
|
|
||||||
msgin.serial( longUid );
|
msgin.serial( longUid );
|
||||||
userId = (uint32) longUid;
|
userId = (uint32) longUid;
|
||||||
msgin.serial( checkNameMsg );
|
msgin.serial( checkNameMsg );
|
||||||
|
@ -941,16 +941,16 @@ void cbCheckName( CMessage& msgin, const std::string &serviceName, NLNET::TServi
|
||||||
void cbCreateChar( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
void cbCreateChar( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||||
{
|
{
|
||||||
H_AUTO(cbCreateChar);
|
H_AUTO(cbCreateChar);
|
||||||
|
|
||||||
// read the player id
|
// read the player id
|
||||||
uint64 longUserId;
|
uint64 longUserId;
|
||||||
uint32 userId;
|
uint32 userId;
|
||||||
msgin.serial( longUserId );
|
msgin.serial( longUserId );
|
||||||
userId = (uint32) longUserId;
|
userId = (uint32) longUserId;
|
||||||
|
|
||||||
CCreateCharMsg createCharMsg;
|
CCreateCharMsg createCharMsg;
|
||||||
createCharMsg.serial( msgin );
|
createCharMsg.serial( msgin );
|
||||||
|
|
||||||
// Yoyo: fix to force new newbieland.
|
// Yoyo: fix to force new newbieland.
|
||||||
if(UseNewNewbieLandStartingPoint)
|
if(UseNewNewbieLandStartingPoint)
|
||||||
{
|
{
|
||||||
|
@ -971,7 +971,7 @@ void cbCreateChar( CMessage& msgin, const std::string &serviceName, NLNET::TServ
|
||||||
createCharMsg.Name[i] = createCharMsg.Name[i] - 'A' + 'a';
|
createCharMsg.Name[i] = createCharMsg.Name[i] - 'A' + 'a';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CCreateCharErrorMsg createCharErrorMsg;
|
CCreateCharErrorMsg createCharErrorMsg;
|
||||||
if( ! CCharacter::checkCreateParams( createCharMsg, createCharErrorMsg, userId ) )
|
if( ! CCharacter::checkCreateParams( createCharMsg, createCharErrorMsg, userId ) )
|
||||||
{
|
{
|
||||||
|
@ -1028,7 +1028,7 @@ CreationFailed:
|
||||||
sendCharactersSummary( PlayerManager.getPlayer( userId ) );
|
sendCharactersSummary( PlayerManager.getPlayer( userId ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void cbCreateChar_part2(uint32 userId, const CCreateCharMsg &createCharMsg, bool ok)
|
void cbCreateChar_part2(uint32 userId, const CCreateCharMsg &createCharMsg, bool ok)
|
||||||
{
|
{
|
||||||
|
@ -1048,12 +1048,12 @@ void cbCreateChar_part2(uint32 userId, const CCreateCharMsg &createCharMsg, bool
|
||||||
|
|
||||||
// create a new char
|
// create a new char
|
||||||
CCharacter * ch = new CCharacter();
|
CCharacter * ch = new CCharacter();
|
||||||
|
|
||||||
createCharMsg.Slot;
|
createCharMsg.Slot;
|
||||||
|
|
||||||
CEntityId charId = PlayerManager.createCharacterId( userId, createCharMsg.Slot );
|
CEntityId charId = PlayerManager.createCharacterId( userId, createCharMsg.Slot );
|
||||||
|
|
||||||
ch->setId( charId );
|
ch->setId( charId );
|
||||||
ch->setName( createCharMsg.Name );
|
ch->setName( createCharMsg.Name );
|
||||||
// ch->setSurname( string("unknown") );
|
// ch->setSurname( string("unknown") );
|
||||||
|
|
||||||
|
@ -1092,7 +1092,7 @@ void cbCreateChar_part2(uint32 userId, const CCreateCharMsg &createCharMsg, bool
|
||||||
{
|
{
|
||||||
nlwarning( "(PS)<cbCreateChar> Error: %s", e.what() );
|
nlwarning( "(PS)<cbCreateChar> Error: %s", e.what() );
|
||||||
}
|
}
|
||||||
|
|
||||||
PlayerManager.savePlayerChar( userId, createCharMsg.Slot );
|
PlayerManager.savePlayerChar( userId, createCharMsg.Slot );
|
||||||
|
|
||||||
// update the ring database with the new char
|
// update the ring database with the new char
|
||||||
|
@ -1110,7 +1110,7 @@ void cbCreateChar_part2(uint32 userId, const CCreateCharMsg &createCharMsg, bool
|
||||||
// std::pair<PVP_CLAN::TPVPClan, PVP_CLAN::TPVPClan> allegiance = ch->getAllegiance();
|
// std::pair<PVP_CLAN::TPVPClan, PVP_CLAN::TPVPClan> allegiance = ch->getAllegiance();
|
||||||
// charInfo.setCivilisation(ch->
|
// charInfo.setCivilisation(ch->
|
||||||
// charInfo.setCult(
|
// charInfo.setCult(
|
||||||
// no respawn points
|
// no respawn points
|
||||||
IShardUnifierEvent::getInstance()->onNewChar(charInfo);
|
IShardUnifierEvent::getInstance()->onNewChar(charInfo);
|
||||||
}
|
}
|
||||||
} // cbCreateChar //
|
} // cbCreateChar //
|
||||||
|
@ -1123,7 +1123,7 @@ void cbCreateChar_part2(uint32 userId, const CCreateCharMsg &createCharMsg, bool
|
||||||
void sendIfNameIsValide( uint32 userId, bool nameValide )
|
void sendIfNameIsValide( uint32 userId, bool nameValide )
|
||||||
{
|
{
|
||||||
H_AUTO(sendIfNameIsValide);
|
H_AUTO(sendIfNameIsValide);
|
||||||
|
|
||||||
CBitMemStream bmsName;
|
CBitMemStream bmsName;
|
||||||
if ( ! GenericMsgManager.pushNameToStream( "CONNECTION:VALID_NAME", bmsName) )
|
if ( ! GenericMsgManager.pushNameToStream( "CONNECTION:VALID_NAME", bmsName) )
|
||||||
{
|
{
|
||||||
|
@ -1132,11 +1132,11 @@ void sendIfNameIsValide( uint32 userId, bool nameValide )
|
||||||
}
|
}
|
||||||
uint8 valide = nameValide;
|
uint8 valide = nameValide;
|
||||||
bmsName.serial( valide );
|
bmsName.serial( valide );
|
||||||
|
|
||||||
CMessage msgoutName( "IMPULSION_UID" );
|
CMessage msgoutName( "IMPULSION_UID" );
|
||||||
msgoutName.serial( userId );
|
msgoutName.serial( userId );
|
||||||
msgoutName.serialBufferWithSize((uint8*)bmsName.buffer(), bmsName.length());
|
msgoutName.serialBufferWithSize((uint8*)bmsName.buffer(), bmsName.length());
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CUnifiedNetwork::getInstance()->send( PlayerManager.getPlayerFrontEndId( userId ), msgoutName );
|
CUnifiedNetwork::getInstance()->send( PlayerManager.getPlayerFrontEndId( userId ), msgoutName );
|
||||||
|
@ -1155,16 +1155,16 @@ void sendIfNameIsValide( uint32 userId, bool nameValide )
|
||||||
void cbDeleteChar( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
void cbDeleteChar( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||||
{
|
{
|
||||||
H_AUTO(cbDeleteChar);
|
H_AUTO(cbDeleteChar);
|
||||||
|
|
||||||
// read the player id
|
// read the player id
|
||||||
uint64 longUserId;
|
uint64 longUserId;
|
||||||
uint32 userId;
|
uint32 userId;
|
||||||
msgin.serial( longUserId );
|
msgin.serial( longUserId );
|
||||||
userId = (uint32) longUserId;
|
userId = (uint32) longUserId;
|
||||||
|
|
||||||
uint8 characterIndex;
|
uint8 characterIndex;
|
||||||
msgin.serial( characterIndex );
|
msgin.serial( characterIndex );
|
||||||
|
|
||||||
CPlayer* player = PlayerManager.getPlayer( userId );
|
CPlayer* player = PlayerManager.getPlayer( userId );
|
||||||
if ( player == NULL )
|
if ( player == NULL )
|
||||||
{
|
{
|
||||||
|
@ -1195,10 +1195,10 @@ void cbDeleteChar( CMessage& msgin, const std::string &serviceName, NLNET::TServ
|
||||||
|
|
||||||
fileName = charPath+NLMISC::toString( "account_%u_%d.xml", userId, index );
|
fileName = charPath+NLMISC::toString( "account_%u_%d.xml", userId, index );
|
||||||
BsiGlobal.deleteFile( fileName );
|
BsiGlobal.deleteFile( fileName );
|
||||||
|
|
||||||
fileName = charPath+NLMISC::toString( "account_%u_%d.xml.backup", userId, index );
|
fileName = charPath+NLMISC::toString( "account_%u_%d.xml.backup", userId, index );
|
||||||
BsiGlobal.deleteFile( fileName );
|
BsiGlobal.deleteFile( fileName );
|
||||||
|
|
||||||
fileName = charPath+NLMISC::toString( "account_%u_%d.bin", userId, index );
|
fileName = charPath+NLMISC::toString( "account_%u_%d.bin", userId, index );
|
||||||
BsiGlobal.deleteFile( fileName );
|
BsiGlobal.deleteFile( fileName );
|
||||||
|
|
||||||
|
@ -1230,7 +1230,7 @@ void cbDeleteChar( CMessage& msgin, const std::string &serviceName, NLNET::TServ
|
||||||
void sendCharactersSummary( CPlayer *player, bool AllAutorized, uint32 bitfieldOwnerOfActiveAnimSession, uint32 bitfieldOwnerOfEditSession )
|
void sendCharactersSummary( CPlayer *player, bool AllAutorized, uint32 bitfieldOwnerOfActiveAnimSession, uint32 bitfieldOwnerOfEditSession )
|
||||||
{
|
{
|
||||||
H_AUTO(sendCharactersSummary);
|
H_AUTO(sendCharactersSummary);
|
||||||
|
|
||||||
if ( player == NULL )
|
if ( player == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1241,14 +1241,14 @@ void sendCharactersSummary( CPlayer *player, bool AllAutorized, uint32 bitfieldO
|
||||||
{
|
{
|
||||||
for ( uint i=0, len=(uint)chars.size(); i!=len; ++i )
|
for ( uint i=0, len=(uint)chars.size(); i!=len; ++i )
|
||||||
{
|
{
|
||||||
chars[i].InRingSession = ((bitfieldOwnerOfActiveAnimSession & (1 << i)) != 0);
|
chars[i].InRingSession = ((bitfieldOwnerOfActiveAnimSession & (1 << i)) != 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bitfieldOwnerOfEditSession != 0)
|
if (bitfieldOwnerOfEditSession != 0)
|
||||||
{
|
{
|
||||||
for ( uint i=0, len=(uint)chars.size(); i!=len; ++i )
|
for ( uint i=0, len=(uint)chars.size(); i!=len; ++i )
|
||||||
{
|
{
|
||||||
chars[i].HasEditSession = ((bitfieldOwnerOfEditSession & (1 << i)) != 0);
|
chars[i].HasEditSession = ((bitfieldOwnerOfEditSession & (1 << i)) != 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1302,7 +1302,7 @@ void sendCharactersSummary( CPlayer *player, bool AllAutorized, uint32 bitfieldO
|
||||||
bms.serialCont (shardNames);
|
bms.serialCont (shardNames);
|
||||||
|
|
||||||
// send privileges in all cases
|
// send privileges in all cases
|
||||||
std::string priv;
|
std::string priv;
|
||||||
priv = player->getUserPriv();
|
priv = player->getUserPriv();
|
||||||
bms.serial(priv);
|
bms.serial(priv);
|
||||||
|
|
||||||
|
@ -1336,7 +1336,7 @@ void sendCharactersSummary( CPlayer *player, bool AllAutorized, uint32 bitfieldO
|
||||||
void cbEntityPos(CMessage& msgin, const string &serviceName, NLNET::TServiceId serviceId)
|
void cbEntityPos(CMessage& msgin, const string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbEntityPos);
|
H_AUTO(cbEntityPos);
|
||||||
|
|
||||||
CEntityId id;
|
CEntityId id;
|
||||||
sint32 x, y, z;
|
sint32 x, y, z;
|
||||||
float t;
|
float t;
|
||||||
|
@ -1382,7 +1382,7 @@ void cbEntityPos(CMessage& msgin, const string &serviceName, NLNET::TServiceId s
|
||||||
void cbClientTpAck( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbClientTpAck( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbTpAcknowledge);
|
H_AUTO(cbTpAcknowledge);
|
||||||
|
|
||||||
CEntityId Id;
|
CEntityId Id;
|
||||||
|
|
||||||
msgin.serial( Id );
|
msgin.serial( Id );
|
||||||
|
@ -1443,7 +1443,7 @@ void cbClientTpAck( NLNET::CMessage& msgin, const std::string &serviceName, NLNE
|
||||||
CBankAccessor_PLR::getTARGET().getBARS().setFOCUS(ch->_PropertyDatabase, 0 );
|
CBankAccessor_PLR::getTARGET().getBARS().setFOCUS(ch->_PropertyDatabase, 0 );
|
||||||
ch->setTarget( CEntityId::Unknown );
|
ch->setTarget( CEntityId::Unknown );
|
||||||
|
|
||||||
// player still intangible for a few seconds
|
// player still intangible for a few seconds
|
||||||
ch->setIntangibleEndDate( CTickEventHandler::getGameCycle() + IntangibleTimeAfterTP );
|
ch->setIntangibleEndDate( CTickEventHandler::getGameCycle() + IntangibleTimeAfterTP );
|
||||||
|
|
||||||
if (ch->getMode()==MBEHAV::DEATH)
|
if (ch->getMode()==MBEHAV::DEATH)
|
||||||
|
@ -1471,11 +1471,11 @@ void cbClientTpAck( NLNET::CMessage& msgin, const std::string &serviceName, NLNE
|
||||||
{
|
{
|
||||||
nlwarning("<TP>%s will arrive in invalid continent %s", ch->getId().toString().c_str(), NLMISC::strlwr( cont->getName() ).c_str() );
|
nlwarning("<TP>%s will arrive in invalid continent %s", ch->getId().toString().c_str(), NLMISC::strlwr( cont->getName() ).c_str() );
|
||||||
}
|
}
|
||||||
|
|
||||||
// respawn the pets if needed
|
// respawn the pets if needed
|
||||||
ch->respawnPetAfterTp( state, in );
|
ch->respawnPetAfterTp( state, in );
|
||||||
|
|
||||||
nldebug("Setting player %s in instance #%u for continent '%s'",
|
nldebug("Setting player %s in instance #%u for continent '%s'",
|
||||||
ch->getId().toString().c_str(),
|
ch->getId().toString().c_str(),
|
||||||
in,
|
in,
|
||||||
CONTINENT::toString(contId).c_str());
|
CONTINENT::toString(contId).c_str());
|
||||||
|
@ -1525,8 +1525,8 @@ void cbClientTpAck( NLNET::CMessage& msgin, const std::string &serviceName, NLNE
|
||||||
ch->setWhoSeesMe( IsRingShard? R2_VISION::buildWhoSeesMe(R2_VISION::WHOSEESME_VISIBLE_PLAYER,true): UINT64_CONSTANT(0xffffffffffffffff) );
|
ch->setWhoSeesMe( IsRingShard? R2_VISION::buildWhoSeesMe(R2_VISION::WHOSEESME_VISIBLE_PLAYER,true): UINT64_CONSTANT(0xffffffffffffffff) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1543,12 +1543,12 @@ void cbClientTpAck( NLNET::CMessage& msgin, const std::string &serviceName, NLNE
|
||||||
} // cbTpAcknowledge //
|
} // cbTpAcknowledge //
|
||||||
|
|
||||||
//---------------------------------------------------
|
//---------------------------------------------------
|
||||||
// cbLeaveTeam: a player
|
// cbLeaveTeam: a player
|
||||||
//---------------------------------------------------
|
//---------------------------------------------------
|
||||||
void cbLeaveTeam( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbLeaveTeam( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbLeaveTeam);
|
H_AUTO(cbLeaveTeam);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
TeamManager.quitTeam( charId );
|
TeamManager.quitTeam( charId );
|
||||||
|
@ -1560,7 +1560,7 @@ void cbLeaveTeam( NLNET::CMessage& msgin, const std::string &serviceName, NLNET:
|
||||||
void cbJoinTeam( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbJoinTeam( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbJoinTeam);
|
H_AUTO(cbJoinTeam);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
TeamManager.joinAccept( charId );
|
TeamManager.joinAccept( charId );
|
||||||
|
@ -1572,7 +1572,7 @@ void cbJoinTeam( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::
|
||||||
void cbJoinTeamDecline( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbJoinTeamDecline( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbJoinTeamDecline);
|
H_AUTO(cbJoinTeamDecline);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
TeamManager.joinDecline( charId );
|
TeamManager.joinDecline( charId );
|
||||||
|
@ -1585,7 +1585,7 @@ void cbJoinTeamDecline( NLNET::CMessage& msgin, const std::string &serviceName,
|
||||||
void cbJoinTeamProposal( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbJoinTeamProposal( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbJoinTeamProposal);
|
H_AUTO(cbJoinTeamProposal);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
|
|
||||||
|
@ -1606,7 +1606,7 @@ void cbJoinTeamProposal( NLNET::CMessage& msgin, const std::string &serviceName,
|
||||||
void cbKickTeammate( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbKickTeammate( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbKickTeammate);
|
H_AUTO(cbKickTeammate);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
uint8 memberIndex;
|
uint8 memberIndex;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
|
@ -1630,7 +1630,7 @@ void cbKickTeammate( NLNET::CMessage& msgin, const std::string &serviceName, NLN
|
||||||
void cbHarvest( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbHarvest( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbHarvest);
|
H_AUTO(cbHarvest);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
|
|
||||||
|
@ -1658,7 +1658,7 @@ void cbHarvest( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::T
|
||||||
void cbHarvestClose( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbHarvestClose( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbHarvestClose);
|
H_AUTO(cbHarvestClose);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
|
|
||||||
|
@ -1684,7 +1684,7 @@ void cbHarvestClose( NLNET::CMessage& msgin, const std::string &serviceName, NLN
|
||||||
void cbHarvestDeposit( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbHarvestDeposit( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbHarvestDeposit);
|
H_AUTO(cbHarvestDeposit);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
|
|
||||||
|
@ -1725,7 +1725,7 @@ void cbHarvestDeposit( NLNET::CMessage& msgin, const std::string &serviceName, N
|
||||||
nlerror( "character->harvestDeposit(true);" ); // TODO
|
nlerror( "character->harvestDeposit(true);" ); // TODO
|
||||||
/*character->depositSearchSkill(skill);
|
/*character->depositSearchSkill(skill);
|
||||||
character->openHarvest();*/
|
character->openHarvest();*/
|
||||||
|
|
||||||
// character->sendMessageToClient( character->getId(), "WOS_HARVEST_SEARCHING" );
|
// character->sendMessageToClient( character->getId(), "WOS_HARVEST_SEARCHING" );
|
||||||
nlerror( "CZoneManager::getInstance().harvestDeposit(character);" );
|
nlerror( "CZoneManager::getInstance().harvestDeposit(character);" );
|
||||||
|
|
||||||
|
@ -1741,7 +1741,7 @@ void cbHarvestDeposit( NLNET::CMessage& msgin, const std::string &serviceName, N
|
||||||
// Changed : Wait new harvest rules ////////////////////////////////////////////////////
|
// Changed : Wait new harvest rules ////////////////////////////////////////////////////
|
||||||
|
|
||||||
// character->setBehaviour( MBEHAV::HARVESTING );
|
// character->setBehaviour( MBEHAV::HARVESTING );
|
||||||
|
|
||||||
} // cbHarvestDeposit //
|
} // cbHarvestDeposit //
|
||||||
|
|
||||||
|
|
||||||
|
@ -1752,7 +1752,7 @@ void cbHarvestDeposit( NLNET::CMessage& msgin, const std::string &serviceName, N
|
||||||
void cbHarvestMPDestroyed( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbHarvestMPDestroyed( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbHarvestMPDestroyed);
|
H_AUTO(cbHarvestMPDestroyed);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
|
|
||||||
|
@ -1797,7 +1797,7 @@ void cbHarvestMPDestroyed( NLNET::CMessage& msgin, const std::string &serviceNam
|
||||||
void cbHarvestInterrupted( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbHarvestInterrupted( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbHarvestInterrupted);
|
H_AUTO(cbHarvestInterrupted);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
|
|
||||||
|
@ -1836,13 +1836,13 @@ void cbHarvestInterrupted( NLNET::CMessage& msgin, const std::string &serviceNam
|
||||||
void cbHarvestDB( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbHarvestDB( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbHarvestDB);
|
H_AUTO(cbHarvestDB);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
CSheetId sheet;
|
CSheetId sheet;
|
||||||
uint16 quantity;
|
uint16 quantity;
|
||||||
uint16 minQuality;
|
uint16 minQuality;
|
||||||
uint16 maxQuality;
|
uint16 maxQuality;
|
||||||
|
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
msgin.serial( sheet );
|
msgin.serial( sheet );
|
||||||
msgin.serial( quantity );
|
msgin.serial( quantity );
|
||||||
|
@ -1868,7 +1868,7 @@ void cbHarvestDB( NLNET::CMessage& msgin, const std::string &serviceName, NLNET:
|
||||||
character->staticActionInProgress(true);
|
character->staticActionInProgress(true);
|
||||||
|
|
||||||
CTempInventory *invTemp = (CTempInventory*)(CInventoryBase*)character->getInventory(INVENTORIES::temporary);
|
CTempInventory *invTemp = (CTempInventory*)(CInventoryBase*)character->getInventory(INVENTORIES::temporary);
|
||||||
|
|
||||||
for (uint32 i = 0 ; i < invTemp->getSlotCount(); ++i )
|
for (uint32 i = 0 ; i < invTemp->getSlotCount(); ++i )
|
||||||
{
|
{
|
||||||
if (i != 0 )
|
if (i != 0 )
|
||||||
|
@ -1880,7 +1880,7 @@ void cbHarvestDB( NLNET::CMessage& msgin, const std::string &serviceName, NLNET:
|
||||||
{
|
{
|
||||||
invTemp->setDispQuantity(i, quantity);
|
invTemp->setDispQuantity(i, quantity);
|
||||||
invTemp->setDispSheetId(i, sheet);
|
invTemp->setDispSheetId(i, sheet);
|
||||||
}
|
}
|
||||||
invTemp->setDispQuality(i, 0);
|
invTemp->setDispQuality(i, 0);
|
||||||
//trap character->incSlotVersion( INVENTORIES::temporary,i );
|
//trap character->incSlotVersion( INVENTORIES::temporary,i );
|
||||||
}
|
}
|
||||||
|
@ -1944,7 +1944,7 @@ void cbHarvestDBUpdateQty( NLNET::CMessage& msgin, const std::string &serviceNam
|
||||||
void cbClearHarvestDB( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbClearHarvestDB( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbClearHarvestDB);
|
H_AUTO(cbClearHarvestDB);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
|
|
||||||
|
@ -1979,7 +1979,7 @@ void cbClearHarvestDB( NLNET::CMessage& msgin, const std::string &serviceName, N
|
||||||
|
|
||||||
uint16 quantity;
|
uint16 quantity;
|
||||||
msgin.serial( quantity );
|
msgin.serial( quantity );
|
||||||
|
|
||||||
uint16 quality;
|
uint16 quality;
|
||||||
msgin.serial( quality );
|
msgin.serial( quality );
|
||||||
|
|
||||||
|
@ -2010,7 +2010,7 @@ void cbClearHarvestDB( NLNET::CMessage& msgin, const std::string &serviceName, N
|
||||||
void cbFightingTarget( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbFightingTarget( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbFightingTarget);
|
H_AUTO(cbFightingTarget);
|
||||||
|
|
||||||
CEntityId IdCharacter, Target;
|
CEntityId IdCharacter, Target;
|
||||||
|
|
||||||
msgin.serial( IdCharacter );
|
msgin.serial( IdCharacter );
|
||||||
|
@ -2040,7 +2040,7 @@ void cbFightingTarget( NLNET::CMessage& msgin, const std::string &serviceName, N
|
||||||
void cbAnimalCommand( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbAnimalCommand( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbAnimalCommand);
|
H_AUTO(cbAnimalCommand);
|
||||||
|
|
||||||
CEntityId entity;
|
CEntityId entity;
|
||||||
uint8 beastIndex;
|
uint8 beastIndex;
|
||||||
uint8 command;
|
uint8 command;
|
||||||
|
@ -2116,7 +2116,7 @@ void cbTradeListReceived( NLNET::CMessage& msgin, const std::string &serviceName
|
||||||
void cbTradeBuySomething( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbTradeBuySomething( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbTradeBuySomething);
|
H_AUTO(cbTradeBuySomething);
|
||||||
|
|
||||||
CEntityId player;
|
CEntityId player;
|
||||||
uint8 ItemNumber;
|
uint8 ItemNumber;
|
||||||
uint16 Quantity;
|
uint16 Quantity;
|
||||||
|
@ -2168,7 +2168,7 @@ void cbGiveSeed( NLNET::CMessage& msgin, const std::string &serviceName, uint16
|
||||||
void cbAddSurvivePact( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbAddSurvivePact( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbAddSurvivePact);
|
H_AUTO(cbAddSurvivePact);
|
||||||
|
|
||||||
CEntityId player;
|
CEntityId player;
|
||||||
uint8 PactNature, PactType;
|
uint8 PactNature, PactType;
|
||||||
|
|
||||||
|
@ -2230,7 +2230,7 @@ void cbFameChange( NLNET::CMessage& msgin, const std::string &serviceName, uint1
|
||||||
// read the creature id
|
// read the creature id
|
||||||
CEntityId Id;
|
CEntityId Id;
|
||||||
msgin.serial( Id );
|
msgin.serial( Id );
|
||||||
|
|
||||||
// read creature sheet id
|
// read creature sheet id
|
||||||
uint32 Sheet;
|
uint32 Sheet;
|
||||||
msgin.serial( Sheet );
|
msgin.serial( Sheet );
|
||||||
|
@ -2269,7 +2269,7 @@ void cbFameChange( NLNET::CMessage& msgin, const std::string &serviceName, uint1
|
||||||
void cbSetValue( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
void cbSetValue( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||||
{
|
{
|
||||||
H_AUTO(cbSetValue);
|
H_AUTO(cbSetValue);
|
||||||
|
|
||||||
// read the entity id
|
// read the entity id
|
||||||
CEntityId Id;
|
CEntityId Id;
|
||||||
msgin.serial( Id );
|
msgin.serial( Id );
|
||||||
|
@ -2302,7 +2302,7 @@ void cbSetValue( CMessage& msgin, const std::string &serviceName, NLNET::TServic
|
||||||
void cbModifyValue( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
void cbModifyValue( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||||
{
|
{
|
||||||
H_AUTO(cbModifyValue);
|
H_AUTO(cbModifyValue);
|
||||||
|
|
||||||
// read the creature id
|
// read the creature id
|
||||||
CEntityId Id;
|
CEntityId Id;
|
||||||
msgin.serial( Id );
|
msgin.serial( Id );
|
||||||
|
@ -2316,7 +2316,7 @@ void cbModifyValue( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
||||||
msgin.serial( modifValue );
|
msgin.serial( modifValue );
|
||||||
|
|
||||||
// egs_ecinfo("*** cbModifyValue from service %s modify value %s to %s", serviceName.c_str(), var.c_str(), modifValue.c_str() );
|
// egs_ecinfo("*** cbModifyValue from service %s modify value %s to %s", serviceName.c_str(), var.c_str(), modifValue.c_str() );
|
||||||
|
|
||||||
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( Id );
|
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( Id );
|
||||||
|
|
||||||
if (entity == 0)
|
if (entity == 0)
|
||||||
|
@ -2333,7 +2333,7 @@ void cbModifyValue( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
||||||
void cbTarget( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
void cbTarget( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||||
{
|
{
|
||||||
H_AUTO(cbTarget);
|
H_AUTO(cbTarget);
|
||||||
|
|
||||||
if ( ! Mirror.mirrorIsReady() )
|
if ( ! Mirror.mirrorIsReady() )
|
||||||
{
|
{
|
||||||
nlwarning("<cbTarget> Received from %s service but mirror not yet ready", serviceName.c_str() );
|
nlwarning("<cbTarget> Received from %s service but mirror not yet ready", serviceName.c_str() );
|
||||||
|
@ -2345,7 +2345,7 @@ void cbTarget( CMessage& msgin, const std::string &serviceName, NLNET::TServiceI
|
||||||
// read the entity id
|
// read the entity id
|
||||||
TDataSetRow Id;
|
TDataSetRow Id;
|
||||||
msgin.serial(Id);
|
msgin.serial(Id);
|
||||||
|
|
||||||
// read the target id
|
// read the target id
|
||||||
TDataSetRow targetId;
|
TDataSetRow targetId;
|
||||||
msgin.serial(targetId);
|
msgin.serial(targetId);
|
||||||
|
@ -2361,12 +2361,12 @@ void cbTarget( CMessage& msgin, const std::string &serviceName, NLNET::TServiceI
|
||||||
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr(Id);
|
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr(Id);
|
||||||
CEntityId EentityId=TheDataset.getEntityId(Id);
|
CEntityId EentityId=TheDataset.getEntityId(Id);
|
||||||
CEntityId EtargetId=TheDataset.getEntityId(targetId);
|
CEntityId EtargetId=TheDataset.getEntityId(targetId);
|
||||||
|
|
||||||
if (entity == 0)
|
if (entity == 0)
|
||||||
{
|
{
|
||||||
nlwarning("<cbTarget> Invalid entity Id %s", EentityId.toString().c_str() );
|
nlwarning("<cbTarget> Invalid entity Id %s", EentityId.toString().c_str() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (entity->getId().getType()==RYZOMID::player)
|
if (entity->getId().getType()==RYZOMID::player)
|
||||||
{
|
{
|
||||||
entity->setTarget(EtargetId);
|
entity->setTarget(EtargetId);
|
||||||
|
@ -2381,7 +2381,7 @@ void cbTarget( CMessage& msgin, const std::string &serviceName, NLNET::TServiceI
|
||||||
void cbChangeMode( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
void cbChangeMode( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||||
{
|
{
|
||||||
H_AUTO(cbChangeMode);
|
H_AUTO(cbChangeMode);
|
||||||
|
|
||||||
/*// read the character id
|
/*// read the character id
|
||||||
CEntityId Id;
|
CEntityId Id;
|
||||||
msgin.serial( Id );
|
msgin.serial( Id );
|
||||||
|
@ -2413,7 +2413,7 @@ void cbChangeMode( CMessage& msgin, const std::string &serviceName, NLNET::TServ
|
||||||
void cbChangeBehaviour( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
void cbChangeBehaviour( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||||
{
|
{
|
||||||
H_AUTO(cbChangeBehaviour);
|
H_AUTO(cbChangeBehaviour);
|
||||||
|
|
||||||
// read the character id
|
// read the character id
|
||||||
CEntityId Id;
|
CEntityId Id;
|
||||||
msgin.serial( Id );
|
msgin.serial( Id );
|
||||||
|
@ -2442,7 +2442,7 @@ void cbItemDrop( CMessage& msgin, const std::string &serviceName, NLNET::TServic
|
||||||
{
|
{
|
||||||
nlwarning("cbItemDrop no more allowed");
|
nlwarning("cbItemDrop no more allowed");
|
||||||
// H_AUTO(cbItemDrop);
|
// H_AUTO(cbItemDrop);
|
||||||
//
|
//
|
||||||
// CEntityId user;
|
// CEntityId user;
|
||||||
// uint16 inventory,slot,quantity;
|
// uint16 inventory,slot,quantity;
|
||||||
//
|
//
|
||||||
|
@ -2498,7 +2498,7 @@ void cbItemPickup( NLNET::CMessage& msgin, const std::string &serviceName, NLNET
|
||||||
void cbItemClosePickup( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
void cbItemClosePickup( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||||
{
|
{
|
||||||
H_AUTO(cbItemClosePickup);
|
H_AUTO(cbItemClosePickup);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
|
|
||||||
|
@ -2519,7 +2519,7 @@ void cbItemSwap( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::
|
||||||
{
|
{
|
||||||
H_AUTO(cbItemSwap);
|
H_AUTO(cbItemSwap);
|
||||||
|
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
uint16 slotSrc, slotDst, quantity;
|
uint16 slotSrc, slotDst, quantity;
|
||||||
INVENTORIES::TInventory inventorySrc, inventoryDst;
|
INVENTORIES::TInventory inventorySrc, inventoryDst;
|
||||||
|
@ -2542,7 +2542,7 @@ void cbItemSwap( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::
|
||||||
}
|
}
|
||||||
|
|
||||||
TLogContext_Item_Swap logContext(character->getId());
|
TLogContext_Item_Swap logContext(character->getId());
|
||||||
|
|
||||||
character->setAfkState(false);
|
character->setAfkState(false);
|
||||||
|
|
||||||
// increment inventory counter
|
// increment inventory counter
|
||||||
|
@ -2550,11 +2550,11 @@ void cbItemSwap( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::
|
||||||
character->incInterfaceCounter();
|
character->incInterfaceCounter();
|
||||||
|
|
||||||
// Special case for guilds
|
// Special case for guilds
|
||||||
if (inventorySrc == INVENTORIES::guild || inventoryDst == INVENTORIES::guild)
|
if (inventorySrc == INVENTORIES::guild || inventoryDst == INVENTORIES::guild)
|
||||||
{
|
{
|
||||||
uint16 nGuildSessionCounter;
|
uint16 nGuildSessionCounter;
|
||||||
msgin.serial( nGuildSessionCounter );
|
msgin.serial( nGuildSessionCounter );
|
||||||
|
|
||||||
string sDebug = "<cbItemSwap> user:" + TheDataset.getEntityId(character->getEntityRowId()).toString() + " ";
|
string sDebug = "<cbItemSwap> user:" + TheDataset.getEntityId(character->getEntityRowId()).toString() + " ";
|
||||||
|
|
||||||
CGuild *pGuild = CGuildManager::getInstance()->getGuildFromId( character->getGuildId() );
|
CGuild *pGuild = CGuildManager::getInstance()->getGuildFromId( character->getGuildId() );
|
||||||
|
@ -2608,18 +2608,18 @@ void cbItemSwap( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::
|
||||||
void cbEngage( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbEngage( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbEngage);
|
H_AUTO(cbEngage);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
|
|
||||||
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( charId );
|
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( charId );
|
||||||
|
|
||||||
if (entity == NULL)
|
if (entity == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("<EntityCallbacks::cbEngage> Invalid entity Id %s", charId.toString().c_str() );
|
nlwarning("<EntityCallbacks::cbEngage> Invalid entity Id %s", charId.toString().c_str() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CEntityId targetId = entity->getTarget();
|
CEntityId targetId = entity->getTarget();
|
||||||
|
|
||||||
vector<CSheetId> bricks;
|
vector<CSheetId> bricks;
|
||||||
|
@ -2648,9 +2648,9 @@ void cbDefaultAttack( NLNET::CMessage& msgin, const std::string &serviceName, NL
|
||||||
|
|
||||||
CEntityId entityId;
|
CEntityId entityId;
|
||||||
msgin.serial( entityId );
|
msgin.serial( entityId );
|
||||||
|
|
||||||
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( entityId );
|
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( entityId );
|
||||||
|
|
||||||
if (entity == NULL)
|
if (entity == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("<EntityCallbacks::cbDefaultAttack> Invalid entity Id %s", entityId.toString().c_str() );
|
nlwarning("<EntityCallbacks::cbDefaultAttack> Invalid entity Id %s", entityId.toString().c_str() );
|
||||||
|
@ -2663,7 +2663,7 @@ void cbDefaultAttack( NLNET::CMessage& msgin, const std::string &serviceName, NL
|
||||||
|
|
||||||
CEntityId targetId = entity->getTarget();
|
CEntityId targetId = entity->getTarget();
|
||||||
CPhraseManager::getInstance().defaultAttackSabrina( entityId, targetId );
|
CPhraseManager::getInstance().defaultAttackSabrina( entityId, targetId );
|
||||||
|
|
||||||
} // cbDefaultAttack //
|
} // cbDefaultAttack //
|
||||||
|
|
||||||
|
|
||||||
|
@ -2673,12 +2673,12 @@ void cbDefaultAttack( NLNET::CMessage& msgin, const std::string &serviceName, NL
|
||||||
void cbStun( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbStun( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbStun);
|
H_AUTO(cbStun);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
|
|
||||||
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( charId );
|
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( charId );
|
||||||
|
|
||||||
if (entity == NULL)
|
if (entity == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("<EntityCallbacks::cbStun> Invalid entity Id %s", charId.toString().c_str() );
|
nlwarning("<EntityCallbacks::cbStun> Invalid entity Id %s", charId.toString().c_str() );
|
||||||
|
@ -2695,12 +2695,12 @@ void cbStun( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
||||||
void cbWake( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbWake( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbWake);
|
H_AUTO(cbWake);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
|
|
||||||
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( charId );
|
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( charId );
|
||||||
|
|
||||||
if (entity == NULL)
|
if (entity == NULL)
|
||||||
{
|
{
|
||||||
nlwarning("<EntityCallbacks::cbWake> Invalid entity Id %s", charId.toString().c_str() );
|
nlwarning("<EntityCallbacks::cbWake> Invalid entity Id %s", charId.toString().c_str() );
|
||||||
|
@ -2738,7 +2738,7 @@ void cbExchangeProposal( NLNET::CMessage& msgin, const std::string &serviceName,
|
||||||
void cbAcceptExchangeInvitation( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbAcceptExchangeInvitation( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbAcceptExchangeInvitation);
|
H_AUTO(cbAcceptExchangeInvitation);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
CCharacter * c = PlayerManager.getChar( charId );
|
CCharacter * c = PlayerManager.getChar( charId );
|
||||||
|
@ -2757,7 +2757,7 @@ void cbAcceptExchangeInvitation( NLNET::CMessage& msgin, const std::string &serv
|
||||||
void cbDeclineExchangeInvitation( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbDeclineExchangeInvitation( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbDeclineExchangeInvitation);
|
H_AUTO(cbDeclineExchangeInvitation);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
CCharacter * c = PlayerManager.getChar( charId );
|
CCharacter * c = PlayerManager.getChar( charId );
|
||||||
|
@ -2777,7 +2777,7 @@ void cbDeclineExchangeInvitation( NLNET::CMessage& msgin, const std::string &ser
|
||||||
void cbAcceptExchange( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbAcceptExchange( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbAcceptExchange);
|
H_AUTO(cbAcceptExchange);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
uint8 exchangeId;
|
uint8 exchangeId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
|
@ -2798,7 +2798,7 @@ void cbAcceptExchange( NLNET::CMessage& msgin, const std::string &serviceName, N
|
||||||
void cbEndExchange( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbEndExchange( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbEndExchange);
|
H_AUTO(cbEndExchange);
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
CCharacter * c = PlayerManager.getChar( charId );
|
CCharacter * c = PlayerManager.getChar( charId );
|
||||||
|
@ -2818,7 +2818,7 @@ void cbEndExchange( NLNET::CMessage& msgin, const std::string &serviceName, NLNE
|
||||||
void cbExchangeSeeds( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbExchangeSeeds( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbExchangeSeeds);
|
H_AUTO(cbExchangeSeeds);
|
||||||
|
|
||||||
///\todo : why not an uint64?
|
///\todo : why not an uint64?
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
sint64 quantity;
|
sint64 quantity;
|
||||||
|
@ -2842,7 +2842,7 @@ void cbExchangeSeeds( NLNET::CMessage& msgin, const std::string &serviceName, NL
|
||||||
void cbAnimalMount( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
void cbAnimalMount( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||||
{
|
{
|
||||||
H_AUTO(cbAnimalMount);
|
H_AUTO(cbAnimalMount);
|
||||||
|
|
||||||
CEntityId id;
|
CEntityId id;
|
||||||
msgin.serial( id );
|
msgin.serial( id );
|
||||||
|
|
||||||
|
@ -2914,7 +2914,7 @@ void cbAnimalMount( NLNET::CMessage& msgin, const std::string &serviceName, NLNE
|
||||||
void cbAnimalUnseat( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
void cbAnimalUnseat( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||||
{
|
{
|
||||||
H_AUTO(cbAnimalUnseat);
|
H_AUTO(cbAnimalUnseat);
|
||||||
|
|
||||||
CEntityId id;
|
CEntityId id;
|
||||||
msgin.serial( id );
|
msgin.serial( id );
|
||||||
|
|
||||||
|
@ -2976,7 +2976,7 @@ void cbSetPlayerSeason(NLNET::CMessage& msgin, const std::string &serviceName, N
|
||||||
void cbTeleportPlayer(NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbTeleportPlayer(NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbTeleportPlayer);
|
H_AUTO(cbTeleportPlayer);
|
||||||
|
|
||||||
CEntityId playerEid;
|
CEntityId playerEid;
|
||||||
sint32 x, y, z;
|
sint32 x, y, z;
|
||||||
float t;
|
float t;
|
||||||
|
@ -2987,12 +2987,12 @@ void cbTeleportPlayer(NLNET::CMessage& msgin, const std::string &serviceName, NL
|
||||||
nlRead(msgin, serial, t);
|
nlRead(msgin, serial, t);
|
||||||
|
|
||||||
|
|
||||||
CCharacter *chr = PlayerManager.getChar(playerEid);
|
CCharacter *chr = PlayerManager.getChar(playerEid);
|
||||||
if (!chr)
|
if (!chr)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
chr->teleportCharacter(x, y, z, true, true, t);
|
chr->teleportCharacter(x, y, z, true, true, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3029,7 +3029,7 @@ void cbRcvValidateSourceSpawnReply( NLNET::CMessage& msgin, const std::string &s
|
||||||
// End spawning (either leave it or destroy it)
|
// End spawning (either leave it or destroy it)
|
||||||
harvestSource->spawnEnd( canSpawn );
|
harvestSource->spawnEnd( canSpawn );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! prospectorDataSetRow.isNull() ) // is null for auto-spawned sources
|
if ( ! prospectorDataSetRow.isNull() ) // is null for auto-spawned sources
|
||||||
{
|
{
|
||||||
// Report the sources found (or not found) to the user
|
// Report the sources found (or not found) to the user
|
||||||
|
@ -3052,7 +3052,7 @@ void cbRcvValidateSourceSpawnReply( NLNET::CMessage& msgin, const std::string &s
|
||||||
void cbPlayerUnreachable( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
void cbPlayerUnreachable( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||||
{
|
{
|
||||||
H_AUTO(cbPlayerUnreachable);
|
H_AUTO(cbPlayerUnreachable);
|
||||||
|
|
||||||
CEntityId creatureId;
|
CEntityId creatureId;
|
||||||
msgin.serial( creatureId );
|
msgin.serial( creatureId );
|
||||||
CCreature * creature = CreatureManager.getCreature( creatureId );
|
CCreature * creature = CreatureManager.getCreature( creatureId );
|
||||||
|
@ -3061,7 +3061,7 @@ void cbPlayerUnreachable( NLNET::CMessage& msgin, const std::string &serviceName
|
||||||
nlwarning("<cbPlayerUnreachable> Unknown creature %s", creatureId.toString().c_str() );
|
nlwarning("<cbPlayerUnreachable> Unknown creature %s", creatureId.toString().c_str() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CEntityId charId;
|
CEntityId charId;
|
||||||
msgin.serial( charId );
|
msgin.serial( charId );
|
||||||
CCharacter * character = PlayerManager.getChar( charId );
|
CCharacter * character = PlayerManager.getChar( charId );
|
||||||
|
@ -3070,7 +3070,7 @@ void cbPlayerUnreachable( NLNET::CMessage& msgin, const std::string &serviceName
|
||||||
nlwarning("<cbPlayerUnreachable> Unknown character %s", charId.toString().c_str() );
|
nlwarning("<cbPlayerUnreachable> Unknown character %s", charId.toString().c_str() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do nothing for now, damage removal is done in aggro lost.
|
// Do nothing for now, damage removal is done in aggro lost.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue