本文整理汇总了C++中Outfit::setAddons方法的典型用法代码示例。如果您正苦于以下问题:C++ Outfit::setAddons方法的具体用法?C++ Outfit::setAddons怎么用?C++ Outfit::setAddons使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Outfit
的用法示例。
在下文中一共展示了Outfit::setAddons方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: luavalue_cast
bool luavalue_cast(int index, Outfit& outfit)
{
if(g_lua.isTable(index)) {
g_lua.getField("type", index);
outfit.setId(g_lua.popInteger());
g_lua.getField("auxType", index);
outfit.setAuxId(g_lua.popInteger());
if(g_game.getFeature(Otc::GamePlayerAddons)) {
g_lua.getField("addons", index);
outfit.setAddons(g_lua.popInteger());
}
g_lua.getField("head", index);
outfit.setHead(g_lua.popInteger());
g_lua.getField("body", index);
outfit.setBody(g_lua.popInteger());
g_lua.getField("legs", index);
outfit.setLegs(g_lua.popInteger());
g_lua.getField("feet", index);
outfit.setFeet(g_lua.popInteger());
if(g_game.getFeature(Otc::GamePlayerMounts)) {
g_lua.getField("mount", index);
outfit.setMount(g_lua.popInteger());
}
return true;
}
return false;
}
示例2: internalLoadCreatureBuffer
void CreatureManager::internalLoadCreatureBuffer(TiXmlElement* attrib, const CreatureTypePtr& m)
{
if(std::find(m_creatures.begin(), m_creatures.end(), m) != m_creatures.end())
return;
Outfit out;
int32 type = attrib->readType<int32>("type");
if(type > 0) {
out.setCategory(ThingCategoryCreature);
out.setId(type);
} else {
out.setCategory(ThingCategoryItem);
out.setAuxId(attrib->readType<int32>("typeex"));
}
{
out.setHead(attrib->readType<int>(("head")));
out.setBody(attrib->readType<int>(("body")));
out.setLegs(attrib->readType<int>(("legs")));
out.setFeet(attrib->readType<int>(("feet")));
out.setAddons(attrib->readType<int>(("addons")));
out.setMount(attrib->readType<int>(("mount")));
}
m->setOutfit(out);
m_creatures.push_back(m);
}
示例3: internalGetOutfit
Outfit ProtocolGame::internalGetOutfit(InputMessage& msg)
{
Outfit outfit;
int id = msg.getU16();
if(id != 0) {
outfit.setCategory(ThingsType::Creature);
int head = msg.getU8();
int body = msg.getU8();
int legs = msg.getU8();
int feet = msg.getU8();
int addons = msg.getU8();
outfit.setId(id);
outfit.setHead(head);
outfit.setBody(body);
outfit.setLegs(legs);
outfit.setFeet(feet);
outfit.setAddons(addons);
}
else {
int id = msg.getU16();
if(id == 0) {
outfit.setCategory(ThingsType::Effect);
outfit.setId(13);
}
else {
outfit.setCategory(ThingsType::Item);
outfit.setId(id);
}
}
return outfit;
}