[git]fix Burst on Hit and Critical Burst

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
zhouwei_e
Cornac
Posts: 35
Joined: Tue Feb 14, 2012 10:01 am

[git]fix Burst on Hit and Critical Burst

#1 Post by zhouwei_e »

Code: Select all

 game/modules/tome/class/interface/Combat.lua |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua
index 2bd0b9d..a562c57 100644
--- a/game/modules/tome/class/interface/Combat.lua
+++ b/game/modules/tome/class/interface/Combat.lua
@@ -511,7 +511,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam)
 	end
 
 	-- Burst on Hit
-	if hitted and crit and weapon.burst_on_hit then
+	if hitted and crit and weapon and weapon.burst_on_hit then
 		for typ, dam in pairs(weapon.burst_on_hit) do
 			if dam > 0 then
 				self:project({type="ball", radius=1, friendlyfire=false}, target.x, target.y, typ, dam)
@@ -520,7 +520,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam)
 	end
 
 	-- Critical Burst (generally more damage then burst on hit and larger radius)
-	if hitted and crit and weapon.burst_on_crit then
+	if hitted and crit and weapon and weapon.burst_on_crit then
 		for typ, dam in pairs(weapon.burst_on_crit) do
 			if dam > 0 then
 				self:project({type="ball", radius=2, friendlyfire=false}, target.x, target.y, typ, dam)

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: [git]fix Burst on Hit and Critical Burst

#2 Post by edge2054 »

Thanks :) I'll add it to the next patch I send Darkgod.

lukep
Sher'Tul Godslayer
Posts: 1712
Joined: Mon Mar 14, 2011 10:32 am
Location: Canada

Re: [git]fix Burst on Hit and Critical Burst

#3 Post by lukep »

Remember to remove "... and crit..." from burst on hit.
Some of my tools for helping make talents:
Melee Talent Creator
Annotated Talent Code (incomplete)

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: [git]fix Burst on Hit and Critical Burst

#4 Post by edge2054 »

Yarr... I got it :)

Was playing around with a flaming battleaxe on a skeleton paradox mage earlier tonight.

I'll probably email Darkgod a patch tomorrow. Have a couple more staff egos I want to knock out first.

Post Reply