Browse Source

discipline and godly drop messages added

master
FatBoy-DOTC 2 years ago
parent
commit
cd0e31f39d
  1. 20
      src/engine/objects/Mob.java

20
src/engine/objects/Mob.java

@ -31,6 +31,7 @@ import engine.net.client.msg.ErrorPopupMsg; @@ -31,6 +31,7 @@ import engine.net.client.msg.ErrorPopupMsg;
import engine.net.client.msg.ManageCityAssetsMsg;
import engine.net.client.msg.PetMsg;
import engine.net.client.msg.PlaceAssetMsg;
import engine.net.client.msg.chat.ChatSystemMsg;
import engine.powers.EffectsBase;
import engine.server.MBServerStatics;
import engine.server.world.WorldServer;
@ -1323,6 +1324,25 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1323,6 +1324,25 @@ public class Mob extends AbstractIntelligenceAgent {
} catch (Exception e) {
Logger.error(e);
}
//send announcement if disc or godly rune
for(Item it : this.getInventory()) {
ItemBase ib = it.getItemBase();
if (ib.isRune()) {
//if disc rune send system message
ChatSystemMsg chatMsg = new ChatSystemMsg(null, this.getName() + " in " + this.getParentZone().getName() + " has found the " + ib.getName() +". Are you tough enough to take it?");
chatMsg.setMessageType(2);
chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID());
DispatchMessage.dispatchMsgToAll(chatMsg);
}
if (ib.isStatRune() && ib.getName().toLowerCase().contains("of the gods")) {
//godly rune send system message
ChatSystemMsg chatMsg = new ChatSystemMsg(null, this.getName() + " in " + this.getParentZone().getName() + " has found the " + ib.getName() +". Are you tough enough to take it?");
chatMsg.setMessageType(2);
chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID());
DispatchMessage.dispatchMsgToAll(chatMsg);
}
}
}
public void respawn() {

Loading…
Cancel
Save