Jump to content

[patch][6174] Eye Remove Flag At End Of Bg


Recommended Posts

Posted

patch is from me

bugreport not found

fix: it removes the flag at end of game, as expected

Index: BattleGroundEY.cpp
===================================================================
--- BattleGroundEY.cpp        (revision 6166)
+++ BattleGroundEY.cpp        (working copy)
@@ -571,8 +571,6 @@

void BattleGroundEY::EventPlayerDroppedFlag(Player *Source)
{
-        if(GetStatus() != STATUS_IN_PROGRESS)
-                return;

        const char *message = "";
        uint8 type = 0;

cause this function gets called at end of bg, where "getstatus()" != status_in_progress, i removed this check..

Posted

void BattleGround::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPacket)
{
       // Remove from lists/maps
....
       Player *plr = objmgr.GetPlayer(guid);

       if(plr && !plr->isAlive())                                                            // resurrect on exit
       {
               plr->ResurrectPlayer(1.0f);
               plr->SpawnCorpseBones();
       }

       RemovePlayer(plr, guid);                                                                // BG subclass specific code
    ^^^^^^^^^^^^^^^^^
....

void BattleGroundEY::RemovePlayer(Player *plr, uint64 guid)
{
       // sometimes flag aura not removed 
       for (int j = EY_POINTS_MAX; j >= 0; --j)
       {
               for(int i = 0; i < m_PlayersNearPoint[j].size(); ++i)
                       if(m_PlayersNearPoint[j][i] == guid)
                               m_PlayersNearPoint[j].erase(m_PlayersNearPoint[j].begin() + i);
       }
       if(IsFlagPickedup())
       {
               if(m_FlagKeeper == guid)
               {
                       if(plr)
                               this->EventPlayerDroppedFlag(plr);
                               ^^^^^^^^^^^^^^^^^^^^^^
                       else
                       {
                               SetFlagPicker(0);
                               RespawnFlag(true);
                       }
               }
       }
}

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