ArsMagica2 icon indicating copy to clipboard operation
ArsMagica2 copied to clipboard

[1.4.0.009] Ritual "Recall other" does not work

Open N7shadow2000 opened this issue 8 years ago • 4 comments

if i try to use the rituall recall other I always get the error message "am2.tooltip.noMatchingPlayer" but i did use the right rune combination. If i use my own rune combination fot the rituall the same error message is given out in the chat and not the error message "am2.tooltip.cantSummonSelf" which should have been given out. I think there is an problem in the code which causes the error. Here the code of the rituall (from public class Recall):

private boolean handleRitualReagents(ItemStack[] ritualRunes, World world, int x, int y, int z, EntityLivingBase caster, Entity target) ... if (hasVinteumDust) { Object copy = new ArrayList(); ItemStack[] arrayOfItemStack2 = ritualRunes;ItemStack localItemStack1 = arrayOfItemStack2.length; for (stack = 0; stack < localItemStack1; stack++) { ItemStack stack = arrayOfItemStack2[stack]; if ((stack.func_77973_b() == ItemsCommonProxy.rune) && (stack.func_77960_j() <= 16)) { ((ArrayList)copy).add(stack); } } ItemStack[] newRunes = (ItemStack[])((ArrayList)copy).toArray(new ItemStack[((ArrayList)copy).size()]); long key = KeystoneUtilities.instance.getKeyFromRunes(newRunes); EntityPlayer player = EntityUtilities.getPlayerForCombo(world, (int)key); if (player == null) { if (((caster instanceof EntityPlayer)) && (!world.field_72995_K)) { ((EntityPlayer)caster).func_145747_a(new ChatComponentText("am2.tooltip.noMatchingPlayer")); } return false; } if (player == caster) { if (((caster instanceof EntityPlayer)) && (!world.field_72995_K)) { ((EntityPlayer)caster).func_145747_a(new ChatComponentText("am2.tooltip.cantSummonSelf")); } return false; } RitualShapeHelper.instance.consumeRitualReagents(this, world, x, y, z); if (target.field_70170_p.field_73011_w.field_76574_g != caster.field_70170_p.field_73011_w.field_76574_g) { DimensionUtilities.doDimensionTransfer(player, caster.field_70170_p.field_73011_w.field_76574_g); } ((EntityLivingBase)target).func_70634_a(x, y, z); return true; }

Possible problems: 1: the rune combo is not read from the rituall reagents 2: method getPlayerForRuneCombo always gives out null 3: if (((caster instanceof EntityPlayer)) && (!world.field_72995_K)) { ((EntityPlayer)caster).func_145747_a(new ChatComponentText("am2.tooltip.noMatchingPlayer")); in the if statement is the problem

N7shadow2000 avatar Jun 22 '16 12:06 N7shadow2000

the arcane compendium does not mention vinteum dust as a rituall reagent

N7shadow2000 avatar Jun 22 '16 12:06 N7shadow2000

Do you think you could do a pull request? We can always help on the #ArsMagica IRC :smile:

jjtParadox avatar Aug 31 '16 21:08 jjtParadox

Also many many many thanks for all your good bug reports. Most of the people who work on this are either on vacation or are busy, so we can't always be around to help with bugs and other issues.

jjtParadox avatar Aug 31 '16 22:08 jjtParadox

sorry but i only know the basics of programing

N7shadow2000 avatar Nov 23 '16 18:11 N7shadow2000