mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 13:49:05 +00:00
Added condition checking to extenders
Extended HP condition to read DBC HP instead
This commit is contained in:
1 parent
670b811e03
commit
aa160ba8fc
3 files changed
+45
-1
No files matched your search
@@ -1176,6 +1176,27 @@ public class AbilityController implements IAbilityHandler {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Boolean fireCheckConditions(AbilityCondition condition, EntityLivingBase caster, EntityLivingBase target) {
|
||||
for (IAbilityExtender ext : extenders) {
|
||||
Boolean result = ext.onCheckCondition(condition, caster, target);
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public Boolean fireCheckConditionsForPlayer(AbilityCondition condition, EntityLivingBase player) {
|
||||
for (IAbilityExtender ext : extenders) {
|
||||
Boolean result = ext.onCheckConditionForPlayer(condition, player);
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// IAbilityHandler
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in new issue
Block a user