mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Scripts/Gundrak: Preparing for updating to new model (#26413)
Co-authored-by: offl <offl@users.noreply.github.com>
(cherry picked from commit 0cf18bcb22)
This commit is contained in:
@@ -446,7 +446,7 @@ private:
|
||||
|
||||
void AddSC_boss_drakkari_colossus()
|
||||
{
|
||||
RegisterCreatureAIWithFactory(boss_drakkari_colossus, GetGundrakAI);
|
||||
RegisterCreatureAIWithFactory(boss_drakkari_elemental, GetGundrakAI);
|
||||
RegisterCreatureAIWithFactory(npc_living_mojo, GetGundrakAI);
|
||||
RegisterGundrakCreatureAI(boss_drakkari_colossus);
|
||||
RegisterGundrakCreatureAI(boss_drakkari_elemental);
|
||||
RegisterGundrakCreatureAI(npc_living_mojo);
|
||||
}
|
||||
|
||||
@@ -299,8 +299,8 @@ class achievement_snakes_whyd_it_have_to_be_snakes : public AchievementCriteriaS
|
||||
|
||||
void AddSC_boss_slad_ran()
|
||||
{
|
||||
RegisterCreatureAIWithFactory(boss_slad_ran, GetGundrakAI);
|
||||
RegisterCreatureAIWithFactory(npc_slad_ran_constrictor, GetGundrakAI);
|
||||
RegisterCreatureAIWithFactory(npc_slad_ran_viper, GetGundrakAI);
|
||||
RegisterGundrakCreatureAI(boss_slad_ran);
|
||||
RegisterGundrakCreatureAI(npc_slad_ran_constrictor);
|
||||
RegisterGundrakCreatureAI(npc_slad_ran_viper);
|
||||
new achievement_snakes_whyd_it_have_to_be_snakes();
|
||||
}
|
||||
|
||||
@@ -96,4 +96,7 @@ inline AI* GetGundrakAI(T* obj)
|
||||
return GetInstanceAI<AI>(obj, GundrakScriptName);
|
||||
}
|
||||
|
||||
#define RegisterGundrakCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetGundrakAI)
|
||||
#define RegisterGundrakGameObjectAI(ai_name) RegisterGameObjectAIWithFactory(ai_name, GetGundrakAI)
|
||||
|
||||
#endif // GUNDRAK_H_
|
||||
|
||||
@@ -349,35 +349,24 @@ class instance_gundrak : public InstanceMapScript
|
||||
}
|
||||
};
|
||||
|
||||
class go_gundrak_altar : public GameObjectScript
|
||||
struct go_gundrak_altar : public GameObjectAI
|
||||
{
|
||||
public:
|
||||
go_gundrak_altar() : GameObjectScript("go_gundrak_altar") { }
|
||||
go_gundrak_altar(GameObject* go) : GameObjectAI(go), instance(go->GetInstanceScript()) { }
|
||||
|
||||
struct go_gundrak_altarAI : public GameObjectAI
|
||||
{
|
||||
go_gundrak_altarAI(GameObject* go) : GameObjectAI(go), instance(go->GetInstanceScript()) { }
|
||||
InstanceScript* instance;
|
||||
|
||||
InstanceScript* instance;
|
||||
bool OnGossipHello(Player* /*player*/) override
|
||||
{
|
||||
me->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
bool OnGossipHello(Player* /*player*/) override
|
||||
{
|
||||
me->AddFlag(GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
instance->SetData(DATA_STATUE_ACTIVATE, me->GetEntry());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
GameObjectAI* GetAI(GameObject* go) const override
|
||||
{
|
||||
return GetGundrakAI<go_gundrak_altarAI>(go);
|
||||
}
|
||||
instance->SetData(DATA_STATUE_ACTIVATE, me->GetEntry());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_instance_gundrak()
|
||||
{
|
||||
new instance_gundrak();
|
||||
new go_gundrak_altar();
|
||||
RegisterGundrakGameObjectAI(go_gundrak_altar);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user