Added party XP sharing.

This commit is contained in:
TfT_02
2013-01-30 15:17:50 +01:00
parent c6ef053aac
commit 9a89c7c49f
11 changed files with 192 additions and 52 deletions

View File

@ -14,6 +14,7 @@ import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.events.experience.McMMOPlayerLevelUpEvent;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.party.ShareHandler;
import com.gmail.nossr50.spout.SpoutConfig;
import com.gmail.nossr50.spout.SpoutTools;
import com.gmail.nossr50.util.Misc;
@ -523,6 +524,11 @@ public class SkillTools {
return;
}
if (profile.inParty()) {
xp = (int) ShareHandler.checkXpSharing(xp, player, profile.getParty(), type);
ShareHandler.handleEqualExpShare(xp, player, profile.getParty(), type);
}
Users.getPlayer(player).addXP(type, xp);
xpCheckSkill(type, player, profile);
}