DaPigGuy / PiggyCustomEnchants

An open source custom enchantment plugin for PocketMine-MP
https://piggydocs.aericio.net/PiggyCustomEnchants.html
Apache License 2.0
103 stars 118 forks source link

enchants glitch #85

Closed TDMidkwhatisxd closed 6 years ago

TDMidkwhatisxd commented 6 years ago

Please make sure your issue complies with these guidelines:

General

PLayers gets unlimited golden hearts

Version of PiggyCustomEnchants:

Steps to Reproduce the Issue

  1. Use these enchants
    • "276:0:1:Cursed Sword:lifesteal:2:deathbringer:5"
    • "310:0:1:DEFAULT:berserker:2:glowing:1"
    • "311:0:1:DEFAULT:revulsion:2:enlighted:2"
    • "312:0:1:DEFAULT:poisoned:3:hardened:1"
    • "313:0:1:DEFAULT:frozen:2"
  2. Get hit by a wooden sword

Extra Information

Hi, players where reporting that they gets unlimited golden heartz if they got hit by wooden/stone swords.

DaPigGuy commented 6 years ago

This is unusual, can you list your plugins?

TDMidkwhatisxd commented 6 years ago

I noticed, wen ppl are hitting me I get 3-4 extra hearts sometimes... Is there a code that give players extra hearts?(I deleted plugins list , because I don't wanna be accesed by anyone, I think u got the list in email)

DaPigGuy commented 6 years ago

The only enchant that gives extra health is Overload (wear to get)

TDMidkwhatisxd commented 6 years ago

not using overload enchants .... But cant anyone else reproduce this issue?

TDMidkwhatisxd commented 6 years ago

I wonder if can be lifesteal enchant ... Ill test

TwistedAsylumMC commented 6 years ago

i doubt lifesteal would give u more than ur normal health

TDMidkwhatisxd commented 6 years ago

https://youtu.be/hJdSl32NIgQ

It seems I didn't need to use sword to reproduce the glitch.... And player sword was a lifesteal sword ... or a lifesteal + deathbringer V sword.

The glitch is for a long time so I don't think sword enchant matters.

TDMidkwhatisxd commented 6 years ago

I think plugin should check if enchant exist first And if no it should apply ... Even if u get hit again effect should not be applied again. I think if u hit someone fast, effect spam and glitch...

TwistedAsylumMC commented 6 years ago

soon chances are being added to the enchants, would chances (like 10% chance to activate ability) fix this issue do you think?

TDMidkwhatisxd commented 6 years ago

I think, checking if a player got effect, is much more effective. But anyway, I will wait ^^

TDMidkwhatisxd commented 6 years ago

it seems that changes will take a while... Not to say , spamming /effect because of player hit, may cause performance issue. I will mod the plugin for me, I wish u good luck and hope that my issue helps.

TDMidkwhatisxd commented 6 years ago

It works, I have no problems anymore . After entity damage by event I put rand(1,7) and if rand = 5 let the magic run. I noticed that tasks eat performance a lot... Is just me?

https://timings.pmmp.io/?url=26113514

TwistedAsylumMC commented 6 years ago

thats exactly what i said, after we add chances it will be fixed, what you done id added chances

TDMidkwhatisxd commented 6 years ago

Nope its not, ppl still get extra heartz, just that it cant get spammed to make 100 heartz anymore. I think my idea to check if enchants are on before apply is better.

TDMidkwhatisxd commented 6 years ago

I did a test ... it seems that if u hit a player with regeneration(enlighted effect) many times, u spam regeneration effect on him and it can become a gitch .... Making more heartz .... But I still don't know ....

After I added chances to effect , it happen rarely ....

P.S. I don't know if its regeneration effect for sure, because it happened on armors without regeneration too... So I think the fault is in OnEntityDamage event ...... Because I put in front of it chance code ... . If chance not activated I get no heartz glitch ...

jrodr10 commented 6 years ago

When i first started reading your comments i thought you were dumb or a child or both... but now that i read them all you kinda have a point @TDMidkwhatisxd , though i do not think that adding a chance should be added to all the enchants, sure Lifesteal should prob be by chance but other enchants like Soulbound should not.

DaPigGuy commented 6 years ago

@TDMidkwhatisxd If regeneration is what's causing it, it's not our issue. It's an issue with PMMP that only gets caused by PiggyCE.

DarkIceTitan commented 6 years ago

This problem with the golden hearts happens even without custom enchantments. This isn't a glitch or bug with PiggyCE.

Aericio commented 6 years ago

Will mark as wontfix for now, since it seems that the issue is caused by PMMP.

TDMidkwhatisxd commented 6 years ago

Yah , enchants like soulbound should not have chance... I mean enchants , that give harmful/good effect should have chance, because with every hit effects are spammed.

TDMidkwhatisxd commented 6 years ago

Is not caused by pmmp ... but anyway ...

Aericio commented 6 years ago

It'll be re-opened if proven otherwise, but currently it seems like it's a pmmp bug.