Rename and clean up MapleMount
This commit is contained in:
@@ -160,7 +160,7 @@ public class Character extends AbstractCharacterObject {
|
||||
private MapleMessenger messenger = null;
|
||||
private MapleMiniGame miniGame;
|
||||
private MapleRockPaperScissor rps;
|
||||
private MapleMount maplemount;
|
||||
private Mount maplemount;
|
||||
private MapleParty party;
|
||||
private final Pet[] pets = new Pet[3];
|
||||
private MaplePlayerShop playerShop = null;
|
||||
@@ -5372,7 +5372,7 @@ public class Character extends AbstractCharacterObject {
|
||||
return bookCover;
|
||||
}
|
||||
|
||||
public MapleMount getMount() {
|
||||
public Mount getMount() {
|
||||
return maplemount;
|
||||
}
|
||||
|
||||
@@ -7424,9 +7424,9 @@ public class Character extends AbstractCharacterObject {
|
||||
|
||||
final int mountid = ret.getJobType() * 10000000 + 1004;
|
||||
if (ret.getInventory(InventoryType.EQUIPPED).getItem((short) -18) != null) {
|
||||
ret.maplemount = new MapleMount(ret, ret.getInventory(InventoryType.EQUIPPED).getItem((short) -18).getItemId(), mountid);
|
||||
ret.maplemount = new Mount(ret, ret.getInventory(InventoryType.EQUIPPED).getItem((short) -18).getItemId(), mountid);
|
||||
} else {
|
||||
ret.maplemount = new MapleMount(ret, 0, mountid);
|
||||
ret.maplemount = new Mount(ret, 0, mountid);
|
||||
}
|
||||
ret.maplemount.setExp(mountexp);
|
||||
ret.maplemount.setLevel(mountlevel);
|
||||
@@ -7540,8 +7540,8 @@ public class Character extends AbstractCharacterObject {
|
||||
}
|
||||
}
|
||||
|
||||
public MapleMount mount(int id, int skillid) {
|
||||
MapleMount mount = maplemount;
|
||||
public Mount mount(int id, int skillid) {
|
||||
Mount mount = maplemount;
|
||||
mount.setItemId(id);
|
||||
mount.setSkillId(skillid);
|
||||
return mount;
|
||||
|
||||
@@ -24,7 +24,7 @@ package client;
|
||||
/**
|
||||
* @author PurpleMadness < Patrick :O >
|
||||
*/
|
||||
public class MapleMount {
|
||||
public class Mount {
|
||||
private int itemid;
|
||||
private int skillid;
|
||||
private int tiredness;
|
||||
@@ -33,7 +33,7 @@ public class MapleMount {
|
||||
private Character owner;
|
||||
private boolean active;
|
||||
|
||||
public MapleMount(Character owner, int id, int skillid) {
|
||||
public Mount(Character owner, int id, int skillid) {
|
||||
this.itemid = id;
|
||||
this.skillid = skillid;
|
||||
this.tiredness = 0;
|
||||
@@ -63,6 +63,7 @@ public class MapleMount {
|
||||
* 1902010 - Frog
|
||||
* 1902011 - Turtle
|
||||
* 1902012 - Yeti
|
||||
*
|
||||
* @return the id
|
||||
*/
|
||||
public int getId() {
|
||||
@@ -90,7 +91,7 @@ public class MapleMount {
|
||||
tiredness = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int incrementAndGetTiredness() {
|
||||
this.tiredness++;
|
||||
return this.tiredness;
|
||||
@@ -107,7 +108,7 @@ public class MapleMount {
|
||||
public void setItemId(int newitemid) {
|
||||
this.itemid = newitemid;
|
||||
}
|
||||
|
||||
|
||||
public void setSkillId(int newskillid) {
|
||||
this.skillid = newskillid;
|
||||
}
|
||||
@@ -119,9 +120,11 @@ public class MapleMount {
|
||||
public boolean isActive() {
|
||||
return active;
|
||||
}
|
||||
|
||||
|
||||
public void empty() {
|
||||
if(owner != null) owner.getClient().getWorldServer().unregisterMountHunger(owner);
|
||||
if (owner != null) {
|
||||
owner.getClient().getWorldServer().unregisterMountHunger(owner);
|
||||
}
|
||||
this.owner = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user