mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 21:56:22 +00:00
fix(Scripts/Karazhan): Implement the side entrance door area trigger … (#17556)
fix(Scripts/Karazhan): Implement the side entrance door area trigger handling
This commit is contained in:
@@ -562,8 +562,32 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class at_karazhan_side_entrance : public OnlyOnceAreaTriggerScript
|
||||
{
|
||||
public:
|
||||
at_karazhan_side_entrance() : OnlyOnceAreaTriggerScript("at_karazhan_side_entrance") { }
|
||||
|
||||
bool _OnTrigger(Player* player, AreaTrigger const* /*at*/) override
|
||||
{
|
||||
if (InstanceScript* instance = player->GetInstanceScript())
|
||||
{
|
||||
if (instance->GetBossState(DATA_OPERA_PERFORMANCE) == DONE)
|
||||
{
|
||||
if (GameObject* door = instance->GetGameObject(DATA_GO_SIDE_ENTRANCE_DOOR))
|
||||
{
|
||||
instance->HandleGameObject(ObjectGuid::Empty, true, door);
|
||||
door->RemoveGameObjectFlag(GO_FLAG_LOCKED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_karazhan()
|
||||
{
|
||||
new npc_barnes();
|
||||
new npc_image_of_medivh();
|
||||
new at_karazhan_side_entrance();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user