mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -67,6 +67,7 @@ nbproject/
|
||||
.idea
|
||||
cmake-build-debug/*
|
||||
cmake-build-debug-coverage/*
|
||||
cmake-build-debug-event-trace
|
||||
coverage-report/
|
||||
|
||||
#
|
||||
|
||||
@@ -33,18 +33,18 @@ IF %M%==4 GOTO ALL
|
||||
IF %M%==5 GOTO :EOF
|
||||
|
||||
:MAPS
|
||||
start /b /w mapextractor.exe
|
||||
start /b /w map_extractor.exe
|
||||
GOTO MENU
|
||||
|
||||
:VMAPS
|
||||
start /b /w vmap4extractor.exe
|
||||
start /b /w vmap4_extractor.exe
|
||||
if exist vmaps\ (
|
||||
echo folder found.
|
||||
) else (
|
||||
echo creating folder "vmaps".
|
||||
mkdir "vmaps"
|
||||
)
|
||||
start /b /w vmap4assembler.exe Buildings vmaps
|
||||
start /b /w vmap4_assembler.exe Buildings vmaps
|
||||
rmdir Buildings /s /q
|
||||
GOTO MENU
|
||||
|
||||
@@ -75,9 +75,9 @@ if exist mmaps\ (
|
||||
echo creating folder "mmaps".
|
||||
mkdir "mmaps"
|
||||
)
|
||||
start /b /w mapextractor.exe
|
||||
start /b /w vmap4extractor.exe
|
||||
start /b /w vmap4assembler.exe Buildings vmaps
|
||||
start /b /w map_extractor.exe
|
||||
start /b /w vmap4_extractor.exe
|
||||
start /b /w vmap4_assembler.exe Buildings vmaps
|
||||
rmdir Buildings /s /q
|
||||
start /b /w mmaps_generator.exe
|
||||
GOTO MENU
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
@ECHO OFF
|
||||
CLS
|
||||
|
||||
:MENU
|
||||
ECHO.
|
||||
ECHO ...............................................
|
||||
@@ -32,18 +33,18 @@ IF %M%==4 GOTO ALL
|
||||
IF %M%==5 GOTO :EOF
|
||||
|
||||
:MAPS
|
||||
start /b /w mapextractor.exe
|
||||
start /b /w map_extractor.exe
|
||||
GOTO MENU
|
||||
|
||||
:VMAPS
|
||||
start /b /w vmap4extractor.exe
|
||||
start /b /w vmap4_extractor.exe
|
||||
if exist vmaps\ (
|
||||
echo folder found.
|
||||
) else (
|
||||
echo creating folder "vmaps".
|
||||
mkdir "vmaps"
|
||||
)
|
||||
start /b /w vmap4assembler.exe Buildings vmaps
|
||||
start /b /w vmap4_assembler.exe Buildings vmaps
|
||||
rmdir Buildings /s /q
|
||||
GOTO MENU
|
||||
|
||||
@@ -74,9 +75,9 @@ if exist mmaps\ (
|
||||
echo creating folder "mmaps".
|
||||
mkdir "mmaps"
|
||||
)
|
||||
start /b /w mapextractor.exe
|
||||
start /b /w vmap4extractor.exe
|
||||
start /b /w vmap4assembler.exe Buildings vmaps
|
||||
start /b /w map_extractor.exe
|
||||
start /b /w vmap4_extractor.exe
|
||||
start /b /w vmap4_assembler.exe Buildings vmaps
|
||||
rmdir Buildings /s /q
|
||||
start /b /w mmaps_generator.exe
|
||||
GOTO MENU
|
||||
|
||||
@@ -223,7 +223,7 @@ function inst_simple_restarter {
|
||||
|
||||
function inst_download_client_data {
|
||||
# change the following version when needed
|
||||
local VERSION=v14
|
||||
local VERSION=v15
|
||||
|
||||
echo "#######################"
|
||||
echo "Client data downloader"
|
||||
|
||||
6
data/sql/updates/db_world/2022_06_21_01.sql
Normal file
6
data/sql/updates/db_world/2022_06_21_01.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- DB update 2022_06_21_00 -> 2022_06_21_01
|
||||
--
|
||||
DELETE FROM `creature` WHERE `guid` = 248582;
|
||||
DELETE FROM `gameobject` WHERE `guid` IN (21003, 21004, 21005, 21006, 21007, 21008, 21010, 21011, 21012, 21013, 21014, 21015, 21017, 21019, 21020, 21021, 21022);
|
||||
DELETE FROM `game_event_creature` WHERE `guid` = 248582;
|
||||
DELETE FROM `game_event_gameobject` WHERE `guid` IN (21003, 21004, 21005, 21006, 21007, 21008, 21010, 21011, 21012, 21013, 21014, 21015, 21017, 21019, 21020, 21021, 21022);
|
||||
3
data/sql/updates/db_world/2022_06_21_02.sql
Normal file
3
data/sql/updates/db_world/2022_06_21_02.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- DB update 2022_06_21_01 -> 2022_06_21_02
|
||||
--
|
||||
UPDATE `spell_dbc` SET `Attributes`=`Attributes`&~0x00200000, `AttributesEx7`=`AttributesEx7`|0x01800000, `DefenseType`=1 WHERE `ID`=20253;
|
||||
7
data/sql/updates/db_world/2022_06_22_00.sql
Normal file
7
data/sql/updates/db_world/2022_06_22_00.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- DB update 2022_06_21_02 -> 2022_06_22_00
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 11353;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 11353);
|
||||
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
|
||||
(11353, 0, 0, 0, 9, 0, 100, 0, 0, 5, 2000, 4000, 0, 11, 24437, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Gurubashi Blood Drinker - Within 0-5 Range - Cast \'Blood Leech\''),
|
||||
(11353, 0, 1, 0, 2, 0, 100, 0, 0, 30, 8000, 12000, 0, 11, 24435, 1, 0, 0, 0, 0, 26, 30, 0, 0, 0, 0, 0, 0, 0, 'Gurubashi Blood Drinker - Between 0-30% Health - Cast \'Drain Life\'');
|
||||
5
data/sql/updates/db_world/2022_06_22_01.sql
Normal file
5
data/sql/updates/db_world/2022_06_22_01.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- DB update 2022_06_22_00 -> 2022_06_22_01
|
||||
--
|
||||
UPDATE `gameobject` SET `position_z`=0.508326 WHERE `guid`=11031 AND `id`=2560;
|
||||
UPDATE `gameobject` SET `position_z`=2.541038 WHERE `guid`=11034 AND `id`=2560;
|
||||
UPDATE `gameobject` SET `position_z`=0.853386 WHERE `guid`=11705 AND `id`=2560;
|
||||
14
data/sql/updates/db_world/2022_06_22_02.sql
Normal file
14
data/sql/updates/db_world/2022_06_22_02.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- DB update 2022_06_22_01 -> 2022_06_22_02
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` IN (11357, 14989);
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE ((`source_type` = 0 AND `entryorguid` = 14989)) OR (`source_type` = 0 AND `entryorguid` = 11357);
|
||||
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
|
||||
(14989, 0, 0, 0, 60, 0, 100, 0, 1000, 1000, 1000, 1000, 0, 11, 24320, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Poisonous Cloud - On Update - Cast \'Poisonous Blood\''),
|
||||
(11357, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 11, 8876, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Son of Hakkar - On Reset - Cast \'Thrash\''),
|
||||
(11357, 0, 1, 0, 0, 0, 100, 0, 11000, 13000, 19000, 22000, 0, 11, 16790, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Son of Hakkar - In Combat - Cast \'Knockdown\''),
|
||||
(11357, 0, 2, 0, 6, 0, 100, 1, 0, 0, 0, 0, 0, 11, 24319, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Son of Hakkar - On Just Died - Cast \'Summon Poison Cloud\' (No Repeat)');
|
||||
|
||||
DELETE FROM `creature` WHERE (`id1` = 11357 AND `guid` IN ( 49033, 49034));
|
||||
INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES
|
||||
(49033, 11357, 0, 0, 309, 0, 0, 1, 1, 0, -11746, -1620.6, 36.9961, 1.59794, 60, 5, 0, 15260, 0, 2, 0, 0, 0, '', 0),
|
||||
(49034, 11357, 0, 0, 309, 0, 0, 1, 1, 0, -11836.5, -1599.98, 40.7501, 1.51519, 60, 5, 0, 15260, 0, 2, 0, 0, 0, '', 0);
|
||||
7
data/sql/updates/db_world/2022_06_22_03.sql
Normal file
7
data/sql/updates/db_world/2022_06_22_03.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- DB update 2022_06_22_02 -> 2022_06_22_03
|
||||
--
|
||||
DELETE FROM `command` WHERE `name` IN ("deserter instance remove all", "deserter bg remove all");
|
||||
|
||||
INSERT INTO `command` (`name`, `security`, `help`) VALUES
|
||||
("deserter instance remove all", 3, "Syntax: .deserter instance remove all <$maxDuration>\r\n Removes the instance deserter debuff from all online and offline players.\nOptional $maxDuration sets the maximum duration to be removed. Use a timestring like \"1h45m\". \"-1\" for any duration. Default: 30m"),
|
||||
("deserter bg remove all", 3, "Syntax: .deserter bg remove all <$maxDuration>\r\n Removes the bg deserter debuff from all online and offline players.\nOptional $maxDuration sets the maximum duration to be removed. Use a timestring like \"1h45m\". \"-1\" for any duration. Default: 15m");
|
||||
@@ -1195,7 +1195,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureTemplate const* cInfo)
|
||||
}
|
||||
else if ((!cInfo->GossipMenuId && (cInfo->npcflag & UNIT_NPC_FLAG_GOSSIP)) && !(cInfo->flags_extra & CREATURE_FLAG_EXTRA_MODULE))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Creature (Entry: {}) has npcflag UNIT_NPC_FLAG_GOSSIP (1), but gossip menu is unassigned.", cInfo->Entry);
|
||||
LOG_INFO("sql.sql", "Creature (Entry: {}) has npcflag UNIT_NPC_FLAG_GOSSIP (1), but gossip menu is unassigned.", cInfo->Entry);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -260,9 +260,34 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool HandleDeserterRemoveAll(ChatHandler* handler, bool isInstance)
|
||||
static bool HandleDeserterRemoveAll(ChatHandler* handler, bool isInstance, Optional<std::string> maxTime)
|
||||
{
|
||||
CharacterDatabase.Query("DELETE FROM character_aura WHERE spell = {} AND remainTime <= 1800000", isInstance ? LFG_SPELL_DUNGEON_DESERTER : BG_SPELL_DESERTER);
|
||||
int32 remainTime = isInstance ? 1800 : 900;
|
||||
|
||||
if (maxTime)
|
||||
{
|
||||
remainTime = TimeStringToSecs(*maxTime);
|
||||
if (remainTime == 0)
|
||||
{
|
||||
remainTime = Acore::StringTo<int32>(*maxTime).value_or(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (remainTime == 0)
|
||||
{
|
||||
handler->SendSysMessage(LANG_BAD_VALUE);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (remainTime < 0)
|
||||
{
|
||||
CharacterDatabase.Execute("DELETE FROM character_aura WHERE spell = {}", isInstance ? LFG_SPELL_DUNGEON_DESERTER : BG_SPELL_DESERTER);
|
||||
}
|
||||
else
|
||||
{
|
||||
CharacterDatabase.Execute("DELETE FROM character_aura WHERE spell = {} AND remainTime <= {}", isInstance ? LFG_SPELL_DUNGEON_DESERTER : BG_SPELL_DESERTER, remainTime * IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
std::shared_lock<std::shared_mutex> lock(*HashMapHolder<Player>::GetLock());
|
||||
HashMapHolder<Player>::MapType const& onlinePlayerList = ObjectAccessor::GetPlayers();
|
||||
@@ -270,7 +295,7 @@ public:
|
||||
{
|
||||
Player* player = itr->second;
|
||||
Aura* aura = player->GetAura(isInstance ? LFG_SPELL_DUNGEON_DESERTER : BG_SPELL_DESERTER);
|
||||
if (aura && aura->GetDuration() <= 1800000)
|
||||
if (aura && (remainTime < 0 || aura->GetDuration() <= remainTime * IN_MILLISECONDS))
|
||||
{
|
||||
player->RemoveAura(isInstance ? LFG_SPELL_DUNGEON_DESERTER : BG_SPELL_DESERTER);
|
||||
}
|
||||
@@ -304,14 +329,14 @@ public:
|
||||
return HandleDeserterRemove(handler, player, false);
|
||||
}
|
||||
|
||||
static bool HandleDeserterInstanceRemoveAll(ChatHandler* handler)
|
||||
static bool HandleDeserterInstanceRemoveAll(ChatHandler* handler, Optional<std::string> maxTime)
|
||||
{
|
||||
return HandleDeserterRemoveAll(handler, true);
|
||||
return HandleDeserterRemoveAll(handler, true, maxTime);
|
||||
}
|
||||
|
||||
static bool HandleDeserterBGRemoveAll(ChatHandler* handler)
|
||||
static bool HandleDeserterBGRemoveAll(ChatHandler* handler, Optional<std::string> maxTime)
|
||||
{
|
||||
return HandleDeserterRemoveAll(handler, false);
|
||||
return HandleDeserterRemoveAll(handler, false, maxTime);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -548,6 +548,8 @@ struct boss_nefarian : public BossAI
|
||||
}
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
classesPresent.clear();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override {}
|
||||
@@ -675,16 +677,21 @@ struct boss_nefarian : public BossAI
|
||||
events.ScheduleEvent(EVENT_TAILLASH, 10000);
|
||||
break;
|
||||
case EVENT_CLASSCALL:
|
||||
std::set<uint8> classesPresent;
|
||||
for (auto& ref : me->GetThreatMgr().getThreatList())
|
||||
if (classesPresent.empty())
|
||||
{
|
||||
if (ref->getTarget() && ref->getTarget()->GetTypeId() == TYPEID_PLAYER)
|
||||
for (auto& ref : me->GetThreatMgr().getThreatList())
|
||||
{
|
||||
classesPresent.insert(ref->getTarget()->getClass());
|
||||
if (ref->getTarget() && ref->getTarget()->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
classesPresent.insert(ref->getTarget()->getClass());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint8 targetClass = Acore::Containers::SelectRandomContainerElement(classesPresent);
|
||||
|
||||
classesPresent.erase(targetClass);
|
||||
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, ClassCallSelector(me, targetClass)))
|
||||
{
|
||||
switch (target->getClass())
|
||||
@@ -755,6 +762,7 @@ struct boss_nefarian : public BossAI
|
||||
private:
|
||||
bool Phase3;
|
||||
bool _introDone;
|
||||
std::set<uint8> classesPresent;
|
||||
};
|
||||
|
||||
enum TotemSpells
|
||||
|
||||
@@ -145,11 +145,11 @@ public:
|
||||
// Always running events
|
||||
events.ScheduleEvent(EVENT_THRASH, 5000);
|
||||
// Phase one events (regular form)
|
||||
events.ScheduleEvent(EVENT_HOLY_NOVA, 5000, 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_HOLY_NOVA, urand(5000, 15000), 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_DISPEL_MAGIC, 35000, 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_HOLY_FIRE, 10000, 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_HOLY_FIRE, urand(10000,20000), 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_RENEW, 30000, 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_HOLY_WRATH, 60000, 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_HOLY_WRATH, urand(15000, 25000), 0, PHASE_ONE);
|
||||
|
||||
events.SetPhase(PHASE_ONE);
|
||||
|
||||
@@ -205,32 +205,19 @@ public:
|
||||
DoCast(me, SPELL_RENEW);
|
||||
events.ScheduleEvent(EVENT_RENEW, urand(25000, 30000), 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_HOLY_NOVA:
|
||||
_inMeleeRange = 0;
|
||||
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat, i))
|
||||
// check if target is within melee-distance
|
||||
if (me->IsWithinMeleeRange(target))
|
||||
++_inMeleeRange;
|
||||
}
|
||||
|
||||
// trigger spellcast only if we have 3 or more targets to affect
|
||||
if (_inMeleeRange >= 3)
|
||||
DoCastVictim(SPELL_HOLY_NOVA);
|
||||
|
||||
events.ScheduleEvent(EVENT_HOLY_NOVA, urand(45000, 75000), 0, PHASE_ONE);
|
||||
case EVENT_HOLY_WRATH:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::MaxThreat))
|
||||
DoCast(target, SPELL_HOLY_WRATH);
|
||||
events.ScheduleEvent(EVENT_HOLY_WRATH, urand(12000, 22000), 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_HOLY_FIRE:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random))
|
||||
DoCast(target, SPELL_HOLY_FIRE);
|
||||
events.ScheduleEvent(EVENT_HOLY_FIRE, urand(45000, 60000), 0, PHASE_ONE);
|
||||
events.ScheduleEvent(EVENT_HOLY_FIRE, urand(10000, 24000), 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_HOLY_WRATH:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random))
|
||||
DoCast(target, SPELL_HOLY_WRATH);
|
||||
events.ScheduleEvent(EVENT_HOLY_WRATH, urand(45000, 60000), 0, PHASE_ONE);
|
||||
case EVENT_HOLY_NOVA:
|
||||
DoCastSelf(SPELL_HOLY_NOVA);
|
||||
events.ScheduleEvent(EVENT_HOLY_NOVA, urand(10000, 24000), 0, PHASE_ONE);
|
||||
break;
|
||||
|
||||
//
|
||||
|
||||
@@ -20,6 +20,12 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "forge_of_souls.h"
|
||||
|
||||
BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_BRONJAHM, new CircleBoundary(Position(5297.3f, 2506.45f), 100.96) },
|
||||
{ DATA_DEVOURER, new ParallelogramBoundary(Position(5663.56f, 2570.53f), Position(5724.39f, 2520.45f), Position(5570.36f, 2461.42f)) }
|
||||
};
|
||||
|
||||
class instance_forge_of_souls : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
@@ -32,7 +38,10 @@ public:
|
||||
|
||||
struct instance_forge_of_souls_InstanceScript : public InstanceScript
|
||||
{
|
||||
instance_forge_of_souls_InstanceScript(Map* map) : InstanceScript(map) {}
|
||||
instance_forge_of_souls_InstanceScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
LoadBossBoundaries(boundaries);
|
||||
}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
TeamId teamIdInInstance;
|
||||
|
||||
@@ -273,24 +273,28 @@ class spell_item_with_mount_speed : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_item_magic_dust : public AuraScript
|
||||
class spell_item_magic_dust : public SpellScript
|
||||
{
|
||||
PrepareAuraScript(spell_item_magic_dust);
|
||||
PrepareSpellScript(spell_item_magic_dust);
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
void HandlePreventAura(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
if (target->getLevel() >= 30)
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
uint8 chance = 100 - std::min<uint8>(100, target->getLevel() - 30 * urand(3, 10));
|
||||
if (!roll_chance_i(chance))
|
||||
PreventDefaultAction();
|
||||
if (target->getLevel() >= 30)
|
||||
{
|
||||
uint8 chance = 100 - std::min<uint8>(100, target->getLevel() - 30 * urand(3, 10));
|
||||
if (!roll_chance_i(chance))
|
||||
{
|
||||
PreventHitAura();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_item_magic_dust::OnApply, EFFECT_0, SPELL_AURA_MOD_STUN, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_item_magic_dust::HandlePreventAura, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user