From b73dc9b8bdb9940d96fe6f166e8b15aeb221d4ba Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Tue, 21 Aug 2012 21:18:44 +0000
Subject: [PATCH] Yeeks winners should correctly be noted in the vault

git-svn-id: http://svn.net-core.org/repos/t-engine4@5550 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/data/chats/sorcerer-end.lua | 2 ++
 game/modules/tome/data/quests/high-peak.lua   | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/game/modules/tome/data/chats/sorcerer-end.lua b/game/modules/tome/data/chats/sorcerer-end.lua
index baf78bab94..c65395fbcd 100644
--- a/game/modules/tome/data/chats/sorcerer-end.lua
+++ b/game/modules/tome/data/chats/sorcerer-end.lua
@@ -51,6 +51,7 @@ The Way will never forget you. Now go and make history!
 			player:die(player)
 			player:setQuestStatus("high-peak", engine.Quest.COMPLETED, "yeek")
 			player:hasQuest("high-peak"):win("yeek-sacrifice")
+			game:saveGame()
 		end},
 		{"But... I did so much, I could do so much more for the Way by staying alive!", jump="yeek-unsure"},
 	}
@@ -66,6 +67,7 @@ You will do as asked, for the good of all Yeeks! The Way is always right.
 			player:die(player)
 			player:setQuestStatus("high-peak", engine.Quest.COMPLETED, "yeek")
 			player:hasQuest("high-peak"):win("yeek-sacrifice")
+			game:saveGame()
 		end},
 	}
 }
diff --git a/game/modules/tome/data/quests/high-peak.lua b/game/modules/tome/data/quests/high-peak.lua
index 12167caa3d..877839c44f 100644
--- a/game/modules/tome/data/quests/high-peak.lua
+++ b/game/modules/tome/data/quests/high-peak.lua
@@ -46,7 +46,7 @@ end
 
 on_status_change = function(self, who, status, sub)
 	if sub then
-		if self:isCompleted("elandar-dead") and self:isCompleted("argoniel-dead") then
+		if self:isCompleted("elandar-dead") and self:isCompleted("argoniel-dead") and not who:isQuestStatus("high-peak", engine.Quest.DONE) then
 			who:setQuestStatus(self.id, engine.Quest.DONE)
 
 			-- Remove all remaining hostiles
-- 
GitLab