Merge branch 'master' into Playerbot
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
-- DB update 2024_08_17_02 -> 2024_08_18_00
|
||||||
|
-- fix spells and timer of Aether Ray (22181)
|
||||||
|
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 22181) AND (`source_type` = 0) AND (`id` IN (0, 2));
|
||||||
|
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
|
||||||
|
(22181, 0, 0, 0, 0, 0, 100, 0, 5000, 15000, 20000, 20000, 0, 0, 11, 35333, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Aether Ray - In Combat - Cast \'Tail Swipe\''),
|
||||||
|
(22181, 0, 2, 0, 3, 0, 100, 0, 0, 75, 20000, 20000, 0, 0, 11, 17008, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Aether Ray - Between 0-75% Mana - Cast \'Mana Drain\'');
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
-- DB update 2024_08_18_00 -> 2024_08_19_00
|
||||||
|
--
|
||||||
|
UPDATE `creature_template` SET `flags_extra` = `flags_extra` |256 WHERE `entry` IN (23418, 23419);
|
||||||
@@ -25,7 +25,7 @@ NullCreatureAI::NullCreatureAI(Creature* c) : CreatureAI(c) { me->SetReactState(
|
|||||||
|
|
||||||
int32 NullCreatureAI::Permissible(Creature const* creature)
|
int32 NullCreatureAI::Permissible(Creature const* creature)
|
||||||
{
|
{
|
||||||
if (creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK))
|
if (creature->HasNpcFlag(UNIT_NPC_FLAG_SPELLCLICK))
|
||||||
return PERMIT_BASE_PROACTIVE + 50;
|
return PERMIT_BASE_PROACTIVE + 50;
|
||||||
|
|
||||||
if (creature->IsTrigger())
|
if (creature->IsTrigger())
|
||||||
|
|||||||
@@ -2061,21 +2061,21 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
{
|
{
|
||||||
for (WorldObject* target : targets)
|
for (WorldObject* target : targets)
|
||||||
if (IsCreature(target))
|
if (IsCreature(target))
|
||||||
target->ToUnit()->SetUInt32Value(UNIT_NPC_FLAGS, e.action.unitFlag.flag);
|
target->ToUnit()->ReplaceAllNpcFlags(NPCFlags(e.action.unitFlag.flag));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SMART_ACTION_ADD_NPC_FLAG:
|
case SMART_ACTION_ADD_NPC_FLAG:
|
||||||
{
|
{
|
||||||
for (WorldObject* target : targets)
|
for (WorldObject* target : targets)
|
||||||
if (IsCreature(target))
|
if (IsCreature(target))
|
||||||
target->ToUnit()->SetFlag(UNIT_NPC_FLAGS, e.action.unitFlag.flag);
|
target->ToUnit()->SetNpcFlag(NPCFlags(e.action.unitFlag.flag));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SMART_ACTION_REMOVE_NPC_FLAG:
|
case SMART_ACTION_REMOVE_NPC_FLAG:
|
||||||
{
|
{
|
||||||
for (WorldObject* target : targets)
|
for (WorldObject* target : targets)
|
||||||
if (IsCreature(target))
|
if (IsCreature(target))
|
||||||
target->ToUnit()->RemoveFlag(UNIT_NPC_FLAGS, e.action.unitFlag.flag);
|
target->ToUnit()->RemoveNpcFlag(NPCFlags(e.action.unitFlag.flag));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SMART_ACTION_CROSS_CAST:
|
case SMART_ACTION_CROSS_CAST:
|
||||||
|
|||||||
@@ -1004,13 +1004,12 @@ public:
|
|||||||
[[nodiscard]] bool IsInnkeeper() const { return HasNpcFlag(UNIT_NPC_FLAG_INNKEEPER); }
|
[[nodiscard]] bool IsInnkeeper() const { return HasNpcFlag(UNIT_NPC_FLAG_INNKEEPER); }
|
||||||
[[nodiscard]] bool IsSpiritHealer() const { return HasNpcFlag(UNIT_NPC_FLAG_SPIRITHEALER); }
|
[[nodiscard]] bool IsSpiritHealer() const { return HasNpcFlag(UNIT_NPC_FLAG_SPIRITHEALER); }
|
||||||
[[nodiscard]] bool IsSpiritGuide() const { return HasNpcFlag(UNIT_NPC_FLAG_SPIRITGUIDE); }
|
[[nodiscard]] bool IsSpiritGuide() const { return HasNpcFlag(UNIT_NPC_FLAG_SPIRITGUIDE); }
|
||||||
[[nodiscard]] bool IsTabardDesigner()const { return HasNpcFlag(UNIT_NPC_FLAG_TABARDDESIGNER); }
|
[[nodiscard]] bool IsTabardDesigner() const { return HasNpcFlag(UNIT_NPC_FLAG_TABARDDESIGNER); }
|
||||||
[[nodiscard]] bool IsAuctioner() const { return HasNpcFlag(UNIT_NPC_FLAG_AUCTIONEER); }
|
[[nodiscard]] bool IsAuctioner() const { return HasNpcFlag(UNIT_NPC_FLAG_AUCTIONEER); }
|
||||||
[[nodiscard]] bool IsArmorer() const { return HasNpcFlag(UNIT_NPC_FLAG_REPAIR); }
|
[[nodiscard]] bool IsArmorer() const { return HasNpcFlag(UNIT_NPC_FLAG_REPAIR); }
|
||||||
[[nodiscard]] bool IsServiceProvider() const
|
[[nodiscard]] bool IsServiceProvider() const
|
||||||
{
|
{
|
||||||
return HasFlag(UNIT_NPC_FLAGS,
|
return HasNpcFlag(UNIT_NPC_FLAG_VENDOR | UNIT_NPC_FLAG_TRAINER | UNIT_NPC_FLAG_FLIGHTMASTER |
|
||||||
UNIT_NPC_FLAG_VENDOR | UNIT_NPC_FLAG_TRAINER | UNIT_NPC_FLAG_FLIGHTMASTER |
|
|
||||||
UNIT_NPC_FLAG_PETITIONER | UNIT_NPC_FLAG_BATTLEMASTER | UNIT_NPC_FLAG_BANKER |
|
UNIT_NPC_FLAG_PETITIONER | UNIT_NPC_FLAG_BATTLEMASTER | UNIT_NPC_FLAG_BANKER |
|
||||||
UNIT_NPC_FLAG_INNKEEPER | UNIT_NPC_FLAG_SPIRITHEALER |
|
UNIT_NPC_FLAG_INNKEEPER | UNIT_NPC_FLAG_SPIRITHEALER |
|
||||||
UNIT_NPC_FLAG_SPIRITGUIDE | UNIT_NPC_FLAG_TABARDDESIGNER | UNIT_NPC_FLAG_AUCTIONEER);
|
UNIT_NPC_FLAG_SPIRITGUIDE | UNIT_NPC_FLAG_TABARDDESIGNER | UNIT_NPC_FLAG_AUCTIONEER);
|
||||||
|
|||||||
@@ -1104,7 +1104,7 @@ namespace Acore
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i_funit->_IsValidAttackTarget(u, _spellInfo, i_obj->GetTypeId() == TYPEID_DYNAMICOBJECT ? i_obj : nullptr) && i_obj->IsWithinDistInMap(u, i_range))
|
if (i_funit->_IsValidAttackTarget(u, _spellInfo, i_obj->GetTypeId() == TYPEID_DYNAMICOBJECT ? i_obj : nullptr) && i_obj->IsWithinDistInMap(u, i_range,true,false))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ Map::EnterState MapMgr::PlayerCannotEnter(uint32 mapid, Player* player, bool log
|
|||||||
}
|
}
|
||||||
|
|
||||||
// players are only allowed to enter 5 instances per hour
|
// players are only allowed to enter 5 instances per hour
|
||||||
if (entry->IsDungeon() && (!group || !group->isLFGGroup() || !group->IsLfgRandomInstance()))
|
if (entry->IsNonRaidDungeon() && (!group || !group->isLFGGroup() || !group->IsLfgRandomInstance()))
|
||||||
{
|
{
|
||||||
uint32 instaceIdToCheck = 0;
|
uint32 instaceIdToCheck = 0;
|
||||||
if (InstanceSave* save = sInstanceSaveMgr->PlayerGetInstanceSave(player->GetGUID(), mapid, player->GetDifficulty(entry->IsRaid())))
|
if (InstanceSave* save = sInstanceSaveMgr->PlayerGetInstanceSave(player->GetGUID(), mapid, player->GetDifficulty(entry->IsRaid())))
|
||||||
|
|||||||
@@ -9035,7 +9035,7 @@ namespace Acore
|
|||||||
if (!target->ToGameObject()->IsInRange(_position->GetPositionX(), _position->GetPositionY(), _position->GetPositionZ(), _range))
|
if (!target->ToGameObject()->IsInRange(_position->GetPositionX(), _position->GetPositionY(), _position->GetPositionZ(), _range))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (!target->IsWithinDist3d(_position, _range))
|
else if (!target->IsInDist(_position, _range))
|
||||||
return false;
|
return false;
|
||||||
else if (target->GetTypeId() == TYPEID_UNIT && target->ToCreature()->IsAvoidingAOE()) // pussywizard
|
else if (target->GetTypeId() == TYPEID_UNIT && target->ToCreature()->IsAvoidingAOE()) // pussywizard
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public:
|
|||||||
scheduler.CancelAll();
|
scheduler.CancelAll();
|
||||||
if (InstanceScript* hyjal = me->GetInstanceScript())
|
if (InstanceScript* hyjal = me->GetInstanceScript())
|
||||||
if (!hyjal->GetData(DATA_WAVE_STATUS))
|
if (!hyjal->GetData(DATA_WAVE_STATUS))
|
||||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustEngagedWith(Unit* /*who*/) override
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
@@ -138,7 +138,7 @@ public:
|
|||||||
|
|
||||||
void IsSummonedBy(WorldObject* /*summoner*/) override
|
void IsSummonedBy(WorldObject* /*summoner*/) override
|
||||||
{
|
{
|
||||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
me->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||||
DoCastSelf(SPELL_SIMPLE_TELEPORT, true);
|
DoCastSelf(SPELL_SIMPLE_TELEPORT, true);
|
||||||
|
|
||||||
// Should wait 2400ms
|
// Should wait 2400ms
|
||||||
@@ -176,7 +176,7 @@ public:
|
|||||||
|
|
||||||
bool OnGossipSelect(Player* /*player*/ , Creature* creature, uint32 /*sender*/, uint32 /*action*/) override
|
bool OnGossipSelect(Player* /*player*/ , Creature* creature, uint32 /*sender*/, uint32 /*action*/) override
|
||||||
{
|
{
|
||||||
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
creature->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||||
|
|
||||||
if (InstanceScript* hyjal = creature->GetInstanceScript())
|
if (InstanceScript* hyjal = creature->GetInstanceScript())
|
||||||
{
|
{
|
||||||
@@ -213,7 +213,7 @@ public:
|
|||||||
scheduler.CancelAll();
|
scheduler.CancelAll();
|
||||||
if (InstanceScript* hyjal = me->GetInstanceScript())
|
if (InstanceScript* hyjal = me->GetInstanceScript())
|
||||||
if (!hyjal->GetData(DATA_WAVE_STATUS))
|
if (!hyjal->GetData(DATA_WAVE_STATUS))
|
||||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
me->SetNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustEngagedWith(Unit* /*who*/) override
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
@@ -251,7 +251,7 @@ public:
|
|||||||
|
|
||||||
bool OnGossipSelect(Player* /*player*/, Creature* creature, uint32 /*sender*/, uint32 /*action*/) override
|
bool OnGossipSelect(Player* /*player*/, Creature* creature, uint32 /*sender*/, uint32 /*action*/) override
|
||||||
{
|
{
|
||||||
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
creature->RemoveNpcFlag(UNIT_NPC_FLAG_GOSSIP);
|
||||||
|
|
||||||
if (InstanceScript* hyjal = creature->GetInstanceScript())
|
if (InstanceScript* hyjal = creature->GetInstanceScript())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1790,7 +1790,7 @@ public:
|
|||||||
if (!spellClickHandled)
|
if (!spellClickHandled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!me->GetUInt32Value(UNIT_NPC_FLAGS))
|
if (!me->GetNpcFlags())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (me->GetArmor())
|
switch (me->GetArmor())
|
||||||
@@ -1806,7 +1806,7 @@ public:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
me->SetUInt32Value(UNIT_NPC_FLAGS, 0);
|
me->ReplaceAllNpcFlags(UNIT_NPC_FLAG_NONE);
|
||||||
me->DespawnOrUnsummon(1000);
|
me->DespawnOrUnsummon(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -546,7 +546,7 @@ struct npc_salvaged_siege_engine : public VehicleAI
|
|||||||
{
|
{
|
||||||
if (Unit* turret = vehicle->GetPassenger(7))
|
if (Unit* turret = vehicle->GetPassenger(7))
|
||||||
{
|
{
|
||||||
if (Vehicle* turretVehicle = me->GetVehicleKit())
|
if (Vehicle* turretVehicle = turret->GetVehicleKit())
|
||||||
{
|
{
|
||||||
if (!turretVehicle->IsVehicleInUse())
|
if (!turretVehicle->IsVehicleInUse())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -103,20 +103,6 @@ enum Misc
|
|||||||
EVENT_KILL_TALK = 100
|
EVENT_KILL_TALK = 100
|
||||||
};
|
};
|
||||||
|
|
||||||
struct HammerOfJusticeSelector
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
HammerOfJusticeSelector(Unit* me) : _me(me) { }
|
|
||||||
|
|
||||||
bool operator()(Unit const* target) const
|
|
||||||
{
|
|
||||||
return target && target->GetTypeId() == TYPEID_PLAYER && _me->IsInRange(target, 10.0f, 40.0f, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
Unit const* _me;
|
|
||||||
};
|
|
||||||
|
|
||||||
class VerasEnvenom : public BasicEvent
|
class VerasEnvenom : public BasicEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -337,12 +323,13 @@ public:
|
|||||||
events.ScheduleEvent(EVENT_SPELL_AURA, 30000);
|
events.ScheduleEvent(EVENT_SPELL_AURA, 30000);
|
||||||
break;
|
break;
|
||||||
case EVENT_SPELL_HAMMER_OF_JUSTICE:
|
case EVENT_SPELL_HAMMER_OF_JUSTICE:
|
||||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, HammerOfJusticeSelector(me)))
|
if (Unit* target = me->GetVictim())
|
||||||
{
|
if (target->IsPlayer() && me->IsInRange(target, 10.0f, 40.0f, true))
|
||||||
me->CastSpell(target, SPELL_HAMMER_OF_JUSTICE, false);
|
{
|
||||||
events.ScheduleEvent(EVENT_SPELL_HAMMER_OF_JUSTICE, 20000);
|
me->CastSpell(target, SPELL_HAMMER_OF_JUSTICE);
|
||||||
break;
|
events.ScheduleEvent(EVENT_SPELL_HAMMER_OF_JUSTICE, 20s);
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
events.ScheduleEvent(EVENT_SPELL_HAMMER_OF_JUSTICE, 0);
|
events.ScheduleEvent(EVENT_SPELL_HAMMER_OF_JUSTICE, 0);
|
||||||
break;
|
break;
|
||||||
case EVENT_SPELL_SEAL:
|
case EVENT_SPELL_SEAL:
|
||||||
@@ -711,4 +698,3 @@ void AddSC_boss_illidari_council()
|
|||||||
RegisterSpellScript(spell_illidari_council_judgement);
|
RegisterSpellScript(spell_illidari_council_judgement);
|
||||||
RegisterSpellScript(spell_illidari_council_deadly_strike_aura);
|
RegisterSpellScript(spell_illidari_council_deadly_strike_aura);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user