[b42] Survival\Piercing Sight bonus not on character sheet

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
drayath
Wayist
Posts: 22
Joined: Sat Nov 27, 2010 10:53 pm

[b42] Survival\Piercing Sight bonus not on character sheet

#1 Post by drayath »

After learning the Survival\Piercing Sight skill does not show a bonus on the first page of the character sheet for the see invisible and see stealth stats.

Looks like the talent bonus is directly added in as part of combat:combatSeeStealth() and combat:combatSeeInvisible(), apparently so it can be scaled by cunning at the point of application.

Quick fix would be to add simular bonus into the character sheet code, but seems a bit messy.

johnnyzero
Thalore
Posts: 148
Joined: Tue Feb 28, 2012 6:36 am

Re: [b42] Survival\Piercing Sight bonus not on character she

#2 Post by johnnyzero »

Duplicate of [b38] Piercing Sight has no effect, which was never resolved. Here's a patch to resolve it:

Code: Select all

Index: CharacterSheet.lua
===================================================================
--- CharacterSheet.lua	(revision 5791)
+++ CharacterSheet.lua	(working copy)
@@ -423,7 +423,7 @@
 		if text then
 			self:mouseTooltip(self.TOOLTIP_VISION_STEALTH,  s:drawColorStringBlended(self.font, ("Stealth        : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
 		end
-		text = compare_fields(player, actor_to_compare, "see_stealth", "%.1f", "%+.1f")
+		text = compare_fields(player, actor_to_compare, function(actor) return actor:combatSeeStealth() end, "%.1f", "%+.1f")
 		if text then
 			self:mouseTooltip(self.TOOLTIP_VISION_SEE_STEALTH,  s:drawColorStringBlended(self.font, ("See stealth    : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
 		end
@@ -431,7 +431,7 @@
 		if text then
 			self:mouseTooltip(self.TOOLTIP_VISION_INVISIBLE,  s:drawColorStringBlended(self.font, ("Invisibility   : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
 		end
-		text = compare_fields(player, actor_to_compare, "see_invisible", "%.1f", "%+.1f")
+		text = compare_fields(player, actor_to_compare, function(actor) return actor:combatSeeInvisible() end, "%.1f", "%+.1f")
 		if text then
 			self:mouseTooltip(self.TOOLTIP_VISION_SEE_INVISIBLE,  s:drawColorStringBlended(self.font, ("See invisible  : #00ff00#%s"):format(text), w, h, 255, 255, 255, true)) h = h + self.font_h
 		end
I tested this patch by viewing the character sheet before taking piercing sight, noting the values seen (they are now shown in the character sheet regardless of talents/equipment), taking a point in piercing sight, and finally observing a correct adjustment to the displayed values for see through stealth and see invisible. The values are also displayed in monster character sheets.

Post Reply