mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/AI: Remove default arguments for inter-script communication
This commit is contained in:
@@ -54,7 +54,9 @@ enum PrinceTaldaramMisc
|
||||
{
|
||||
DATA_EMBRACE_DMG = 20000,
|
||||
H_DATA_EMBRACE_DMG = 40000,
|
||||
SUMMON_GROUP_CONTROLLERS = 1
|
||||
SUMMON_GROUP_CONTROLLERS = 1,
|
||||
|
||||
DATA_FLAME_SPHERE_TARGET_GUID = 0,
|
||||
};
|
||||
|
||||
enum PrinceTaldaramYells
|
||||
@@ -123,7 +125,7 @@ struct boss_prince_taldaram : public BossAI
|
||||
case NPC_FLAME_SPHERE_1:
|
||||
case NPC_FLAME_SPHERE_2:
|
||||
case NPC_FLAME_SPHERE_3:
|
||||
summon->AI()->SetGUID(_flameSphereTargetGUID);
|
||||
summon->AI()->SetGUID(_flameSphereTargetGUID, DATA_FLAME_SPHERE_TARGET_GUID);
|
||||
break;
|
||||
case NPC_JEDOGA_CONTROLLER:
|
||||
summon->CastSpell(me, SPELL_BEAM_VISUAL);
|
||||
@@ -307,8 +309,11 @@ struct npc_prince_taldaram_flame_sphere : public ScriptedAI
|
||||
_events.ScheduleEvent(EVENT_DESPAWN, 13s);
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 id) override
|
||||
{
|
||||
if (id != DATA_FLAME_SPHERE_TARGET_GUID)
|
||||
return;
|
||||
|
||||
_flameSphereTargetGUID = guid;
|
||||
}
|
||||
|
||||
|
||||
@@ -116,7 +116,8 @@ enum Data
|
||||
{
|
||||
DATA_CRUSHER_PACK_ID = 1,
|
||||
DATA_HADRONOX_ENTERED_COMBAT,
|
||||
DATA_HADRONOX_WEBBED_DOORS
|
||||
DATA_HADRONOX_WEBBED_DOORS,
|
||||
DATA_ANUBAR_GUID,
|
||||
};
|
||||
|
||||
enum Creatures
|
||||
@@ -264,8 +265,11 @@ struct boss_hadronox : public BossAI
|
||||
nerubian->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 id) override
|
||||
{
|
||||
if (id != DATA_ANUBAR_GUID)
|
||||
return;
|
||||
|
||||
_anubar.push_back(guid);
|
||||
}
|
||||
|
||||
@@ -664,7 +668,7 @@ struct npc_hadronox_foeAI : public ScriptedAI
|
||||
{
|
||||
ScriptedAI::InitializeAI();
|
||||
if (Creature* hadronox = _instance->GetCreature(DATA_HADRONOX))
|
||||
hadronox->AI()->SetGUID(me->GetGUID());
|
||||
hadronox->AI()->SetGUID(me->GetGUID(), DATA_ANUBAR_GUID);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) override
|
||||
|
||||
@@ -179,7 +179,8 @@ enum Misc
|
||||
DATA_MATERIAL_DAMAGE_TAKEN = 2,
|
||||
DATA_STACKS_DISPELLED = 3,
|
||||
DATA_FIGHT_PHASE = 4,
|
||||
DATA_SPAWNED_FLAMES = 5
|
||||
DATA_SPAWNED_FLAMES = 5,
|
||||
DATA_ROOT_GUID = 6,
|
||||
};
|
||||
|
||||
enum OrbCarrierSeats
|
||||
@@ -1110,7 +1111,7 @@ class npc_meteor_strike : public CreatureScript
|
||||
{
|
||||
Position pos = me->GetNearPosition(5.0f, frand(-static_cast<float>(M_PI / 6.0f), static_cast<float>(M_PI / 6.0f)));
|
||||
if (Creature* flame = me->SummonCreature(NPC_METEOR_STRIKE_FLAME, pos, TEMPSUMMON_TIMED_DESPAWN, 25s))
|
||||
flame->AI()->SetGUID(me->GetGUID());
|
||||
flame->AI()->SetGUID(me->GetGUID(), DATA_ROOT_GUID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1139,8 +1140,11 @@ class npc_meteor_strike_flame : public CreatureScript
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 id) override
|
||||
{
|
||||
if (id != DATA_ROOT_GUID)
|
||||
return;
|
||||
|
||||
_rootOwnerGuid = guid;
|
||||
_events.ScheduleEvent(EVENT_SPAWN_METEOR_FLAME, Milliseconds(800));
|
||||
}
|
||||
@@ -1170,7 +1174,7 @@ class npc_meteor_strike_flame : public CreatureScript
|
||||
|
||||
Position pos = me->GetNearPosition(5.0f, frand(-static_cast<float>(M_PI / 6.0f), static_cast<float>(M_PI / 6.0f)));
|
||||
if (Creature* flame = me->SummonCreature(NPC_METEOR_STRIKE_FLAME, pos, TEMPSUMMON_TIMED_DESPAWN, 25s))
|
||||
flame->AI()->SetGUID(_rootOwnerGuid);
|
||||
flame->AI()->SetGUID(_rootOwnerGuid, DATA_ROOT_GUID);
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason /*why*/) override { }
|
||||
|
||||
@@ -170,7 +170,8 @@ enum Misc
|
||||
SUMMON_PRINCES_GROUP = 1,
|
||||
DATA_INTRO = 2,
|
||||
DATA_INTRO_DONE = 3,
|
||||
DATA_PRINCE_EVADE = 4
|
||||
DATA_PRINCE_EVADE = 4,
|
||||
DATA_CHASE_TARGET_GUID = 5,
|
||||
};
|
||||
|
||||
class StandUpEvent : public BasicEvent
|
||||
@@ -698,7 +699,7 @@ struct boss_prince_taldaram_icc : public BloodPrincesBossAI
|
||||
Talk(EMOTE_TALDARAM_FLAME, target);
|
||||
|
||||
if (target)
|
||||
summon->AI()->SetGUID(target->GetGUID());
|
||||
summon->AI()->SetGUID(target->GetGUID(), DATA_CHASE_TARGET_GUID);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -930,8 +931,11 @@ struct npc_ball_of_flame : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 id) override
|
||||
{
|
||||
if (id != DATA_CHASE_TARGET_GUID)
|
||||
return;
|
||||
|
||||
_chaseGUID = guid;
|
||||
}
|
||||
|
||||
|
||||
@@ -166,6 +166,11 @@ enum Actions
|
||||
ACTION_START_INTRO
|
||||
};
|
||||
|
||||
enum LadyDeathwhisperData
|
||||
{
|
||||
DATA_VENGEFUL_SHADE_TARGET_GUID = 0
|
||||
};
|
||||
|
||||
#define NPC_DARNAVAN RAID_MODE<uint32>(NPC_DARNAVAN_10, NPC_DARNAVAN_25, NPC_DARNAVAN_10, NPC_DARNAVAN_25)
|
||||
#define NPC_DARNAVAN_CREDIT RAID_MODE<uint32>(NPC_DARNAVAN_CREDIT_10, NPC_DARNAVAN_CREDIT_25, NPC_DARNAVAN_CREDIT_10, NPC_DARNAVAN_CREDIT_25)
|
||||
#define QUEST_DEPROGRAMMING RAID_MODE<uint32>(QUEST_DEPROGRAMMING_10, QUEST_DEPROGRAMMING_25, QUEST_DEPROGRAMMING_10, QUEST_DEPROGRAMMING_25)
|
||||
@@ -477,7 +482,7 @@ struct boss_lady_deathwhisper : public BossAI
|
||||
case NPC_VENGEFUL_SHADE:
|
||||
if (_nextVengefulShadeTargetGUID.empty())
|
||||
break;
|
||||
summon->AI()->SetGUID(_nextVengefulShadeTargetGUID.front());
|
||||
summon->AI()->SetGUID(_nextVengefulShadeTargetGUID.front(), DATA_VENGEFUL_SHADE_TARGET_GUID);
|
||||
_nextVengefulShadeTargetGUID.pop_front();
|
||||
break;
|
||||
case NPC_CULT_ADHERENT:
|
||||
@@ -782,8 +787,11 @@ struct npc_vengeful_shade : public ScriptedAI
|
||||
});
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 id) override
|
||||
{
|
||||
if (id != DATA_VENGEFUL_SHADE_TARGET_GUID)
|
||||
return;
|
||||
|
||||
_targetGUID = guid;
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ struct boss_lord_marrowgar : public BossAI
|
||||
return &_coldflameLastPos;
|
||||
}
|
||||
|
||||
ObjectGuid GetGUID(int32 type /*= 0 */) const override
|
||||
ObjectGuid GetGUID(int32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@@ -358,13 +358,11 @@ enum MiscData
|
||||
SOUND_PAIN = 17360, // separate sound, not attached to any text
|
||||
|
||||
EQUIP_ASHBRINGER_GLOWING = 50442,
|
||||
EQUIP_BROKEN_FROSTMOURNE = 50840
|
||||
};
|
||||
EQUIP_BROKEN_FROSTMOURNE = 50840,
|
||||
|
||||
enum Misc
|
||||
{
|
||||
DATA_PLAGUE_STACK = 70337,
|
||||
DATA_VILE = 45814622,
|
||||
DATA_GRABBED_PLAYER_GUID = 0,
|
||||
|
||||
GOSSIP_MENU_START_INTRO = 10993
|
||||
};
|
||||
@@ -1500,8 +1498,11 @@ struct npc_valkyr_shadowguard : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 id) override
|
||||
{
|
||||
if (id != DATA_GRABBED_PLAYER_GUID)
|
||||
return;
|
||||
|
||||
_grabbedPlayer = guid;
|
||||
}
|
||||
|
||||
@@ -2304,7 +2305,7 @@ class spell_the_lich_king_valkyr_target_search : public SpellScript
|
||||
_target = Trinity::Containers::SelectRandomContainerElement(targets);
|
||||
targets.clear();
|
||||
targets.push_back(_target);
|
||||
GetCaster()->GetAI()->SetGUID(_target->GetGUID());
|
||||
GetCaster()->GetAI()->SetGUID(_target->GetGUID(), DATA_GRABBED_PLAYER_GUID);
|
||||
}
|
||||
|
||||
void ReplaceTarget(std::list<WorldObject*>& targets)
|
||||
|
||||
@@ -69,6 +69,11 @@ enum Events
|
||||
EVENT_SUMMON,
|
||||
};
|
||||
|
||||
enum MaexxnaData
|
||||
{
|
||||
DATA_WEBWRAP_VICTIM_GUID = 0
|
||||
};
|
||||
|
||||
const float WEB_WRAP_MOVE_SPEED = 20.0f;
|
||||
|
||||
struct WebTargetSelector
|
||||
@@ -143,7 +148,7 @@ struct boss_maexxna : public BossAI
|
||||
target->RemoveAura(SPELL_WEB_SPRAY);
|
||||
if (Creature* wrap = DoSummon(NPC_WEB_WRAP, WrapPositions[wrapPos], 70s, TEMPSUMMON_TIMED_DESPAWN))
|
||||
{
|
||||
wrap->AI()->SetGUID(target->GetGUID()); // handles application of debuff
|
||||
wrap->AI()->SetGUID(target->GetGUID(), DATA_WEBWRAP_VICTIM_GUID); // handles application of debuff
|
||||
target->GetMotionMaster()->MoveJump(WrapPositions[wrapPos], WEB_WRAP_MOVE_SPEED, WEB_WRAP_MOVE_SPEED); // move after stun to avoid stun cancelling move
|
||||
}
|
||||
}
|
||||
@@ -188,10 +193,14 @@ struct npc_webwrap : public NullCreatureAI
|
||||
me->SetVisible(false);
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 id) override
|
||||
{
|
||||
if (id != DATA_WEBWRAP_VICTIM_GUID)
|
||||
return;
|
||||
|
||||
if (!guid)
|
||||
return;
|
||||
|
||||
victimGUID = guid;
|
||||
if (Unit* victim = ObjectAccessor::GetUnit(*me, victimGUID))
|
||||
{
|
||||
|
||||
@@ -1260,7 +1260,9 @@ enum BloodsporeRuination
|
||||
NPC_BLOODMAGE_LAURITH = 25381,
|
||||
SAY_BLOODMAGE_LAURITH = 0,
|
||||
EVENT_TALK = 1,
|
||||
EVENT_RESET_ORIENTATION
|
||||
EVENT_RESET_ORIENTATION,
|
||||
|
||||
DATA_FACING_PLAYER_GUID = 0
|
||||
};
|
||||
|
||||
// 45997 - Bloodspore Ruination
|
||||
@@ -1270,7 +1272,7 @@ class spell_q11719_bloodspore_ruination_45997 : public SpellScript
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Creature* laurith = caster->FindNearestCreature(NPC_BLOODMAGE_LAURITH, 100.0f))
|
||||
laurith->AI()->SetGUID(caster->GetGUID());
|
||||
laurith->AI()->SetGUID(caster->GetGUID(), DATA_FACING_PLAYER_GUID);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1289,8 +1291,11 @@ struct npc_bloodmage_laurith : public ScriptedAI
|
||||
_playerGUID.Clear();
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid const& guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid const& guid, int32 id) override
|
||||
{
|
||||
if (id != DATA_FACING_PLAYER_GUID)
|
||||
return;
|
||||
|
||||
if (!_playerGUID.IsEmpty())
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user