Thanks to AngelSL for everything but the buff broadcast. <3
Morph Items
ID Name Monster
5300000 Fungus Scroll Orange Mushroom
5300001 Oinker Delight Pig
5300002 Zeta Nightmare Alien
2210003 Dragon Elixer Green Cornian
2210005 Tigun Transformation Bundle Weird Arabian Dude
In MapleBuffStat.java
Add
Code:
MORPH(0x200000000l),
In MaplePacketCreator.java
Change
Code:
public static MaplePacket giveBuff(int buffid, int bufflength, List<Pair<MapleBuffStat, Integer>> statups) {
to
Code:
public static MaplePacket giveBuff(int buffid, int bufflength, List<Pair<MapleBuffStat, Integer>> statups, boolean morph) {
Change
Code:
mplew.write(0); // combo 600, too
to
Code:
if(!morph)
mplew.write(0); // combo 600, too
else
mplew.write(1);
In MapleStatEffect.java
Add
Code:
private boolean isMorph = false;
private int morphId = 0;
under
Code:
private int moneyCon;
Add
Code:
ret.morphId = MapleDataTool.getInt("morph", source, 0);
ret.isMorph = ret.morphId > 0 ? true : false;
under
Code:
ret.mobCount = MapleDataTool.getInt("mobCount", source, 1);
Add
Code:
if(ret.isMorph())
statups.add(new Pair<MapleBuffStat, Integer>(MapleBuffStat.MORPH, Integer.valueOf(ret.getMorph())));
ABOVE
Code:
ret.monsterStatus = monsterStatus;
Add
Code:
if (isMorph()) {
List<Pair<MapleBuffStat, Integer>> stat = Collections.singletonList(new Pair<MapleBuffStat, Integer>(
MapleBuffStat.MORPH, morphId));
applyto.getMap().broadcastMessage(applyto, MaplePacketCreator.giveForeignBuff(applyto.getId(), stat),
false);
}
ABOVE
Change
Code:
applyto.getClient().getSession().write(MaplePacketCreator.giveBuff((skill ? sourceid : -sourceid), localDuration, localstatups));
to
Code:
applyto.getClient().getSession().write(MaplePacketCreator.giveBuff((skill ? sourceid : -sourceid), localDuration, localstatups, isMorph));
Add
Code:
public boolean isMorph(){
return isMorph;
}
public int getMorph(){
return morphId;
}
above the last closing bracket at the end of the file.
In UseCashItemHandler.java
Add
Code:
} else if(itemType == 530) {
MapleItemInformationProvider ii = MapleItemInformationProvider.getInstance();
ii.getItemEffect(itemId).applyTo(c.getPlayer());
ABOVE
Code:
} else if (itemType == 512) {
In MapleCharacter.java
Change (Theres 2 you must change.)
Code:
getClient().getSession().write(MaplePacketCreator.giveBuff(1111002, duration, stat));
to
Code:
getClient().getSession().write(MaplePacketCreator.giveBuff(1111002, duration, stat, false));