コード例 #1
0
ファイル: GridNotifiers.cpp プロジェクト: AlucardVoss/Patchs
void VisibleChangesNotifier::Visit(DynamicObjectMapType &m)
{
    for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
        if (IS_PLAYER_GUID(iter->getSource()->GetCasterGUID()))
            if (Player* caster = (Player*)iter->getSource()->GetCaster())
                if (caster->m_seer == iter->getSource())
                    caster->UpdateVisibilityOf(&i_object);
}
コード例 #2
0
ファイル: GridNotifiers.cpp プロジェクト: FixCore/335source
void VisibleChangesNotifier::Visit(DynamicObjectMapType &m)
{
    for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
        if (Unit* caster = iter->GetSource()->GetCaster())
            if (Player* player = caster->ToPlayer())
                if (player->m_seer == iter->GetSource())
                    player->UpdateVisibilityOf(&i_object);
}
コード例 #3
0
ファイル: GridNotifiers.cpp プロジェクト: Blumfield/TBCPvP
void
VisibleChangesNotifier::Visit(DynamicObjectMapType &m)
{
    for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
        if (iter->getSource()->GetTypeId() == TYPEID_PLAYER) // better check to see if the target it a player.
            if (Player* caster = (Player*)iter->getSource()->GetCaster())
                if (caster->m_seer == iter->getSource())
                    caster->UpdateVisibilityOf(&i_object);
}
コード例 #4
0
void
ObjectAccessor::WorldObjectChangeAccumulator::Visit(DynamicObjectMapType &m)
{
    for(DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
    {
        uint64 guid = iter->getSource()->GetCasterGUID();
        if(IS_PLAYER_GUID(guid))
        {
            //Caster may be NULL if DynObj is in removelist
            if(Player *caster = FindPlayer(guid))
                if (caster->GetUInt64Value(PLAYER_FARSIGHT) == iter->getSource()->GetGUID())
                    BuildPacket(caster);
        }
    }
}
コード例 #5
0
ファイル: GridNotifiers.cpp プロジェクト: Zekom/NeoCore
void
Deliverer::Visit(DynamicObjectMapType &m)
{
    for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
    {
        if (IS_PLAYER_GUID(iter->getSource()->GetCasterGUID()))
        {
            // Send packet back to the caster if the caster has vision of dynamic object
            Player* caster = iter->getSource()->GetCaster()->ToPlayer();
            if (caster && caster->GetUInt64Value(PLAYER_FARSIGHT) == iter->getSource()->GetGUID() &&
                (!i_dist || iter->getSource()->GetDistance(&i_source) <= i_dist))
                SendPacket(caster);
        }
    }
}
コード例 #6
0
void
MessageDistDeliverer::Visit(DynamicObjectMapType &m)
{
    for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
    {
        if (iter->getSource()->GetExactDistSq(i_source) > i_distSq)
            continue;

        if (iter->getSource()->GetTypeId() == TYPEID_PLAYER)
        {
            // Send packet back to the caster if the caster has vision of dynamic object
            Player* caster = iter->getSource()->GetCaster()->ToPlayer();
            if (caster && caster->m_seer == iter->getSource())
                SendPacket(caster);
        }
    }
}
コード例 #7
0
ファイル: GridNotifiers.cpp プロジェクト: Keader/Sunwell
void MessageDistDelivererToHostile::Visit(DynamicObjectMapType &m)
{
    for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
    {
        DynamicObject* target = iter->GetSource();
        if (!IS_PLAYER_GUID(target->GetCasterGUID()) || !target->InSamePhase(i_phaseMask))
            continue;

        if (target->GetExactDist2dSq(i_source) > i_distSq)
            continue;

        // Send packet back to the caster if the caster has vision of dynamic object
        Player* caster = (Player*)target->GetCaster();
        if (caster && caster->m_seer == target)
            SendPacket(caster);
    }
}
コード例 #8
0
ファイル: GridNotifiers.cpp プロジェクト: FixCore/335source
void MessageDistDeliverer::Visit(DynamicObjectMapType &m)
{
    for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
    {
        DynamicObject* target = iter->GetSource();
        if (!target->InSamePhase(i_phaseMask))
            continue;

        if (target->GetExactDist2dSq(i_source) > i_distSq)
            continue;

        if (Unit* caster = target->GetCaster())
        {
            // Send packet back to the caster if the caster has vision of dynamic object
            Player* player = caster->ToPlayer();
            if (player && player->m_seer == target)
                SendPacket(player);
        }
    }
}
コード例 #9
0
void
MessageDistDeliverer::Visit(DynamicObjectMapType &m)
{
    for (DynamicObjectMapType::iterator iter = m.begin(); iter != m.end(); ++iter)
    {
        if(!iter->getSource()->InSamePhase(i_phaseMask))
            continue;

        if(iter->getSource()->GetExactDistSq(i_source) > i_distSq)
            continue;

        if (IS_PLAYER_GUID(iter->getSource()->GetCasterGUID()))
        {
            // Send packet back to the caster if the caster has vision of dynamic object
            Player* caster = (Player*)iter->getSource()->GetCaster();
            if (caster && caster->m_seer == iter->getSource())
                SendPacket(caster);
        }
    }
}