discipline and godly drop messages added

This commit is contained in:
2023-01-11 21:02:18 -06:00
parent 5853dc802d
commit cd0e31f39d
+20
View File
@@ -31,6 +31,7 @@ import engine.net.client.msg.ErrorPopupMsg;
import engine.net.client.msg.ManageCityAssetsMsg; import engine.net.client.msg.ManageCityAssetsMsg;
import engine.net.client.msg.PetMsg; import engine.net.client.msg.PetMsg;
import engine.net.client.msg.PlaceAssetMsg; import engine.net.client.msg.PlaceAssetMsg;
import engine.net.client.msg.chat.ChatSystemMsg;
import engine.powers.EffectsBase; import engine.powers.EffectsBase;
import engine.server.MBServerStatics; import engine.server.MBServerStatics;
import engine.server.world.WorldServer; import engine.server.world.WorldServer;
@@ -1323,6 +1324,25 @@ public class Mob extends AbstractIntelligenceAgent {
} catch (Exception e) { } catch (Exception e) {
Logger.error(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() { public void respawn() {