- Joined
- Jul 12, 2008
- Messages
- 55
- Reaction score
- 0
when i was designing the SBossMapMonitor.java back in odinms forums, my onli goal is to get the animation out.it seem like i miss out the HT drops, well actually i killed all monster which include mob 8810018 which is essential for the animation, with drop disable(kinda like using the killall command).
so heres a little fix for my silly mistake.
in SBossMapMonitor.java
change
to this
in MapleMap.java
find this
add this below it
EDIT i miss out this
add this below it too
==========================================================================
EDIT: donehttp://forum.ragezone.com/showthread.php?t=439230
the section below here is concern abt further development/improvement mainly on the design issue
dun bother with this if u could;t help
and i was thinking abt re-defining SBossMapMonitor such that it will monitor zakum arms as well(to control whether zakum can attack) in fact any boss that comes in parts.
so it might include a enum which look like this
HORNTAIL type- monitor the map for the existence of dead parts, once all dead part exist, kill all monster(currently used)
ZAKUM type- monitor the map for the existence of all arms,if all arms exist, make zakum body stop attacking ppl or taking dmg
if anyone has a better design let mi noe.
let me noe the following as well
if u noe how to make a monster freeze/or stop doing anything
so heres a little fix for my silly mistake.
in SBossMapMonitor.java
change
PHP:
//special event happen
map.killAllMonster();
to this
PHP:
//special event happen
map.killAllMonster(true);
in MapleMap.java
find this
PHP:
public void killAllMonster()
{
List<MapleMapObject> monsters = getMapObjectsInRange(new Point(0,0), Double.POSITIVE_INFINITY, Arrays
.asList(MapleMapObjectType.MONSTER));
for (MapleMapObject monstermo : monsters) {
MapleMonster monster = (MapleMonster) monstermo;
spawnedMonstersOnMap.decrementAndGet();
monster.setHp(0);
broadcastMessage(MaplePacketCreator.killMonster(monster.getObjectId(), true), monster.getPosition());
removeMapObject(monster);
}
}
add this below it
PHP:
public void killAllMonster(boolean drop)
{
List<MapleMapObject> players=null;
if(drop)players=getAllPlayer();
List<MapleMapObject> monsters = getMapObjectsInRange(new Point(0,0), Double.POSITIVE_INFINITY, Arrays
.asList(MapleMapObjectType.MONSTER));
for (MapleMapObject monstermo : monsters) {
MapleMonster monster = (MapleMonster) monstermo;
spawnedMonstersOnMap.decrementAndGet();
monster.setHp(0);
broadcastMessage(MaplePacketCreator.killMonster(monster.getObjectId(), true), monster.getPosition());
removeMapObject(monster);
if(drop)
{
int random=(int)(Math.random()*(playerCount()-0))+0;
dropFromMonster((MapleCharacter)players.get(random), monster);
}
}
}
EDIT i miss out this
add this below it too
PHP:
private List<MapleMapObject> getAllPlayer()
{
return getMapObjectsInRange(new Point(0,0), Double.POSITIVE_INFINITY, Arrays
.asList(MapleMapObjectType.PLAYER));
}
==========================================================================
EDIT: donehttp://forum.ragezone.com/showthread.php?t=439230
the section below here is concern abt further development/improvement mainly on the design issue
dun bother with this if u could;t help
and i was thinking abt re-defining SBossMapMonitor such that it will monitor zakum arms as well(to control whether zakum can attack) in fact any boss that comes in parts.
so it might include a enum which look like this
PHP:
public enum type{ZAKUM,HORNTAIL}
HORNTAIL type- monitor the map for the existence of dead parts, once all dead part exist, kill all monster(currently used)
ZAKUM type- monitor the map for the existence of all arms,if all arms exist, make zakum body stop attacking ppl or taking dmg
if anyone has a better design let mi noe.
let me noe the following as well
if u noe how to make a monster freeze/or stop doing anything
Last edited: