[git]fix Burst on Hit and Critical Burst
Posted: Tue Mar 13, 2012 8:19 pm
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)