[Patch] BG win item

Hello TC members,

How to win in the BG set to win was in the form of marks and no honor. I know that this is set in battleground.h but unfortunately do not know where. I believe in your personally help;) Thanks.

btw: sry for my english

would be nice to have this kind of share here:) i hate the new battleground format:P

This one?

[CODE]enum BattlegroundRandomRewards

{

BG_REWARD_WINNER_HONOR_FIRST    = 30,

BG_REWARD_WINNER_ARENA_FIRST    = 25,

BG_REWARD_WINNER_HONOR_LAST     = 15,

BG_REWARD_WINNER_ARENA_LAST     = 0,

BG_REWARD_LOSER_HONOR_FIRST    = 5,

BG_REWARD_LOSER_HONOR_LAST     = 5

};[/CODE]

as there is a place to write it, I got the BG Marks

What I must rewrite to change BG reward from honors to mark of honor. Its for BG server.

THX

any ideas?

This is my script for reward on end of Battleground(quest reward for WSG, AB, EoS):


# HG changeset patch -- Bitbucket.org

# Project Deffender BG 3.3.5a

# URL https://bitbucket.org/JaroslavPeter/deffender-bg-3.3.5a/overview

# User Jaroslav Peter <[email protected]>

# Date 1296326608 -3600

# Node ID 69c9499860c3f72ca3a1634ddb5ebd076c2346f5

# Parent  c8f2ae59f3e5140baf996e478e213aac3c8125c6

Basic core updates


--- a/src/server/game/Battlegrounds/Battleground.cpp

+++ b/src/server/game/Battlegrounds/Battleground.cpp

@@ -861,9 +861,38 @@ void Battleground::EndBattleground(uint3

         uint32 loser_kills = plr->GetRandomWinner() ? BG_REWARD_LOSER_HONOR_LAST : BG_REWARD_LOSER_HONOR_FIRST;

         uint32 winner_arena = plr->GetRandomWinner() ? BG_REWARD_WINNER_ARENA_LAST : BG_REWARD_WINNER_ARENA_FIRST;


+        // Reward

+        uint32 reward_bg_item_id = 4021,

+               reward_arena_item_id = 33455,

+               reward_winner_count = 15,

+               reward_loser_count = 8,

+               reward_quest_wsg = 43483,

+               reward_quest_ab = 43484,

+               reward_quest_eos = 43477;

+

+        uint32 itemId = isArena() ? reward_arena_item_id : reward_bg_item_id;

+        uint32 itemCount = team == winner ? reward_winner_count : reward_loser_count;

+        uint32 spellId = 0;

+        ItemPosCountVec dest;

+

         // Reward winner team

         if (team == winner)

         {

+            switch(plr->GetMapId())

+            {

+                case 489: // Warsong Gulch

+                    plr->CastSpell(plr, reward_quest_wsg, true);

+                    break;

+                case 529: // Arathi Basin

+                    plr->CastSpell(plr, reward_quest_ab, true);

+                    break;

+                case 566: // Eye of the Storm

+                    plr->CastSpell(plr, reward_quest_eos, true);

+                    break;

+                default:

+                    break;

+            }

+

             if (IsRandom() || BattlegroundMgr::IsBGWeekend(GetTypeID()))

             {

                 UpdatePlayerScore(plr, SCORE_BONUS_HONOR, GetBonusHonorFromKill(winner_kills));

@@ -881,6 +910,11 @@ void Battleground::EndBattleground(uint3

                 UpdatePlayerScore(plr, SCORE_BONUS_HONOR, GetBonusHonorFromKill(loser_kills));

         }


+        if (plr->CanStoreNewItem(NULL_BAG, NULL_SLOT, dest, itemId, itemCount) == EQUIP_ERR_OK)

+        {

+            Item* item = plr->StoreNewItem(dest, itemId, true, Item::GenerateItemRandomPropertyId(itemId));

+            plr->SendNewItem(item, itemCount, true, false);

+        }


         plr->ResetAllPowers();

         plr->CombatStopWithPets(true);

With a little modification quest reward will work for all BG.

thx very very much I love you :***

case 489: // Warsong Gulch

how to know that code 489 it’s warsong gulch?? i need to add other bg in this list but i don’t know the code of this and the item code reward_arena_item_id = 33455, can be different example : 29024

Hi guys

i need Script or .patch for win in the Battleground and get item.

i see this setting in my Friend worldserver.conf


BG.Items.Enable = 1

BG.Items_Alterac_ID = 20560

BG.Items_Warsong_ID = 20558

BG.Items_Arathi_ID = 20559

BG.Items_Eye_ID = 29024

BG.Items.Count.Winner = 3

BG.Items.Count.Loser = 1

i need Script for this…

thx

(Sorry for my bad English)

yes it’s very Use full in Need it too

hi guys …

i need Script or .patch for win in the Battlegrounds and get item.

i see this setting in my Friend worldserver.conf …

with this setting can set custom reward for all Battlegrounds …

BG.Items.Enable = 1

BG.Items_Alterac_ID = 20560

BG.Items_Warsong_ID = 20558

BG.Items_Arathi_ID = 20559

BG.Items_Eye_ID = 29024

BG.Items.Count.Winner = 3

BG.Items.Count.Loser = 1

thx

(Sorry for my bad English)

— Canned message start —

This thread is not related to the official Trinity codebase and was moved to the Custom Code section.

Please read the stickies next time.

— Canned message end —

Does anyone know the Random Battleground Quest ID or a way to modify Random Battlegrounds rewards?

Any help… >.< ?

Try searching in quest_template by rewards

SELECT * FROM quest_template WHERE RewardHonor > 0

I already tried that but it didn’t work, it appears that the random battleground rewards are not by Quest, maybe code?

I also tried to find Quest with Arena Points but no difference.

Maybe its event. Try searching in DB near other events such as lunar festival or midsummer.

Look in Battleground.cpp on the lines between ~874-881



if (IsRandom() || BattlegroundMgr::IsBGWeekend(GetTypeID()))

{

    UpdatePlayerScore(player, SCORE_BONUS_HONOR, GetBonusHonorFromKill(winner_kills));

    if (CanAwardArenaPoints())

        player->ModifyArenaPoints(winner_arena);

    if (!player->GetRandomWinner())

        player->SetRandomWinner(true);

}

Look post http://www.trinitycore.org/f/topic/842-patch-bg-win-item/#entry6299