Jump to content

[Help] Players Unable To See One And Other In Instances.


Guest Aucti9

Recommended Posts

If you are a horde you can see all players any where in the game..

if you are alliance you can see all players any where in game.

if you are alliance in a instance you can not see horde.

if you are horde in a instance you can not see alliance.

where do i search the code to see why or add to where i can make sure all players are seen any where at any time?

i was thinking the vision areas of the code. if i added

if(getTeam==HORDE || getTeam==ALLIANCE)

return;

or some thing..

and i have ben trid to use the config files for the, Class's

I dont kn ow what to call them horde is not a class or is it?

maybe faction

any ways

Can you point me in the right direction so all players can see one and other even if in instance..

they can see each other out of game but in instance they can not.

This problem also dosen show the correct players online with a search command.. it will only show me

my faction or class. Horde.

bool ChatHandler::HandleSearchWhoCommand(const char* args)
{
   Player * plr =getSelectedPlayer();
   if(plr->activate_commands == false)
   {
   RedSystemMessage(m_session,"Sorry Your Comamnds Are Not Activated Type .activatecommands or .ac");
   return true;
   }
   bool first = true;

   HashMapHolder<Player>::MapType &m = HashMapHolder<Player>::GetContainer();
   HashMapHolder<Player>::MapType::iterator itr = m.begin();
   for(; itr != m.end(); ++itr)
   {
       if( itr->second->GetSession()->GetSecurity() && (itr->second->activate_Who == true) &&
           itr->second->IsVisibleGloballyFor(m_session->GetPlayer()) )
       {   
           if(first)

           {

               GreenSystemMessage(m_session,"Players Online");
               first = false;
           }

           SystemMessage(m_session, "|cff888888 Name: %s [Rank: %u]|r", itr->second->GetName(), itr->second->GetSession()->GetSecurity());
       }
   }

  if(first)

  GreenSystemMessage(m_session,"No Player Online");
  Unit * uni=getSelectedUnit();
   uni->CastSpell(uni, 40436, true);
   uni->CastSpell(uni, 34442, true);
  return true;
}

so when i look at this code i see that its calling this function

IsVisibleGloballyFor

so i go there and think this is where i can add the team info..

bool Player::IsVisibleGloballyFor( Player* u ) const
{
   if(!u)
       return false;

   // Always can see self
   if (u==this)
       return true;

   // Visible units, always are visible for all players
   if (GetVisibility() == VISIBILITY_ON)
       return true;

   // GMs are visible for higher gms (or players are visible for gms)
   if (u->GetSession()->GetSecurity() > R0)
       return GetSession()->GetSecurity() <= u->GetSession()->GetSecurity();

  // non faction visibility non-breakable for non-GMs
   if (GetVisibility() == VISIBILITY_OFF)
      return false;

   // non-gm stealth/invisibility not hide from global player lists
   return true;
}

any ways.. maybe you can help.

Link to comment
Share on other sites

its not to hard to find heres what i did to fix it.

void Player::UpdateZoneDependentAuras( uint32 newZone )
{
   // remove new continent flight forms
   if(GetVirtualMapForMapAndZone(GetMapId(),newZone) != 530)
   {
       RemoveSpellsCausingAura(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED);
       RemoveSpellsCausingAura(SPELL_AURA_FLY);
   }

   // Some spells applied at enter into zone (with subzones)
   // Human Illusion
   // NOTE: these are removed by RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CHANGE_MAP);
   if ( newZone == 2367 )                                  // Old Hillsbrad Foothills
   {
       uint32 spellid = 0;
       // all horde races

       if( GetTeam() == HORDE || GetTeam() == ALLIANCE )
       {
           spellid = getGender() == GENDER_FEMALE ? 35481 : 35480;
       }

       else
       {
        spellid = getGender() == GENDER_MALE ?  35481 : 35480;
       }

       //if( getRace() == RACE_NIGHTELF || getRace() == RACE_DRAENEI )
      /* if(getRace() == RACE_HUMAN || getRace() == RACE_ORC||getRace() == RACE_DWARF  || getRace() == RACE_NIGHTELF
       || getRace() == RACE_UNDEAD_PLAYER||getRace() == RACE_TAUREN  || getRace() == RACE_GNOME
       || getRace() == RACE_TROLL||getRace() == RACE_GOBLIN  || getRace() == RACE_BLOODELF
       || getRace() == RACE_DRAENEI||getRace() == RACE_FEL_ORC  || getRace() == RACE_NAGA
       || getRace() == RACE_BROKEN||getRace() == RACE_SKELETON  || getRace() == MAX_RACES)
            {
           spellid = getGender() == GENDER_FEMALE ? 35483 : 35482;
            }
            else
            {
                spellid = getGender() == GENDER_MALE ? 35483 : 35482;
            }*/



       if(spellid && !HasAura(spellid,0) )
           CastSpell(this,spellid,true);
   }
}

I was playing around with all kinds of ideas but this works..

Im trying to get the realm loop working this is driving me crazzy.. any one willing to work on the realm loop bug so we can get that fixed and out of the way? Im sick of loging out and ing when i test lol

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use