Changed: #878 Fix typos in comments/code
This commit is contained in:
parent
2e40a2a593
commit
072a44cac3
3 changed files with 183 additions and 186 deletions
|
@ -56,7 +56,7 @@ void CAiWrapperServer::init(NLLIGO::CLigoConfig * ligoConfig)
|
|||
{
|
||||
|
||||
CPrimitiveContext::instance().CurrentLigoConfig = R2::LigoConfigPtr;
|
||||
// Read the ligo primitive class file
|
||||
// Read the ligo primitive class file
|
||||
// NLLIGO::Register();
|
||||
|
||||
}
|
||||
|
@ -67,65 +67,65 @@ void CAiWrapperServer::init(NLLIGO::CLigoConfig * ligoConfig)
|
|||
void CAiWrapperServer::streamToPdr(NLMISC::IStream& stream, const std::string& primName, CPersistentDataRecord& pdr)
|
||||
{
|
||||
H_AUTO_INST( streamToPdr );
|
||||
CAIPrimitiveParser::init(&pdr);
|
||||
CAIPrimitiveParser::init(&pdr);
|
||||
AI_SHARE::parsePrimStream(stream, primName.c_str());
|
||||
CAIPrimitiveParser::release();
|
||||
CAIPrimitiveParser::release();
|
||||
}
|
||||
|
||||
void CAiWrapperServer::primsToPdr(NLLIGO::CPrimitives *prims, const std::string& primName, CPersistentDataRecord& pdr)
|
||||
{
|
||||
H_AUTO_INST( primsToPdr );
|
||||
CAIPrimitiveParser::init(&pdr);
|
||||
CAIPrimitiveParser::init(&pdr);
|
||||
AI_SHARE::parsePrimNoStream(prims, primName.c_str());
|
||||
CAIPrimitiveParser::release();
|
||||
CAIPrimitiveParser::release();
|
||||
}
|
||||
|
||||
void CAiWrapperServer::pdrToFile(CPersistentDataRecord& pdr, const std::string& pdrName)
|
||||
{
|
||||
{
|
||||
CAIPrimitiveParser::init(&pdr);
|
||||
CAIPrimitiveParser::getInstance().writeFile(pdrName.c_str());
|
||||
CAIPrimitiveParser::release();
|
||||
CAIPrimitiveParser::release();
|
||||
}
|
||||
|
||||
void CAiWrapperServer::fileToPdr(const std::string& pdrName, CPersistentDataRecord& pdr)
|
||||
{
|
||||
{
|
||||
CAIPrimitiveParser::init(&pdr);
|
||||
CAIPrimitiveParser::getInstance().readFile(pdrName.c_str());
|
||||
CAIPrimitiveParser::release();
|
||||
CAIPrimitiveParser::release();
|
||||
}
|
||||
|
||||
void CAiWrapperServer::displayPdr( CPersistentDataRecord& pdr)
|
||||
{
|
||||
CAIPrimitiveParser::init(&pdr);
|
||||
CAIPrimitiveParser::init(&pdr);
|
||||
CAIPrimitiveParser::getInstance().display();
|
||||
CAIPrimitiveParser::release();
|
||||
CAIPrimitiveParser::release();
|
||||
}
|
||||
|
||||
void CAiWrapperServer::clearPdr( CPersistentDataRecord& pdr)
|
||||
{
|
||||
CAIPrimitiveParser::init(&pdr);
|
||||
CAIPrimitiveParser::init(&pdr);
|
||||
CAIPrimitiveParser::getInstance().clear();
|
||||
CAIPrimitiveParser::release();
|
||||
CAIPrimitiveParser::release();
|
||||
}
|
||||
|
||||
void CAiWrapperServer::primitiveFileToPdr(const std::string& primitiveName, CPersistentDataRecord& pdr)
|
||||
{
|
||||
pdr.clear();
|
||||
CAIPrimitiveParser::init(&pdr);
|
||||
CAIPrimitiveParser::init(&pdr);
|
||||
AI_SHARE::parsePrimFile(primitiveName.c_str());
|
||||
CAIPrimitiveParser::release();
|
||||
CAIPrimitiveParser::release();
|
||||
}
|
||||
|
||||
void CAiWrapperServer::stopTest(TSessionId sessionId, uint32 aiInstanceId)
|
||||
{
|
||||
nldebug("Stop Test in session %u (aiInstance %u)", sessionId.asInt(), aiInstanceId);
|
||||
CMessage msgout("R2_STOPLIVE");
|
||||
CMessage msgout("R2_STOPLIVE");
|
||||
bool isBase = true;
|
||||
|
||||
msgout.serial(aiInstanceId);
|
||||
msgout.serial(isBase);
|
||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||
}
|
||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||
}
|
||||
|
||||
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))
|
||||
{
|
||||
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);
|
||||
nlinfo("R2An: startInstance %u", aiInstanceId);
|
||||
CMessage msgout("R2_STARTINSTANCE");
|
||||
CMessage msgout("R2_STARTINSTANCE");
|
||||
msgout.serial(aiInstanceId);
|
||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||
|
||||
|
@ -164,12 +164,12 @@ void CAiWrapperServer::startInstance(TSessionId sessionId, uint32 aiInstanceId)
|
|||
void CAiWrapperServer::stopAct(TSessionId sessionId, uint32 aiInstanceId)
|
||||
{
|
||||
nldebug("Stop Act in session %u (aiInstance %u)", sessionId.asInt(), aiInstanceId);
|
||||
CMessage msgout("R2_STOPLIVE");
|
||||
CMessage msgout("R2_STOPLIVE");
|
||||
msgout.serial(aiInstanceId);
|
||||
bool isBase = false;
|
||||
msgout.serial(isBase);
|
||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||
}
|
||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||
}
|
||||
|
||||
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))
|
||||
{
|
||||
nlwarning("can't serialise data");
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -209,7 +209,7 @@ namespace
|
|||
static std::string aliasToString(uint32 alias)
|
||||
{
|
||||
uint32 staticPart = alias >> 20;
|
||||
uint32 dynPart = alias & ((1 << 21)-1);
|
||||
uint32 dynPart = alias & ((1 << 21)-1);
|
||||
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());
|
||||
|
||||
|
||||
|
||||
|
||||
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
||||
msgout.serial(messageVersion);
|
||||
msgout.serial(nbString);
|
||||
msgout.serial(eid);
|
||||
msgout.serial(str);
|
||||
|
||||
|
||||
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);
|
||||
|
||||
|
||||
|
||||
|
||||
//CMessage msgout("EVENT_NPC_GROUP_SCRIPT");
|
||||
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
||||
msgout.serial(messageVersion);
|
||||
msgout.serial(nbString);
|
||||
msgout.serial(eid);
|
||||
msgout.serial(hpstr);
|
||||
|
||||
|
||||
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());
|
||||
|
||||
|
||||
|
||||
|
||||
//CMessage msgout("EVENT_NPC_GROUP_SCRIPT");
|
||||
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
||||
msgout.serial(messageVersion);
|
||||
msgout.serial(nbString);
|
||||
msgout.serial(eid);
|
||||
msgout.serial(hpstr);
|
||||
|
||||
|
||||
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);
|
||||
eventId = (float)(int) eventId;
|
||||
if (eventId < 0 || eventId > 10) return;
|
||||
|
||||
|
||||
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
||||
msgout.serial(messageVersion);
|
||||
msgout.serial(nbString);
|
||||
msgout.serial(eid);
|
||||
msgout.serial(str);
|
||||
|
||||
|
||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||
|
||||
}
|
||||
|
@ -307,13 +307,13 @@ void CAiWrapperServer::controlNpc(NLMISC::CEntityId clientId, NLMISC::CEntityId
|
|||
uint32 nbString=2;
|
||||
std::string eid = npc.toString();
|
||||
std::string str = NLMISC::toString("()setPlayerController(\"%s\",\"%s\");", npc.toString().c_str(), clientId.toString().c_str());
|
||||
|
||||
|
||||
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
||||
msgout.serial(messageVersion);
|
||||
msgout.serial(nbString);
|
||||
msgout.serial(eid);
|
||||
msgout.serial(str);
|
||||
|
||||
|
||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||
}
|
||||
|
||||
|
@ -324,13 +324,13 @@ void CAiWrapperServer::stopControlNpc(NLMISC::CEntityId clientId, NLMISC::CEntit
|
|||
uint32 nbString=2;
|
||||
std::string eid = npc.toString();
|
||||
std::string str = NLMISC::toString("()clearPlayerController(\"%s\");", npc.toString().c_str());
|
||||
|
||||
|
||||
CMessage msgout("R2_NPC_BOT_SCRIPT_BY_ID");
|
||||
msgout.serial(messageVersion);
|
||||
msgout.serial(nbString);
|
||||
msgout.serial(eid);
|
||||
msgout.serial(str);
|
||||
|
||||
|
||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||
}
|
||||
|
||||
|
@ -339,22 +339,22 @@ void CAiWrapperServer::triggerUserTrigger(const std::string& groupName, uint32 t
|
|||
/*
|
||||
uint32 messageVersion = 1;
|
||||
uint32 nbString=2;
|
||||
|
||||
|
||||
std::string script = NLMISC::toString("()setEvent(%d);", triggerId);
|
||||
|
||||
|
||||
|
||||
|
||||
CMessage msgout("R2_NPC_GROUP_SCRIPT_BY_NAME");
|
||||
msgout.serial(messageVersion);
|
||||
msgout.serial(nbString);
|
||||
msgout.serial(const_cast<std::string&>(groupName));
|
||||
msgout.serial(script);
|
||||
|
||||
|
||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
std::string script = NLMISC::toString("\"()setEvent(%d);\"", triggerId);
|
||||
CMessage msgout("EXEC_COMMAND");
|
||||
|
@ -388,7 +388,7 @@ void CAiWrapperServer::setPioneerRight(NLMISC::CEntityId entityId, const R2::TPi
|
|||
msgout.serial(command);
|
||||
CUnifiedNetwork::getInstance()->send("EGS",msgout);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else if (right == R2::TPioneerRight::Tester)
|
||||
{
|
||||
|
@ -410,7 +410,7 @@ void CAiWrapperServer::setPioneerRight(NLMISC::CEntityId entityId, const R2::TPi
|
|||
msgout.serial(command);
|
||||
CUnifiedNetwork::getInstance()->send("EGS",msgout);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -421,7 +421,7 @@ void CAiWrapperServer::askBotDespawnNotification(NLMISC::CEntityId creatureId, T
|
|||
{
|
||||
NLNET::CMessage msgout("ASK_BOT_DESPAWN_NOTIFICATION");
|
||||
uint32 messageVersion = 1;
|
||||
msgout.serial(messageVersion, alias, creatureId);
|
||||
msgout.serial(messageVersion, alias, creatureId);
|
||||
CUnifiedNetwork::getInstance()->send("AIS",msgout);
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@ void foo()
|
|||
admin_modules_forceLink();
|
||||
}
|
||||
|
||||
|
||||
namespace R2
|
||||
{
|
||||
// The ligo config
|
||||
|
@ -59,8 +58,6 @@ namespace R2
|
|||
CR2LigoConfig R2LigoConfig;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CDynamicScenarioService::forwardToStringManagerModule (CMessage &msgin)
|
||||
{
|
||||
TDataSetRow senderId;
|
||||
|
|
|
@ -194,7 +194,7 @@ void cbClientConnection(CMessage& msgin, const std::string &serviceName, NLNET::
|
|||
msgin.serial( userName, userPriv, userExtended, languageId);
|
||||
msgin.serial( fromAddr );
|
||||
msgin.serial( cookie );
|
||||
#ifdef NL_DEBUG
|
||||
#ifdef NL_DEBUG
|
||||
egs_ecinfo("WEB: received cookie %s from player %u", cookie.toString().c_str(), userId);
|
||||
#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()) );
|
||||
|
@ -227,7 +227,7 @@ void cbClientConnection(CMessage& msgin, const std::string &serviceName, NLNET::
|
|||
|
||||
// set the front end id of this player
|
||||
PlayerManager.setPlayerFrontEndId( userId, serviceId );
|
||||
|
||||
|
||||
const bool betaTester = (userExtended.find(":FBT:") != string::npos);
|
||||
const bool preOrder = (userExtended.find(":PO:") != 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 );
|
||||
// userId = (uint32) longUserId;
|
||||
//
|
||||
//
|
||||
// CCharacter * c = PlayerManager.getActiveChar( userId );
|
||||
// if( c != 0 )
|
||||
// {
|
||||
// charId = c->getId();
|
||||
//
|
||||
// // send userId/charId association to the FE
|
||||
// CMessage msgout("CL_ID");
|
||||
// CMessage msgout("CL_ID");
|
||||
// msgout.serial(userId);
|
||||
// msgout.serial( charId );
|
||||
// uint16 frontEndId = PlayerManager.getPlayerFrontEndId( userId );
|
||||
// CUnifiedNetwork::getInstance()->send(frontEndId, msgout);
|
||||
//
|
||||
//
|
||||
// // send acknowledge to client for received Enter message
|
||||
// CBitMemStream 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 )
|
||||
{
|
||||
H_AUTO(cbClientReady);
|
||||
|
||||
|
||||
// read the player id
|
||||
CEntityId characterId;
|
||||
msgin.serial( characterId );
|
||||
|
@ -346,7 +346,7 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
|||
disconnectUser( PlayerManager.getPlayerId( characterId ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// add the character in the GPMS
|
||||
COfflineEntityState state;
|
||||
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
|
||||
// \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() );
|
||||
|
||||
|
||||
NLNET::CMessage msgout( "IMPULSION_ID" );
|
||||
CEntityId id = c->getId();
|
||||
msgout.serial( id );
|
||||
|
@ -373,11 +373,11 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
|||
{
|
||||
uint32 shardId = IService::getInstance()->getShardId();
|
||||
bms.serial(shardId);
|
||||
|
||||
|
||||
CConfigFile::CVar *var = IService::getInstance()->ConfigFile.getVarPtr("WebSrvHost");
|
||||
string webHost = (var != NULL ? var->asString() : "");
|
||||
bms.serial(webHost);
|
||||
|
||||
|
||||
msgout.serialBufferWithSize((uint8*)bms.buffer(), bms.length());
|
||||
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());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Add player in the mirror // createEntity() will produce warnings if it fails
|
||||
if ( ! Mirror.createEntity( characterId ) )
|
||||
{
|
||||
|
@ -416,7 +416,7 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
|||
uint32 in = c->getStartupInstance();
|
||||
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);
|
||||
|
||||
// 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() );
|
||||
}
|
||||
|
||||
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->setInstanceNumber( in );
|
||||
}
|
||||
|
@ -497,26 +497,26 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
|||
{
|
||||
c->setWhoSeesMe(UINT64_CONSTANT(0xffffffffffffffff));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (!IsRingShard && player->havePriv(AlwaysInvisiblePriv))
|
||||
{
|
||||
c->setWhoSeesMe(uint64(0));
|
||||
}
|
||||
|
||||
|
||||
TheDataset.declareEntity( entityIndex ); // after the writing of properties to mirror
|
||||
|
||||
//#ifdef NL_DEBUG
|
||||
egs_ecinfo("Client ready (entity %s (Row %u) added to mirror)", characterId.toString().c_str(), entityIndex.getIndex() );
|
||||
//#endif
|
||||
|
||||
|
||||
// player enter the game
|
||||
PlayerManager.setEnterFlag( characterId, true );
|
||||
|
||||
|
||||
// ask backup for offline commands file
|
||||
COfflineCharacterCommand::getInstance()->characterOnline( characterId );
|
||||
|
||||
|
||||
if( CGameEventManager::getInstance().getChannelEventId() != TChanID::Unknown )
|
||||
{
|
||||
if( c->haveAnyPrivilege() )
|
||||
|
@ -538,7 +538,7 @@ void cbClientReady( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
|||
|
||||
//---------------------------------------------------
|
||||
// finalizeClientReady :
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------
|
||||
void finalizeClientReady( uint32 userId, uint32 index )
|
||||
{
|
||||
|
@ -546,21 +546,21 @@ void finalizeClientReady( uint32 userId, uint32 index )
|
|||
|
||||
CPlayer *player = PlayerManager.getPlayer(userId);
|
||||
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 );
|
||||
|
||||
|
||||
// get the char infos
|
||||
CCharacter * c = PlayerManager.getChar( userId, index );
|
||||
BOMB_IF( c == NULL, toString("Character %u of user %u not created", index, userId), return);
|
||||
|
||||
// get character CEntityId
|
||||
CEntityId characterId = c->getId();
|
||||
|
||||
|
||||
c->sendDynamicSystemMessage( c->getId(), "OPS_WELCOME" );
|
||||
// c->sendMessageToClient( c->getId(), "OPS_WELCOME" );
|
||||
|
||||
c->sendMessageOfTheDay();
|
||||
|
||||
|
||||
c->checkSkillTreeForLockedSkill();
|
||||
|
||||
c->setDatabase();
|
||||
|
@ -595,7 +595,7 @@ void finalizeClientReady( uint32 userId, uint32 index )
|
|||
nlwarning("<cbclientReady : user %s is not in his guild>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
c->resetFameDatabase();
|
||||
|
||||
// notify player respawn points system that player is ready
|
||||
|
@ -654,7 +654,7 @@ void finalizeClientReady( uint32 userId, uint32 index )
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// check sell store
|
||||
c->checkSellStore();
|
||||
|
||||
|
@ -681,13 +681,13 @@ void finalizeClientReady( uint32 userId, uint32 index )
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// for GM player, trigger a 'infos' command to remember their persistent state
|
||||
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);
|
||||
|
||||
} // finalizeClientReady //
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------
|
||||
// cbClientDisconnection :
|
||||
|
@ -696,7 +696,7 @@ void finalizeClientReady( uint32 userId, uint32 index )
|
|||
void cbClientDisconnection(CMessage& msgin, const string &serviceName, NLNET::TServiceId serviceId)
|
||||
{
|
||||
H_AUTO(cbClientDisconnection);
|
||||
|
||||
|
||||
// read the player id
|
||||
uint32 userId;
|
||||
msgin.serial( userId );
|
||||
|
@ -733,7 +733,7 @@ void cbClientDisconnection(CMessage& msgin, const string &serviceName, NLNET::TS
|
|||
void disconnectUser(uint32 userId)
|
||||
{
|
||||
H_AUTO(disconnectUser);
|
||||
|
||||
|
||||
PlayerManager.disconnectPlayer( userId );
|
||||
}
|
||||
|
||||
|
@ -744,7 +744,7 @@ void disconnectUser(uint32 userId)
|
|||
void cbSelectChar( CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId )
|
||||
{
|
||||
H_AUTO(cbSelectChar);
|
||||
|
||||
|
||||
// read the player id
|
||||
// uint64 longUserId;
|
||||
uint32 userId;
|
||||
|
@ -770,7 +770,7 @@ void cbSelectChar( CMessage& msgin, const std::string &serviceName, NLNET::TServ
|
|||
{
|
||||
// get the char infos
|
||||
CCharacter * ch = PlayerManager.getChar( userId, index );
|
||||
|
||||
|
||||
if( ch != 0 )
|
||||
{
|
||||
// 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
|
||||
ch->setStartupInstance(instanceId);
|
||||
|
||||
|
||||
// Send userId/charId association to the FE (IMPULSION_ID becomes valid from now on)
|
||||
CEntityId charId = ch->getId();
|
||||
PlayerManager.setActiveCharForPlayer( userId, index, charId );
|
||||
CMessage msgout2("CL_ID");
|
||||
CMessage msgout2("CL_ID");
|
||||
msgout2.serial( userId );
|
||||
msgout2.serial( charId );
|
||||
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.)
|
||||
ch->sendUserChar( userId, 0 /*auto*/, R2::TUserRole::ur_player );
|
||||
}
|
||||
|
||||
|
||||
// send CEntityId/name association to the IOS
|
||||
// ch->registerName();
|
||||
|
||||
// ch->registerName();
|
||||
|
||||
// send acknowledge to client for received Enter message (new: it includes version handshake)
|
||||
CBitMemStream 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.serialBufferWithSize((uint8*)bms2.buffer(), bms2.length());
|
||||
CUnifiedNetwork::getInstance()->send( frontEndId, msgout3 );
|
||||
|
||||
|
||||
// // Remove user language from IOS, we don't need it anymore
|
||||
// CMessage msgout4("REMOVE_USER_LANGUAGE");
|
||||
// msgout4.serial(userId);
|
||||
// CUnifiedNetwork::getInstance()->send("IOS", msgout4);
|
||||
|
||||
|
||||
if( CPVPManager2::getInstance()->inSafeZone( ch->getPosition() ) )
|
||||
{
|
||||
// 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 )
|
||||
{
|
||||
H_AUTO(cbCheckName);
|
||||
|
||||
|
||||
uint64 longUid;
|
||||
uint32 userId;
|
||||
CCheckNameMsg checkNameMsg;
|
||||
|
||||
|
||||
msgin.serial( longUid );
|
||||
userId = (uint32) longUid;
|
||||
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 )
|
||||
{
|
||||
H_AUTO(cbCreateChar);
|
||||
|
||||
|
||||
// read the player id
|
||||
uint64 longUserId;
|
||||
uint32 userId;
|
||||
msgin.serial( longUserId );
|
||||
userId = (uint32) longUserId;
|
||||
|
||||
|
||||
CCreateCharMsg createCharMsg;
|
||||
createCharMsg.serial( msgin );
|
||||
|
||||
|
||||
// Yoyo: fix to force new newbieland.
|
||||
if(UseNewNewbieLandStartingPoint)
|
||||
{
|
||||
|
@ -971,7 +971,7 @@ void cbCreateChar( CMessage& msgin, const std::string &serviceName, NLNET::TServ
|
|||
createCharMsg.Name[i] = createCharMsg.Name[i] - 'A' + 'a';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CCreateCharErrorMsg createCharErrorMsg;
|
||||
if( ! CCharacter::checkCreateParams( createCharMsg, createCharErrorMsg, userId ) )
|
||||
{
|
||||
|
@ -1028,7 +1028,7 @@ CreationFailed:
|
|||
sendCharactersSummary( PlayerManager.getPlayer( userId ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
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
|
||||
CCharacter * ch = new CCharacter();
|
||||
|
||||
|
||||
createCharMsg.Slot;
|
||||
|
||||
CEntityId charId = PlayerManager.createCharacterId( userId, createCharMsg.Slot );
|
||||
|
||||
ch->setId( charId );
|
||||
ch->setId( charId );
|
||||
ch->setName( createCharMsg.Name );
|
||||
// ch->setSurname( string("unknown") );
|
||||
|
||||
|
@ -1092,7 +1092,7 @@ void cbCreateChar_part2(uint32 userId, const CCreateCharMsg &createCharMsg, bool
|
|||
{
|
||||
nlwarning( "(PS)<cbCreateChar> Error: %s", e.what() );
|
||||
}
|
||||
|
||||
|
||||
PlayerManager.savePlayerChar( userId, createCharMsg.Slot );
|
||||
|
||||
// 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();
|
||||
// charInfo.setCivilisation(ch->
|
||||
// charInfo.setCult(
|
||||
// no respawn points
|
||||
// no respawn points
|
||||
IShardUnifierEvent::getInstance()->onNewChar(charInfo);
|
||||
}
|
||||
} // cbCreateChar //
|
||||
|
@ -1123,7 +1123,7 @@ void cbCreateChar_part2(uint32 userId, const CCreateCharMsg &createCharMsg, bool
|
|||
void sendIfNameIsValide( uint32 userId, bool nameValide )
|
||||
{
|
||||
H_AUTO(sendIfNameIsValide);
|
||||
|
||||
|
||||
CBitMemStream bmsName;
|
||||
if ( ! GenericMsgManager.pushNameToStream( "CONNECTION:VALID_NAME", bmsName) )
|
||||
{
|
||||
|
@ -1132,11 +1132,11 @@ void sendIfNameIsValide( uint32 userId, bool nameValide )
|
|||
}
|
||||
uint8 valide = nameValide;
|
||||
bmsName.serial( valide );
|
||||
|
||||
|
||||
CMessage msgoutName( "IMPULSION_UID" );
|
||||
msgoutName.serial( userId );
|
||||
msgoutName.serialBufferWithSize((uint8*)bmsName.buffer(), bmsName.length());
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
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 )
|
||||
{
|
||||
H_AUTO(cbDeleteChar);
|
||||
|
||||
|
||||
// read the player id
|
||||
uint64 longUserId;
|
||||
uint32 userId;
|
||||
msgin.serial( longUserId );
|
||||
userId = (uint32) longUserId;
|
||||
|
||||
|
||||
uint8 characterIndex;
|
||||
msgin.serial( characterIndex );
|
||||
|
||||
|
||||
CPlayer* player = PlayerManager.getPlayer( userId );
|
||||
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 );
|
||||
BsiGlobal.deleteFile( fileName );
|
||||
|
||||
|
||||
fileName = charPath+NLMISC::toString( "account_%u_%d.xml.backup", userId, index );
|
||||
BsiGlobal.deleteFile( fileName );
|
||||
|
||||
|
||||
fileName = charPath+NLMISC::toString( "account_%u_%d.bin", userId, index );
|
||||
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 )
|
||||
{
|
||||
H_AUTO(sendCharactersSummary);
|
||||
|
||||
|
||||
if ( player == NULL )
|
||||
return;
|
||||
|
||||
|
@ -1241,14 +1241,14 @@ void sendCharactersSummary( CPlayer *player, bool AllAutorized, uint32 bitfieldO
|
|||
{
|
||||
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)
|
||||
{
|
||||
for ( uint i=0, len=(uint)chars.size(); i!=len; ++i )
|
||||
{
|
||||
{
|
||||
chars[i].HasEditSession = ((bitfieldOwnerOfEditSession & (1 << i)) != 0);
|
||||
}
|
||||
}
|
||||
|
@ -1302,7 +1302,7 @@ void sendCharactersSummary( CPlayer *player, bool AllAutorized, uint32 bitfieldO
|
|||
bms.serialCont (shardNames);
|
||||
|
||||
// send privileges in all cases
|
||||
std::string priv;
|
||||
std::string priv;
|
||||
priv = player->getUserPriv();
|
||||
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)
|
||||
{
|
||||
H_AUTO(cbEntityPos);
|
||||
|
||||
|
||||
CEntityId id;
|
||||
sint32 x, y, z;
|
||||
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)
|
||||
{
|
||||
H_AUTO(cbTpAcknowledge);
|
||||
|
||||
|
||||
CEntityId 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 );
|
||||
ch->setTarget( CEntityId::Unknown );
|
||||
|
||||
// player still intangible for a few seconds
|
||||
// player still intangible for a few seconds
|
||||
ch->setIntangibleEndDate( CTickEventHandler::getGameCycle() + IntangibleTimeAfterTP );
|
||||
|
||||
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() );
|
||||
}
|
||||
|
||||
|
||||
// respawn the pets if needed
|
||||
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(),
|
||||
in,
|
||||
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) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1543,12 +1543,12 @@ void cbClientTpAck( NLNET::CMessage& msgin, const std::string &serviceName, NLNE
|
|||
} // cbTpAcknowledge //
|
||||
|
||||
//---------------------------------------------------
|
||||
// cbLeaveTeam: a player
|
||||
// cbLeaveTeam: a player
|
||||
//---------------------------------------------------
|
||||
void cbLeaveTeam( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::TServiceId serviceId)
|
||||
{
|
||||
H_AUTO(cbLeaveTeam);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
msgin.serial( 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)
|
||||
{
|
||||
H_AUTO(cbJoinTeam);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
msgin.serial( 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)
|
||||
{
|
||||
H_AUTO(cbJoinTeamDecline);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
msgin.serial( 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)
|
||||
{
|
||||
H_AUTO(cbJoinTeamProposal);
|
||||
|
||||
|
||||
CEntityId 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)
|
||||
{
|
||||
H_AUTO(cbKickTeammate);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
uint8 memberIndex;
|
||||
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)
|
||||
{
|
||||
H_AUTO(cbHarvest);
|
||||
|
||||
|
||||
CEntityId 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)
|
||||
{
|
||||
H_AUTO(cbHarvestClose);
|
||||
|
||||
|
||||
CEntityId 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)
|
||||
{
|
||||
H_AUTO(cbHarvestDeposit);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
msgin.serial( charId );
|
||||
|
||||
|
@ -1725,7 +1725,7 @@ void cbHarvestDeposit( NLNET::CMessage& msgin, const std::string &serviceName, N
|
|||
nlerror( "character->harvestDeposit(true);" ); // TODO
|
||||
/*character->depositSearchSkill(skill);
|
||||
character->openHarvest();*/
|
||||
|
||||
|
||||
// character->sendMessageToClient( character->getId(), "WOS_HARVEST_SEARCHING" );
|
||||
nlerror( "CZoneManager::getInstance().harvestDeposit(character);" );
|
||||
|
||||
|
@ -1741,7 +1741,7 @@ void cbHarvestDeposit( NLNET::CMessage& msgin, const std::string &serviceName, N
|
|||
// Changed : Wait new harvest rules ////////////////////////////////////////////////////
|
||||
|
||||
// character->setBehaviour( MBEHAV::HARVESTING );
|
||||
|
||||
|
||||
} // 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)
|
||||
{
|
||||
H_AUTO(cbHarvestMPDestroyed);
|
||||
|
||||
|
||||
CEntityId 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)
|
||||
{
|
||||
H_AUTO(cbHarvestInterrupted);
|
||||
|
||||
|
||||
CEntityId 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)
|
||||
{
|
||||
H_AUTO(cbHarvestDB);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
CSheetId sheet;
|
||||
uint16 quantity;
|
||||
uint16 minQuality;
|
||||
uint16 maxQuality;
|
||||
|
||||
|
||||
msgin.serial( charId );
|
||||
msgin.serial( sheet );
|
||||
msgin.serial( quantity );
|
||||
|
@ -1868,7 +1868,7 @@ void cbHarvestDB( NLNET::CMessage& msgin, const std::string &serviceName, NLNET:
|
|||
character->staticActionInProgress(true);
|
||||
|
||||
CTempInventory *invTemp = (CTempInventory*)(CInventoryBase*)character->getInventory(INVENTORIES::temporary);
|
||||
|
||||
|
||||
for (uint32 i = 0 ; i < invTemp->getSlotCount(); ++i )
|
||||
{
|
||||
if (i != 0 )
|
||||
|
@ -1880,7 +1880,7 @@ void cbHarvestDB( NLNET::CMessage& msgin, const std::string &serviceName, NLNET:
|
|||
{
|
||||
invTemp->setDispQuantity(i, quantity);
|
||||
invTemp->setDispSheetId(i, sheet);
|
||||
}
|
||||
}
|
||||
invTemp->setDispQuality(i, 0);
|
||||
//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)
|
||||
{
|
||||
H_AUTO(cbClearHarvestDB);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
msgin.serial( charId );
|
||||
|
||||
|
@ -1979,7 +1979,7 @@ void cbClearHarvestDB( NLNET::CMessage& msgin, const std::string &serviceName, N
|
|||
|
||||
uint16 quantity;
|
||||
msgin.serial( quantity );
|
||||
|
||||
|
||||
uint16 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)
|
||||
{
|
||||
H_AUTO(cbFightingTarget);
|
||||
|
||||
|
||||
CEntityId IdCharacter, Target;
|
||||
|
||||
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)
|
||||
{
|
||||
H_AUTO(cbAnimalCommand);
|
||||
|
||||
|
||||
CEntityId entity;
|
||||
uint8 beastIndex;
|
||||
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)
|
||||
{
|
||||
H_AUTO(cbTradeBuySomething);
|
||||
|
||||
|
||||
CEntityId player;
|
||||
uint8 ItemNumber;
|
||||
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)
|
||||
{
|
||||
H_AUTO(cbAddSurvivePact);
|
||||
|
||||
|
||||
CEntityId player;
|
||||
uint8 PactNature, PactType;
|
||||
|
||||
|
@ -2230,7 +2230,7 @@ void cbFameChange( NLNET::CMessage& msgin, const std::string &serviceName, uint1
|
|||
// read the creature id
|
||||
CEntityId Id;
|
||||
msgin.serial( Id );
|
||||
|
||||
|
||||
// read creature sheet id
|
||||
uint32 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 )
|
||||
{
|
||||
H_AUTO(cbSetValue);
|
||||
|
||||
|
||||
// read the entity id
|
||||
CEntityId 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 )
|
||||
{
|
||||
H_AUTO(cbModifyValue);
|
||||
|
||||
|
||||
// read the creature id
|
||||
CEntityId Id;
|
||||
msgin.serial( Id );
|
||||
|
@ -2316,7 +2316,7 @@ void cbModifyValue( CMessage& msgin, const std::string &serviceName, NLNET::TSer
|
|||
msgin.serial( modifValue );
|
||||
|
||||
// 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 );
|
||||
|
||||
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 )
|
||||
{
|
||||
H_AUTO(cbTarget);
|
||||
|
||||
|
||||
if ( ! Mirror.mirrorIsReady() )
|
||||
{
|
||||
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
|
||||
TDataSetRow Id;
|
||||
msgin.serial(Id);
|
||||
|
||||
|
||||
// read the target id
|
||||
TDataSetRow targetId;
|
||||
msgin.serial(targetId);
|
||||
|
@ -2361,12 +2361,12 @@ void cbTarget( CMessage& msgin, const std::string &serviceName, NLNET::TServiceI
|
|||
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr(Id);
|
||||
CEntityId EentityId=TheDataset.getEntityId(Id);
|
||||
CEntityId EtargetId=TheDataset.getEntityId(targetId);
|
||||
|
||||
|
||||
if (entity == 0)
|
||||
{
|
||||
nlwarning("<cbTarget> Invalid entity Id %s", EentityId.toString().c_str() );
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (entity->getId().getType()==RYZOMID::player)
|
||||
{
|
||||
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 )
|
||||
{
|
||||
H_AUTO(cbChangeMode);
|
||||
|
||||
|
||||
/*// read the character id
|
||||
CEntityId 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 )
|
||||
{
|
||||
H_AUTO(cbChangeBehaviour);
|
||||
|
||||
|
||||
// read the character id
|
||||
CEntityId Id;
|
||||
msgin.serial( Id );
|
||||
|
@ -2442,7 +2442,7 @@ void cbItemDrop( CMessage& msgin, const std::string &serviceName, NLNET::TServic
|
|||
{
|
||||
nlwarning("cbItemDrop no more allowed");
|
||||
// H_AUTO(cbItemDrop);
|
||||
//
|
||||
//
|
||||
// CEntityId user;
|
||||
// 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 )
|
||||
{
|
||||
H_AUTO(cbItemClosePickup);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
msgin.serial( charId );
|
||||
|
||||
|
@ -2519,7 +2519,7 @@ void cbItemSwap( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::
|
|||
{
|
||||
H_AUTO(cbItemSwap);
|
||||
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
uint16 slotSrc, slotDst, quantity;
|
||||
INVENTORIES::TInventory inventorySrc, inventoryDst;
|
||||
|
@ -2542,7 +2542,7 @@ void cbItemSwap( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::
|
|||
}
|
||||
|
||||
TLogContext_Item_Swap logContext(character->getId());
|
||||
|
||||
|
||||
character->setAfkState(false);
|
||||
|
||||
// increment inventory counter
|
||||
|
@ -2550,11 +2550,11 @@ void cbItemSwap( NLNET::CMessage& msgin, const std::string &serviceName, NLNET::
|
|||
character->incInterfaceCounter();
|
||||
|
||||
// Special case for guilds
|
||||
if (inventorySrc == INVENTORIES::guild || inventoryDst == INVENTORIES::guild)
|
||||
if (inventorySrc == INVENTORIES::guild || inventoryDst == INVENTORIES::guild)
|
||||
{
|
||||
uint16 nGuildSessionCounter;
|
||||
msgin.serial( nGuildSessionCounter );
|
||||
|
||||
|
||||
string sDebug = "<cbItemSwap> user:" + TheDataset.getEntityId(character->getEntityRowId()).toString() + " ";
|
||||
|
||||
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)
|
||||
{
|
||||
H_AUTO(cbEngage);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
msgin.serial( charId );
|
||||
|
||||
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( charId );
|
||||
|
||||
|
||||
if (entity == NULL)
|
||||
{
|
||||
nlwarning("<EntityCallbacks::cbEngage> Invalid entity Id %s", charId.toString().c_str() );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
CEntityId targetId = entity->getTarget();
|
||||
|
||||
vector<CSheetId> bricks;
|
||||
|
@ -2648,9 +2648,9 @@ void cbDefaultAttack( NLNET::CMessage& msgin, const std::string &serviceName, NL
|
|||
|
||||
CEntityId entityId;
|
||||
msgin.serial( entityId );
|
||||
|
||||
|
||||
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( entityId );
|
||||
|
||||
|
||||
if (entity == NULL)
|
||||
{
|
||||
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();
|
||||
CPhraseManager::getInstance().defaultAttackSabrina( entityId, targetId );
|
||||
|
||||
|
||||
} // 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)
|
||||
{
|
||||
H_AUTO(cbStun);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
msgin.serial( charId );
|
||||
|
||||
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( charId );
|
||||
|
||||
|
||||
if (entity == NULL)
|
||||
{
|
||||
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)
|
||||
{
|
||||
H_AUTO(cbWake);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
msgin.serial( charId );
|
||||
|
||||
CEntityBase* entity = CEntityBaseManager::getEntityBasePtr( charId );
|
||||
|
||||
|
||||
if (entity == NULL)
|
||||
{
|
||||
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)
|
||||
{
|
||||
H_AUTO(cbAcceptExchangeInvitation);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
msgin.serial( 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)
|
||||
{
|
||||
H_AUTO(cbDeclineExchangeInvitation);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
msgin.serial( 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)
|
||||
{
|
||||
H_AUTO(cbAcceptExchange);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
uint8 exchangeId;
|
||||
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)
|
||||
{
|
||||
H_AUTO(cbEndExchange);
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
msgin.serial( 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)
|
||||
{
|
||||
H_AUTO(cbExchangeSeeds);
|
||||
|
||||
|
||||
///\todo : why not an uint64?
|
||||
CEntityId charId;
|
||||
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 )
|
||||
{
|
||||
H_AUTO(cbAnimalMount);
|
||||
|
||||
|
||||
CEntityId 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 )
|
||||
{
|
||||
H_AUTO(cbAnimalUnseat);
|
||||
|
||||
|
||||
CEntityId 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)
|
||||
{
|
||||
H_AUTO(cbTeleportPlayer);
|
||||
|
||||
|
||||
CEntityId playerEid;
|
||||
sint32 x, y, z;
|
||||
float t;
|
||||
|
@ -2987,12 +2987,12 @@ void cbTeleportPlayer(NLNET::CMessage& msgin, const std::string &serviceName, NL
|
|||
nlRead(msgin, serial, t);
|
||||
|
||||
|
||||
CCharacter *chr = PlayerManager.getChar(playerEid);
|
||||
CCharacter *chr = PlayerManager.getChar(playerEid);
|
||||
if (!chr)
|
||||
{
|
||||
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)
|
||||
harvestSource->spawnEnd( canSpawn );
|
||||
}
|
||||
|
||||
|
||||
if ( ! prospectorDataSetRow.isNull() ) // is null for auto-spawned sources
|
||||
{
|
||||
// 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)
|
||||
{
|
||||
H_AUTO(cbPlayerUnreachable);
|
||||
|
||||
|
||||
CEntityId creatureId;
|
||||
msgin.serial( 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() );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
CEntityId charId;
|
||||
msgin.serial( 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() );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Do nothing for now, damage removal is done in aggro lost.
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue