use of scripting.event.EventInstanceManager in project HeavenMS by ronancpl.
the class MapleCharacter method changeMap.
public void changeMap(int map, MaplePortal portal) {
MapleMap warpMap;
EventInstanceManager eim = getEventInstance();
if (eim != null) {
warpMap = eim.getMapInstance(map);
} else {
warpMap = client.getChannelServer().getMapFactory().getMap(map);
}
changeMap(warpMap, portal);
}
use of scripting.event.EventInstanceManager in project HeavenMS by ronancpl.
the class MapleCharacter method changeMap.
public void changeMap(int map, String portal) {
MapleMap warpMap;
EventInstanceManager eim = getEventInstance();
if (eim != null) {
warpMap = eim.getMapInstance(map);
} else {
warpMap = client.getChannelServer().getMapFactory().getMap(map);
}
changeMap(warpMap, warpMap.getPortal(portal));
}
use of scripting.event.EventInstanceManager in project HeavenMS by ronancpl.
the class World method updateParty.
public void updateParty(int partyid, PartyOperation operation, MaplePartyCharacter target) {
MapleParty party = getParty(partyid);
if (party == null) {
throw new IllegalArgumentException("no party with the specified partyid exists");
}
switch(operation) {
case JOIN:
party.addMember(target);
break;
case EXPEL:
case LEAVE:
party.removeMember(target);
break;
case DISBAND:
disbandParty(partyid);
break;
case SILENT_UPDATE:
case LOG_ONOFF:
party.updateMember(target);
break;
case CHANGE_LEADER:
MapleCharacter mc = party.getLeader().getPlayer();
EventInstanceManager eim = mc.getEventInstance();
if (eim != null && eim.isEventLeader(mc)) {
eim.changedLeader(target.getPlayer());
}
party.setLeader(target);
break;
default:
System.out.println("Unhandled updateParty operation " + operation.name());
}
updateParty(party, operation, target);
}
Aggregations