Skip to content

Commit 0332a3e

Browse files
author
Github Actions
committed
Merge 3.3.5 to 3.3.5-base_patch
2 parents 5e60968 + 4e38582 commit 0332a3e

8 files changed

Lines changed: 63 additions & 26 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
-- Forgotten Depths Ambusher
2+
SET @ENTRY := 30204;
3+
-- Update auras
4+
UPDATE `creature_template_addon` SET `auras`='42459 56422' WHERE `entry`=@ENTRY; -- Dual Wield, Nerubian Submerge
5+
-- Update unit flags
6+
UPDATE `creature_template` SET `unit_flags`=512 WHERE `entry`=@ENTRY;
7+
-- Forgotten Depths Ambusher smart ai
8+
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = @ENTRY;
9+
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryOrGuid` = @ENTRY;
10+
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
11+
(@ENTRY, 0, 0, 1, 54, 0, 100, 1, 0, 0, 0, 0, 28, 56422, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Forgotten Depths Ambusher - On just summoned - Remove 'Nerubian Submerge' aura (No Repeat)"),
12+
(@ENTRY, 0, 1, 2, 61, 0, 100, 1, 0, 0, 0, 0, 11, 56418, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Forgotten Depths Ambusher - On link - Cast spell 'Emerge From Snow' on Self (No Repeat)"),
13+
(@ENTRY, 0, 2, 0, 61, 0, 100, 1, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 40, 0, 0, 0, 0, 0, 0, "Forgotten Depths Ambusher - On link - Attack start on closest player (No Repeat)"),
14+
(@ENTRY, 0, 3, 0, 7, 0, 100, 1, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, "Forgotten Depths Ambusher - On evade - Despawn instantly (No Repeat)");
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- Add Franklin the Friendly charm immunnity
2+
UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask`|1 WHERE `entry`=14529;

src/server/game/DataStores/DBCStores.cpp

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -589,11 +589,12 @@ void LoadDBCStores(const std::string& dataPath)
589589
if (sInfo->Effect[j] == SPELL_EFFECT_SEND_TAXI)
590590
spellPaths.insert(sInfo->EffectMiscValue[j]);
591591

592-
sTaxiNodesMask.fill(0);
593-
sOldContinentsNodesMask.fill(0);
594-
sHordeTaxiNodesMask.fill(0);
595-
sAllianceTaxiNodesMask.fill(0);
596-
sDeathKnightTaxiNodesMask.fill(0);
592+
// reinitialize internal storage for globals after loading TaxiNodes.db2
593+
sTaxiNodesMask = {};
594+
sOldContinentsNodesMask = {};
595+
sHordeTaxiNodesMask = {};
596+
sAllianceTaxiNodesMask = {};
597+
sDeathKnightTaxiNodesMask = {};
597598
for (TaxiNodesEntry const* node : sTaxiNodesStore)
598599
{
599600
TaxiPathSetBySource::const_iterator src_i = sTaxiPathSetBySource.find(node->ID);
@@ -985,3 +986,12 @@ EmotesTextSoundEntry const* FindTextSoundEmoteFor(uint32 emote, uint32 race, uin
985986
auto itr = sEmotesTextSoundMap.find(EmotesTextSoundKey(emote, race, gender));
986987
return itr != sEmotesTextSoundMap.end() ? itr->second : nullptr;
987988
}
989+
990+
TaxiMask::TaxiMask()
991+
{
992+
if (sTaxiNodesStore.GetNumRows())
993+
{
994+
_data.resize((sTaxiNodesStore.GetNumRows() + (8 * sizeof(uint64) - 1)) / (8 * sizeof(uint64)) * (sizeof(uint64) / sizeof(value_type)), 0);
995+
ASSERT((_data.size() % (8 / sizeof(value_type))) == 0, "TaxiMask byte size must be aligned to a multiple of uint64");
996+
}
997+
}

src/server/game/Entities/Player/PlayerTaxi.cpp

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void PlayerTaxi::InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint8 level
2929
{
3030
case CLASS_DEATH_KNIGHT:
3131
{
32-
for (uint8 i = 0; i < TaxiMaskSize; ++i)
32+
for (std::size_t i = 0; i < m_taximask.size(); ++i)
3333
m_taximask[i] |= sOldContinentsNodesMask[i];
3434
break;
3535
}
@@ -66,7 +66,7 @@ bool PlayerTaxi::LoadTaxiMask(std::string const& data)
6666
{
6767
bool warn = false;
6868
std::vector<std::string_view> tokens = Trinity::Tokenize(data, ' ', false);
69-
for (uint8 index = 0; (index < TaxiMaskSize) && (index < tokens.size()); ++index)
69+
for (size_t index = 0; (index < m_taximask.size()) && (index < tokens.size()); ++index)
7070
{
7171
if (Optional<uint32> mask = Trinity::StringTo<uint32>(tokens[index]))
7272
{
@@ -87,15 +87,9 @@ bool PlayerTaxi::LoadTaxiMask(std::string const& data)
8787
void PlayerTaxi::AppendTaximaskTo(ByteBuffer& data, bool all)
8888
{
8989
if (all)
90-
{
91-
for (uint8 i = 0; i < TaxiMaskSize; ++i)
92-
data << uint32(sTaxiNodesMask[i]); // all existing nodes
93-
}
90+
data.append(sTaxiNodesMask.data(), sTaxiNodesMask.size()); // all existing nodes
9491
else
95-
{
96-
for (uint8 i = 0; i < TaxiMaskSize; ++i)
97-
data << uint32(m_taximask[i]); // known nodes
98-
}
92+
data.append(m_taximask.data(), m_taximask.size()); // known nodes
9993
}
10094

10195
bool PlayerTaxi::LoadTaxiDestinationsFromString(const std::string& values, uint32 team)
@@ -176,8 +170,8 @@ uint32 PlayerTaxi::GetCurrentTaxiPath() const
176170

177171
std::ostringstream& operator<<(std::ostringstream& ss, PlayerTaxi const& taxi)
178172
{
179-
for (uint8 i = 0; i < TaxiMaskSize; ++i)
180-
ss << taxi.m_taximask[i] << ' ';
173+
for (std::size_t i = 0; i < taxi.m_taximask.size(); ++i)
174+
ss << uint32(taxi.m_taximask[i]) << ' ';
181175
return ss;
182176
}
183177

src/server/game/Entities/Player/PlayerTaxi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct FactionTemplateEntry;
3030
class TC_GAME_API PlayerTaxi
3131
{
3232
public:
33-
PlayerTaxi() : m_flightMasterFactionId(0) { m_taximask.fill(0); }
33+
PlayerTaxi() : m_flightMasterFactionId(0) { }
3434
~PlayerTaxi() { }
3535
// Nodes
3636
void InitTaxiNodesForLevel(uint32 race, uint32 chrClass, uint8 level);

src/server/game/Handlers/GroupHandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -911,7 +911,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recvData)
911911
recvData >> Guid;
912912

913913
Player* player = ObjectAccessor::FindConnectedPlayer(Guid);
914-
if (!player)
914+
if (!player || !GetPlayer()->IsInSameRaidWith(player))
915915
{
916916
WorldPacket data(SMSG_PARTY_MEMBER_STATS_FULL, 3+4+2);
917917
data << uint8(0); // only for SMSG_PARTY_MEMBER_STATS_FULL, probably arena/bg related

src/server/game/Maps/MapManager.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,6 @@ Map::EnterState MapManager::PlayerCannotEnter(uint32 mapid, Player* player, bool
152152
if (player->IsGameMaster())
153153
return Map::CAN_ENTER;
154154

155-
//Other requirements
156-
if (!player->Satisfy(sObjectMgr->GetAccessRequirement(mapid, targetDifficulty), mapid, true))
157-
return Map::CANNOT_ENTER_UNSPECIFIED_REASON;
158-
159155
char const* mapName = entry->MapName[player->GetSession()->GetSessionDbcLocale()];
160156

161157
Group* group = player->GetGroup();
@@ -209,6 +205,10 @@ Map::EnterState MapManager::PlayerCannotEnter(uint32 mapid, Player* player, bool
209205
return Map::CANNOT_ENTER_TOO_MANY_INSTANCES;
210206
}
211207

208+
//Other requirements
209+
if (!player->Satisfy(sObjectMgr->GetAccessRequirement(mapid, targetDifficulty), mapid, true))
210+
return Map::CANNOT_ENTER_UNSPECIFIED_REASON;
211+
212212
return Map::CAN_ENTER;
213213
}
214214

src/server/shared/DataStores/DBCEnums.h

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#define DBCENUMS_H
2020

2121
#include "Define.h"
22-
#include <array>
22+
#include <vector>
2323

2424
#pragma pack(push, 1)
2525

@@ -433,8 +433,25 @@ enum SummonPropFlags
433433
#define MAX_PET_TALENT_RANK 3 // use in calculations, expected <= MAX_TALENT_RANK
434434
#define MAX_TALENT_TABS 3
435435

436-
static constexpr size_t TaxiMaskSize = 14;
437-
typedef std::array<uint32, TaxiMaskSize> TaxiMask;
436+
class TaxiMask
437+
{
438+
public:
439+
using value_type = uint32;
440+
441+
TaxiMask();
442+
443+
value_type& operator[](size_t i) { return _data[i]; }
444+
value_type const& operator[](size_t i) const { return _data[i]; }
445+
446+
size_t size() const { return _data.size(); }
447+
value_type const* data() const { return _data.data(); }
448+
449+
decltype(auto) begin() { return _data.begin(); }
450+
decltype(auto) end() { return _data.end(); }
451+
452+
private:
453+
std::vector<value_type> _data;
454+
};
438455

439456
enum TotemCategoryType
440457
{

0 commit comments

Comments
 (0)