本文整理汇总了C++中ObjectGuid::GetEntry方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectGuid::GetEntry方法的具体用法?C++ ObjectGuid::GetEntry怎么用?C++ ObjectGuid::GetEntry使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectGuid
的用法示例。
在下文中一共展示了ObjectGuid::GetEntry方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LogLooting
void PlayerLogger::LogLooting(LootSourceType type, ObjectGuid const & droppedBy, ObjectGuid const & itemGuid, uint32 id)
{
if (!IsLoggingActive(PLAYER_LOGMASK_LOOTING))
return;
PlayerLogLooting log = PlayerLogLooting(sWorld.GetUptime());
log.itemEntry = itemGuid.GetEntry();
log.SetLootSourceType(type);
log.itemGuid = itemGuid.GetCounter();
log.droppedBy = droppedBy.IsEmpty() ? id : droppedBy.GetEntry();
((std::vector<PlayerLogLooting>*)(data[PLAYER_LOG_LOOTING]))->push_back(log);
}
示例2: LogKilling
void PlayerLogger::LogKilling(bool killedEnemy, ObjectGuid const & unitGuid)
{
if (!IsLoggingActive(PLAYER_LOGMASK_KILL))
return;
PlayerLogKilling log = PlayerLogKilling(sWorld.GetUptime());
log.unitEntry = unitGuid.GetEntry();
log.SetKill(killedEnemy);
log.unitGuid = unitGuid.GetCounter();
((std::vector<PlayerLogKilling>*)(data[PLAYER_LOG_KILL]))->push_back(log);
}
示例3: LogTrading
void PlayerLogger::LogTrading(bool aquire, ObjectGuid const & partner, ObjectGuid const & itemGuid)
{
if (!IsLoggingActive(PLAYER_LOGMASK_TRADE))
return;
PlayerLogTrading log = PlayerLogTrading(sWorld.GetUptime());
log.itemEntry = itemGuid.GetEntry();
log.SetItemAquired(aquire);
log.itemGuid = itemGuid.GetCounter();
log.partner = partner.GetCounter();
((std::vector<PlayerLogTrading>*)(data[PLAYER_LOG_TRADE]))->push_back(log);
}
示例4: GetSpawnTeamFor
Team BattleGroundIC::GetSpawnTeamFor(ObjectGuid const& guid) const
{
if (guid.IsEmpty() || !guid.HasEntry())
return TEAM_NONE;
switch (guid.GetEntry())
{
case VEHICLE_IC_DEMOLISHER:
case VEHICLE_IC_DEMOLISHER_1:
{
if (m_Nodes[BG_IC_NODE_WORKSHOP] == BG_IC_NODE_STATUS_ALLY_OCCUPIED)
return ALLIANCE;
else if (m_Nodes[BG_IC_NODE_WORKSHOP] == BG_IC_NODE_STATUS_HORDE_OCCUPIED)
return HORDE;
break;
}
case VEHICLE_IC_CATAPULT:
case VEHICLE_IC_CATAPULT_1:
{
if (m_Nodes[BG_IC_NODE_DOCKS] == BG_IC_NODE_STATUS_ALLY_OCCUPIED)
return ALLIANCE;
else if (m_Nodes[BG_IC_NODE_DOCKS] == BG_IC_NODE_STATUS_HORDE_OCCUPIED)
return HORDE;
break;
}
case VEHICLE_IC_CANNON:
case VEHICLE_IC_CANNON_1:
{
WorldObject const* obj = const_cast<BattleGroundIC*>(this)->GetBgMap()->GetWorldObject(guid);
if (obj)
// simplest way to determine factions Ive found
return (obj->GetPositionX() > 1000.0f) ? HORDE : ALLIANCE;
break;
}
case VEHICLE_IC_GLAIVE_A:
return ALLIANCE;
case VEHICLE_IC_GLAIVE_H:
return HORDE;
default:
break;
}
return TEAM_INVALID;
}
示例5: LogDamage
void PlayerLogger::LogDamage(bool done, uint16 damage, uint16 heal, ObjectGuid const & unitGuid, uint16 spell)
{
if (!IsLoggingActive(done ? PLAYER_LOGMASK_DAMAGE_DONE : PLAYER_LOGMASK_DAMAGE_GET))
return;
PlayerLogDamage log = PlayerLogDamage(sWorld.GetUptime());
log.dmgUnit = (unitGuid.GetCounter() == playerGuid) ? 0 : (unitGuid.IsPlayer() ? unitGuid.GetCounter() : unitGuid.GetEntry());
log.SetCreature(unitGuid.IsCreatureOrPet());
log.damage = damage > 0 ? int16(damage) : -int16(heal);
log.spell = spell;
((std::vector<PlayerLogDamage>*)(data[done ? PLAYER_LOG_DAMAGE_DONE : PLAYER_LOG_DAMAGE_GET]))->push_back(log);
}