mirror of
https://gitlab.com/phoenix-dvpmt/mmoitems.git
synced 2024-12-31 06:07:34 +01:00
Use of recent trigger types conventions
This commit is contained in:
parent
b1c2e660a0
commit
3ba7839833
@ -70,7 +70,7 @@ public abstract class Ability<T extends AbilityMetadata> extends SkillHandler<T>
|
||||
RegisteredSkill registeredSkill = new RegisteredSkill(this);
|
||||
|
||||
// Corresponding ability data
|
||||
AbilityData abilityData = new AbilityData(registeredSkill, TriggerType.API);
|
||||
AbilityData abilityData = new AbilityData(registeredSkill, TriggerType.CAST);
|
||||
for (String mod : modifiers.keySet())
|
||||
abilityData.setModifier(mod, meta.getModifier(mod));
|
||||
|
||||
|
@ -117,7 +117,7 @@ public class MMOItemsAPI {
|
||||
public AttackMetadata castAbility(Player player, String skillName, Map<String, Double> modifiers, @Nullable LivingEntity target, @Nullable AttackMetadata attackMeta) {
|
||||
|
||||
// Setup ability
|
||||
AbilityData abilityData = new AbilityData(getSkillById(skillName), TriggerType.API);
|
||||
AbilityData abilityData = new AbilityData(getSkillById(skillName), TriggerType.CAST);
|
||||
modifiers.forEach((key, value) -> abilityData.setModifier(key, value));
|
||||
|
||||
// Cast ability
|
||||
@ -158,7 +158,7 @@ public class MMOItemsAPI {
|
||||
* based on entity attacks; in that case no attack metadata is provided.
|
||||
*/
|
||||
public void castSkill(Player player, RegisteredSkill skill, @NotNull Map<String, Double> modifiers, @Nullable LivingEntity target, @Nullable AttackMetadata attackMeta) {
|
||||
AbilityData castable = new AbilityData(skill, TriggerType.API);
|
||||
AbilityData castable = new AbilityData(skill, TriggerType.CAST);
|
||||
modifiers.forEach((mod, value) -> castable.setModifier(mod, value));
|
||||
|
||||
PlayerMetadata caster = MMOPlayerData.get(player).getStatMap().cache(EquipmentSlot.MAIN_HAND);
|
||||
|
@ -60,7 +60,7 @@ public class AbilityCommandTreeNode extends CommandTreeNode {
|
||||
}
|
||||
|
||||
// modifiers
|
||||
AbilityData ability = new AbilityData(MMOItems.plugin.getSkills().getSkill(key), TriggerType.API);
|
||||
AbilityData ability = new AbilityData(MMOItems.plugin.getSkills().getSkill(key), TriggerType.CAST);
|
||||
for (int j = 3; j < args.length - 1; j += 2) {
|
||||
String name = args[j];
|
||||
String value = args[j + 1];
|
||||
|
@ -332,7 +332,7 @@ public class PlayerListener implements Listener {
|
||||
}
|
||||
|
||||
// Create ability data
|
||||
AbilityData abilityData = new AbilityData(registeredSkill, TriggerType.API);
|
||||
AbilityData abilityData = new AbilityData(registeredSkill, TriggerType.CAST);
|
||||
for (String mod : event.getCast().getHandler().getModifiers())
|
||||
abilityData.setModifier(mod, event.getMetadata().getModifier(mod));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user