Skip to content

Commit 86cd2ed

Browse files
author
Github Actions
committed
Merge 3.3.5 to 3.3.5-vas-autobalance
2 parents fc18801 + 070d803 commit 86cd2ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+300
-441
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
ALTER TABLE `gameobject_template` CHANGE `data0` `Data0` INT NOT NULL DEFAULT '0';
2+
ALTER TABLE `gameobject_template` CHANGE `data1` `Data1` INT NOT NULL DEFAULT '0';
3+
ALTER TABLE `gameobject_template` CHANGE `data2` `Data2` INT NOT NULL DEFAULT '0';
4+
ALTER TABLE `gameobject_template` CHANGE `data3` `Data3` INT NOT NULL DEFAULT '0';
5+
ALTER TABLE `gameobject_template` CHANGE `data4` `Data4` INT NOT NULL DEFAULT '0';
6+
ALTER TABLE `gameobject_template` CHANGE `data5` `Data5` INT NOT NULL DEFAULT '0';
7+
ALTER TABLE `gameobject_template` CHANGE `data6` `Data6` INT NOT NULL DEFAULT '0';
8+
ALTER TABLE `gameobject_template` CHANGE `data7` `Data7` INT NOT NULL DEFAULT '0';
9+
ALTER TABLE `gameobject_template` CHANGE `data8` `Data8` INT NOT NULL DEFAULT '0';
10+
ALTER TABLE `gameobject_template` CHANGE `data9` `Data9` INT NOT NULL DEFAULT '0';
11+
ALTER TABLE `gameobject_template` CHANGE `data10` `Data10` INT NOT NULL DEFAULT '0';
12+
ALTER TABLE `gameobject_template` CHANGE `data11` `Data11` INT NOT NULL DEFAULT '0';
13+
ALTER TABLE `gameobject_template` CHANGE `data12` `Data12` INT NOT NULL DEFAULT '0';
14+
ALTER TABLE `gameobject_template` CHANGE `data13` `Data13` INT NOT NULL DEFAULT '0';
15+
ALTER TABLE `gameobject_template` CHANGE `data14` `Data14` INT NOT NULL DEFAULT '0';
16+
ALTER TABLE `gameobject_template` CHANGE `data15` `Data15` INT NOT NULL DEFAULT '0';
17+
ALTER TABLE `gameobject_template` CHANGE `data16` `Data16` INT NOT NULL DEFAULT '0';
18+
ALTER TABLE `gameobject_template` CHANGE `data17` `Data17` INT NOT NULL DEFAULT '0';
19+
ALTER TABLE `gameobject_template` CHANGE `data18` `Data18` INT NOT NULL DEFAULT '0';
20+
ALTER TABLE `gameobject_template` CHANGE `data19` `Data19` INT NOT NULL DEFAULT '0';
21+
ALTER TABLE `gameobject_template` CHANGE `data20` `Data20` INT NOT NULL DEFAULT '0';
22+
ALTER TABLE `gameobject_template` CHANGE `data21` `Data21` INT NOT NULL DEFAULT '0';
23+
ALTER TABLE `gameobject_template` CHANGE `data22` `Data22` INT NOT NULL DEFAULT '0';
24+
ALTER TABLE `gameobject_template` CHANGE `data23` `Data23` INT NOT NULL DEFAULT '0';

src/server/game/Accounts/AccountMgr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ AccountOpResult AccountMgr::DeleteAccount(uint32 accountId)
9595
{
9696
do
9797
{
98-
ObjectGuid guid(HighGuid::Player, (*result)[0].GetUInt32());
98+
ObjectGuid guid = ObjectGuid::Create<HighGuid::Player>((*result)[0].GetUInt32());
9999

100100
// Kick if player is online
101101
if (Player* p = ObjectAccessor::FindConnectedPlayer(guid))

src/server/game/AuctionHouse/AuctionHouseMgr.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry* auction, CharacterDatabas
126126
return;
127127

128128
uint32 bidderAccId = 0;
129-
ObjectGuid bidderGuid(HighGuid::Player, auction->bidder);
129+
ObjectGuid bidderGuid = ObjectGuid::Create<HighGuid::Player>(auction->bidder);
130130
Player* bidder = ObjectAccessor::FindConnectedPlayer(bidderGuid);
131131
// data for gm.log
132132
std::string bidderName;
@@ -147,7 +147,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry* auction, CharacterDatabas
147147

148148
if (logGmTrade)
149149
{
150-
ObjectGuid ownerGuid = ObjectGuid(HighGuid::Player, auction->owner);
150+
ObjectGuid ownerGuid = ObjectGuid::Create<HighGuid::Player>(auction->owner);
151151
std::string ownerName;
152152
if (!sCharacterCache->GetCharacterNameByGuid(ownerGuid, ownerName))
153153
ownerName = sObjectMgr->GetTrinityStringForDBCLocale(LANG_UNKNOWN);
@@ -188,7 +188,7 @@ void AuctionHouseMgr::SendAuctionWonMail(AuctionEntry* auction, CharacterDatabas
188188

189189
void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry* auction, CharacterDatabaseTransaction trans)
190190
{
191-
ObjectGuid owner_guid(HighGuid::Player, auction->owner);
191+
ObjectGuid owner_guid = ObjectGuid::Create<HighGuid::Player>(auction->owner);
192192
Player* owner = ObjectAccessor::FindConnectedPlayer(owner_guid);
193193
uint32 owner_accId = sCharacterCache->GetCharacterAccountIdByGuid(owner_guid);
194194
// owner exist (online or offline)
@@ -209,7 +209,7 @@ void AuctionHouseMgr::SendAuctionSalePendingMail(AuctionEntry* auction, Characte
209209
//call this method to send mail to auction owner, when auction is successful, it does not clear ram
210210
void AuctionHouseMgr::SendAuctionSuccessfulMail(AuctionEntry* auction, CharacterDatabaseTransaction trans)
211211
{
212-
ObjectGuid owner_guid(HighGuid::Player, auction->owner);
212+
ObjectGuid owner_guid = ObjectGuid::Create<HighGuid::Player>(auction->owner);
213213
Player* owner = ObjectAccessor::FindConnectedPlayer(owner_guid);
214214
uint32 owner_accId = sCharacterCache->GetCharacterAccountIdByGuid(owner_guid);
215215
// owner exist
@@ -240,7 +240,7 @@ void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry* auction, CharacterDat
240240
if (!pItem)
241241
return;
242242

243-
ObjectGuid owner_guid(HighGuid::Player, auction->owner);
243+
ObjectGuid owner_guid = ObjectGuid::Create<HighGuid::Player>(auction->owner);
244244
Player* owner = ObjectAccessor::FindConnectedPlayer(owner_guid);
245245
uint32 owner_accId = sCharacterCache->GetCharacterAccountIdByGuid(owner_guid);
246246
// owner exist
@@ -263,7 +263,7 @@ void AuctionHouseMgr::SendAuctionExpiredMail(AuctionEntry* auction, CharacterDat
263263
//this function sends mail to old bidder
264264
void AuctionHouseMgr::SendAuctionOutbiddedMail(AuctionEntry* auction, uint32 newPrice, Player* newBidder, CharacterDatabaseTransaction trans)
265265
{
266-
ObjectGuid oldBidder_guid(HighGuid::Player, auction->bidder);
266+
ObjectGuid oldBidder_guid = ObjectGuid::Create<HighGuid::Player>(auction->bidder);
267267
Player* oldBidder = ObjectAccessor::FindConnectedPlayer(oldBidder_guid);
268268

269269
uint32 oldBidder_accId = 0;
@@ -285,7 +285,7 @@ void AuctionHouseMgr::SendAuctionOutbiddedMail(AuctionEntry* auction, uint32 new
285285
//this function sends mail, when auction is cancelled to old bidder
286286
void AuctionHouseMgr::SendAuctionCancelledToBidderMail(AuctionEntry* auction, CharacterDatabaseTransaction trans, Item* item)
287287
{
288-
ObjectGuid bidder_guid = ObjectGuid(HighGuid::Player, auction->bidder);
288+
ObjectGuid bidder_guid = ObjectGuid::Create<HighGuid::Player>(auction->bidder);
289289
Player* bidder = ObjectAccessor::FindConnectedPlayer(bidder_guid);
290290

291291
uint32 bidder_accId = 0;

src/server/game/Battlegrounds/ArenaTeam.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ bool ArenaTeam::LoadArenaTeamFromDB(QueryResult result)
195195

196196
TeamId = fields[0].GetUInt32();
197197
TeamName = fields[1].GetString();
198-
CaptainGuid = ObjectGuid(HighGuid::Player, fields[2].GetUInt32());
198+
CaptainGuid = ObjectGuid::Create<HighGuid::Player>(fields[2].GetUInt32());
199199
Type = fields[3].GetUInt8();
200200
BackgroundColor = fields[4].GetUInt32();
201201
EmblemStyle = fields[5].GetUInt8();
@@ -234,7 +234,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
234234
break;
235235

236236
ArenaTeamMember newMember;
237-
newMember.Guid = ObjectGuid(HighGuid::Player, fields[1].GetUInt32());
237+
newMember.Guid = ObjectGuid::Create<HighGuid::Player>(fields[1].GetUInt32());
238238
newMember.WeekGames = fields[2].GetUInt16();
239239
newMember.WeekWins = fields[3].GetUInt16();
240240
newMember.SeasonGames = fields[4].GetUInt16();
@@ -890,7 +890,7 @@ void ArenaTeam::MemberWon(Player* player, uint32 againstMatchmakerRating, int32
890890
}
891891
}
892892

893-
void ArenaTeam::UpdateArenaPointsHelper(std::map<uint32, uint32>& playerPoints)
893+
void ArenaTeam::UpdateArenaPointsHelper(std::map<ObjectGuid, uint32>& playerPoints)
894894
{
895895
// Called after a match has ended and the stats are already modified
896896
// Helper function for arena point distribution (this way, when distributing, no actual calculation is required, just a few comparisons)
@@ -908,15 +908,15 @@ void ArenaTeam::UpdateArenaPointsHelper(std::map<uint32, uint32>& playerPoints)
908908
if (itr->WeekGames >= requiredGames)
909909
pointsToAdd = GetPoints(itr->PersonalRating);
910910

911-
std::map<uint32, uint32>::iterator plr_itr = playerPoints.find(itr->Guid.GetCounter());
911+
std::map<ObjectGuid, uint32>::iterator plr_itr = playerPoints.find(itr->Guid);
912912
if (plr_itr != playerPoints.end())
913913
{
914914
// Check if there is already more points
915915
if (plr_itr->second < pointsToAdd)
916-
playerPoints[itr->Guid.GetCounter()] = pointsToAdd;
916+
playerPoints[itr->Guid] = pointsToAdd;
917917
}
918918
else
919-
playerPoints[itr->Guid.GetCounter()] = pointsToAdd;
919+
playerPoints[itr->Guid] = pointsToAdd;
920920
}
921921
}
922922

src/server/game/Battlegrounds/ArenaTeam.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class TC_GAME_API ArenaTeam
179179
void MemberLost(Player* player, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange = -12);
180180
void OfflineMemberLost(ObjectGuid guid, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange = -12);
181181

182-
void UpdateArenaPointsHelper(std::map<uint32, uint32> & PlayerPoints);
182+
void UpdateArenaPointsHelper(std::map<ObjectGuid, uint32> & PlayerPoints);
183183

184184
bool FinishWeek(); // returns true if arena team played this week
185185
void FinishGame(int32 mod);

src/server/game/Battlegrounds/ArenaTeamMgr.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void ArenaTeamMgr::DistributeArenaPoints()
143143
sWorld->SendWorldText(LANG_DIST_ARENA_POINTS_ONLINE_START);
144144

145145
// Temporary structure for storing maximum points to add values for all players
146-
std::map<uint32, uint32> PlayerPoints;
146+
std::map<ObjectGuid, uint32> PlayerPoints;
147147

148148
// At first update all points for all team members
149149
for (auto [teamId, team] : ArenaTeamStore)
@@ -154,16 +154,16 @@ void ArenaTeamMgr::DistributeArenaPoints()
154154
CharacterDatabasePreparedStatement* stmt;
155155

156156
// Cycle that gives points to all players
157-
for (std::map<uint32, uint32>::iterator playerItr = PlayerPoints.begin(); playerItr != PlayerPoints.end(); ++playerItr)
157+
for (std::map<ObjectGuid, uint32>::iterator playerItr = PlayerPoints.begin(); playerItr != PlayerPoints.end(); ++playerItr)
158158
{
159159
// Add points to player if online
160-
if (Player* player = ObjectAccessor::FindConnectedPlayer(ObjectGuid(HighGuid::Player, playerItr->first)))
160+
if (Player* player = ObjectAccessor::FindConnectedPlayer(playerItr->first))
161161
player->ModifyArenaPoints(playerItr->second, trans);
162162
else // Update database
163163
{
164164
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_CHAR_ARENA_POINTS);
165165
stmt->setUInt32(0, playerItr->second);
166-
stmt->setUInt32(1, playerItr->first);
166+
stmt->setUInt32(1, playerItr->first.GetCounter());
167167
trans->Append(stmt);
168168
}
169169
}

src/server/game/Chat/Channels/Channel.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ Channel::Channel(std::string const& name, uint32 team /*= 0*/, std::string const
7676
{
7777
for (std::string_view guid : Trinity::Tokenize(banList, ' ', false))
7878
{
79-
ObjectGuid banned(Trinity::StringTo<uint64>(guid).value_or(0));
79+
ObjectGuid banned;
80+
banned.SetRawValue(Trinity::StringTo<uint64>(guid).value_or(0));
8081
if (!banned)
8182
continue;
8283

src/server/game/Conditions/ConditionMgr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo) const
260260
condMeets = instance->GetData(ConditionValue1) == ConditionValue2;
261261
break;
262262
case INSTANCE_INFO_GUID_DATA:
263-
condMeets = instance->GetGuidData(ConditionValue1) == ObjectGuid(uint64(ConditionValue2));
263+
condMeets = instance->GetGuidData(ConditionValue1).GetRawValue() == uint64(ConditionValue2);
264264
break;
265265
case INSTANCE_INFO_BOSS_STATE:
266266
condMeets = instance->GetBossState(ConditionValue1) == EncounterState(ConditionValue2);

src/server/game/Conditions/ConditionMgr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct Condition;
3636
enum ConditionTypes
3737
{ // value1 value2 value3
3838
CONDITION_NONE = 0, // 0 0 0 always true
39-
CONDITION_AURA = 1, // spell_id effindex use target? true if player (or target, if value3) has aura of spell_id with effect effindex
39+
CONDITION_AURA = 1, // spell_id effindex 0 true if target has aura of spell_id with effect effindex
4040
CONDITION_ITEM = 2, // item_id count bank true if has #count of item_ids (if 'bank' is set it searches in bank slots too)
4141
CONDITION_ITEM_EQUIPPED = 3, // item_id 0 0 true if has item_id equipped
4242
CONDITION_ZONEID = 4, // zone_id 0 0 true if in zone_id

src/server/game/DungeonFinding/LFGMgr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void LFGMgr::_LoadFromDB(Field* fields, ObjectGuid guid)
7676
if (!guid.IsGroup())
7777
return;
7878

79-
SetLeader(guid, ObjectGuid(HighGuid::Player, fields[0].GetUInt32()));
79+
SetLeader(guid, ObjectGuid::Create<HighGuid::Player>(fields[0].GetUInt32()));
8080

8181
uint32 dungeon = fields[17].GetUInt32();
8282
uint8 state = fields[18].GetUInt8();

0 commit comments

Comments
 (0)