mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 11:25:42 +00:00
Refactor(Core/Gossip): Replacing old macros with new (#1338)
* Correct support new macro
This commit is contained in:
@@ -118,7 +118,7 @@ public:
|
||||
uint8 Counter;
|
||||
uint8 RandomUnfreeze[4];
|
||||
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
}
|
||||
while (!good);
|
||||
}
|
||||
|
||||
|
||||
events.Reset();
|
||||
summons.DoAction(ACTION_DESPAWN_ADDS);
|
||||
summons.DespawnAll();
|
||||
@@ -306,7 +306,7 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@ public:
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
summons.DespawnAll();
|
||||
events.Reset();
|
||||
@@ -444,9 +444,9 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (Creature *palehoof = ObjectAccessor::GetCreature(*me, m_pInstance->GetData64(DATA_GORTOK_PALEHOOF)))
|
||||
palehoof->AI()->DoAction(ACTION_MINIBOSS_DIED);
|
||||
@@ -479,7 +479,7 @@ public:
|
||||
InstanceScript *m_pInstance;
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -554,9 +554,9 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (Creature *palehoof = ObjectAccessor::GetCreature(*me, m_pInstance->GetData64(DATA_GORTOK_PALEHOOF)))
|
||||
palehoof->AI()->DoAction(ACTION_MINIBOSS_DIED);
|
||||
@@ -581,7 +581,7 @@ public:
|
||||
|
||||
struct npc_ravenous_furbolgAI : public ScriptedAI
|
||||
{
|
||||
npc_ravenous_furbolgAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_ravenous_furbolgAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
m_pInstance = pCreature->GetInstanceScript();
|
||||
}
|
||||
@@ -589,7 +589,7 @@ public:
|
||||
InstanceScript *m_pInstance;
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -662,9 +662,9 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (Creature *palehoof = ObjectAccessor::GetCreature(*me, m_pInstance->GetData64(DATA_GORTOK_PALEHOOF)))
|
||||
palehoof->AI()->DoAction(ACTION_MINIBOSS_DIED);
|
||||
@@ -689,7 +689,7 @@ public:
|
||||
|
||||
struct npc_frenzied_worgenAI : public ScriptedAI
|
||||
{
|
||||
npc_frenzied_worgenAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_frenzied_worgenAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
m_pInstance = pCreature->GetInstanceScript();
|
||||
}
|
||||
@@ -697,7 +697,7 @@ public:
|
||||
InstanceScript *m_pInstance;
|
||||
EventMap events;
|
||||
|
||||
void Reset()
|
||||
void Reset()
|
||||
{
|
||||
events.Reset();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -770,9 +770,9 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
void JustDied(Unit* /*pKiller*/)
|
||||
{
|
||||
if (m_pInstance)
|
||||
if (m_pInstance)
|
||||
{
|
||||
if (Creature *palehoof = ObjectAccessor::GetCreature(*me, m_pInstance->GetData64(DATA_GORTOK_PALEHOOF)))
|
||||
palehoof->AI()->DoAction(ACTION_MINIBOSS_DIED);
|
||||
@@ -782,20 +782,20 @@ public:
|
||||
};
|
||||
|
||||
class go_palehoof_sphere : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_palehoof_sphere() : GameObjectScript("go_palehoof_sphere") { }
|
||||
{
|
||||
public:
|
||||
go_palehoof_sphere() : GameObjectScript("go_palehoof_sphere") { }
|
||||
|
||||
bool OnGossipHello(Player * /*pPlayer*/, GameObject *pGO)
|
||||
bool OnGossipHello(Player * /*pPlayer*/, GameObject *go) override
|
||||
{
|
||||
InstanceScript *pInstance = pGO->GetInstanceScript();
|
||||
InstanceScript *pInstance = go->GetInstanceScript();
|
||||
|
||||
Creature *pPalehoof = ObjectAccessor::GetCreature(*pGO, pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
Creature *pPalehoof = ObjectAccessor::GetCreature(*go, pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof && pPalehoof->IsAlive())
|
||||
{
|
||||
// maybe these are hacks :(
|
||||
pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
pGO->SetGoState(GO_STATE_ACTIVE);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
pPalehoof->AI()->DoAction(ACTION_START_EVENT);
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
{
|
||||
if (IsHeroic())
|
||||
m_pInstance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_LODI_DODI);
|
||||
|
||||
|
||||
m_pInstance->SetData(DATA_SKADI_THE_RUTHLESS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
|
||||
void DoAction(int32 param)
|
||||
{
|
||||
|
||||
|
||||
if (param == ACTION_PHASE2)
|
||||
{
|
||||
SecondPhase = true;
|
||||
@@ -306,7 +306,7 @@ public:
|
||||
AchievementHitCount++;
|
||||
if (AchievementHitCount >= 3 && m_pInstance)
|
||||
m_pInstance->SetData(DATA_SKADI_ACHIEVEMENT, true);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ public:
|
||||
cr->CastSpell(cr, cr->GetMap()->IsHeroic() ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH_N, true);
|
||||
if ((cr = me->SummonCreature(NPC_BREATH_TRIGGER, 471.0f, -484.7f, 105, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)))
|
||||
cr->CastSpell(cr, cr->GetMap()->IsHeroic() ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH_N, true);
|
||||
|
||||
|
||||
for (uint8 j = 0; j < 7; j++)
|
||||
if ((cr = me->SummonCreature(NPC_BREATH_TRIGGER, 477.0f, -507.0f+(j*3), 105.0f, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000)))
|
||||
cr->CastSpell(cr, cr->GetMap()->IsHeroic() ? SPELL_FLAME_BREATH_H : SPELL_FLAME_BREATH_N, true);
|
||||
@@ -351,7 +351,7 @@ public:
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
if (m_pInstance)
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(SKADI_IN_RANGE, 1);
|
||||
|
||||
me->MonsterTextEmote(EMOTE_IN_RANGE, 0, true);
|
||||
@@ -408,7 +408,7 @@ public:
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
RemoveSkadi(true);
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ public:
|
||||
me->CastSpell(me, SPELL_FLAME_VISUAL, false);
|
||||
}
|
||||
|
||||
if (m_pInstance)
|
||||
if (m_pInstance)
|
||||
m_pInstance->SetData(SKADI_IN_RANGE, 0);
|
||||
|
||||
currentPos = targetPoint;
|
||||
@@ -486,13 +486,13 @@ public:
|
||||
};
|
||||
|
||||
class go_harpoon_canon : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_harpoon_canon() : GameObjectScript("go_harpoon_canon") { }
|
||||
{
|
||||
public:
|
||||
go_harpoon_canon() : GameObjectScript("go_harpoon_canon") { }
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* pGO)
|
||||
bool OnGossipHello(Player* pPlayer, GameObject* go) override
|
||||
{
|
||||
InstanceScript *m_pInstance = pGO->GetInstanceScript();
|
||||
InstanceScript *m_pInstance = go->GetInstanceScript();
|
||||
if (m_pInstance && m_pInstance->GetData(DATA_SKADI_THE_RUTHLESS) == IN_PROGRESS)
|
||||
if (m_pInstance->GetData(SKADI_IN_RANGE) == 1)
|
||||
{
|
||||
@@ -509,7 +509,7 @@ public:
|
||||
|
||||
grauf->AI()->DoAction(ACTION_MYGIRL_ACHIEVEMENT);
|
||||
}
|
||||
pGO->CastSpell((Unit*)NULL, SPELL_LAUNCH_HARPOON);
|
||||
go->CastSpell((Unit*)NULL, SPELL_LAUNCH_HARPOON);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user