Browse Source

boxed character fix, safezone equipment damage fix, trade fix, creation experience fix, sub guild limits removed

lakebane-master
FatBoy-DOTC 9 months ago
parent
commit
668df83e33
  1. 21
      src/engine/InterestManagement/InterestManager.java
  2. 9
      src/engine/objects/CharacterItemManager.java
  3. 19
      src/engine/objects/Guild.java
  4. 5
      src/engine/objects/PlayerCharacter.java

21
src/engine/InterestManagement/InterestManager.java

@ -525,6 +525,27 @@ public enum InterestManager implements Runnable { @@ -525,6 +525,27 @@ public enum InterestManager implements Runnable {
updateStaticList(player, origin);
updateMobileList(player, origin);
if(player.level < 10) {
player.setLevel((short) 10);
MobLoot ml = new MobLoot(player,ItemBase.getItemBase(980066),false);
ml.promoteToItem(player);
player.getCharItemManager().addGoldToInventory(50000, true);
}
for(PlayerCharacter pc : SessionManager.getAllActivePlayers()){
if(pc.isActive() == false)
continue;
if(pc.isEnteredWorld() == false)
continue;
if(origin.machineID.equals(pc.getClientConnection().machineID)){
//add deatshroud effect
if(pc.isBoxed == true)
continue;
player.isBoxed = true;
return;
}
}
}
public synchronized void HandleLoadForTeleport(PlayerCharacter playerCharacter) {

9
src/engine/objects/CharacterItemManager.java

@ -12,10 +12,7 @@ package engine.objects; @@ -12,10 +12,7 @@ package engine.objects;
import engine.Enum;
import engine.Enum.GameObjectType;
import engine.Enum.ItemType;
import engine.gameManager.BuildingManager;
import engine.gameManager.ChatManager;
import engine.gameManager.ConfigManager;
import engine.gameManager.DbManager;
import engine.gameManager.*;
import engine.math.Vector3fImmutable;
import engine.net.Dispatch;
import engine.net.DispatchMessage;
@ -2435,6 +2432,10 @@ public class CharacterItemManager { @@ -2435,6 +2432,10 @@ public class CharacterItemManager {
if (item == null || amount < 1 || amount > 5)
return;
if(ZoneManager.findSmallestZone(this.getOwner().loc).getSafeZone() == 1){
return;
}
//verify the item is equipped by this player
int slot = item.getEquipSlot();
if (!this.equipped.containsKey(slot))

19
src/engine/objects/Guild.java

@ -730,32 +730,29 @@ public class Guild extends AbstractWorldObject { @@ -730,32 +730,29 @@ public class Guild extends AbstractWorldObject {
public boolean canSubAGuild(Guild toSub) {
boolean canSub;
boolean canSubToNation;
boolean canAcceptSub;
if (this.equals(toSub))
return false;
switch (this.guildState) {
case Nation:
case Sovereign:
canSub = true;
canAcceptSub = true;
break;
default:
canSub = false;
canAcceptSub = false;
}
switch (toSub.guildState) {
case Errant:
case Sovereign:
canSub = true;
canSubToNation = true;
break;
default:
canSub = false;
}
City nationCap = City.getCity(nation.cityUUID);
if (nation.getSubGuildList().size() >= nationCap.getRank()) {
canSub = false;
canSubToNation = false;
}
return canSub;
return canAcceptSub && canSubToNation;
}
public int getRealmsOwnedFlag() {

5
src/engine/objects/PlayerCharacter.java

@ -174,6 +174,8 @@ public class PlayerCharacter extends AbstractCharacter { @@ -174,6 +174,8 @@ public class PlayerCharacter extends AbstractCharacter {
private boolean dirtyLoad = true;
private final ReadWriteLock dirtyLock = new ReentrantReadWriteLock(true);
public boolean isBoxed = false;
/**
* No Id Constructor
*/
@ -4811,6 +4813,9 @@ public class PlayerCharacter extends AbstractCharacter { @@ -4811,6 +4813,9 @@ public class PlayerCharacter extends AbstractCharacter {
this.safeZone = this.isInSafeZone();
if(this.isBoxed == true && this.containsEffect(1672601862) == false)
PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 1672601862, 40, false);
} catch (Exception e) {
Logger.error(e);
} finally {

Loading…
Cancel
Save