Page 1 of 1

[b30] Prox can drown without dropping note. patch included

Posted: Wed Jul 20, 2011 8:27 pm
by tiger_eye
Prox can die by drowning, in which case he may not drop the final note. Here is a patch to ensure the note gets dropped:

Code: Select all

Index: game/modules/tome/data/zones/trollmire/npcs.lua
===================================================================
--- game/modules/tome/data/zones/trollmire/npcs.lua	(revision 3922)
+++ game/modules/tome/data/zones/trollmire/npcs.lua	(working copy)
@@ -77,6 +77,14 @@
 	end,
 
 	on_die = function(self, who)
+		--force the note to drop if it hasn't dropped already (such as if he died via drowning)
+		if self.on_takehit then
+			local n = game.zone:makeEntityByName(game.level, "object", "PROX_NOTE")
+			if n then
+				self.on_takehit = nil
+				game.zone:addEntity(game.level, n, "object", self.x, self.y)
+			end
+		end
 		game.state:activateBackupGuardian("ALUIN", 2, 35, "... and we thought the trollmire was safer now!")
 		game.player:resolveSource():setQuestStatus("start-allied", engine.Quest.COMPLETED, "trollmire")
 	end,

Re: [b30] Prox can drown without dropping note. patch inclu

Posted: Thu Jul 21, 2011 6:13 pm
by Final Master
That's actually quiet true as he is suppose to drop it once his hp hits a certain point. Good fix tiger!