本文整理汇总了C++中Spawn::GuildID方法的典型用法代码示例。如果您正苦于以下问题:C++ Spawn::GuildID方法的具体用法?C++ Spawn::GuildID怎么用?C++ Spawn::GuildID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Spawn
的用法示例。
在下文中一共展示了Spawn::GuildID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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);
}
示例2: newSpawn
void SpawnShell::newSpawn(const spawnStruct& s)
{
#ifdef SPAWNSHELL_DIAG
printf("SpawnShell::newSpawn(spawnStruct *(name='%s'), bSelected=%s)\n", s.name, bSelected?"true":"false");
#endif
// if this is the SPAWN_SELF it's the player
if (s.NPC == SPAWN_SELF)
return;
// not the player, so check if it's a recently deleted spawn
for (int i =0; i < m_cntDeadSpawnIDs; i++)
{
if ((m_deadSpawnID[i] != 0) && (m_deadSpawnID[i] == s.spawnId))
{
// found a match, remove it from the deleted spawn list
m_deadSpawnID[i] = 0;
// let the user know what's going on
printf("%s(%d) has already been removed from the zone before we processed it.\n",
s.name, s.spawnId);
// and stop the attempt to add the spawn.
return;
}
}
Item* item = m_spawns.find(s.spawnId);
if (item != NULL)
{
Spawn* spawn = (Spawn*)item;
spawn->update(&s);
updateFilterFlags(spawn);
updateRuntimeFilterFlags(spawn);
item->updateLastChanged();
if (spawn->GuildID() < MAXGUILDS)
spawn->setGuildTag(m_guildMgr->guildIdToName(spawn->GuildID()));
if (!showeq_params->fast_machine)
item->setDistanceToPlayer(m_player->calcDist2DInt(*item));
else
item->setDistanceToPlayer(m_player->calcDist(*item));
emit changeItem(item, tSpawnChangedALL);
}
else
{
item = new Spawn(&s);
Spawn* spawn = (Spawn*)item;
updateFilterFlags(spawn);
updateRuntimeFilterFlags(spawn);
m_spawns.insert(s.spawnId, item);
if (spawn->GuildID() < MAXGUILDS)
spawn->setGuildTag(m_guildMgr->guildIdToName(spawn->GuildID()));
if (!showeq_params->fast_machine)
item->setDistanceToPlayer(m_player->calcDist2DInt(*item));
else
item->setDistanceToPlayer(m_player->calcDist(*item));
emit addItem(item);
// send notification of new spawn count
emit numSpawns(m_spawns.count());
}
if (item->filterFlags() & FILTER_FLAG_ALERT)
emit handleAlert(item, tNewSpawn);
}