Skip to content

Commit 8c3f15c

Browse files
Merge AzerothCore 3.3.5 to ElunaAzerothcore [skip ci]
2 parents fd4aa27 + 37019a2 commit 8c3f15c

12 files changed

Lines changed: 125 additions & 41 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-- DB update 2026_02_02_01 -> 2026_02_03_00
2+
-- Add parent rotation columns to gameobject_addon table for transport rotation support
3+
ALTER TABLE `gameobject_addon`
4+
ADD COLUMN `parent_rotation0` FLOAT NOT NULL DEFAULT 0 AFTER `guid`,
5+
ADD COLUMN `parent_rotation1` FLOAT NOT NULL DEFAULT 0 AFTER `parent_rotation0`,
6+
ADD COLUMN `parent_rotation2` FLOAT NOT NULL DEFAULT 0 AFTER `parent_rotation1`,
7+
ADD COLUMN `parent_rotation3` FLOAT NOT NULL DEFAULT 1 AFTER `parent_rotation2`;
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- DB update 2026_02_03_00 -> 2026_02_03_01
2+
-- DB/Gameobject: Update "Dangerous!" sign with sniffed values
3+
-- Closes https://github.com/azerothcore/azerothcore-wotlk/issues/16834
4+
DELETE FROM `gameobject` WHERE `guid` = 17154 AND `id` = 2008;
5+
INSERT INTO `gameobject` (`guid`, `id`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `VerifiedBuild`) VALUES
6+
(17154, 2008, 0, 267, 272, 1, 1, -19.4826393127441406, -935.3038330078125, 58.09708786010742187, 2.65289926528930664, -0.04655265808105468, 0.011606216430664062, 0.969178199768066406, 0.241643846035003662, 120, 255, 1, 42328);
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
-- DB update 2026_02_03_01 -> 2026_02_04_00
2+
--
3+
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20046);
4+
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`, `event_param6`, `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
5+
(20046, 0, 0, 0, 0, 0, 100, 0, 1000, 3000, 5500, 7500, 0, 0, 11, 37110, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Astromancer Lord - In Combat - Cast \'Fire Blast\''),
6+
(20046, 0, 1, 0, 0, 0, 100, 0, 4000, 8000, 15000, 17000, 0, 0, 11, 37289, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Astromancer Lord - In Combat - Cast \'Dragon\'s Breath\''),
7+
(20046, 0, 2, 0, 0, 0, 100, 0, 15000, 16000, 15000, 24000, 0, 0, 11, 37109, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Astromancer Lord - In Combat - Cast \'Fireball Volley\''),
8+
(20046, 0, 3, 0, 0, 0, 100, 1, 0, 1000, 0, 0, 0, 0, 11, 38732, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Astromancer Lord - In Combat - Cast \'Fire Shield\' (No Repeat)'),
9+
(20046, 0, 4, 0, 0, 0, 100, 0, 9700, 19800, 10900, 23800, 0, 0, 11, 37122, 32, 0, 0, 0, 0, 6, 20, 1, 0, 37122, 0, 0, 0, 0, 'Astromancer Lord - In Combat - Cast \'Domination\'');
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
-- DB update 2026_02_04_00 -> 2026_02_04_01
2+
--
3+
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 19734);
4+
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`, `event_param6`, `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
5+
(19734, 0, 0, 1, 0, 0, 100, 1, 8000, 12000, 0, 0, 0, 0, 11, 35256, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Fungal Giant - In Combat - Cast \'Serverside - Summon Unstable Mushroom\' (No Repeat)'),
6+
(19734, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Fungal Giant - In Combat - Say Line 0 (No Repeat)');
7+
8+
DELETE FROM `creature_text` WHERE (`CreatureID` = 19734);
9+
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
10+
(19734, 0, 0, '%s throws a mushroom spore at $n.', 16, 0, 100, 0, 0, 0, 18913, 0, 'Fungal Giant Unstable Shroom');
11+
12+
DELETE FROM `creature_template_movement` WHERE (`CreatureId` = 20479);
13+
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES
14+
(20479, 0, 0, 0, 1, 0, 0, 0);
15+
16+
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 20479);
17+
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`, `event_param6`, `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
18+
(20479, 0, 0, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 80, 2047900, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - On Just Summoned - Run Script');
19+
20+
DELETE FROM `smart_scripts` WHERE (`source_type` = 9 AND `entryorguid` = 2047900);
21+
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`, `event_param6`, `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
22+
(2047900, 9, 0 , 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Set Reactstate Passive'),
23+
(2047900, 9, 1 , 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 31690, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Cast \'Putrid Mushroom\''),
24+
(2047900, 9, 2 , 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 31691, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Cast \'Shrink\''),
25+
(2047900, 9, 3 , 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 31698, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Cast \'Grow\''),
26+
(2047900, 9, 4 , 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 31698, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Cast \'Grow\''),
27+
(2047900, 9, 5 , 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 31698, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Cast \'Grow\''),
28+
(2047900, 9, 6 , 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 31698, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Cast \'Grow\''),
29+
(2047900, 9, 7 , 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 31698, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Cast \'Grow\''),
30+
(2047900, 9, 8 , 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 31698, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Cast \'Grow\''),
31+
(2047900, 9, 9 , 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 31698, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Cast \'Grow\''),
32+
(2047900, 9, 10, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 31698, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Cast \'Grow\''),
33+
(2047900, 9, 11, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 31698, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Cast \'Grow\''),
34+
(2047900, 9, 12, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 0, 0, 11, 35362, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Cast \'Unstable Mushroom Visual\''),
35+
(2047900, 9, 13, 0, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 35252, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Cast \'Unstable Cloud\''),
36+
(2047900, 9, 14, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 0, 0, 28, 31698, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Remove Aura \'Grow\''),
37+
(2047900, 9, 15, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Unstable Shroom - Actionlist - Despawn Instant');
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-- DB update 2026_02_04_01 -> 2026_02_04_02
2+
-- Removes "Warsong Report" and "Battered Junkbox" (yes remove itself from itself) from "Battered Junkbox"
3+
DELETE FROM `item_loot_template` WHERE `Entry` = 16882 AND `Item` IN (16746, 16882);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
-- DB update 2026_02_04_02 -> 2026_02_04_03
2+
DELETE FROM `creature_template_model` WHERE `CreatureID` IN (17168, 17169, 17170, 17171, 17172, 17173, 17174, 17175, 17176, 25739);
3+
INSERT INTO `creature_template_model` (`CreatureID`, `Idx`, `CreatureDisplayID`, `DisplayScale`, `Probability`, `VerifiedBuild`) VALUES
4+
(17168, 0, 15435, 1, 1, 51831),
5+
(17168, 1, 1126, 1, 0, 51831),
6+
(17169, 0, 15435, 1, 1, 51831),
7+
(17169, 1, 1126, 1, 0, 51831),
8+
(17170, 0, 15435, 1, 1, 51831),
9+
(17170, 1, 1126, 1, 0, 51831),
10+
(17171, 0, 15435, 1, 1, 51831),
11+
(17171, 1, 1126, 1, 0, 51831),
12+
(17172, 0, 15435, 1, 1, 51831),
13+
(17172, 1, 1126, 1, 0, 51831),
14+
(17173, 0, 15435, 1, 1, 51831),
15+
(17174, 0, 15435, 1, 1, 51831),
16+
(17175, 0, 15435, 1, 0, 51831),
17+
(17176, 0, 15435, 1, 0, 51831),
18+
(25739, 0, 169, 1, 0, 51831),
19+
(25739, 1, 23343, 1, 1, 51831);

src/server/game/Entities/GameObject/GameObject.cpp

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@
4141
#include "LuaEngine.h"
4242
#endif
4343

44+
bool QuaternionData::IsUnit() const
45+
{
46+
return fabs(x * x + y * y + z * z + w * w - 1.0f) < 1e-5f;
47+
}
48+
4449
GameObject::GameObject() : WorldObject(), MovableMapObject(),
4550
m_model(nullptr), m_goValue(), m_AI(nullptr)
4651
{
@@ -296,35 +301,14 @@ bool GameObject::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, u
296301
return false;
297302
}
298303

299-
GameObjectAddon const* addon = sObjectMgr->GetGameObjectAddon(GetSpawnId());
304+
SetLocalRotation(rotation);
300305

301-
// hackfix for the hackfix down below
302-
switch (goinfo->entry)
303-
{
304-
// excluded ids from the hackfix below
305-
// used switch since there should be more
306-
case 181233: // maexxna portal effect
307-
case 181575: // maexxna portal
308-
case 20992: // theramore black shield
309-
case 21042: // theramore guard badge
310-
SetLocalRotation(rotation);
311-
break;
312-
default:
313-
// xinef: hackfix - but make it possible to use original WorldRotation (using special gameobject addon data)
314-
// pussywizard: temporarily calculate WorldRotation from orientation, do so until values in db are correct
315-
if (addon && addon->invisibilityType == INVISIBILITY_GENERAL && addon->InvisibilityValue == 0)
316-
{
317-
SetLocalRotation(rotation);
318-
}
319-
else
320-
{
321-
SetLocalRotationAngles(NormalizeOrientation(GetOrientation()), 0.0f, 0.0f);
322-
}
323-
break;
324-
}
306+
GameObjectAddon const* gameObjectAddon = sObjectMgr->GetGameObjectAddon(GetSpawnId());
307+
QuaternionData parentRotation;
308+
if (gameObjectAddon)
309+
parentRotation = gameObjectAddon->ParentRotation;
325310

326-
// pussywizard: no PathRotation for normal gameobjects
327-
SetTransportPathRotation(0.0f, 0.0f, 0.0f, 1.0f);
311+
SetTransportPathRotation(parentRotation.x, parentRotation.y, parentRotation.z, parentRotation.w);
328312

329313
SetObjectScale(goinfo->size);
330314

@@ -406,12 +390,12 @@ bool GameObject::Create(ObjectGuid::LowType guidlow, uint32 name_id, Map* map, u
406390
break;
407391
}
408392

409-
if (addon)
393+
if (gameObjectAddon)
410394
{
411-
if (addon->InvisibilityValue)
395+
if (gameObjectAddon->InvisibilityValue)
412396
{
413-
m_invisibility.AddFlag(addon->invisibilityType);
414-
m_invisibility.AddValue(addon->invisibilityType, addon->InvisibilityValue);
397+
m_invisibility.AddFlag(gameObjectAddon->invisibilityType);
398+
m_invisibility.AddValue(gameObjectAddon->invisibilityType, gameObjectAddon->InvisibilityValue);
415399
}
416400
}
417401

src/server/game/Entities/GameObject/GameObjectData.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,23 @@ struct GameObjectLocale
678678
std::vector<std::string> CastBarCaption;
679679
};
680680

681+
struct AC_GAME_API QuaternionData
682+
{
683+
float x;
684+
float y;
685+
float z;
686+
float w;
687+
688+
QuaternionData() : x(0.0f), y(0.0f), z(0.0f), w(1.0f) { }
689+
QuaternionData(float X, float Y, float Z, float W) : x(X), y(Y), z(Z), w(W) { }
690+
691+
[[nodiscard]] bool IsUnit() const;
692+
};
693+
681694
// `gameobject_addon` table
682695
struct GameObjectAddon
683696
{
697+
QuaternionData ParentRotation;
684698
InvisibilityType invisibilityType;
685699
uint32 InvisibilityValue;
686700
};

src/server/game/Entities/Unit/Unit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ void Unit::CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 dama
13451345
}
13461346

13471347
int32 cleanDamage = 0;
1348-
if (Unit::IsDamageReducedByArmor(damageSchoolMask, spellInfo))
1348+
if (!spellInfo->HasAttribute(SPELL_ATTR4_IGNORE_DAMAGE_TAKEN_MODIFIERS) && Unit::IsDamageReducedByArmor(damageSchoolMask, spellInfo))
13491349
{
13501350
int32 oldDamage = damage;
13511351
damage = Unit::CalcArmorReducedDamage(this, victim, damage, spellInfo, 0, attackType);

src/server/game/Globals/ObjectMgr.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,8 +1355,8 @@ void ObjectMgr::LoadGameObjectAddons()
13551355
{
13561356
uint32 oldMSTime = getMSTime();
13571357

1358-
// 0 1 2
1359-
QueryResult result = WorldDatabase.Query("SELECT guid, invisibilityType, invisibilityValue FROM gameobject_addon");
1358+
// 0 1 2 3 4 5 6
1359+
QueryResult result = WorldDatabase.Query("SELECT guid, parent_rotation0, parent_rotation1, parent_rotation2, parent_rotation3, invisibilityType, invisibilityValue FROM gameobject_addon");
13601360

13611361
if (!result)
13621362
{
@@ -1380,8 +1380,9 @@ void ObjectMgr::LoadGameObjectAddons()
13801380
}
13811381

13821382
GameObjectAddon& gameObjectAddon = _gameObjectAddonStore[guid];
1383-
gameObjectAddon.invisibilityType = InvisibilityType(fields[1].Get<uint8>());
1384-
gameObjectAddon.InvisibilityValue = fields[2].Get<uint32>();
1383+
gameObjectAddon.ParentRotation = QuaternionData(fields[1].Get<float>(), fields[2].Get<float>(), fields[3].Get<float>(), fields[4].Get<float>());
1384+
gameObjectAddon.invisibilityType = InvisibilityType(fields[5].Get<uint8>());
1385+
gameObjectAddon.InvisibilityValue = fields[6].Get<uint32>();
13851386

13861387
if (gameObjectAddon.invisibilityType >= TOTAL_INVISIBILITY_TYPES)
13871388
{
@@ -1396,6 +1397,12 @@ void ObjectMgr::LoadGameObjectAddons()
13961397
gameObjectAddon.InvisibilityValue = 1;
13971398
}
13981399

1400+
if (!gameObjectAddon.ParentRotation.IsUnit())
1401+
{
1402+
LOG_ERROR("sql.sql", "GameObject (GUID: {}) has invalid parent rotation in `gameobject_addon`, set to default", guid);
1403+
gameObjectAddon.ParentRotation = QuaternionData();
1404+
}
1405+
13991406
++count;
14001407
} while (result->NextRow());
14011408

0 commit comments

Comments
 (0)