MoparClassic / MoparClassic

An emulator for an old java MMORPG
MoparClassic
44 stars 26 forks source link

MASSIVE XP GAIN #116

Open RSCHub opened 12 years ago

RSCHub commented 12 years ago

I'm not quite sure how it works, but i attacked a man (think he was glitched) and i got about 36 str levels in 3 seconds by rapidly attacking that npc. Rodger wilco was there and can vouch

Rodgerwilco commented 12 years ago

Its been reported that this was in rsca source as well... but i doubt it. I never came across it myself and has only happened once (with rschub) not sure how to activate it

CodeForFame commented 12 years ago

This seems like the NPC is not being removed correctly when it dies. Meaning, it has 0 HP.

Maybe check the HP when it is starting the fight event.

Joe0 commented 12 years ago

You'll need to make sure the Npc isn't dead. Make sure to check this for xp/item gaining actions.

This includes thieving, ranged, magic, and normal attacking.

Also, if anyone can replicate glitching a Npc, that would help a lot, because then we can just remove the cause of the problem.

Rodgerwilco commented 12 years ago

Too tackle this issue we are gonna need some beta users teaming an npc..

If I remember correctly, it happens when two people are there.. and sometimes only one person can get exp while the other attempts to attack but nothing happens.

Rodgerwilco commented 12 years ago

Wouldn't checking if the npc is nulled work? Currently looking for a problem and I am lost >:(

FightEvent class after run() method

    if(affectedMob == null) {
        owner.getActionSender().sendMessage("affectedMob == null");
        return;
    }

Because checking if the npcs hp is 0 is already there

    if (opponent instanceof Npc) {
        Npc n = (Npc) opponent;
        if (opponent.getHits() <= 0) {
            n.resetCombat(CombatState.ERROR);
            owner.resetCombat(CombatState.ERROR);
            this.stop();
        }
    }
CodeForFame commented 12 years ago

No, you should do:

if(owner == null || affectedMob == null) {
    ...
    return;
}

Right at the top of the run method.

Also, this.stop(); calls should be added in the appropriate places.

Nemesis- commented 12 years ago

Isn't this fixed?

Rodgerwilco commented 12 years ago

Possibly, needs a few people to test. It would occur after about 5-10 minutes usually. Guess we can close until it pops up again.

Joe0 commented 11 years ago

Is this still a problem? I've never seen it happen, so I'm not sure I'd be the greatest at testing it.