Skip to content

Commit 4026eee

Browse files
author
Github Actions
committed
Merge 3.3.5 to 3.3.5-vas-autobalance
2 parents 5775d43 + 760cd82 commit 4026eee

File tree

22 files changed

+777
-696
lines changed

22 files changed

+777
-696
lines changed

dep/boost/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ endif()
4343
find_package(Boost ${BOOST_REQUIRED_VERSION}
4444
REQUIRED
4545
COMPONENTS
46-
system
4746
filesystem
4847
program_options
4948
regex
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--
2+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_kurinnaxx_sand_trap';
3+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
4+
(26524, 'spell_kurinnaxx_sand_trap');
5+
6+
-- Should be disturbed instead (activate object action)
7+
UPDATE `gameobject_template` SET `AIName` = 'SmartGameObjectAI' WHERE `entry` = 180647;
8+
DELETE FROM `smart_scripts` WHERE `entryorguid` = 180647 AND `source_type` = 1;
9+
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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
10+
(180647,1,0,0,60,0,100,1,4500,4500,0,0,0,11,25656,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Sand Trap - On Update - Cast 'Sand Trap' (No Repeat)"),
11+
(180647,1,1,0,60,0,100,1,4500,4500,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Sand Trap - On Update - Despawn (No Repeat)");
12+
13+
DELETE FROM `creature_text` WHERE `CreatureID` = 15348;
14+
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
15+
(15348,0,0,"%s goes into a frenzy!",16,0,100,0,0,0,2384,0,"Kurinnaxx EMOTE_FRENZY");
16+
17+
UPDATE `creature_text` SET `TextRange` = 3 WHERE `CreatureID` = 15339 AND `GroupID` = 5;
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
--
2+
DELETE FROM `spell_target_position` WHERE `ID` IN (518,25831,25832,26630,26631,26632,720,731,1121);
3+
INSERT INTO `spell_target_position` (`ID`, `EffectIndex`, `MapID`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `VerifiedBuild`) VALUES
4+
(518,0,531,-8028.5,1050.9,-54,0,0),
5+
(25831,0,531,-8158.03,1139.3,-83.95,0,0),
6+
(25832,0,531,-8029.25,1237.78,-85.2285,0,0),
7+
(720,0,531,-8043.6,1254.1,-84.3,0,0),
8+
(731,0,531,-8003,1222.9,-82.1,0,0),
9+
(1121,0,531,-8022.3,1149,-89.1,0,0),
10+
(26630,0,531,-8043.6,1254.1,-84.2167,0,0),
11+
(26631,0,531,-8003,1222.9,-82.0167,0,0),
12+
(26632,0,531,-8022.3,1149,-89.0167,0,0);
13+
14+
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 15962;
15+
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (15630,15962) AND `source_type` = 0;
16+
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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
17+
(15630,0,0,0,37,0,100,0,0,0,0,0,0,116,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Spawn of Fankriss - On AI Initialize - Set Corpse Delay"),
18+
(15630,0,1,0,11,0,100,0,0,0,0,0,0,38,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Spawn of Fankriss - On Spawn - Set In Combat With Zone"),
19+
(15630,0,2,0,60,0,100,1,20000,20000,0,0,0,11,26662,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Spawn of Fankriss - On Update - Cast 'Berserk'"),
20+
21+
(15962,0,0,0,37,0,100,0,0,0,0,0,0,116,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Vekniss Hatchling - On AI Initialize - Set Corpse Delay"),
22+
(15962,0,1,0,11,0,100,0,0,0,0,0,0,38,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Vekniss Hatchling - On Spawn - Set In Combat With Zone");
23+
24+
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_fankriss_entangle';
25+
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
26+
(720, 'spell_fankriss_entangle'),
27+
(731, 'spell_fankriss_entangle'),
28+
(1121, 'spell_fankriss_entangle');
29+
30+
UPDATE `creature_template` SET `speed_run` = 2.14285714286 WHERE `entry` = 15510;
31+
UPDATE `creature_template` SET `speed_run` = 1.71428571429 WHERE `entry` = 15630;
32+
UPDATE `creature_template` SET `speed_run` = 1.42857142857 WHERE `entry` = 15962;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--
2+
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (22035,22036);
3+
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (22035,22036) AND `source_type` = 0;
4+
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (2203500) AND `source_type` = 9;
5+
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`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
6+
(22035,0,0,0,37,0,100,0,0,0,0,0,0,116,4,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Pure Spawn of Hydross - On AI Initialize - Set Corpse Delay"),
7+
(22035,0,1,0,37,0,100,0,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Pure Spawn of Hydross - On AI Initialize - Set Reactstate Passive"),
8+
(22035,0,2,0,11,0,100,0,0,0,0,0,0,11,25035,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Pure Spawn of Hydross - On Spawn - Cast 'Elemental Spawn-in'"),
9+
(22035,0,3,0,11,0,100,0,0,0,0,0,0,80,2203500,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Pure Spawn of Hydross - On Spawn - Run Script"),
10+
11+
(22036,0,0,0,37,0,100,0,0,0,0,0,0,116,4,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Tainted Spawn of Hydross - On AI Initialize - Set Corpse Delay"),
12+
(22036,0,1,0,37,0,100,0,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Tainted Spawn of Hydross - On AI Initialize - Set Reactstate Passive"),
13+
(22036,0,2,0,11,0,100,0,0,0,0,0,0,11,25035,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Tainted Spawn of Hydross - On Spawn - Cast 'Elemental Spawn-in'"),
14+
(22036,0,3,0,11,0,100,0,0,0,0,0,0,80,2203500,2,0,0,0,0,1,0,0,0,0,0,0,0,0,"Tainted Spawn of Hydross - On Spawn - Run Script"),
15+
16+
(2203500,9,0,0,0,0,100,0,3000,3000,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Pure Spawn of Hydross - On Script - Set Reactstate Aggressive");
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--
2+
UPDATE `spell_script_names` SET `ScriptName` = 'spell_netherstorm_detonate_teleporter' WHERE `ScriptName` = 'spell_detonate_teleporter';
3+
4+
-- Shouldn't be used for teleport, only to trigger events
5+
DELETE FROM `areatrigger_teleport` WHERE `ID` = 4523;
6+
7+
DELETE FROM `gameobject` WHERE `guid` = 91320 AND `id` = 184606;
8+
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`, `StringId`, `VerifiedBuild`) VALUES
9+
(91320,184606,530,0,0,1,1,4799.248,3779.397,211.75,0,0,0,0,1,300,0,1,'',NULL,0);
10+
11+
UPDATE `spell_script_names` SET `ScriptName` = 'spell_netherstorm_socrethars_stone' WHERE `ScriptName` = 'spell_item_socrethars_stone';
12+
13+
--
14+
UPDATE `spell_script_names` SET `ScriptName` = 'spell_hellfire_peninsula_purify_helboar_meat' WHERE `ScriptName` = 'spell_item_purify_helboar_meat';
15+
16+
--
17+
UPDATE `spell_script_names` SET `ScriptName` = 'spell_hellfire_peninsula_absorb_eye_of_grillok' WHERE `ScriptName` = 'spell_item_absorb_eye_of_grillok';

src/common/Containers/FlatSet.h

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#ifndef TRINITYCORE_FLAT_SET_H
1818
#define TRINITYCORE_FLAT_SET_H
1919

20+
#include <algorithm>
2021
#include <functional>
2122
#include <vector>
2223

@@ -38,21 +39,28 @@ class FlatSet
3839
auto end() { return _storage.end(); }
3940
auto end() const { return _storage.end(); }
4041

42+
bool contains(Key const& value) const
43+
{
44+
return std::binary_search(this->begin(), this->end(), value, Compare());
45+
}
46+
4147
auto find(Key const& value) const
4248
{
49+
auto compare = Compare();
4350
auto end = this->end();
44-
auto itr = std::lower_bound(this->begin(), end, value, Compare());
45-
if (itr != end && Compare()(value, *itr))
51+
auto itr = std::lower_bound(this->begin(), end, value, compare);
52+
if (itr != end && compare(value, *itr))
4653
itr = end;
4754

4855
return itr;
4956
}
5057

5158
auto find(Key const& value)
5259
{
60+
auto compare = Compare();
5361
auto end = this->end();
54-
auto itr = std::lower_bound(this->begin(), end, value, Compare());
55-
if (itr != end && Compare()(value, *itr))
62+
auto itr = std::lower_bound(this->begin(), end, value, compare);
63+
if (itr != end && compare(value, *itr))
5664
itr = end;
5765

5866
return itr;
@@ -62,9 +70,10 @@ class FlatSet
6270
std::pair<iterator, bool> emplace(Args&&... args)
6371
{
6472
Key newElement(std::forward<Args>(args)...);
73+
auto compare = Compare();
6574
auto end = this->end();
66-
auto itr = std::lower_bound(this->begin(), end, newElement, Compare());
67-
if (itr != end && !Compare()(newElement, *itr))
75+
auto itr = std::lower_bound(this->begin(), end, newElement, compare);
76+
if (itr != end && !compare(newElement, *itr))
6877
return { itr, false };
6978

7079
return { _storage.emplace(itr, std::move(newElement)), true };
@@ -87,15 +96,8 @@ class FlatSet
8796

8897
void shrink_to_fit() { _storage.shrink_to_fit(); }
8998

90-
friend bool operator==(FlatSet const& left, FlatSet const& right)
91-
{
92-
return left._storage == right._storage;
93-
}
94-
95-
friend bool operator!=(FlatSet const& left, FlatSet const& right)
96-
{
97-
return !(left == right);
98-
}
99+
friend std::strong_ordering operator<=>(FlatSet const& left, FlatSet const& right) = default;
100+
friend bool operator==(FlatSet const& left, FlatSet const& right) = default;
99101

100102
private:
101103
KeyContainer _storage;

src/server/game/Battlegrounds/Battleground.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ void Battleground::SetBgRaid(uint32 TeamID, Group* bg_raid)
17951795

17961796
WorldSafeLocsEntry const* Battleground::GetClosestGraveyard(Player* player)
17971797
{
1798-
return sObjectMgr->GetClosestGraveyard(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), player->GetTeam());
1798+
return sObjectMgr->GetClosestGraveyard(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), player->GetTeam(), player);
17991799
}
18001800

18011801
void Battleground::StartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4862,7 +4862,7 @@ void Player::RepopAtGraveyard()
48624862
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId()))
48634863
ClosestGrave = bf->GetClosestGraveyard(this);
48644864
else
4865-
ClosestGrave = sObjectMgr->GetClosestGraveyard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam());
4865+
ClosestGrave = sObjectMgr->GetClosestGraveyard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam(), this);
48664866
}
48674867

48684868
// stop countdown until repop
@@ -22084,7 +22084,7 @@ void Player::SetBattlegroundEntryPoint()
2208422084
// If map is dungeon find linked graveyard
2208522085
if (GetMap()->IsDungeon())
2208622086
{
22087-
if (WorldSafeLocsEntry const* entry = sObjectMgr->GetClosestGraveyard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam()))
22087+
if (WorldSafeLocsEntry const* entry = sObjectMgr->GetClosestGraveyard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeam(), this))
2208822088
m_bgData.joinPos = WorldLocation(entry->Continent, entry->Loc.X, entry->Loc.Y, entry->Loc.Z, 0.0f);
2208922089
else
2209022090
TC_LOG_ERROR("entities.player", "Player::SetBattlegroundEntryPoint: Dungeon (MapID: {}) has no linked graveyard, setting home location as entry point.", GetMapId());

src/server/game/Globals/ObjectMgr.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7019,7 +7019,7 @@ WorldSafeLocsEntry const* ObjectMgr::GetDefaultGraveyard(uint32 team) const
70197019
else return nullptr;
70207020
}
70217021

7022-
WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveyard(float x, float y, float z, uint32 MapId, uint32 team) const
7022+
WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveyard(float x, float y, float z, uint32 MapId, uint32 team, WorldObject* conditionObject) const
70237023
{
70247024
// search for zone associated closest graveyard
70257025
uint32 zoneId = sMapMgr->GetZoneId(PHASEMASK_NORMAL, MapId, x, y, z);
@@ -7028,7 +7028,8 @@ WorldSafeLocsEntry const* ObjectMgr::GetClosestGraveyard(float x, float y, float
70287028
{
70297029
if (z > -500)
70307030
{
7031-
TC_LOG_ERROR("misc", "ZoneId not found for map {} coords ({}, {}, {})", MapId, x, y, z);
7031+
TC_LOG_ERROR("misc", "ZoneId not found for map {} coords ({}, {}, {}), object name: {} {}", MapId, x, y, z,
7032+
conditionObject ? std::string_view(conditionObject->GetName()) : "", Object::GetGUID(conditionObject));
70327033
return GetDefaultGraveyard(team);
70337034
}
70347035
}

src/server/game/Globals/ObjectMgr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ class TC_GAME_API ObjectMgr
10591059
QuestGreeting const* GetQuestGreeting(ObjectGuid guid) const;
10601060

10611061
WorldSafeLocsEntry const* GetDefaultGraveyard(uint32 team) const;
1062-
WorldSafeLocsEntry const* GetClosestGraveyard(float x, float y, float z, uint32 MapId, uint32 team) const;
1062+
WorldSafeLocsEntry const* GetClosestGraveyard(float x, float y, float z, uint32 MapId, uint32 team, WorldObject* conditionObject) const;
10631063
bool AddGraveyardLink(uint32 id, uint32 zoneId, uint32 team, bool persist = true);
10641064
void RemoveGraveyardLink(uint32 id, uint32 zoneId, uint32 team, bool persist = false);
10651065
void LoadGraveyardZones();

0 commit comments

Comments
 (0)