Jump to content

Battleground Switching


Recommended Posts

Posted

Hi you all.

I was wondering about the existance of a tested code in order to prevent battleground switching while they are running.

If it exists, could someone link me this code / a thread about this topic?

Thanks a lot

CoE

Posted

you just have to remove the player from the other bg-queues he is in, when he joins a bg (maybe there is even a function like PlayerRemoveFromBGQueue ;-) )

i think it won't be to hard

Posted

I am trying to do this from 2 days, but i'm not a coder, so i tryed just to put:

for(int qId = 0; qId < PLAYER_MAX_BATTLEGROUND_QUEUES; ++qId)
                       {
                               if(_player->GetBattleGroundQueueId(qId) != 0)
                               {
                                       int i=(_player->GetBattleGroundQueueId(qId));
                                       _player->RemoveBattleGroundQueueId(i);
                               }
                       }

in line 328 of Battlegroundhandler.cpp, before the "break;" line. But i didn't tryed this yet.

Posted

for(int qId = 1; qId <= 7; ++qId)
{
   if(bgTypeId != qId)
   {
       queueSlot = _player->GetBattleGroundQueueIndex(qId);
       _player->RemoveBattleGroundQueueId(qId);
       sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, bg, _player->GetTeam(), queueSlot, STATUS_NONE, 0, 0);
       sBattleGroundMgr.m_BattleGroundQueues[qId].RemovePlayer(_player->GetGUID(), true);
       SendPacket(&data);
   }
}

OK! Now it works! Tested by me ;)

Insert this between rows 327 and 328 ( between bg->AddPlayer(_player); and break; ) of the file battlegroundhandler.cpp

×
×
  • 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