Show
Ignore:
Timestamp:
11/19/08 13:29:16 (17 years ago)
Author:
yumileroy
Message:

[svn] Enabled game events to change the honor and reputation gaining speed in battlegrounds. This is done by a new table in the world database, game_event_battleground_holiday. Structure is the following:
event - id of the game event
bgflag - bitmask, used to set which battleground(s) give extra honor/reputation when the event is active. To add extra honor on a battleground, use 2 bgTypeId as mask. Multiple battlegrounds can be set by logical 'or' ('|') operation.
You will need database data for the table, please check trinitydatabase.org.

Original author: w12x
Date: 2008-10-17 16:36:07-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/BattleGroundWS.cpp

    r49 r50  
    3030#include "World.h" 
    3131 
     32// these variables aren't used outside of this file, so declare them only here 
     33enum BG_WSG_Rewards 
     34{ 
     35    BG_WSG_WIN = 0, 
     36    BG_WSG_FLAG_CAP, 
     37    BG_WSG_MAP_COMPLETE, 
     38    BG_WSG_REWARD_NUM 
     39}; 
     40 
     41uint32 BG_WSG_Honor[BG_HONOR_MODE_NUM][BG_WSG_REWARD_NUM] = { 
     42    {20,40,40}, // normal honor 
     43    {60,40,80}  // holiday 
     44}; 
     45 
     46uint32 BG_WSG_Reputation[BG_HONOR_MODE_NUM][BG_WSG_REWARD_NUM] = { 
     47    {0,35,0}, // normal honor 
     48    {0,45,0}  // holiday 
     49}; 
     50 
    3251BattleGroundWS::BattleGroundWS() 
    3352{ 
     
    242261            AddPoint(ALLIANCE, 1); 
    243262        PlaySoundToAll(BG_WS_SOUND_FLAG_CAPTURED_ALLIANCE); 
    244         RewardReputationToTeam(890, 35, ALLIANCE);          // +35 reputation 
    245         RewardHonorToTeam(40, ALLIANCE);                    // +40 bonushonor 
     263        RewardReputationToTeam(890, BG_WSG_Reputation[m_HonorMode][BG_WSG_FLAG_CAP], ALLIANCE);          // +35 reputation 
     264        RewardHonorToTeam(BG_WSG_Honor[m_HonorMode][BG_WSG_FLAG_CAP], ALLIANCE);                    // +40 bonushonor 
    246265    } 
    247266    else 
     
    259278            AddPoint(HORDE, 1); 
    260279        PlaySoundToAll(BG_WS_SOUND_FLAG_CAPTURED_HORDE); 
    261         RewardReputationToTeam(889, 35, HORDE);             // +35 reputation 
    262         RewardHonorToTeam(40, HORDE);                       // +40 bonushonor 
     280        RewardReputationToTeam(889, BG_WSG_Reputation[m_HonorMode][BG_WSG_FLAG_CAP], HORDE);             // +35 reputation 
     281        RewardHonorToTeam(BG_WSG_Honor[m_HonorMode][BG_WSG_FLAG_CAP], HORDE);                       // +40 bonushonor 
    263282    } 
    264283 
     
    288307        UpdateWorldState(BG_WS_FLAG_STATE_HORDE, 1); 
    289308 
     309        RewardHonorToTeam(BG_WSG_Honor[m_HonorMode][BG_WSG_WIN], winner); 
    290310        EndBattleGround(winner); 
    291311    }