mcMMO-Dev/mcMMO — pull request #184 by bm01 (2012-02-24 10:18:44+00:00)
Title: Optimization in combatChecks()

Removed unnecessary checks and casts.

Item and permission verifications are now only done once in the method. However they're still done in bleedCheck(), axeCritialCheck() and probably elsewhere too. It can now be avoided.

Two methods were added: Combat.PvPExperienceGain() and Combat.PvEExperienceGain(), both are private and called in combatChecks(). SkillType is passed as an argument to avoid checks that have already been done.

I hope it works well, I couldn't properly test it, I have some trouble with the export (messages replaced by strings between exclamation marks, for example). Sorry for that, tell me if you think more test is needed.