From a509b0e9d3b0858a3448b82eab8117aa0b49114f Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 21 Feb 2012 11:22:31 -0800 Subject: [PATCH] Removed Master/Apprentice chat spam, and more.. Began modifying party command, still a WIP and probably not working properly. Modified locale for Taming messages to trim them shorter. --- Changelog.txt | 1 + .../nossr50/commands/party/PartyCommand.java | 38 +++++++++++++++++++ .../nossr50/datatypes/PlayerProfile.java | 4 +- .../resources/locale/locale_de.properties | 4 +- .../resources/locale/locale_en_us.properties | 4 +- .../resources/locale/locale_es_es.properties | 4 +- .../resources/locale/locale_fi.properties | 4 +- .../resources/locale/locale_fr.properties | 4 +- .../resources/locale/locale_nl.properties | 4 +- .../resources/locale/locale_pl.properties | 4 +- .../resources/locale/locale_pt_br.properties | 4 +- .../resources/locale/locale_ru.properties | 4 +- 12 files changed, 59 insertions(+), 20 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index e88bbb722..7d1814b53 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -18,6 +18,7 @@ Version 1.3.00-dev - Changed chat logging for /p & /a - Changed Tree Feller to use per-use ArrayList - Prettied up new config files + - Removed Master/Apprentice chat notifications to reduce spam - Removed duplicate settings in config.yml - Removed unused settings from config.yml (HP Regen) - Removed Nether Brick from Mining XP Tables diff --git a/src/main/java/com/gmail/nossr50/commands/party/PartyCommand.java b/src/main/java/com/gmail/nossr50/commands/party/PartyCommand.java index 3e6b25b1e..02da9c2a0 100644 --- a/src/main/java/com/gmail/nossr50/commands/party/PartyCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/party/PartyCommand.java @@ -11,6 +11,7 @@ import com.gmail.nossr50.Users; import com.gmail.nossr50.mcPermissions; import com.gmail.nossr50.config.LoadProperties; import com.gmail.nossr50.datatypes.PlayerProfile; +import com.gmail.nossr50.datatypes.SkillType; import com.gmail.nossr50.locale.mcLocale; import com.gmail.nossr50.party.Party; @@ -73,6 +74,43 @@ public class PartyCommand implements CommandExecutor { } player.sendMessage(mcLocale.getString("mcPlayerListener.YouAreInParty", new Object[] { PP.getParty() })); player.sendMessage(mcLocale.getString("mcPlayerListener.PartyMembers") + " (" + tempList + ChatColor.GREEN + ")"); + + //Master Apprentice Stuff + //Show the player all their bonuses when they type /party + for(Player a : Party.getInstance().getPartyMembers(player)) + { + if(Party.getInstance().isPartyLeader(a.getName(), PP.getParty()) && !a.getName().equals(player.getName())) + { + PlayerProfile LP = Users.getProfile(a); + for(SkillType type : SkillType.values()) + { + //Skip this one + if(type == SkillType.ALL) + continue; + + if(LP.getSkillLevel(type) > PP.getSkillLevel(type)) + { + //Tell them what their skill bonus is for this skill + int leaderLevel = LP.getSkillLevel(type); + int difference = leaderLevel - PP.getSkillLevel(type); + + double bonusModifier = (difference*0.75D)/100D; + double trueBonus = bonusModifier * 100; + player.sendMessage("You get "+trueBonus+"% more XP from "+type.toString()); + //double percent = (trueBonus/100)*100; + } else + { + //Tell them they have no bonus.. or not + } + } + } else if(Party.getInstance().isPartyLeader(a.getName(), PP.getParty()) && a.getName().equals(player.getName())) + { + //Tell them they are providing bonuses + } + } + + + return true; } else if (args.length == 1) { if (args[0].equals("q") && PP.inParty()) { diff --git a/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java index 93a672bea..0c20c3b70 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/PlayerProfile.java @@ -903,7 +903,7 @@ public class PlayerProfile } /** - * Adds XP to the player, this is affected by skill modifiers + * Adds XP to the player, this is affected by skill modifiers and xp rate * @param skillType The skill to add XP to * @param newvalue The amount of XP to add */ @@ -997,7 +997,7 @@ public class PlayerProfile double oldxp = xp; xp+=trueBonus; double percent = (trueBonus/oldxp)*100; - thisplayer.sendMessage(ChatColor.GREEN+"XP: "+oldxp+" Bonus XP: "+trueBonus+" Total: "+xp+ChatColor.GOLD+" [Master: "+leaderName+" " +" +"+(int)percent+"%]"); + //thisplayer.sendMessage(ChatColor.GREEN+"XP: "+oldxp+" Bonus XP: "+trueBonus+" Total: "+xp+ChatColor.GOLD+" [Master: "+leaderName+" " +" +"+(int)percent+"%]"); } Bukkit.getPluginManager().callEvent(new McMMOPlayerXpGainEvent(Bukkit.getPlayer(playerName), skillType, xp)); skillsXp.put(skillType, skillsXp.get(skillType)+xp); diff --git a/src/main/resources/locale/locale_de.properties b/src/main/resources/locale/locale_de.properties index 2e9d158fe..3416aad7a 100644 --- a/src/main/resources/locale/locale_de.properties +++ b/src/main/resources/locale/locale_de.properties @@ -396,8 +396,8 @@ m.EffectsTaming7_0=[[YELLOW]]Ruf der Wildniss m.EffectsTaming7_1=[[AQUA]]Beschwoere einen Wolf auf deine Seite m.EffectsTaming7_2=[[YELLOW]]Info: [[AQUA]]Ducken und Rechtsklick mit {0} Knochen in der Hand m.EffectsTaming8_0=Fast Food Service -m.EffectsTaming8_1=Chance for wolves to heal when they attack +m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service -m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt +m.AbilBonusTaming5_1=50% Chance for heal on attack Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file diff --git a/src/main/resources/locale/locale_en_us.properties b/src/main/resources/locale/locale_en_us.properties index e9607ed9e..281c72e7f 100644 --- a/src/main/resources/locale/locale_en_us.properties +++ b/src/main/resources/locale/locale_en_us.properties @@ -389,8 +389,8 @@ m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming8_0=Fast Food Service -m.EffectsTaming8_1=Chance for wolves to heal when they attack +m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service -m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt +m.AbilBonusTaming5_1=50% Chance for heal on attack Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file diff --git a/src/main/resources/locale/locale_es_es.properties b/src/main/resources/locale/locale_es_es.properties index 7c5a46e9c..44bfdb51f 100644 --- a/src/main/resources/locale/locale_es_es.properties +++ b/src/main/resources/locale/locale_es_es.properties @@ -389,8 +389,8 @@ m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming8_0=Fast Food Service -m.EffectsTaming8_1=Chance for wolves to heal when they attack +m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service -m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt +m.AbilBonusTaming5_1=50% Chance for heal on attack Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file diff --git a/src/main/resources/locale/locale_fi.properties b/src/main/resources/locale/locale_fi.properties index 6c0780000..e1a1e9de2 100644 --- a/src/main/resources/locale/locale_fi.properties +++ b/src/main/resources/locale/locale_fi.properties @@ -368,8 +368,8 @@ m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming8_0=Fast Food Service -m.EffectsTaming8_1=Chance for wolves to heal when they attack +m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service -m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt +m.AbilBonusTaming5_1=50% Chance for heal on attack Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file diff --git a/src/main/resources/locale/locale_fr.properties b/src/main/resources/locale/locale_fr.properties index 6a3b763df..8aba73a34 100644 --- a/src/main/resources/locale/locale_fr.properties +++ b/src/main/resources/locale/locale_fr.properties @@ -389,8 +389,8 @@ m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming8_0=Fast Food Service -m.EffectsTaming8_1=Chance for wolves to heal when they attack +m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service -m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt +m.AbilBonusTaming5_1=50% Chance for heal on attack Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file diff --git a/src/main/resources/locale/locale_nl.properties b/src/main/resources/locale/locale_nl.properties index c1d2bd0ed..ca7d39566 100644 --- a/src/main/resources/locale/locale_nl.properties +++ b/src/main/resources/locale/locale_nl.properties @@ -395,8 +395,8 @@ m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming8_0=Fast Food Service -m.EffectsTaming8_1=Chance for wolves to heal when they attack +m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service -m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt +m.AbilBonusTaming5_1=50% Chance for heal on attack Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file diff --git a/src/main/resources/locale/locale_pl.properties b/src/main/resources/locale/locale_pl.properties index 2bab49de7..fff2bb5d4 100644 --- a/src/main/resources/locale/locale_pl.properties +++ b/src/main/resources/locale/locale_pl.properties @@ -389,8 +389,8 @@ m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming8_0=Fast Food Service -m.EffectsTaming8_1=Chance for wolves to heal when they attack +m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service -m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt +m.AbilBonusTaming5_1=50% Chance for heal on attack Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file diff --git a/src/main/resources/locale/locale_pt_br.properties b/src/main/resources/locale/locale_pt_br.properties index 5f127286e..7ed3664bb 100644 --- a/src/main/resources/locale/locale_pt_br.properties +++ b/src/main/resources/locale/locale_pt_br.properties @@ -399,8 +399,8 @@ m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming8_0=Fast Food Service -m.EffectsTaming8_1=Chance for wolves to heal when they attack +m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service -m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt +m.AbilBonusTaming5_1=50% Chance for heal on attack Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file diff --git a/src/main/resources/locale/locale_ru.properties b/src/main/resources/locale/locale_ru.properties index 2d2b38c1b..e7e1ded31 100644 --- a/src/main/resources/locale/locale_ru.properties +++ b/src/main/resources/locale/locale_ru.properties @@ -381,8 +381,8 @@ m.EffectsTaming7_0=Call of the Wild m.EffectsTaming7_1=Summon a wolf to your side m.EffectsTaming7_2=[[GRAY]]COTW HOW-TO: Crouch and right click with {0} Bones in hand m.EffectsTaming8_0=Fast Food Service -m.EffectsTaming8_1=Chance for wolves to heal when they attack +m.EffectsTaming8_1=Chance for wolves to heal on attack m.AbilLockTaming5=LOCKED UNTIL 50+ SKILL (FAST FOOD SERVICE) m.AbilBonusTaming5_0=Fast Food Service -m.AbilBonusTaming5_1=50% Chance to heal equivalent to damage dealt +m.AbilBonusTaming5_1=50% Chance for heal on attack Swords.StoppedBleeding=[[GRAY]]The bleeding has [[GREEN]]stopped[[GRAY]]! \ No newline at end of file