Browse Source

Possibly fixing a problem with Goddess' blessing (thx bonekid)

TeraProxy 9 years ago
parent
commit
87999b7e1d
1 changed files with 7 additions and 3 deletions
  1. 7 3
      index.js

+ 7 - 3
index.js

@@ -64,9 +64,7 @@ module.exports = function Essentials(dispatch) {
 	
 	
 	dispatch.hook('S_CREATURE_LIFE', 1, event => {
 	dispatch.hook('S_CREATURE_LIFE', 1, event => {
 		if(event.target.equals(cid) && alive != event.alive) {
 		if(event.target.equals(cid) && alive != event.alive) {
-			setTimeout(function () {
-				nostrum(!(alive = event.alive))
-			}, 1900)
+			alive = event.alive
 			
 			
 			if(!alive) {
 			if(!alive) {
 				nextUse = 0
 				nextUse = 0
@@ -74,6 +72,12 @@ module.exports = function Essentials(dispatch) {
 			}
 			}
 		}
 		}
 	})
 	})
+	
+	dispatch.hook('C_REVIVE_NOW', 1, (event) => {
+		setTimeout(function () {
+			nostrum(!(alive = event.alive))
+		}, 1900)
+	})
 
 
 	dispatch.hook('S_MOUNT_VEHICLE', 1, mount.bind(null, true))
 	dispatch.hook('S_MOUNT_VEHICLE', 1, mount.bind(null, true))
 	dispatch.hook('S_UNMOUNT_VEHICLE', 1, mount.bind(null, false))
 	dispatch.hook('S_UNMOUNT_VEHICLE', 1, mount.bind(null, false))