本文整理汇总了C++中Corpse::UpdateEquipmentLight方法的典型用法代码示例。如果您正苦于以下问题:C++ Corpse::UpdateEquipmentLight方法的具体用法?C++ Corpse::UpdateEquipmentLight怎么用?C++ Corpse::UpdateEquipmentLight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Corpse
的用法示例。
在下文中一共展示了Corpse::UpdateEquipmentLight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadCharacterCorpseEntity
Corpse* Corpse::LoadCharacterCorpseEntity(uint32 in_dbid, uint32 in_charid, std::string in_charname, const glm::vec4& position, std::string time_of_death, bool rezzed, bool was_at_graveyard) {
uint32 item_count = database.GetCharacterCorpseItemCount(in_dbid);
char *buffer = new char[sizeof(PlayerCorpse_Struct) + (item_count * sizeof(player_lootitem::ServerLootItem_Struct))];
PlayerCorpse_Struct *pcs = (PlayerCorpse_Struct*)buffer;
database.LoadCharacterCorpseData(in_dbid, pcs);
/* Load Items */
ItemList itemlist;
ServerLootItem_Struct* tmp = 0;
for (unsigned int i = 0; i < pcs->itemcount; i++) {
tmp = new ServerLootItem_Struct;
memcpy(tmp, &pcs->items[i], sizeof(player_lootitem::ServerLootItem_Struct));
itemlist.push_back(tmp);
}
/* Create Corpse Entity */
Corpse* pc = new Corpse(
in_dbid, // uint32 in_dbid
in_charid, // uint32 in_charid
in_charname.c_str(), // char* in_charname
&itemlist, // ItemList* in_itemlist
pcs->copper, // uint32 in_copper
pcs->silver, // uint32 in_silver
pcs->gold, // uint32 in_gold
pcs->plat, // uint32 in_plat
position,
pcs->size, // float in_size
pcs->gender, // uint8 in_gender
pcs->race, // uint16 in_race
pcs->class_, // uint8 in_class
pcs->deity, // uint8 in_deity
pcs->level, // uint8 in_level
pcs->texture, // uint8 in_texture
pcs->helmtexture, // uint8 in_helmtexture
pcs->exp, // uint32 in_rezexp
was_at_graveyard // bool wasAtGraveyard
);
if (pcs->locked)
pc->Lock();
/* Load Item Tints */
pc->item_tint[0].Color = pcs->item_tint[0].Color;
pc->item_tint[1].Color = pcs->item_tint[1].Color;
pc->item_tint[2].Color = pcs->item_tint[2].Color;
pc->item_tint[3].Color = pcs->item_tint[3].Color;
pc->item_tint[4].Color = pcs->item_tint[4].Color;
pc->item_tint[5].Color = pcs->item_tint[5].Color;
pc->item_tint[6].Color = pcs->item_tint[6].Color;
pc->item_tint[7].Color = pcs->item_tint[7].Color;
pc->item_tint[8].Color = pcs->item_tint[8].Color;
/* Load Physical Appearance */
pc->haircolor = pcs->haircolor;
pc->beardcolor = pcs->beardcolor;
pc->eyecolor1 = pcs->eyecolor1;
pc->eyecolor2 = pcs->eyecolor2;
pc->hairstyle = pcs->hairstyle;
pc->luclinface = pcs->face;
pc->beard = pcs->beard;
pc->drakkin_heritage = pcs->drakkin_heritage;
pc->drakkin_tattoo = pcs->drakkin_tattoo;
pc->drakkin_details = pcs->drakkin_details;
pc->IsRezzed(rezzed);
pc->become_npc = false;
pc->m_Light.Level.Innate = pc->m_Light.Type.Innate = 0;
pc->UpdateEquipmentLight(); // itemlist populated above..need to determine actual values
pc->m_Light.Level.Spell = pc->m_Light.Type.Spell = 0;
safe_delete_array(pcs);
return pc;
}