本文整理汇总了C++中Ref::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ Ref::GetName方法的具体用法?C++ Ref::GetName怎么用?C++ Ref::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ref
的用法示例。
在下文中一共展示了Ref::GetName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReplaceObj
void NiDefaultAVObjectPalette::ReplaceObj( const Ref<NiAVObject> newobj, const Ref<NiAVObject> oldobj ) {
for (vector<AVObject>::iterator itr = objs.begin(); itr != objs.end(); ++itr) {
if ( (*itr).avObject == oldobj ) {
(*itr).name = newobj->GetName();
(*itr).avObject = newobj;
}
}
}
示例2: AddObj
bool NiDefaultAVObjectPalette::AddObj( Ref<NiAVObject > obj ) {
for (vector<AVObject>::iterator itr = objs.begin(); itr != objs.end(); ++itr) {
if ( (*itr).avObject == obj ) {
return false;
}
}
struct AVObject avo;
avo.name = obj->GetName();
avo.avObject = obj;
objs.push_back(avo);
numObjs++;
return false;
}
示例3: CreatePlayer
void User::CreatePlayer(){
if (this->player != NULL){
delete this->player;
this->player = NULL;
cout << "[WARN] WARNING: Player Object was not destroyed";
}
ZoneId cZone = this->getWorld();
//cout << "USER: " << this->ip.ToString() << ":" << cZone << std::endl;
std::wstring name;
COMPONENT1_POSITION pos = getZoneSpawnPoint(this->getWorld());
Ref<Character> chr = this->GetCurrentCharacter();
if (chr != NULL){
name = StringToWString(chr->GetName());
if (!chr->pos.isNull()) pos = chr->pos;
}
else{
name = StringToWString(this->username);
}
//1152921507004579166
//1152921504606846976
this->player = new PlayerObject(this->GetCurrentCharacter()->charobjid, name);
Component1 *c1 = this->player->getComponent1();
c1->setPosition(pos);
Component4 *c4 = this->player->getComponent4();
c4->setLevel(this->current->level);
PLAYER_INFO pi;
pi.accountID = this->GetID();
pi.isFreeToPlay = false;
pi.legoScore = 600;
c4->setInfo(pi);
if (chr != NULL){
CharacterData cd = chr->Data;
PLAYER_STYLE style;
style.eyebrowsStyle = cd.minifig.eyebrows;
style.eyesStyle = cd.minifig.eyes;
style.hairColor = cd.minifig.haircolor;
style.hairStyle = cd.minifig.hairstyle;
style.mouthStyle = cd.minifig.mouth;
style.pantsColor = cd.minifig.pants;
style.shirtColor = cd.minifig.shirtcolor;
this->player->getComponent4()->setStyle(style);
}
}
示例4: write_breakpoint
void write_breakpoint(BinaryNinja::BinaryView *view, uint64_t start, uint64_t length)
{
// Sample function to show registering a plugin menu item for a range of bytes.
// Also possible:
// register
// register_for_address
// register_for_function
Ref<Architecture> arch = view->GetDefaultArchitecture();
string arch_name = arch->GetName();
if (arch_name.compare(0, 3, "x86") == 0) {
string int3s = string(length, '\xcc');
view->Write(start, int3s.c_str(), length);
} else {
LogError("No support for breakpoint on %s", arch_name.c_str());
}
}
示例5: getChardata
void User::getChardata(long long objid, RakNet::BitStream *packet){
packet->Write((uchar)83);
packet->Write((ushort)5);
packet->Write((ulong)4);
packet->Write((uchar)0);
LDF *ldf = new LDF();
ldf->writeS64(L"accountID", this->id);
ldf->writeS32(L"chatmode", 0); //0 - Normal, 1 - Super
ldf->writeBOOL(L"editor_enabled", false);
ldf->writeS32(L"editor_level", 0);
ldf->writeBOOL(L"freetrial", false);
ldf->writeS32(L"gmlevel", 0); //0 - Normal, 1 - Mythran
ldf->writeBOOL(L"legoclub", true);
ldf->writeS64(L"levelid", 0); //Try e3 04 f4 74 95 51 08 20 if this breaks
std::wstring name;
Ref<Character> chr = this->GetCurrentCharacter();
if (chr != NULL){
name = StringToWString(chr->GetName());
}
else{
name = StringToWString(this->GetUsername());
}
ldf->writeWSTRING(L"name", name);
ldf->writeID(L"objid", objid);
ldf->writeFLOAT(L"position.x", this->current->pos.x);
ldf->writeFLOAT(L"position.y", this->current->pos.y);
ldf->writeFLOAT(L"position.z", this->current->pos.z);
ldf->writeS64(L"reputation", 100); //Set reputation here
ldf->writeS32(L"template", 1);
RakNet::BitStream *xml = new RakNet::BitStream();
writeXML(xml, "<?xml version=\"1.0\"?>");
writeXML(xml, "<obj v=\"1\">");
writeXML(xml, "<buff/>");
writeXML(xml, "<skil/>");
writeXML(xml, "<inv>");
writeXML(xml, "<bag>");
writeXML(xml, "<b t=\"0\" m=\"24\"/>"); //Items, Default size: 20
writeXML(xml, "</bag>");
writeXML(xml, "<items>");
writeXML(xml, "<in>");
//Adding items to the inventory:
//l: LOT, template, type of item
//id: objid, unique, this object
//s: slot in inventory
//b: present and set to "1" if object is linked to the player
//c: amout of this item
std::vector<InventoryItem> items = InventoryTable::getItems(objid);
for (uint k = 0; k < items.size(); k++){
//long lot = ObjectsTable::getTemplateOfItem(items.at(k).objid);
ObjectInfo oinfo = ObjectsTable::getItemInfo(items.at(k).objid);
Logger::log("USER", "CHARDATA", "Adding item " + std::to_string(oinfo.lot) + "[" + std::to_string(oinfo.objid) + "] " + std::to_string(oinfo.spawnerid));
if (oinfo.lot > -1){
stringstream adddata;
adddata << "<i l=\"" << oinfo.lot << "\" id=\"" << items.at(k).objid << "\" s=\"" << items.at(k).slot << "\"";
if (items.at(k).qnt > 1){
adddata << " c=\"" << items.at(k).qnt << "\"";
}
if (oinfo.spawnerid > -1){
adddata << " sk=\"" << oinfo.spawnerid << "\"";
}
if (items.at(k).linked){
adddata << " b=\"1\"";
}
if (oinfo.spawnerid > -1){
adddata << ">";
ObjectInfo sinfo = ObjectsTable::getItemInfo(oinfo.spawnerid);
if (sinfo.spawnerid == -1){
//Not an item for an object itself
if (sinfo.lot == 6416){
//This is a custom Rocket
RocketInfo rinfo = ObjectsTable::getRocketInfo(sinfo.objid);
if (rinfo.cockpit_template > 0 && rinfo.engine_template > 0 && rinfo.nose_cone_template > 0){
//adddata << "<x ma=\"0:1:" << rinfo.nose_cone_template << "+1:" << rinfo.cockpit_template << "+1:" << rinfo.engine_template << "\"/>";
Logger::log("USER", "CHARDATA", "Adding Rocket");
}
}
}
adddata << "</i>";
}else{
adddata << "/>";
}
writeXML(xml, adddata.str());
}
}
writeXML(xml, "</in>");
writeXML(xml, "</items>");
writeXML(xml, "</inv>");
writeXML(xml, "<mf/>");
writeXML(xml, "<char cc=\"");
writeXML(xml, std::to_string(100).c_str());
writeXML(xml, "\"></char>");
std::stringstream adddata;
adddata << "<lvl";
//.........这里部分代码省略.........