Browse Source

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

lakebane-master
FatBoy-DOTC 11 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 {
updateStaticList(player, origin); updateStaticList(player, origin);
updateMobileList(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) { public synchronized void HandleLoadForTeleport(PlayerCharacter playerCharacter) {

9
src/engine/objects/CharacterItemManager.java

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

19
src/engine/objects/Guild.java

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

5
src/engine/objects/PlayerCharacter.java

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

Loading…
Cancel
Save