From b8041202462c4881e3b45a09e85000d66d0715a8 Mon Sep 17 00:00:00 2001 From: Aleos Date: Thu, 2 Jun 2022 20:38:26 -0400 Subject: [PATCH] Fixes Battlegrounds and atcommand reloadscript (#7002) * Fixes #6175. * Fixes an issue where the Battleground Queue System could become stuck if a GM uses atcommand reloadscript. Thanks to @roSBK! --- npc/battleground/flavius/flavius01.txt | 2 ++ npc/battleground/flavius/flavius02.txt | 2 ++ npc/battleground/kvm/kvm01.txt | 3 +++ npc/battleground/kvm/kvm02.txt | 3 +++ npc/battleground/kvm/kvm03.txt | 3 +++ npc/battleground/tierra/tierra01.txt | 2 ++ npc/battleground/tierra/tierra02.txt | 2 ++ 7 files changed, 17 insertions(+) diff --git a/npc/battleground/flavius/flavius01.txt b/npc/battleground/flavius/flavius01.txt index 74a3be178a..4c3410c624 100644 --- a/npc/battleground/flavius/flavius01.txt +++ b/npc/battleground/flavius/flavius01.txt @@ -77,6 +77,8 @@ OnTimer1000: //============================================================ bat_b01,15,15,3 script start#bat_b01 844,{ OnInit: + if (getbattleflag("feature.bgqueue")) + bg_unbook "bat_b01"; mapwarp "bat_b01","bat_room",154,150; end; diff --git a/npc/battleground/flavius/flavius02.txt b/npc/battleground/flavius/flavius02.txt index 875c0b60a1..bd0e36be12 100644 --- a/npc/battleground/flavius/flavius02.txt +++ b/npc/battleground/flavius/flavius02.txt @@ -79,6 +79,8 @@ OnTimer1000: //============================================================ bat_b02,15,15,3 script start#bat_b02 844,{ OnInit: + if (getbattleflag("feature.bgqueue")) + bg_unbook "bat_b02"; mapwarp "bat_b02","bat_room",154,150; end; diff --git a/npc/battleground/kvm/kvm01.txt b/npc/battleground/kvm/kvm01.txt index a54c788ab0..039338d261 100644 --- a/npc/battleground/kvm/kvm01.txt +++ b/npc/battleground/kvm/kvm01.txt @@ -111,6 +111,9 @@ OnTouch: end; OnInit: + if (getbattleflag("feature.bgqueue")) + bg_unbook "bat_c01"; + mapwarp "bat_c01","bat_room",154,150; setwall "bat_c01",54,122,6,7,0,"batc01wall_a"; setwall "bat_c01",55,122,5,7,0,"batc01wall_b"; setwall "bat_c01",140,56,6,7,0,"batc01wall_c"; diff --git a/npc/battleground/kvm/kvm02.txt b/npc/battleground/kvm/kvm02.txt index 32c8ba8e9f..74164277a7 100644 --- a/npc/battleground/kvm/kvm02.txt +++ b/npc/battleground/kvm/kvm02.txt @@ -111,6 +111,9 @@ OnTouch: end; OnInit: + if (getbattleflag("feature.bgqueue")) + bg_unbook "bat_c02"; + mapwarp "bat_c02","bat_room",154,150; setwall "bat_c02",54,122,6,7,0,"batc02wall_a"; setwall "bat_c02",55,122,5,7,0,"batc02wall_b"; setwall "bat_c02",140,56,6,7,0,"batc02wall_c"; diff --git a/npc/battleground/kvm/kvm03.txt b/npc/battleground/kvm/kvm03.txt index 28df4ce9c7..05e6e2fe42 100644 --- a/npc/battleground/kvm/kvm03.txt +++ b/npc/battleground/kvm/kvm03.txt @@ -111,6 +111,9 @@ OnTouch: end; OnInit: + if (getbattleflag("feature.bgqueue")) + bg_unbook "bat_c03"; + mapwarp "bat_c03","bat_room",154,150; setwall "bat_c03",54,122,6,7,0,"batc03wall_a"; setwall "bat_c03",55,122,5,7,0,"batc03wall_b"; setwall "bat_c03",140,56,6,7,0,"batc03wall_c"; diff --git a/npc/battleground/tierra/tierra01.txt b/npc/battleground/tierra/tierra01.txt index ce61f0c641..7385f2178c 100644 --- a/npc/battleground/tierra/tierra01.txt +++ b/npc/battleground/tierra/tierra01.txt @@ -98,6 +98,8 @@ bat_room,57,211,0 warp back_bgrooma01b 1,1,bat_room,154,150 //============================================================ bat_a01,15,15,3 script start#bat_a01 844,{ OnInit: + if (getbattleflag("feature.bgqueue")) + bg_unbook "bat_a01"; mapwarp "bat_a01","bat_room",154,150; end; diff --git a/npc/battleground/tierra/tierra02.txt b/npc/battleground/tierra/tierra02.txt index 04d01165ed..43e2533d88 100644 --- a/npc/battleground/tierra/tierra02.txt +++ b/npc/battleground/tierra/tierra02.txt @@ -98,6 +98,8 @@ bat_room,113,211,0 warp back_bgrooma02b 1,1,bat_room,154,150 //============================================================ bat_a02,15,15,3 script start#bat_a02 844,{ OnInit: + if (getbattleflag("feature.bgqueue")) + bg_unbook "bat_a02"; mapwarp "bat_a02","bat_room",154,150; end;