mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 19:29:09 +00:00
Convert plUUID and its cascade of dependencies to plString
This commit is contained in:
@ -700,19 +700,12 @@ void plNetMsgStreamedObject::WriteVersion(hsStream* s, hsResMgr* mgr)
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// debug
|
||||
std::string plNetMsgSDLState::AsStdString() const
|
||||
plString plNetMsgSDLState::AsString() const
|
||||
{
|
||||
std::string s;
|
||||
|
||||
ISetDescName(); // set desc name for debug if necessary
|
||||
|
||||
// xtl::format(s,"object:%s, SDL:%s, initial:%d, %s",
|
||||
// ObjectInfo()->GetObjectName(), fDescName.c_str(), fIsInitialState, plNetMsgStreamedObject::AsStdString().c_str() );
|
||||
|
||||
xtl::format(s,"object:%s, initial:%d, %s",
|
||||
ObjectInfo()->GetObjectName(), fIsInitialState, plNetMsgStreamedObject::AsStdString().c_str() );
|
||||
|
||||
return s;
|
||||
return plString::Format("object:%s, initial:%d, %s",
|
||||
ObjectInfo()->GetObjectName(), fIsInitialState, plNetMsgStreamedObject::AsString().c_str() );
|
||||
}
|
||||
|
||||
//
|
||||
@ -1119,7 +1112,7 @@ int plNetMsgMemberUpdate::IPokeBuffer(hsStream* stream, UInt32 peekOptions)
|
||||
if (bytes)
|
||||
{
|
||||
// FIX ME to something nice
|
||||
fMemberInfo.GetClientGuid()->SetClientKey("");
|
||||
fMemberInfo.GetClientGuid()->SetClientKey(_TEMP_CONVERT_FROM_LITERAL(""));
|
||||
fMemberInfo.GetClientGuid()->SetAccountUUID(plUUID());
|
||||
fMemberInfo.Poke(stream, peekOptions);
|
||||
stream->WriteByte(fAddMember);
|
||||
|
@ -65,8 +65,6 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
|
||||
#include "pnNetBase/pnNetBase.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
class plMessage;
|
||||
class plUUID;
|
||||
|
||||
@ -246,11 +244,11 @@ public:
|
||||
void InitReplyFieldsFrom(plNetMessage * msg);
|
||||
|
||||
// debug
|
||||
virtual std::string AsStdString() const
|
||||
virtual plString AsString() const
|
||||
{
|
||||
const char* delim = "";
|
||||
|
||||
std::stringstream ss;
|
||||
plStringStream ss;
|
||||
if ( GetHasPlayerID() )
|
||||
{
|
||||
ss << delim << "p:" << GetPlayerID();
|
||||
@ -263,7 +261,7 @@ public:
|
||||
}
|
||||
if ( GetHasAcctUUID() )
|
||||
{
|
||||
ss << delim << "a:" << GetAcctUUID()->AsStdString();
|
||||
ss << delim << "a:" << GetAcctUUID()->AsString();
|
||||
delim = ",";
|
||||
}
|
||||
if ( IsBitSet(kHasVersion) )
|
||||
@ -272,7 +270,7 @@ public:
|
||||
delim = ",";
|
||||
}
|
||||
|
||||
return ss.str().c_str();
|
||||
return ss.GetString();
|
||||
}
|
||||
};
|
||||
|
||||
@ -331,12 +329,10 @@ public:
|
||||
void WriteVersion(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
// debug
|
||||
std::string AsStdString() const
|
||||
plString AsString() const
|
||||
{
|
||||
std::string s;
|
||||
char tmp[256];
|
||||
xtl::format(s,"object=%s, %s",fObjectHelper.GetUoid().StringIze(tmp), plNetMessage::AsStdString().c_str());
|
||||
return s;
|
||||
return plString::Format("object=%s, %s",fObjectHelper.GetUoid().StringIze(tmp), plNetMessage::AsString().c_str());
|
||||
}
|
||||
|
||||
};
|
||||
@ -409,7 +405,7 @@ public:
|
||||
void SetIsAvatarState(bool b) { fIsAvatarState = b; }
|
||||
|
||||
// debug
|
||||
std::string AsStdString() const;
|
||||
plString AsString() const;
|
||||
bool IsInitialState() const {return fIsInitialState!=0; }
|
||||
void SetIsInitialState( bool v ) { fIsInitialState=v; }
|
||||
|
||||
@ -509,12 +505,10 @@ public:
|
||||
void WriteVersion(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
// debug
|
||||
std::string AsStdString() const
|
||||
plString AsString() const
|
||||
{
|
||||
std::string s;
|
||||
const char* noc=plFactory::GetTheFactory()->GetNameOfClass(StreamInfo()->GetStreamType());
|
||||
xtl::format(s,"%s %s",plNetMsgStream::AsStdString().c_str(), noc ? noc : "?");
|
||||
return s;
|
||||
return plString::Format("%s %s",plNetMsgStream::AsString().c_str(), noc ? noc : "?");
|
||||
}
|
||||
};
|
||||
|
||||
@ -562,13 +556,11 @@ public:
|
||||
|
||||
|
||||
// debug
|
||||
std::string AsStdString() const
|
||||
plString AsString() const
|
||||
{
|
||||
std::string s;
|
||||
char tmp[256];
|
||||
xtl::format(s,"object=%s initial=%d, %s",fObjectHelper.GetUoid().StringIze(tmp), fIsInitialState,
|
||||
plNetMsgGameMessage::AsStdString().c_str());
|
||||
return s;
|
||||
return plString::Format("object=%s initial=%d, %s",fObjectHelper.GetUoid().StringIze(tmp), fIsInitialState,
|
||||
plNetMsgGameMessage::AsString().c_str());
|
||||
}
|
||||
};
|
||||
|
||||
@ -805,11 +797,9 @@ public:
|
||||
void WriteVersion(hsStream* s, hsResMgr* mgr);
|
||||
|
||||
// debug
|
||||
std::string AsStdString() const
|
||||
plString AsStdString() const
|
||||
{
|
||||
std::string s;
|
||||
xtl::format(s,"lockReq=%d, %s",fLockRequest, plNetMsgStreamedObject::AsStdString().c_str());
|
||||
return s;
|
||||
return plString::Format("lockReq=%d, %s",fLockRequest, plNetMsgStreamedObject::AsString().c_str());
|
||||
}
|
||||
};
|
||||
|
||||
@ -991,18 +981,16 @@ public:
|
||||
const hsBitVector& GetRegionsICareAbout() const { return fRegionsICareAbout; }
|
||||
const hsBitVector& GetRegionsImIn() const { return fRegionsImIn; }
|
||||
|
||||
std::string AsStdString() const
|
||||
plString AsStdString() const
|
||||
{
|
||||
std::string s;
|
||||
std::string b1, b2;
|
||||
plString b1, b2;
|
||||
int i;
|
||||
for(i=0;i<fRegionsImIn.GetNumBitVectors(); i++)
|
||||
b1 += xtl::format("0x%x ", fRegionsImIn.GetBitVector(i)).c_str();
|
||||
b1 += plString::Format("0x%x ", fRegionsImIn.GetBitVector(i));
|
||||
for(i=0;i<fRegionsICareAbout.GetNumBitVectors(); i++)
|
||||
b2 += xtl::format("0x%x ", fRegionsICareAbout.GetBitVector(i)).c_str();
|
||||
xtl::format( s, "rgnsImIn:%s, rgnsICareAbout:%s, %s",
|
||||
b1.c_str(), b2.c_str(), plNetMessage::AsStdString().c_str() );
|
||||
return s;
|
||||
b2 += plString::Format("0x%x ", fRegionsICareAbout.GetBitVector(i));
|
||||
return plString::Format("rgnsImIn:%s, rgnsICareAbout:%s, %s",
|
||||
b1.c_str(), b2.c_str(), plNetMessage::AsString().c_str() );
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -505,7 +505,7 @@ int plNetMsgMemberListHelper::Poke(hsStream* stream, const UInt32 peekOptions)
|
||||
int i;
|
||||
for(i=0;i<numMembers;i++)
|
||||
{
|
||||
fMembers[i]->GetClientGuid()->SetClientKey("");
|
||||
fMembers[i]->GetClientGuid()->SetClientKey(_TEMP_CONVERT_FROM_LITERAL(""));
|
||||
fMembers[i]->GetClientGuid()->SetAccountUUID(plUUID());
|
||||
fMembers[i]->Poke(stream, peekOptions);
|
||||
}
|
||||
|
Reference in New Issue
Block a user