Merge branch 'master' into ScheduleCreatureRespawn

This commit is contained in:
天鹭 2025-10-10 07:43:50 +08:00 committed by GitHub
commit 1ac11e13e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 191 additions and 49 deletions

View File

@ -0,0 +1,39 @@
-- DB update 2025_10_07_01 -> 2025_10_09_00
-- Add Npcs to Rhino.
DELETE FROM `vehicle_template_accessory` WHERE `entry` = 29931;
INSERT INTO `vehicle_template_accessory` (`entry`, `accessory_entry`, `seat_id`, `minion`, `description`, `summontype`, `summontimer`) VALUES
(29931, 29982, 0, 0, 'Drakkari Raider', 7, 0),
(29931, 29982, 1, 0, 'Drakkari Raider', 7, 0),
(29931, 29982, 2, 0, 'Drakkari Raider', 7, 0);
-- Remove Spawns (Drakkari Raider)
DELETE FROM `creature` WHERE `id1` = 29982;
-- Remove Guid SmartAI (Drakkari Raider)
DELETE FROM `smart_scripts` WHERE (`entryorguid` IN (-127226, -127225, -127217)) AND (`source_type` = 0);
-- Remove Extra Flag Dont_override (Drakkari Raider)
UPDATE `creature_template` SET `flags_extra` = `flags_extra` &~ 134217728 WHERE (`entry` = 29982);
-- Edit SmartAI (Drakkari Rhino and Drakkari Raider)
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE (`entry` IN (29931, 29982));
DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (29931, 29982));
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
(29931, 0, 0, 0, 9, 0, 100, 514, 0, 0, 8000, 8000, 5, 40, 11, 55530, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - Within 5-40 Range - Cast \'Charge\' (Normal Dungeon)'),
(29931, 0, 1, 0, 9, 0, 100, 516, 0, 0, 8000, 8000, 5, 40, 11, 58991, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - Within 5-40 Range - Cast \'Charge\' (Heroic Dungeon)'),
(29931, 0, 2, 0, 0, 0, 100, 514, 0, 10000, 8000, 22000, 0, 0, 11, 55663, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - In Combat - Cast \'Deafening Roar\' (Normal Dungeon)'),
(29931, 0, 3, 0, 0, 0, 100, 516, 0, 10000, 8000, 22000, 0, 0, 11, 58992, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - In Combat - Cast \'Deafening Roar\' (Heroic Dungeon)'),
(29931, 0, 4, 0, 38, 0, 100, 0, 0, 2, 0, 0, 0, 0, 232, 1272070, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Data Set 0 2 - Start Path 1272070'),
(29931, 0, 5, 6, 108, 0, 100, 0, 3, 1272070, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Point 3 of Path 1272070 Reached - Set Home Position'),
(29931, 0, 6, 7, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 150, 0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Point 3 of Path 1272070 Reached - Do Action ID 150'),
(29931, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 151, 0, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Point 3 of Path 1272070 Reached - Do Action ID 151'),
(29931, 0, 8, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 223, 152, 0, 0, 0, 0, 0, 29, 2, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Rhino - On Point 3 of Path 1272070 Reached - Do Action ID 152'),
(29982, 0, 0, 0, 0, 0, 100, 0, 2000, 6000, 5000, 11000, 0, 0, 11, 15496, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Raider - In Combat - Cast \'Cleave\''),
(29982, 0, 1, 2, 72, 0, 100, 0, 150, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Raider - On Action 150 Done - Exit vehicle'),
(29982, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 1773.92, 748.702, 119.4, 3.1151, 'Drakkari Raider - On Action 150 Done - Set Home Position'),
(29982, 0, 3, 4, 72, 0, 100, 0, 151, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Raider - On Action 151 Done - Exit vehicle'),
(29982, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 1769.33, 743.685, 119.4, 3.1151, 'Drakkari Raider - On Action 151 Done - Set Home Position'),
(29982, 0, 5, 6, 72, 0, 100, 0, 152, 0, 0, 0, 0, 0, 203, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Drakkari Raider - On Action 152 Done - Exit vehicle'),
(29982, 0, 6, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 1771.29, 738.667, 119.4, 3.1151, 'Drakkari Raider - On Action 152 Done - Set Home Position');

View File

@ -0,0 +1,16 @@
-- DB update 2025_10_09_00 -> 2025_10_09_01
-- Update gameobject 'Lava' with sniffed values
-- updated spawns
DELETE FROM `gameobject` WHERE (`id` IN (191854, 191858, 191859, 191855, 191856, 191857)) AND (`guid` IN (58982, 59037, 59050, 67174, 67176, 67178));
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`, `VerifiedBuild`, `Comment`) VALUES
(58982, 191854, 571, 0, 0, 1, 1, 4397.71826171875, 1617.9945068359375, 129.1055908203125, 4.520402908325195312, 0, 0, -0.77162456512451171, 0.636078238487243652, 120, 255, 1, "", 46158, NULL),
(59037, 191858, 571, 0, 0, 1, 1, 4435.0810546875, 1672.25341796875, 131.871307373046875, 3.90954136848449707, 0, 0, -0.92718315124511718, 0.37460830807685852, 120, 255, 1, "", 46158, NULL),
(59050, 191859, 571, 0, 0, 1, 1, 4537.86279296875, 1702.455078125, 158.952392578125, 3.063024282455444335, 0, 0, 0.999228477478027343, 0.039274025708436965, 120, 255, 1, "", 46158, NULL),
(67174, 191855, 571, 0, 0, 1, 1, 4423.2138671875, 1815.5992431640625, 160.35821533203125, 4.982916831970214843, 0, 0, -0.60529327392578125, 0.796002507209777832, 120, 255, 1, "", 46158, NULL),
(67176, 191856, 571, 0, 0, 1, 1, 4511.74365234375, 1860.2879638671875, 161.1739959716796875, 4.982916831970214843, 0, 0, -0.60529327392578125, 0.796002507209777832, 120, 255, 1, "", 46158, NULL),
(67178, 191857, 571, 0, 0, 1, 1, 4299.21142578125, 1867.4713134765625, 160.4115753173828125, 0.026179106906056404, 0, 0, 0.013089179992675781, 0.999914348125457763, 120, 255, 1, "", 47720, NULL);
-- new spawns
DELETE FROM `gameobject` WHERE (`id` IN (191861)) AND (`guid` IN (44));
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`, `VerifiedBuild`, `Comment`) VALUES
(44, 191861, 571, 0, 0, 1, 1, 4567.751953125, 1630.7730712890625, 164.80889892578125, 2.975770950317382812, 0, 0, 0.996564865112304687, 0.082815870642662048, 120, 255, 1, "", 46158, NULL);

View File

@ -0,0 +1,6 @@
-- DB update 2025_10_09_01 -> 2025_10_09_02
-- Update gameobject 'Frostglow' with sniffed values
-- new spawns
DELETE FROM `gameobject` WHERE (`id` IN (192077)) AND (`guid` IN (46));
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`, `VerifiedBuild`, `Comment`) VALUES
(46, 192077, 571, 0, 0, 1, 8, 7214.13720703125, -2652.241455078125, 820.3399658203125, 0.24434557557106018, 0, 0, 0.121869087219238281, 0.9925462007522583, 120, 255, 1, "", 46248, NULL);

View File

@ -0,0 +1,34 @@
-- DB update 2025_10_09_02 -> 2025_10_09_03
-- Update gameobject 'Torch' with sniffed values
-- updated spawns
DELETE FROM `gameobject` WHERE (`id` IN (192618, 97701, 177385, 176767, 179507, 179508, 179513, 192562, 192563, 191836, 191837, 191838, 191839, 192620, 192621, 192614, 192615)) AND (`guid` IN (100103, 11894, 43177, 45428, 49958, 49960, 49967, 57030, 57079, 58173, 58174, 58190, 58206, 58207, 58218, 58219, 58968, 58975, 7094, 7095));
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`, `VerifiedBuild`, `Comment`) VALUES
(100103, 192618, 571, 0, 0, 1, 1, 5931.291015625, -3036.54443359375, 393.401611328125, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 46368, NULL),
(11894, 97701, 189, 0, 0, 1, 1, 1169.0335693359375, 1345.62841796875, 33.04557037353515625, 3.141592741012573242, 0, 0, -1, 0, 7200, 255, 1, "", 48632, NULL),
(43177, 177385, 289, 0, 0, 1, 1, 227.2589263916015625, 88.310302734375, 99.19482421875, 0.017452461645007133, 0, 0, 0.008726119995117187, 0.999961912631988525, 7200, 255, 1, "", 50664, NULL),
(45428, 176767, 0, 0, 0, 1, 1, 1262.9735107421875, -2563.075927734375, 96.84517669677734375, 0.479964137077331542, 0, 0, 0.237685203552246093, 0.971342265605926513, 120, 255, 1, "", 46248, NULL),
(49958, 179507, 1, 0, 0, 1, 1, -3821.48828125, 1253.965087890625, 162.3778533935546875, 4.703663349151611328, 0, 0, -0.71018505096435546, 0.704015016555786132, 120, 255, 1, "", 46248, NULL),
(49960, 179508, 1, 0, 0, 1, 1, -3757.915283203125, 1252.9454345703125, 162.3778533935546875, 4.703663349151611328, 0, 0, -0.71018505096435546, 0.704015016555786132, 120, 255, 1, "", 46248, NULL),
(49967, 179513, 1, 0, 0, 1, 1, -4070.459716796875, 84.60311126708984375, 60.002593994140625, 4.223697185516357421, 0, 0, -0.85716724395751953, 0.515038192272186279, 120, 255, 1, "", 47720, NULL),
(57030, 192562, 571, 0, 0, 1, 1, 6954.73388671875, -4626.74072265625, 468.348052978515625, 2.364918231964111328, 0, 0, 0.925539970397949218, 0.378649920225143432, 120, 255, 1, "", 46368, NULL),
(57079, 192563, 571, 0, 0, 1, 1, 6933.04248046875, -4648.81396484375, 468.348052978515625, 2.364918231964111328, 0, 0, 0.925539970397949218, 0.378649920225143432, 120, 255, 1, "", 46368, NULL),
(58173, 191836, 571, 0, 0, 1, 1, 6945.23974609375, -4371.509765625, 478.80419921875, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 120, 255, 1, "", 46368, NULL),
(58174, 191836, 571, 0, 0, 1, 1, 6726.8125, -4691.68017578125, 478.794921875, 0.767943859100341796, 0, 0, 0.374606132507324218, 0.927184045314788818, 120, 255, 1, "", 50172, NULL),
(58190, 191837, 571, 0, 0, 1, 1, 7001.833984375, -4428.10400390625, 478.80419921875, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 120, 255, 1, "", 46368, NULL),
(58206, 191838, 571, 0, 0, 1, 1, 7036.54541015625, -4393.39306640625, 478.80419921875, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 120, 255, 1, "", 46368, NULL),
(58207, 191838, 571, 0, 0, 1, 1, 6635.90234375, -4668.20703125, 478.794921875, 0.767943859100341796, 0, 0, 0.374606132507324218, 0.927184045314788818, 120, 255, 1, "", 50172, NULL),
(58218, 191839, 571, 0, 0, 1, 1, 6979.951171875, -4336.798828125, 478.80419921875, 3.926995515823364257, 0, 0, -0.92387866973876953, 0.38268551230430603, 120, 255, 1, "", 46368, NULL),
(58219, 191839, 571, 0, 0, 1, 1, 6691.50048828125, -4725.7802734375, 478.794921875, 0.767943859100341796, 0, 0, 0.374606132507324218, 0.927184045314788818, 120, 255, 1, "", 50172, NULL),
(58968, 192620, 571, 0, 0, 1, 1, 5855.06787109375, -2905.767333984375, 362.3609619140625, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 46158, NULL),
(58975, 192621, 571, 0, 0, 1, 1, 5666.6611328125, -2995.633056640625, 362.3609619140625, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 46158, NULL),
(7094, 192614, 571, 0, 0, 1, 1, 5850.66455078125, -3038.080322265625, 307.921875, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 45942, NULL),
(7095, 192615, 571, 0, 0, 1, 1, 5770.06396484375, -3076.52490234375, 307.921875, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 45942, NULL);
-- remaining spawns (no sniffed values available)
-- (`guid` IN (49961, 49962))
-- new spawns
DELETE FROM `gameobject` WHERE (`id` IN (191837, 192619)) AND (`guid` IN (162, 163));
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`, `VerifiedBuild`, `Comment`) VALUES
(162, 191837, 571, 0, 0, 1, 1, 6671.21435546875, -4634.1064453125, 478.794921875, 0.767943859100341796, 0, 0, 0.374606132507324218, 0.927184045314788818, 120, 255, 1, "", 50172, NULL),
(163, 192619, 571, 0, 0, 1, 1, 5718.88671875, -3137.856201171875, 393.134735107421875, 2.015851974487304687, 0, 0, 0.845726966857910156, 0.533615827560424804, 120, 255, 1, "", 46158, NULL);

View File

@ -0,0 +1,5 @@
-- DB update 2025_10_09_03 -> 2025_10_09_04
DELETE FROM `spell_script_names` WHERE `spell_id` IN (37705, 60510);
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(37705, 'spell_item_healing_trance'),
(60510, 'spell_item_healing_trance');

View File

@ -1,5 +1,8 @@
<!-- First of all, THANK YOU for your contribution. -->
<!-- How to title your Pull Request, Description, Co-Authors (Cherry Pick) and others, please see the link below -->
<!-- https://www.azerothcore.org/wiki/commit-message-guidelines -->
## Changes Proposed:
<!-- If your pull request promotes complex changes that require a detailed explanation, please describe them in detail specifying what your solution is and what is it meant to address. -->
This PR proposes changes to:

View File

@ -555,6 +555,7 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
case SMART_TARGET_RANDOM_POINT:
case SMART_TARGET_ROLE_SELECTION:
case SMART_TARGET_LOOT_RECIPIENTS:
case SMART_TARGET_VEHICLE_PASSENGER:
case SMART_EVENT_SUMMONED_UNIT_DIES:
case SMART_EVENT_SUMMONED_UNIT_EVADE:
case SMART_TARGET_PLAYER_RANGE:
@ -866,6 +867,7 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
case SMART_ACTION_ZONE_UNDER_ATTACK: return NO_PARAMS;
case SMART_ACTION_LOAD_GRID: return NO_PARAMS;
case SMART_ACTION_MUSIC: return sizeof(SmartAction::music);
case SMART_ACTION_DO_ACTION: return sizeof(SmartAction::doAction);
case SMART_ACTION_SET_GUID: return sizeof(SmartAction::setGuid);
case SMART_ACTION_SCRIPTED_SPAWN: return sizeof(SmartAction::scriptSpawn);
case SMART_ACTION_SET_SCALE: return sizeof(SmartAction::setScale);

View File

@ -146,6 +146,7 @@ class BfGraveyard
{
public:
BfGraveyard(Battlefield* Bf);
virtual ~BfGraveyard() = default;
// Method to changing who controls the graveyard
void GiveControlTo(TeamId team);

View File

@ -23,6 +23,7 @@
#include <array>
#include <string>
#include <vector>
#include <numbers>
enum ReactStates : uint8;
@ -202,8 +203,10 @@ enum PetScalingSpells
SPELL_RISEN_GHOUL_SELF_STUN = 47466,
};
#define PET_FOLLOW_DIST 1.0f
#define PET_FOLLOW_ANGLE (M_PI/2)
constexpr float PET_FOLLOW_DIST = 2.0f;
constexpr float PET_FOLLOW_ANGLE = std::numbers::pi_v<float> / 2;
constexpr float MINI_PET_SUMMON_ANGLE = std::numbers::pi_v<float> / 4;
constexpr float MINI_PET_FOLLOW_ANGLE = std::numbers::pi_v<float>;
class PetStable
{

View File

@ -9289,28 +9289,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
{
switch (auraSpellInfo->Id)
{
// Soul Preserver
case 60510:
{
switch (getClass())
{
case CLASS_DRUID:
trigger_spell_id = 60512;
break;
case CLASS_PALADIN:
trigger_spell_id = 60513;
break;
case CLASS_PRIEST:
trigger_spell_id = 60514;
break;
case CLASS_SHAMAN:
trigger_spell_id = 60515;
break;
}
target = this;
break;
}
case 37657: // Lightning Capacitor
case 54841: // Thunder Capacitor
case 67712: // Item - Coliseum 25 Normal Caster Trinket

View File

@ -1754,9 +1754,21 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket& recvData)
std::string name;
recvData >> name;
if (name.length() > 16) // Client limitation
{
LOG_ERROR("entities.player.cheat", "Character GUID {} tried to create equipment set {} with too long a name!", _player->GetGUID().ToString(), setGuid);
return;
}
std::string iconName;
recvData >> iconName;
if (iconName.length() > 100) // DB limitation
{
LOG_ERROR("entities.player.cheat", "Character GUID {} tried to create equipment set {} with too long an icon name!", _player->GetGUID().ToString(), setGuid);
return;
}
EquipmentSet eqSet;
eqSet.Guid = setGuid;

View File

@ -2429,8 +2429,14 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
}
break;
}
case SUMMON_TYPE_JEEVES:
case SUMMON_TYPE_MINIPET:
// For companions, recalculate the position to ensure they spawn at the intended π/4 angle.
destTarget->Relocate(m_originalCaster->GetNearPosition(
m_originalCaster->GetDistance2d(destTarget->GetPositionX(), destTarget->GetPositionY()),
MINI_PET_SUMMON_ANGLE
));
[[fallthrough]];
case SUMMON_TYPE_JEEVES:
{
summon = m_caster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, m_originalCaster, m_spellInfo->Id, 0, personalSpawn);
if (!summon || !summon->HasUnitTypeMask(UNIT_MASK_MINION))
@ -2446,8 +2452,9 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
//summon->AI()->EnterEvadeMode();
if (properties->Type != SUMMON_TYPE_JEEVES)
{
summon->SetFacingToObject(m_originalCaster);
summon->GetMotionMaster()->Clear(false);
summon->GetMotionMaster()->MoveFollow(m_originalCaster, PET_FOLLOW_DIST, summon->GetFollowAngle(), MOTION_SLOT_ACTIVE);
summon->GetMotionMaster()->MoveFollow(m_originalCaster, PET_FOLLOW_DIST, MINI_PET_FOLLOW_ANGLE, MOTION_SLOT_ACTIVE);
}
break;
}

View File

@ -160,7 +160,7 @@ struct npc_pet_gen_argent_pony_bridle : public ScriptedAI
if (Unit* owner = me->GetCharmerOrOwner())
{
me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE);
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, MINI_PET_FOLLOW_ANGLE, MOTION_SLOT_ACTIVE);
}
}
@ -709,7 +709,7 @@ struct npc_pet_gen_toxic_wasteling : public PassiveAI
if (Unit* owner = me->GetCharmerOrOwner())
{
me->GetMotionMaster()->Clear(false);
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, me->GetFollowAngle(), MOTION_SLOT_ACTIVE);
me->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, MINI_PET_FOLLOW_ANGLE, MOTION_SLOT_ACTIVE);
}
me->AddAura(71854, me); // Growth
checkTimer = 0;

View File

@ -1083,7 +1083,7 @@ class spell_item_enchanted_broom_periodic : public AuraScript
{
if (owner->isMoving())
{
GetTarget()->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, GetTarget()->GetFollowAngle(), MOTION_SLOT_ACTIVE);
GetTarget()->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, MINI_PET_FOLLOW_ANGLE, MOTION_SLOT_ACTIVE);
}
else
{
@ -1206,27 +1206,38 @@ class spell_item_direbrew_remote_aura : public AuraScript
}
};
enum EyeOfGruul
enum HealingTrance
{
SPELL_DRUID_ITEM_HEALING_TRANCE = 37721,
SPELL_PALADIN_ITEM_HEALING_TRANCE = 37723,
SPELL_PRIEST_ITEM_HEALING_TRANCE = 37706,
SPELL_SHAMAN_ITEM_HEALING_TRANCE = 37722
SPELL_HEALING_DISCOUNT = 37705,
SPELL_SOUL_PRESERVER = 60510,
SPELL_PRIEST_EYE_OF_GRUUL_HEALING_TRANCE = 37706,
SPELL_DRUID_EYE_OF_GRUUL_HEALING_TRANCE = 37721,
SPELL_SHAMAN_EYE_OF_GRUUL_HEALING_TRANCE = 37722,
SPELL_PALADIN_EYE_OF_GRUUL_HEALING_TRANCE = 37723,
SPELL_DRUID_SOUL_PRESERVER_HEALING_TRANCE = 60512,
SPELL_PALADIN_SOUL_PRESERVER_HEALING_TRANCE = 60513,
SPELL_PRIEST_SOUL_PRESERVER_HEALING_TRANCE = 60514,
SPELL_SHAMAN_SOUL_PRESERVER_HEALING_TRANCE = 60515,
};
// 37705 - Healing Discount
class spell_item_eye_of_gruul_healing_discount : public AuraScript
// 60510 - Soul Preserver
class spell_item_healing_trance : public AuraScript
{
PrepareAuraScript(spell_item_eye_of_gruul_healing_discount);
PrepareAuraScript(spell_item_healing_trance);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo(
{
SPELL_DRUID_ITEM_HEALING_TRANCE,
SPELL_PALADIN_ITEM_HEALING_TRANCE,
SPELL_PRIEST_ITEM_HEALING_TRANCE,
SPELL_SHAMAN_ITEM_HEALING_TRANCE
SPELL_PRIEST_EYE_OF_GRUUL_HEALING_TRANCE,
SPELL_DRUID_EYE_OF_GRUUL_HEALING_TRANCE,
SPELL_SHAMAN_EYE_OF_GRUUL_HEALING_TRANCE,
SPELL_PALADIN_EYE_OF_GRUUL_HEALING_TRANCE,
SPELL_DRUID_SOUL_PRESERVER_HEALING_TRANCE,
SPELL_PALADIN_SOUL_PRESERVER_HEALING_TRANCE,
SPELL_PRIEST_SOUL_PRESERVER_HEALING_TRANCE,
SPELL_SHAMAN_SOUL_PRESERVER_HEALING_TRANCE,
});
}
@ -1235,32 +1246,57 @@ class spell_item_eye_of_gruul_healing_discount : public AuraScript
PreventDefaultAction();
if (Unit* unitTarget = GetTarget())
{
uint32 spell_id = 0;
switch (unitTarget->getClass())
uint32 const itemSpell = GetSpellInfo()->Id;
uint32 spellId = 0;
if (itemSpell == SPELL_HEALING_DISCOUNT)
{
switch (unitTarget->getClass())
{
case CLASS_DRUID:
spell_id = SPELL_DRUID_ITEM_HEALING_TRANCE;
spellId = SPELL_DRUID_EYE_OF_GRUUL_HEALING_TRANCE;
break;
case CLASS_PALADIN:
spell_id = SPELL_PALADIN_ITEM_HEALING_TRANCE;
spellId = SPELL_PALADIN_EYE_OF_GRUUL_HEALING_TRANCE;
break;
case CLASS_PRIEST:
spell_id = SPELL_PRIEST_ITEM_HEALING_TRANCE;
spellId = SPELL_PRIEST_EYE_OF_GRUUL_HEALING_TRANCE;
break;
case CLASS_SHAMAN:
spell_id = SPELL_SHAMAN_ITEM_HEALING_TRANCE;
spellId = SPELL_SHAMAN_EYE_OF_GRUUL_HEALING_TRANCE;
break;
default:
return; // ignore for non-healing classes
}
}
else if (itemSpell == SPELL_SOUL_PRESERVER)
{
switch (unitTarget->getClass())
{
case CLASS_DRUID:
spellId = SPELL_DRUID_SOUL_PRESERVER_HEALING_TRANCE;
break;
case CLASS_PALADIN:
spellId = SPELL_PALADIN_SOUL_PRESERVER_HEALING_TRANCE;
break;
case CLASS_PRIEST:
spellId = SPELL_PRIEST_SOUL_PRESERVER_HEALING_TRANCE;
break;
case CLASS_SHAMAN:
spellId = SPELL_SHAMAN_SOUL_PRESERVER_HEALING_TRANCE;
break;
default:
return; // ignore for non-healing classes
}
}
unitTarget->CastSpell(unitTarget, spell_id, true, nullptr, aurEff);
unitTarget->CastSpell(unitTarget, spellId, true, nullptr, aurEff);
}
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_item_eye_of_gruul_healing_discount::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
OnEffectProc += AuraEffectProcFn(spell_item_healing_trance::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
@ -4292,7 +4328,7 @@ void AddSC_item_spell_scripts()
RegisterSpellScript(spell_item_summon_or_dismiss);
RegisterSpellScript(spell_item_draenic_pale_ale);
RegisterSpellAndAuraScriptPair(spell_item_direbrew_remote, spell_item_direbrew_remote_aura);
RegisterSpellScript(spell_item_eye_of_gruul_healing_discount);
RegisterSpellScript(spell_item_healing_trance);
RegisterSpellScript(spell_item_summon_argent_knight);
RegisterSpellScript(spell_item_instant_statue);
// 23074 Arcanite Dragonling