Патч реализует нововведение близов в патче 3.3.3
+ Поле боя, которому посвящены выходные, будет отображаться на соответствующей закладке и в календаре с пометкой «К оружию!».
+ Для изменения количества получаемый очков чести, зарабатываемое на этих полях боя, необходим патч
[patch] Random BattleGrounds
Код:
diff --git a/src/game/DBCStructure.h b/src/game/DBCStructure.h
index c762e15..c1d1a21 100644
--- a/src/game/DBCStructure.h
+++ b/src/game/DBCStructure.h
@@ -574,7 +574,7 @@ struct BattlemasterListEntry
char* name[16]; // 11-26
//uint32 nameFlags // 27 string flag, unused
uint32 maxGroupSize; // 28 maxGroupSize, used for checking if queue as group
- //uint32 HolidayWorldStateId; // 29 new 3.1
+ uint32 HolidayWorldStateId; // 29 new 3.1
uint32 minLevel; // 30, min level (sync with PvPDifficulty.dbc content)
uint32 maxLevel; // 31, max level (sync with PvPDifficulty.dbc content)
};
diff --git a/src/game/DBCfmt.h b/src/game/DBCfmt.h
index 8c2fc67..cb388d1 100644
--- a/src/game/DBCfmt.h
+++ b/src/game/DBCfmt.h
@@ -27,7 +27,7 @@ const char AreaTriggerEntryfmt[]="niffffffff";
const char AuctionHouseEntryfmt[]="niiixxxxxxxxxxxxxxxxx";
const char BankBagSlotPricesEntryfmt[]="ni";
const char BarberShopStyleEntryfmt[]="nixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiii";
-const char BattlemasterListEntryfmt[]="niiiiiiiiixssssssssssssssssxixii";
+const char BattlemasterListEntryfmt[]="niiiiiiiiixssssssssssssssssxiiii";
const char CharStartOutfitEntryfmt[]="diiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
const char CharTitlesEntryfmt[]="nxssssssssssssssssxxxxxxxxxxxxxxxxxxi";
const char ChatChannelsEntryfmt[]="iixssssssssssssssssxxxxxxxxxxxxxxxxxx";
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 9f99e88..5d0d05a 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -8369,6 +8369,22 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
break;
}
GetSession()->SendPacket(&data);
+ SendBGWeekendWorldStates();
+}
+
+void Player::SendBGWeekendWorldStates()
+{
+ for(uint32 i = 1; i < sBattlemasterListStore.GetNumRows(); ++i)
+ {
+ BattlemasterListEntry const * bl = sBattlemasterListStore.LookupEntry(i);
+ if(bl && bl->HolidayWorldStateId)
+ {
+ if(BattleGroundMgr::IsBGWeekend((BattleGroundTypeId)bl->id))
+ SendUpdateWorldState(bl->HolidayWorldStateId,1);
+ else
+ SendUpdateWorldState(bl->HolidayWorldStateId,0);
+ }
+ }
}
uint32 Player::GetXPRestBonus(uint32 xp)
diff --git a/src/game/Player.h b/src/game/Player.h
index 79188db..eefcdc1 100644
--- a/src/game/Player.h
+++ b/src/game/Player.h
@@ -1989,6 +1989,7 @@ class MANGOS_DLL_SPEC Player : public Unit
void SendInitWorldStates(uint32 zone, uint32 area);
void SendUpdateWorldState(uint32 Field, uint32 Value);
void SendDirectMessage(WorldPacket *data);
+ void SendBGWeekendWorldStates();
void SendAurasForTarget(Unit *target);