ahmedsuffian / aionxemu

Automatically exported from code.google.com/p/aionxemu
0 stars 0 forks source link

fortress generals exploit #282

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
YOU MUST BE USING AION X EMU FILES ONLY!! IF ANY MODIFICATIONS WERE DONE TO
THE FILES THAT WERE NOT INCLUDED WITH THE SVN, WE WILL NOT SUPPORT THOSE
ISSUES HERE!!

Core revision: r258

Bug description: Players can attack their own fortress generals, so they can 
get rewards anyway, regardless which faction holds the fortress.

What steps will reproduce the problem?: With normal attacks and/or AOE skills.

What is the expected output?: There must be a something player restriction to 
avoid the exploit.

Please copy/paste errors below:

Original issue reported on code.google.com by fourthdi...@gmail.com on 14 Apr 2011 at 10:48

GoogleCodeExporter commented 9 years ago
Check out the PlayerRestrictions.canAttack() Function. That is where you can 
most likely modify it to get it working fine.

Original comment by ZeroSign...@gmail.com on 19 Apr 2011 at 5:19

GoogleCodeExporter commented 9 years ago
ahh thank you mr zero for enlightenment....i already looking for this 
issue......
hmmm..... 

maybe like removing the line : "if (creature instanceof FortressGeneral ||"

and make new line like : 

"if (!(target instanceof FortressGeneral))
            return false;

are iam right ???
iam will testing it on local asap......THX

Original comment by freiya_d...@hotmail.com on 19 Apr 2011 at 7:58

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Please apply patch, test and report results.

Sorry, previous patches were bugged.

Original comment by ZeroSign...@gmail.com on 27 Apr 2011 at 3:58

Attachments:

GoogleCodeExporter commented 9 years ago
Committed Revision 271.

Original comment by ZeroSign...@gmail.com on 28 Apr 2011 at 3:15

GoogleCodeExporter commented 9 years ago
you can't use normal attacks on the enemy fortress generals, error:

[ERROR 2011-04-28 11:09:39] gameserver.network.aion.AionClientPacket:71 - Error 
handling client (axetest) message :[C] 0x92 CM_ATTACK
java.lang.ClassCastException: gameserver.model.siege.FortressGeneral cannot be 
cast to gameserver.model.gameobjects.player.Player
    at gameserver.restrictions.PlayerRestrictions.canAttack(PlayerRestrictions.java:294)
    at gameserver.restrictions.RestrictionsManager.canAttack(RestrictionsManager.java:204)
    at gameserver.controllers.PlayerController.attackTarget(PlayerController.java:296)
    at gameserver.network.aion.clientpackets.CM_ATTACK.runImpl(CM_ATTACK.java:72)
    at gameserver.network.aion.AionClientPacket.run(AionClientPacket.java:64)
    at com.aionemu.commons.utils.concurrent.ExecuteWrapper.execute(ExecuteWrapper.java:54)
    at gameserver.taskmanager.FIFORunnableQueue.removeAndExecuteFirst(FIFORunnableQueue.java:28)
    at gameserver.taskmanager.FIFOExecutableQueue.run(FIFOExecutableQueue.java:65)
    at com.aionemu.commons.utils.concurrent.ExecuteWrapper.execute(ExecuteWrapper.java:54)
    at com.aionemu.commons.utils.concurrent.ExecuteWrapper.run(ExecuteWrapper.java:39)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

small correction in your restriction script:
        if (creature instanceof FortressGeneral) {
            FortressGeneral fortressGeneral = (FortressGeneral) creature;
            if (!fortressGeneral.isEnemyPlayer(player)) {
                return false;
            } else
                return true;
        }

and players still can dmg their generals with non-target aoe skills, if they 
doesn't target them just stand close.

(anyway thank you so much for your contribution, awesome what you are doing at 
aionxemu, respect.)

Original comment by fourthdi...@gmail.com on 28 Apr 2011 at 10:05

GoogleCodeExporter commented 9 years ago
Hello,

Thanks for your feedback.

Please apply this patch, test and report your results so I can commit it asap 
if it works ok. It should also hopefully prevent the AoE damage from occurring.

Original comment by ZeroSign...@gmail.com on 28 Apr 2011 at 2:52

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
with this last patch nobody can cast skills (regular/stigma and non-target 
skills either) on the fortress generals regardless of races.

with an "else" exception like at the physical attacks it can be fixed, nice job.

note: need something for the fortress guards also, the npc rule script causes 
pretty much conflicts.

Original comment by fourthdi...@gmail.com on 29 Apr 2011 at 5:31

GoogleCodeExporter commented 9 years ago
Update to the latest revision then apply the 
FortressGeneral_PlayerAttack_Fix_3.patch, test and report results.

Original comment by ZeroSign...@gmail.com on 13 May 2011 at 2:15

GoogleCodeExporter commented 9 years ago
excellent work! no error, no exploit.

Original comment by fourthdi...@hotmail.com on 14 May 2011 at 9:01

GoogleCodeExporter commented 9 years ago
Committed Revision 288.

Original comment by ZeroSign...@gmail.com on 19 May 2011 at 9:51