[git]fix weapon egos (of purging)

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 weapon egos (of purging)

#1 Post by zhouwei_e »

Code: Select all

 .../tome/data/general/objects/egos/weapon.lua      |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/game/modules/tome/data/general/objects/egos/weapon.lua b/game/modules/tome/data/general/objects/egos/weapon.lua
index dc8abe6..e3fdc7b 100644
--- a/game/modules/tome/data/general/objects/egos/weapon.lua
+++ b/game/modules/tome/data/general/objects/egos/weapon.lua
@@ -685,10 +685,12 @@ newEntity{
 			
 			local eff = rng.tableRemove(effs)
 
-			if eff[1] == "effect" then
-				target:removeEffect(eff[2])
-			else
-				target:forceUseTalent(eff[2], {ignore_energy=true})
+			if eff then
+				if eff[1] == "effect" then
+					target:removeEffect(eff[2])
+				else
+					target:forceUseTalent(eff[2], {ignore_energy=true})
+				end
 			end
 		end},
 	},

Post Reply