discipline and godly drop messages added

This commit is contained in:
2023-01-11 21:58:24 -06:00
parent cd0e31f39d
commit 73edd8d932
2 changed files with 28 additions and 21 deletions
+9 -1
View File
@@ -313,7 +313,15 @@ public class ItemBase {
int ID = uuid;
return ID > 249999 && ID < 250045;
}
public boolean isDiscRune(){
int ID = uuid;
if (ID > 2499 && ID < 3050) { //class, discipline runes
return true;
}
else{
return false;
}
}
public boolean isGlass() {
int ID = uuid;
return ID > 7000099 && ID < 7000281;
+19 -20
View File
@@ -1324,25 +1324,6 @@ 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() {
@@ -1451,7 +1432,25 @@ public class Mob extends AbstractIntelligenceAgent {
this.charItemManager.addItemToInventory(ml);
}
//send announcement if disc or godly rune
for(Item it : this.getInventory()) {
ItemBase ib = it.getItemBase();
if (ib.isDiscRune()) {
//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(10);
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(10);
chatMsg.setChannel(Enum.ChatChannelType.SYSTEM.getChannelID());
DispatchMessage.dispatchMsgToAll(chatMsg);
return;
}
}
//add special loot to mob
}