mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Ch-Ch-Ch-Changes!
This commit is contained in:
parent
c5334bcdc8
commit
be23f9a145
@ -8,6 +8,13 @@ GigaDrillBreaker/Berserk doesn't drop clay blocks anymore
|
|||||||
Fixed bug where Herbalism didn't heal more for bread/stew when right clicking a block
|
Fixed bug where Herbalism didn't heal more for bread/stew when right clicking a block
|
||||||
Fixed bug where Wheat did not use the values form the config file
|
Fixed bug where Wheat did not use the values form the config file
|
||||||
|
|
||||||
|
TODO:
|
||||||
|
Fix the NPE with theType
|
||||||
|
Permission nodes for Spout elements
|
||||||
|
Small HUD style
|
||||||
|
HUD persistence
|
||||||
|
Maybe incorporate mmoParty
|
||||||
|
|
||||||
In order to streamline the configuration of how XP/Levels are gained, we rewrote the formulas, it is paramount to understand that from a game perspective that does NOT change how fast you level up, it just changes how easy it is to configure the system, current configuration files will be automatically updated maintaining your selected leveling speed
|
In order to streamline the configuration of how XP/Levels are gained, we rewrote the formulas, it is paramount to understand that from a game perspective that does NOT change how fast you level up, it just changes how easy it is to configure the system, current configuration files will be automatically updated maintaining your selected leveling speed
|
||||||
|
|
||||||
|
|
||||||
|
@ -89,11 +89,11 @@ public class Combat
|
|||||||
int xp = (int) (event.getDamage() * 2 * LoadProperties.pvpxprewardmodifier);
|
int xp = (int) (event.getDamage() * 2 * LoadProperties.pvpxprewardmodifier);
|
||||||
|
|
||||||
if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker))
|
if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker))
|
||||||
PPa.addXP(SkillType.AXES, xp);
|
PPa.addXP(SkillType.AXES, xp*10);
|
||||||
if(m.isSwords(attacker.getItemInHand()) && mcPermissions.getInstance().swords(attacker))
|
if(m.isSwords(attacker.getItemInHand()) && mcPermissions.getInstance().swords(attacker))
|
||||||
PPa.addXP(SkillType.SWORDS, xp);
|
PPa.addXP(SkillType.SWORDS, xp*10);
|
||||||
if(attacker.getItemInHand().getTypeId() == 0 && mcPermissions.getInstance().unarmed(attacker))
|
if(attacker.getItemInHand().getTypeId() == 0 && mcPermissions.getInstance().unarmed(attacker))
|
||||||
PPa.addXP(SkillType.UNARMED, xp);
|
PPa.addXP(SkillType.UNARMED, xp*10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -117,11 +117,11 @@ public class Combat
|
|||||||
xp = (event.getDamage() * 3);
|
xp = (event.getDamage() * 3);
|
||||||
|
|
||||||
if(m.isSwords(attacker.getItemInHand()) && mcPermissions.getInstance().swords(attacker))
|
if(m.isSwords(attacker.getItemInHand()) && mcPermissions.getInstance().swords(attacker))
|
||||||
PPa.addXP(SkillType.SWORDS, xp);
|
PPa.addXP(SkillType.SWORDS, xp*10);
|
||||||
else if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker))
|
else if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker))
|
||||||
PPa.addXP(SkillType.AXES, xp);
|
PPa.addXP(SkillType.AXES, xp*10);
|
||||||
else if(attacker.getItemInHand().getTypeId() == 0 && mcPermissions.getInstance().unarmed(attacker))
|
else if(attacker.getItemInHand().getTypeId() == 0 && mcPermissions.getInstance().unarmed(attacker))
|
||||||
PPa.addXP(SkillType.UNARMED, xp);
|
PPa.addXP(SkillType.UNARMED, xp*10);
|
||||||
}
|
}
|
||||||
Skills.XpCheckAll(attacker);
|
Skills.XpCheckAll(attacker);
|
||||||
|
|
||||||
@ -206,12 +206,12 @@ public class Combat
|
|||||||
xp = (event.getDamage() * 4);
|
xp = (event.getDamage() * 4);
|
||||||
if(event.getEntity() instanceof Ghast)
|
if(event.getEntity() instanceof Ghast)
|
||||||
xp = (event.getDamage() * 4);
|
xp = (event.getDamage() * 4);
|
||||||
Users.getProfile(master).addXP(SkillType.TAMING, xp);
|
Users.getProfile(master).addXP(SkillType.TAMING, xp*10);
|
||||||
}
|
}
|
||||||
if(event.getEntity() instanceof Player)
|
if(event.getEntity() instanceof Player)
|
||||||
{
|
{
|
||||||
xp = (event.getDamage() * 2);
|
xp = (event.getDamage() * 2);
|
||||||
Users.getProfile(master).addXP(SkillType.TAMING, xp);
|
Users.getProfile(master).addXP(SkillType.TAMING, xp*10);
|
||||||
}
|
}
|
||||||
Skills.XpCheckSkill(SkillType.TAMING, master);
|
Skills.XpCheckSkill(SkillType.TAMING, master);
|
||||||
}
|
}
|
||||||
@ -337,19 +337,19 @@ public class Combat
|
|||||||
{
|
{
|
||||||
//XP
|
//XP
|
||||||
if(x instanceof Creeper)
|
if(x instanceof Creeper)
|
||||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 4));
|
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 4)*10);
|
||||||
if(x instanceof Spider)
|
if(x instanceof Spider)
|
||||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3));
|
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3)*10);
|
||||||
if(x instanceof Skeleton)
|
if(x instanceof Skeleton)
|
||||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 2));
|
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 2)*10);
|
||||||
if(x instanceof Zombie)
|
if(x instanceof Zombie)
|
||||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 2));
|
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 2)*10);
|
||||||
if(x instanceof PigZombie)
|
if(x instanceof PigZombie)
|
||||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3));
|
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3)*10);
|
||||||
if(x instanceof Slime)
|
if(x instanceof Slime)
|
||||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3));
|
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3)*10);
|
||||||
if(x instanceof Ghast)
|
if(x instanceof Ghast)
|
||||||
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3));
|
PPa.addXP(SkillType.ARCHERY, (event.getDamage() * 3)*10);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Attacker is Player
|
* Attacker is Player
|
||||||
@ -374,7 +374,7 @@ public class Combat
|
|||||||
if(LoadProperties.pvpxp && !Party.getInstance().inSameParty(attacker, defender)
|
if(LoadProperties.pvpxp && !Party.getInstance().inSameParty(attacker, defender)
|
||||||
&& ((PPd.getLastLogin()+5)*1000) < System.currentTimeMillis())
|
&& ((PPd.getLastLogin()+5)*1000) < System.currentTimeMillis())
|
||||||
{
|
{
|
||||||
int xp = (int) (event.getDamage() * 2 * LoadProperties.pvpxprewardmodifier);
|
int xp = (int) ((event.getDamage() * 2) * 10);
|
||||||
PPa.addXP(SkillType.ARCHERY, xp);
|
PPa.addXP(SkillType.ARCHERY, xp);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@ -187,16 +187,27 @@ public class HUDmmo
|
|||||||
{
|
{
|
||||||
SkillType theType = null;
|
SkillType theType = null;
|
||||||
|
|
||||||
if(PP.getXpBarLocked())
|
if(PP.getXpBarLocked() && PP.getSkillLock() != null)
|
||||||
theType=PP.getSkillLock();
|
theType=PP.getSkillLock();
|
||||||
else
|
else
|
||||||
theType=PP.getLastGained();
|
theType=PP.getLastGained();
|
||||||
|
|
||||||
Color color = SpoutStuff.getRetroColor(theType);
|
Color color = new Color(0.3f, 0.3f, 0.75f, 1f);
|
||||||
|
|
||||||
((GenericTexture) xpicon).setUrl(LoadProperties.web_url+"HUD/Retro/"+m.getCapitalized(theType.toString())+"_r.png");
|
if(xpicon != null && theType != null)
|
||||||
|
xpicon.setUrl(LoadProperties.web_url+"HUD/Retro/"+m.getCapitalized(theType.toString())+"_r.png");
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(xpicon == null)
|
||||||
|
System.out.println("xpicon was null!");
|
||||||
|
if(theType == null)
|
||||||
|
System.out.println("theType was null!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(theType != null)
|
||||||
xpfill.setBottomColor(color).setTopColor(color).setWidth(SpoutStuff.getXpInc(PP.getSkillXpLevel(theType), PP.getXpToLevel(theType), HUDType.RETRO)).setDirty(true);
|
xpfill.setBottomColor(color).setTopColor(color).setWidth(SpoutStuff.getXpInc(PP.getSkillXpLevel(theType), PP.getXpToLevel(theType), HUDType.RETRO)).setDirty(true);
|
||||||
|
else
|
||||||
|
System.out.println("theType was null!");
|
||||||
|
|
||||||
SpoutManager.getPlayer(player).getMainScreen().setDirty(true);
|
SpoutManager.getPlayer(player).getMainScreen().setDirty(true);
|
||||||
}
|
}
|
||||||
|
@ -928,14 +928,9 @@ public class PlayerProfile
|
|||||||
xp=(int) (xp/LoadProperties.sorceryxpmodifier);
|
xp=(int) (xp/LoadProperties.sorceryxpmodifier);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
xp=xp*LoadProperties.xpGainMultiplier;
|
||||||
skillsXp.put(skillType, skillsXp.get(skillType)+xp);
|
skillsXp.put(skillType, skillsXp.get(skillType)+xp);
|
||||||
|
|
||||||
if(LoadProperties.spoutEnabled)
|
|
||||||
{
|
|
||||||
lastgained = skillType;
|
lastgained = skillType;
|
||||||
//switch
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//save();
|
//save();
|
||||||
}
|
}
|
||||||
|
@ -131,7 +131,7 @@ public class mcMMO extends JavaPlugin
|
|||||||
//Entity Stuff
|
//Entity Stuff
|
||||||
pm.registerEvent(Event.Type.ENTITY_TARGET, entityListener, Priority.Normal, this);
|
pm.registerEvent(Event.Type.ENTITY_TARGET, entityListener, Priority.Normal, this);
|
||||||
pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Priority.Normal, this);
|
pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Priority.Normal, this);
|
||||||
pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Priority.Highest, this);
|
pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Priority.High, this);
|
||||||
pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Priority.Normal, this);
|
pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Priority.Normal, this);
|
||||||
|
|
||||||
//Spout Stuff
|
//Spout Stuff
|
||||||
|
@ -36,7 +36,7 @@ public class Acrobatics {
|
|||||||
*/
|
*/
|
||||||
if(player.getHealth() - newDamage >= 1){
|
if(player.getHealth() - newDamage >= 1){
|
||||||
if(!event.isCancelled())
|
if(!event.isCancelled())
|
||||||
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 8));
|
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 8)*10);
|
||||||
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
||||||
event.setDamage(newDamage);
|
event.setDamage(newDamage);
|
||||||
if(event.getDamage() <= 0)
|
if(event.getDamage() <= 0)
|
||||||
@ -49,7 +49,7 @@ public class Acrobatics {
|
|||||||
}
|
}
|
||||||
} else if (!event.isCancelled()){
|
} else if (!event.isCancelled()){
|
||||||
if(player.getHealth() - event.getDamage() >= 1){
|
if(player.getHealth() - event.getDamage() >= 1){
|
||||||
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 12));
|
PP.addXP(SkillType.ACROBATICS, (event.getDamage() * 12)*10);
|
||||||
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
Skills.XpCheckSkill(SkillType.ACROBATICS, player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ public class Acrobatics {
|
|||||||
if(Math.random() * 4000 <= PPd.getSkillLevel(SkillType.ACROBATICS)){
|
if(Math.random() * 4000 <= PPd.getSkillLevel(SkillType.ACROBATICS)){
|
||||||
defender.sendMessage(ChatColor.GREEN+"**DODGE**");
|
defender.sendMessage(ChatColor.GREEN+"**DODGE**");
|
||||||
if(System.currentTimeMillis() >= 5000 + PPd.getRespawnATS() && defender.getHealth() >= 1){
|
if(System.currentTimeMillis() >= 5000 + PPd.getRespawnATS() && defender.getHealth() >= 1){
|
||||||
PPd.addXP(SkillType.ACROBATICS, event.getDamage() * 12);
|
PPd.addXP(SkillType.ACROBATICS, (event.getDamage() * 12)*1);
|
||||||
Skills.XpCheckSkill(SkillType.ACROBATICS, defender);
|
Skills.XpCheckSkill(SkillType.ACROBATICS, defender);
|
||||||
}
|
}
|
||||||
event.setDamage(event.getDamage() / 2);
|
event.setDamage(event.getDamage() / 2);
|
||||||
@ -75,7 +75,7 @@ public class Acrobatics {
|
|||||||
} else if(Math.random() * 4000 <= 800) {
|
} else if(Math.random() * 4000 <= 800) {
|
||||||
defender.sendMessage(ChatColor.GREEN+"**DODGE**");
|
defender.sendMessage(ChatColor.GREEN+"**DODGE**");
|
||||||
if(System.currentTimeMillis() >= 5000 + PPd.getRespawnATS() && defender.getHealth() >= 1){
|
if(System.currentTimeMillis() >= 5000 + PPd.getRespawnATS() && defender.getHealth() >= 1){
|
||||||
PPd.addXP(SkillType.ACROBATICS, event.getDamage() * 12);
|
PPd.addXP(SkillType.ACROBATICS, (event.getDamage() * 12)*10);
|
||||||
Skills.XpCheckSkill(SkillType.ACROBATICS, defender);
|
Skills.XpCheckSkill(SkillType.ACROBATICS, defender);
|
||||||
}
|
}
|
||||||
event.setDamage(event.getDamage() / 2);
|
event.setDamage(event.getDamage() / 2);
|
||||||
|
@ -316,7 +316,6 @@ public class Skills
|
|||||||
if(sPlayer.isSpoutCraftEnabled())
|
if(sPlayer.isSpoutCraftEnabled())
|
||||||
{
|
{
|
||||||
SpoutStuff.levelUpNotification(skillType, sPlayer);
|
SpoutStuff.levelUpNotification(skillType, sPlayer);
|
||||||
PP.setXpBarInc(0);
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
player.sendMessage(mcLocale.getString("Skills."+capitalized+"Up", new Object[] {String.valueOf(skillups), PP.getSkillLevel(skillType)}));
|
player.sendMessage(mcLocale.getString("Skills."+capitalized+"Up", new Object[] {String.valueOf(skillups), PP.getSkillLevel(skillType)}));
|
||||||
|
Loading…
Reference in New Issue
Block a user