ChatSystemMsgchatMsg=newChatSystemMsg(null,mob.getName()+" in "+mob.getParentZone().getName()+" has found the "+specialDrop.getName()+". Are you tough enough to take it?");
//lastly, check mobs inventory for godly or disc runes to send a server announcement
for(Itemit:mob.getInventory()){
ItemBaseib=it.getItemBase();
if(ib==null)
if(ib==null)
break;
if(ib.isDiscRune()||ib.getName().toLowerCase().contains("of the gods")){
ChatSystemMsgchatMsg=newChatSystemMsg(null,mob.getName()+" in "+mob.getParentZone().getName()+" has found the "+ib.getName()+". Are you tough enough to take it?");
@ -123,30 +98,10 @@ public enum LootManager {
@@ -123,30 +98,10 @@ public enum LootManager {
@ -47,13 +47,13 @@ public class FinishSummonsJob extends AbstractScheduleJob {
@@ -47,13 +47,13 @@ public class FinishSummonsJob extends AbstractScheduleJob {
return;
// cannot summon a player in combat
//if (this.target.isCombat()) {
if(this.target.isCombat()){
// ErrorPopupMsg.sendErrorMsg(this.source, "Cannot summon player in combat.");
ErrorPopupMsg.sendErrorMsg(this.source,"Cannot summon player in combat.");
@ -560,30 +560,12 @@ public class ClientMessagePump implements NetMsgHandler {
@@ -560,30 +560,12 @@ public class ClientMessagePump implements NetMsgHandler {
@ -672,8 +654,6 @@ public class ClientMessagePump implements NetMsgHandler {
@@ -672,8 +654,6 @@ public class ClientMessagePump implements NetMsgHandler {
@ -1263,8 +1243,6 @@ public class ClientMessagePump implements NetMsgHandler {
@@ -1263,8 +1243,6 @@ public class ClientMessagePump implements NetMsgHandler {
@ -1369,8 +1347,6 @@ public class ClientMessagePump implements NetMsgHandler {
@@ -1369,8 +1347,6 @@ public class ClientMessagePump implements NetMsgHandler {
@ -1382,192 +1358,219 @@ public class ClientMessagePump implements NetMsgHandler {
@@ -1382,192 +1358,219 @@ public class ClientMessagePump implements NetMsgHandler {
@ -1576,43 +1579,14 @@ public class ClientMessagePump implements NetMsgHandler {
@@ -1576,43 +1579,14 @@ public class ClientMessagePump implements NetMsgHandler {
@ -1672,17 +1646,14 @@ public class ClientMessagePump implements NetMsgHandler {
@@ -1672,17 +1646,14 @@ public class ClientMessagePump implements NetMsgHandler {
max*=(1+(durMod*0.01f));
if(dur>=max||dur<1){
//redundancy message to clear item from window in client
@ -36,28 +35,26 @@ public class ArcMineChangeProductionMsgHandler extends AbstractClientMsgHandler
@@ -36,28 +35,26 @@ public class ArcMineChangeProductionMsgHandler extends AbstractClientMsgHandler
//TODO verify this against the warehouse?
if(!GuildStatusController.isInnerCouncil(playerCharacter.getGuildStatus()))// is this only GL?
if(GuildStatusController.isInnerCouncil(playerCharacter.getGuildStatus())==false)// is this only GL?
@ -63,7 +63,7 @@ public class CityDataHandler extends AbstractClientMsgHandler {
@@ -63,7 +63,7 @@ public class CityDataHandler extends AbstractClientMsgHandler {
// If the hotZone has changed then update the client's map accordingly.
@ -62,7 +62,7 @@ public class DestroyBuildingHandler extends AbstractClientMsgHandler {
@@ -62,7 +62,7 @@ public class DestroyBuildingHandler extends AbstractClientMsgHandler {
@ -102,7 +102,7 @@ public class GroupInviteResponseHandler extends AbstractClientMsgHandler {
@@ -102,7 +102,7 @@ public class GroupInviteResponseHandler extends AbstractClientMsgHandler {
@ -360,11 +360,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -360,11 +360,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@ -62,23 +62,16 @@ public class MOTDEditHandler extends AbstractClientMsgHandler {
@@ -62,23 +62,16 @@ public class MOTDEditHandler extends AbstractClientMsgHandler {
returntrue;
}
if(type==1){ // Guild MOTD
if(type==1)// Guild MOTD
msg.setMessage(guild.getMOTD());
guild.updateDatabase();
}elseif(type==3){// IC MOTD
elseif(type==3)// IC MOTD
msg.setMessage(guild.getICMOTD());
guild.updateDatabase();
}elseif(type==0){// Nation MOTD
elseif(type==0){// Nation MOTD
Guildnation=guild.getNation();
if(nation==null||!nation.isNation()){
ErrorPopupMsg.sendErrorMsg(playerCharacter,"You do not have such authority!");
@ -106,7 +105,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@@ -106,7 +105,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
ErrorPopupMsg.sendErrorPopup(player,173);// You must be the leader of a guild to receive a blessing
return;
}
@ -127,12 +126,12 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@@ -127,12 +126,12 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
realm=RealmMap.getRealmForCity(city);
if(!realm.getCanBeClaimed()){
if(realm.getCanBeClaimed()==false){
ErrorPopupMsg.sendErrorPopup(player,180);// This territory cannot be ruled by anyone
return;
}
if(realm.isRuled()){
if(realm.isRuled()==true){
ErrorPopupMsg.sendErrorPopup(player,178);// This territory is already claimed
return;
}
@ -143,12 +142,12 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@@ -143,12 +142,12 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@ -156,7 +155,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@@ -156,7 +155,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@ -172,9 +171,11 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@@ -172,9 +171,11 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@ -190,31 +191,16 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@@ -190,31 +191,16 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
return;
}
inttrains=0;
switch(npc.getRank()){
case1:
trains=10;
break;
case2:
trains=15;
break;
case3:
trains=20;
break;
case4:
trains=25;
break;
case5:
trains=30;
break;
case6:
trains=35;
break;
case7:
trains=40;
break;
}
intrank=shrine.getRank();
//R8 trees always get atleast rank 2 boons. rank uses index, where 0 is first place, 1 is second, etc...
ChatManager.chatGuildInfo(player.getGuild(),player.getName()+" has recieved a boon costing "+1+" point of favor.");
shrineBuilding.addEffectBit(1000000<<2);
@ -274,31 +260,9 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@@ -274,31 +260,9 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@ -352,9 +316,6 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@@ -352,9 +316,6 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
}
}
}
privatestaticPowersBasegetPowerforHermit(NPCnpc){
intcontractID;
@ -459,7 +420,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@@ -459,7 +420,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
@ -421,12 +421,31 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@@ -421,12 +421,31 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
itemMan.consume(item);
}
break;
//ANNIVERSERY GIFT
case31:
// *** Disabled for now: Needs bootyset created
//if (ib.getUUID() == 971012) {
// int random = ThreadLocalRandom.current().nextInt(ItemBase.AnniverseryGifts.size());
// int annyID = ItemBase.AnniverseryGifts.get(random);
// Item gift = MobLoot.createItemForPlayer(player, annyIB);
// if (gift != null) {
// itemMan.addItemToInventory(gift);
// itemMan.consume(item);
// }
// }
// break;
//}
LootManager.peddleFate(player,item);
break;
case30://water bucket
case8://potions, tears of saedron
case5://runes, petition, warrant, scrolls
if(uuid>3000&&uuid<3050){//Discipline Runes
if(ApplyRuneMsg.applyRune(uuid,origin,player)){
@ -443,12 +462,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@@ -443,12 +462,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
itemMan.consume(item);
}
break;
}elseif(uuid>252122&&uuid<252137){//blood runes
if(ApplyRuneMsg.applyRune(uuid,origin,player)){
itemMan.consume(item);
}
break;
}elseif(uuid>252128&&uuid<252128){//mastery runes
}elseif(uuid>252122&&uuid<252128){//mastery runes
if(ApplyRuneMsg.applyRune(uuid,origin,player)){
itemMan.consume(item);
}
@ -514,6 +528,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@@ -514,6 +528,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@ -528,9 +543,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@@ -528,9 +543,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
@ -135,8 +135,7 @@ public class TaxCityMsgHandler extends AbstractClientMsgHandler {
@@ -135,8 +135,7 @@ public class TaxCityMsgHandler extends AbstractClientMsgHandler {
@ -112,12 +112,6 @@ public class BuyFromNPCWindowMsg extends ClientNetMsg {
@@ -112,12 +112,6 @@ public class BuyFromNPCWindowMsg extends ClientNetMsg {
@ -485,19 +485,36 @@ public class ManageCityAssetsMsg extends ClientNetMsg {
@@ -485,19 +485,36 @@ public class ManageCityAssetsMsg extends ClientNetMsg {
@ -80,19 +77,10 @@ public class TeleportRepledgeListMsg extends ClientNetMsg {
@@ -80,19 +77,10 @@ public class TeleportRepledgeListMsg extends ClientNetMsg {
publicvoidconfigure(){
if(isTeleport){
if(isTeleport)
cities=City.getCitiesToTeleportTo(player);
try{
mines=Mine.getMinesToTeleportTo(player);
if(mines==null)
mines=newArrayList<>();
}catch(Exceptione){
Logger.error("Unable To Load Mines For Teleport: "+e.getMessage());
}
}else{
else
cities=City.getCitiesToRepledgeTo(player);
mines=newArrayList<>();
}
}
/**
@ -108,14 +96,10 @@ public class TeleportRepledgeListMsg extends ClientNetMsg {
@@ -108,14 +96,10 @@ public class TeleportRepledgeListMsg extends ClientNetMsg {
@ -992,9 +992,6 @@ public class CharacterSkill extends AbstractGameObject {
@@ -992,9 +992,6 @@ public class CharacterSkill extends AbstractGameObject {
@ -1012,7 +1009,7 @@ public class CharacterSkill extends AbstractGameObject {
@@ -1012,7 +1009,7 @@ public class CharacterSkill extends AbstractGameObject {
@ -1087,9 +1084,6 @@ public class CharacterSkill extends AbstractGameObject {
@@ -1087,9 +1084,6 @@ public class CharacterSkill extends AbstractGameObject {
@ -1105,9 +1099,6 @@ public class CharacterSkill extends AbstractGameObject {
@@ -1105,9 +1099,6 @@ public class CharacterSkill extends AbstractGameObject {
@ -1118,7 +1109,7 @@ public class CharacterSkill extends AbstractGameObject {
@@ -1118,7 +1109,7 @@ public class CharacterSkill extends AbstractGameObject {
@ -1514,31 +1465,11 @@ public class Mob extends AbstractIntelligenceAgent {
@@ -1514,31 +1465,11 @@ public class Mob extends AbstractIntelligenceAgent {
@ -1682,65 +1573,36 @@ public class Mob extends AbstractIntelligenceAgent {
@@ -1682,65 +1573,36 @@ public class Mob extends AbstractIntelligenceAgent {
// TODO add error log here
if(this.bonuses!=null){
defense=GetDefense((int)defense,this);
}else
Logger.error("Error: missing bonuses");
defense=(defense<1)?1:defense;
this.defenseRating=(short)(defense+0.5f);
}catch(Exceptione){
Logger.info("Mobbase ID "+this.getMobBaseID()+" returned an error. Setting to Default Defense."+e.getMessage());
@ -176,10 +175,6 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -176,10 +175,6 @@ public class PlayerCharacter extends AbstractCharacter {
@ -785,9 +780,6 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -785,9 +780,6 @@ public class PlayerCharacter extends AbstractCharacter {
// Verify Race
intraceID=msg.getRace();
if(raceID==0)
raceID=1999;
Racerace=Race.getRace(raceID);
if(race==null){
@ -827,7 +819,6 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -827,7 +819,6 @@ public class PlayerCharacter extends AbstractCharacter {
inthairColorID=msg.getHairColor();
intbeardColorID=msg.getBeardColor();
if(raceID!=1999){
if(!race.isValidHairStyle(hairStyleID)){
Logger.info("Invalid HairStyleID: "+hairStyleID+" for race: "+race.getName());
returnnull;
@ -847,7 +838,7 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -847,7 +838,7 @@ public class PlayerCharacter extends AbstractCharacter {
Logger.info("Invalid beardColorID: "+beardColorID+" for race: "+race.getName());
returnnull;
}
}
// Get stat modifiers
intstrMod=msg.getStrengthMod();
intdexMod=msg.getDexterityMod();
@ -935,12 +926,11 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -935,12 +926,11 @@ public class PlayerCharacter extends AbstractCharacter {
}
// Validate Rune against Race
if(raceID!=1999){
if(!race.isAllowedRune(runeBase)){
Logger.info("Trait Not valid for Race");
returnnull;
}
}
// Validate BaseClass against Race
if(!baseClass.isAllowedRune(runeBase)){
Logger.info("Trait Not valid for BaseClass");
@ -1129,15 +1119,9 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -1129,15 +1119,9 @@ public class PlayerCharacter extends AbstractCharacter {
@ -1167,13 +1151,6 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -1167,13 +1151,6 @@ public class PlayerCharacter extends AbstractCharacter {
@ -1848,20 +1825,20 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -1848,20 +1825,20 @@ public class PlayerCharacter extends AbstractCharacter {
@ -2048,8 +2025,7 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -2048,8 +2025,7 @@ public class PlayerCharacter extends AbstractCharacter {
@ -4811,29 +4787,15 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -4811,29 +4787,15 @@ public class PlayerCharacter extends AbstractCharacter {
@ -4849,25 +4811,6 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -4849,25 +4811,6 @@ public class PlayerCharacter extends AbstractCharacter {
//ChatManager.chatSystemInfo(this, "You Cannot Fly While Having A MovementBuff");
}
}
}catch(Exceptione){
Logger.error(e);
@ -4876,44 +4819,7 @@ public class PlayerCharacter extends AbstractCharacter {
@@ -4876,44 +4819,7 @@ public class PlayerCharacter extends AbstractCharacter {
@ -150,7 +150,6 @@ public class PromotionClass extends AbstractGameObject {
@@ -150,7 +150,6 @@ public class PromotionClass extends AbstractGameObject {
@ -45,10 +45,13 @@ public class RunegateTeleportPowerAction extends AbstractPowerAction {
@@ -45,10 +45,13 @@ public class RunegateTeleportPowerAction extends AbstractPowerAction {
@ -78,7 +78,7 @@ public class StealPowerAction extends AbstractPowerAction {
@@ -78,7 +78,7 @@ public class StealPowerAction extends AbstractPowerAction {
@ -131,23 +131,8 @@ public class StealPowerAction extends AbstractPowerAction {
@@ -131,23 +131,8 @@ public class StealPowerAction extends AbstractPowerAction {
//Handle target attacking back if in combat and has no other target
Logger.debug("Null mine building for Mine "+mine.getObjectUUID()+" Building "+mine.getBuildingID());
returnfalse;
}
// Mine building still stands; nothing to do.
// We can early exit here.
if(mineBuilding.getRank()>0){
mine.setActive(false);
mine.lastClaimer=null;
ChatSystemMsgchatMsg=newChatSystemMsg(null,mine.guildName+" has defended the mine in "+mine.getParentZone().getParent().getName()+". The mine is no longer active.");
ChatSystemMsgchatMsg=newChatSystemMsg(null,mine.lastClaimer.getName()+" has claimed the mine in "+mine.getParentZone().getParent().getName()+" for "+mine.getOwningGuild().getName()+". The mine is no longer active.");
ChatSystemMsgchatMsg=newChatSystemMsg(null,mine.lastClaimer.getName()+" has claimed the mine in "+mine.getParentZone().getParent().getName()+" for "+mine.getOwningGuild().getName()+". The mine is no longer active.");