Jump to content

[patch][5990]battleground Score


Recommended Posts

Posted

Little fix at battleground score...

KILLING_BLOWS is only for killing a player... not for captured flag in wsg...

HONORABLE_KILLS is only for honor kills in group... not for captured flag in AB

and in all BG if you give the last hit to a player you will be awarded of one KILLING_BLOWS

Index: src/game/BattleGroundAB.cpp
===================================================================
--- src/game/BattleGroundAB.cpp        (revision 5691)
+++ src/game/BattleGroundAB.cpp        (working copy)
@@ -599,7 +599,6 @@
                sprintf(buf, GetMangosString(LANG_BG_AB_NODE_ASSAULTED), _GetNodeName(node));
                (teamIndex == 0) ? SOUND_NODE_ASSAULTED_ALLIANCE : SOUND_NODE_ASSAULTED_HORDE;
        }
-        UpdatePlayerScore(source, SCORE_HONORABLE_KILLS, 1);
        UpdatePlayerScore(source, SCORE_BASES_ASSAULTED, 1);
        WorldPacket data;
        ChatHandler::FillMessageData(&data, source->GetSession(), type, LANG_UNIVERSAL, NULL, source->GetGUID(), buf, NULL);
Index: src/game/BattleGroundWS.cpp
===================================================================
--- src/game/BattleGroundWS.cpp        (revision 5691)
+++ src/game/BattleGroundWS.cpp        (working copy)
@@ -237,7 +237,6 @@

        UpdateFlagState(Source->GetTeam(), 1);                                    // flag state none
        UpdateTeamScore(Source->GetTeam());
-        UpdatePlayerScore(Source, SCORE_KILLING_BLOWS, 3);            // +3 kills for flag capture...
        UpdatePlayerScore(Source, SCORE_FLAG_CAPTURES, 1);            // +1 flag captures...

        if(GetTeamScore(ALLIANCE) == BG_WS_MAX_TEAM_SCORE)
Index: src/game/Unit.cpp
===================================================================
--- src/game/Unit.cpp        (revision 5691)
+++ src/game/Unit.cpp        (working copy)
@@ -593,7 +593,7 @@
                                        bg->UpdatePlayerScore(killed, SCORE_DEATHS, 1);
                                        if(killer)
                                                // add +1 kills
-                                                bg->UpdatePlayerScore(killer, SCORE_HONORABLE_KILLS, 1);
+                                                bg->UpdatePlayerScore(killer, SCORE_KILLING_BLOWS, 1);
                                        // to be able to remove insignia
                                        killed->SetFlag( UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE );
                                }

dont know if this is correct too but here a patch for add honorable kills in BG...

Index: src/game/Player.cpp
===================================================================
--- src/game/Player.cpp        (revision 5691)
+++ src/game/Player.cpp        (working copy)
@@ -5468,6 +5468,14 @@

                        m_lastKillDate = now;
                        m_saveKills = true;
+
+                        if( ((Player*)pVictim)->InBattleGround() )
+                        {
+                                if(BattleGround *bg = GetBattleGround())
+                                {
+                                        bg->UpdatePlayerScore(this, SCORE_HONORABLE_KILLS, 1);
+                                }
+                        }
                }
                else
                {

  • 2 weeks later...
  • 2 weeks later...
Posted

Honorable kills are correct.

About killing blows i think its correct already. I mean flag capture should give 3 Killing Blows (but i can be wrong)

  • 2 weeks later...
Posted

this should work for update honorable kills at player kill in a better way

Index: src/game/BattleGround.cpp
===================================================================
--- src/game/BattleGround.cpp        (revision 5990)
+++ src/game/BattleGround.cpp        (working copy)
@@ -1048,8 +1048,21 @@
        // add +1 kills and killing_blows
        if(killer)
        {
-                UpdatePlayerScore(killer, SCORE_HONORABLE_KILLS, 1);
                bg->UpdatePlayerScore(killer, SCORE_KILLING_BLOWS, 1);
+
+                for(std::map<uint64, BattleGroundPlayer>::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
+                {
+                        Player *plr = objmgr.GetPlayer(itr->first);
+
+                        if(!plr)
+                        {
+                                sLog.outError("BattleGround: Player " I64FMTD " not found!", itr->first);
+                                continue;
+                        }
+
+                        if(plr->GetTeam() == killer->GetTeam() && plr->IsAtGroupRewardDistance(player))
+                                UpdatePlayerScore(plr, SCORE_HONORABLE_KILLS, 1);
+                }
        }

        // to be able to remove insignia

Posted

one kill= 20.9 honor at level 70.

is just for say how much honor a player will gain because bonus honor must change based on player level... and isnt related to score board.

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