本文整理汇总了C++中Spawn::level方法的典型用法代码示例。如果您正苦于以下问题:C++ Spawn::level方法的具体用法?C++ Spawn::level怎么用?C++ Spawn::level使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spawn
的用法示例。
在下文中一共展示了Spawn::level方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: killSpawn
void SpawnShell::killSpawn(const newCorpseStruct* deadspawn)
{
#ifdef SPAWNSHELL_DIAG
printf("SpawnShell::killSpawn(id=%d, kid=%d)\n",
deadspawn->spawnId, deadspawn->killerId);
#endif
Item* item;
Item* killer;
item = m_spawns.find(deadspawn->spawnId);
if (item != NULL)
{
Spawn* spawn = (Spawn*)item;
killer = m_spawns.find(deadspawn->killerId);
// ZBTEMP: This is temporary until we can find a better way
// set the last kill info on the player (do this before changing name)
m_player->setLastKill(spawn->name(), spawn->level());
spawn->killSpawn();
updateFilterFlags(item);
updateRuntimeFilterFlags(item);
emit killSpawn(item, killer, deadspawn->killerId);
if (item->filterFlags() & FILTER_FLAG_ALERT)
emit handleAlert(item, tKillSpawn);
}
}
示例2: Item
Spawn::Spawn(Spawn& s, uint16_t id)
: Item(tSpawn, id)
{
setName(s.name());
setLastName(s.lastName());
Item::setPoint(s.x(), s.y(), s.z());
setPetOwnerID(s.petOwnerID());
setLight(s.light());
setGender(s.gender());
setDeity(s.deity());
setRace(s.race());
setClassVal(s.classVal());
setHP(s.HP());
setMaxHP(s.maxHP());
setGuildID(s.GuildID());
setLevel(s.level());
for (int i = 0; i <= tLastCoreWearSlot; i++)
setEquipment(i, s.equipment(i));
setEquipment(tUnknown1, 0);
setTypeflag(s.typeflag());
setNPC(s.NPC());
setAnimation(s.animation());
setDeltas(s.deltaX(), s.deltaY(), s.deltaZ());
setHeading(s.heading(), s.deltaHeading());
setConsidered(s.considered());
// the new copy will own the spawn track list
m_spawnTrackList.setAutoDelete(false);
m_spawnTrackList = s.m_spawnTrackList;
s.m_spawnTrackList.setAutoDelete(false);
m_spawnTrackList.setAutoDelete(true);
}