当前位置: 首页>>代码示例>>C++>>正文


C++ ObjectGuid::GetEntry方法代码示例

本文整理汇总了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);
}
开发者ID:billy1arm,项目名称:serverZero,代码行数:11,代码来源:PlayerLogger.cpp

示例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);
}
开发者ID:billy1arm,项目名称:serverZero,代码行数:10,代码来源:PlayerLogger.cpp

示例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);
}
开发者ID:billy1arm,项目名称:serverZero,代码行数:11,代码来源:PlayerLogger.cpp

示例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;
}
开发者ID:BACKUPLIB,项目名称:Infinity_MaNGOS,代码行数:45,代码来源:BattleGroundIC.cpp

示例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);
}
开发者ID:billy1arm,项目名称:serverZero,代码行数:11,代码来源:PlayerLogger.cpp


注:本文中的ObjectGuid::GetEntry方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。