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.
This commit is contained in:
nossr50
2012-02-21 11:22:31 -08:00
parent 93e223b2cc
commit a509b0e9d3
12 changed files with 59 additions and 20 deletions

View File

@ -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()) {

View File

@ -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);