Skip to content

Commit 085875c

Browse files
committed
Fix leave shack with visual store
1 parent 7b65d70 commit 085875c

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

Source/stores.cpp

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,28 @@ void SmithRepairEnter()
15301530

15311531
void WitchEnter()
15321532
{
1533+
if (*GetOptions().Gameplay.visualStoreUI) {
1534+
switch (CurrentTextLine) {
1535+
case 12:
1536+
OldTextLine = 12;
1537+
TownerId = TOWN_WITCH;
1538+
OldActiveStore = TalkID::Witch;
1539+
StartStore(TalkID::Gossip);
1540+
break;
1541+
case 14:
1542+
ActiveStore = TalkID::None;
1543+
OpenVisualStore(VisualStoreVendor::Witch);
1544+
break;
1545+
case 16:
1546+
StartStore(TalkID::WitchRecharge);
1547+
break;
1548+
case 18:
1549+
ActiveStore = TalkID::None;
1550+
break;
1551+
}
1552+
return;
1553+
}
1554+
15331555
switch (CurrentTextLine) {
15341556
case 12:
15351557
OldTextLine = 12;
@@ -1538,20 +1560,10 @@ void WitchEnter()
15381560
StartStore(TalkID::Gossip);
15391561
break;
15401562
case 14:
1541-
if (*GetOptions().Gameplay.visualStoreUI) {
1542-
ActiveStore = TalkID::None;
1543-
OpenVisualStore(VisualStoreVendor::Witch);
1544-
} else {
1545-
StartStore(TalkID::WitchBuy);
1546-
}
1563+
StartStore(TalkID::WitchBuy);
15471564
break;
15481565
case 16:
1549-
if (*GetOptions().Gameplay.visualStoreUI) {
1550-
ActiveStore = TalkID::None;
1551-
OpenVisualStore(VisualStoreVendor::Witch);
1552-
} else {
1553-
StartStore(TalkID::WitchSell);
1554-
}
1566+
StartStore(TalkID::WitchSell);
15551567
break;
15561568
case 18:
15571569
StartStore(TalkID::WitchRecharge);
@@ -1660,7 +1672,7 @@ void WitchRechargeEnter()
16601672
{
16611673
if (CurrentTextLine == BackButtonLine()) {
16621674
StartStore(TalkID::Witch);
1663-
CurrentTextLine = 18;
1675+
CurrentTextLine = *GetOptions().Gameplay.visualStoreUI ? 16 : 18;
16641676
return;
16651677
}
16661678

@@ -2517,7 +2529,7 @@ void StoreESC()
25172529
break;
25182530
case TalkID::WitchRecharge:
25192531
StartStore(TalkID::Witch);
2520-
CurrentTextLine = 18;
2532+
CurrentTextLine = *GetOptions().Gameplay.visualStoreUI ? 16 : 18;
25212533
break;
25222534
case TalkID::HealerBuy:
25232535
StartStore(TalkID::Healer);

0 commit comments

Comments
 (0)