Poison corrections
::poison command (admin) will now automatically remove poison immunity timers for faster testing Poison will no longer give an inauthentic warning when it is about to expire Newly applied poison timers will only overwrite old poison timers if they are greater in severity Fixed up some logic for monster examine checking poison immunity Fixed numerous poison stats
This commit is contained in:
@@ -3044,8 +3044,12 @@ fun applyPoison (entity: Entity, source: Entity, severity: Int) {
|
||||
val existingTimer = getTimer<Poison>(entity)
|
||||
|
||||
if (existingTimer != null) {
|
||||
existingTimer.severity = severity
|
||||
existingTimer.damageSource = source
|
||||
if (existingTimer.severity > severity) {
|
||||
return
|
||||
} else {
|
||||
existingTimer.severity = severity
|
||||
existingTimer.damageSource = source
|
||||
}
|
||||
} else {
|
||||
registerTimer(entity, spawnTimer<Poison>(source, severity))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user