Sentry Issue #223481030
Prevent Fish Flurry from activating if no suitable blocks are found Steps to reproduce: 1) Select squid on hyrule castle 2) Activate fish flurry while looking at middle of empty side of castle
This commit is contained in:
parent
7e9211815f
commit
cb9ac1fc9f
@ -102,11 +102,6 @@ public class PerkFishFlurry extends SmashPerk implements IThrown
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Recharge.Instance.use(player, GetName(), COOLDOWN, true, true))
|
||||
{
|
||||
return;
|
||||
|
||||
}
|
||||
event.setCancelled(true);
|
||||
|
||||
Set<Block> blocks = new HashSet<>();
|
||||
@ -131,10 +126,18 @@ public class PerkFishFlurry extends SmashPerk implements IThrown
|
||||
blocks.add(cur);
|
||||
}
|
||||
|
||||
_active.add(new DataSquidGeyser(player, blocks));
|
||||
if (!blocks.isEmpty())
|
||||
{
|
||||
if (!Recharge.Instance.use(player, GetName(), COOLDOWN, true, true))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Inform
|
||||
UtilPlayer.message(player, F.main("Game", "You used " + F.skill(GetName()) + "."));
|
||||
_active.add(new DataSquidGeyser(player, blocks));
|
||||
|
||||
// Inform
|
||||
UtilPlayer.message(player, F.main("Game", "You used " + F.skill(GetName()) + "."));
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
Loading…
Reference in New Issue
Block a user