↑ ↓

yGuard

Тема в разделе "Работа", создана пользователем Dev4ik, 15 июл 2018.

  1. TopicStarter Overlay
    Offline

    Dev4ik Ефрейтор

    230
    5
    51
    Кредиты:
    $229.178.655.615,39
    Репутация:
    -1
    Друзья помогите мне как добавить классы в yGuard, уже 3 дня мучаюсь над этим :( за ранее спасибо
     
  2. TopicStarter Overlay
    Offline

    Dev4ik Ефрейтор

    230
    5
    51
    Кредиты:
    $229.178.655.615,39
    Репутация:
    -1
    Вот в чем вопрос, у меня при компиле до конца не компилирует и вот что в логах

    <!-- An exception has occured.
    com.yworks.yguard.obf.NoSuchMappingException: No mapping found for: Class pirate.events.EventManager$PlayerInfo
    com.yworks.yguard.obf.NoSuchMappingException: No mapping found for: Class pirate.events.EventManager$PlayerInfo
    at com.yworks.yguard.obf.ClassTree.mapClass(Unknown Source)
    at com.yworks.yguard.obf.ClassTree.mapSignature(Unknown Source)
    at com.yworks.yguard.obf.ClassTree.mapSignature(Unknown Source)
    at com.yworks.yguard.obf.ClassTree.mapSignature(Unknown Source)
    at com.yworks.yguard.obf.classfile.ClassFile.remapSignature(Unknown Source)
    at com.yworks.yguard.obf.classfile.ClassFile.remap(Unknown Source)
    at com.yworks.yguard.obf.GuardDB.remapTo(Unknown Source)
    at com.yworks.yguard.ObfuscatorTask.execute(Unknown Source)
    at com.yworks.yguard.YGuardTask.execute(Unknown Source)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.Main.runBuild(Main.java:851)
    at org.apache.tools.ant.Main.startAnt(Main.java:235)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
     
  3. TopicStarter Overlay
    Offline

    Dev4ik Ефрейтор

    230
    5
    51
    Кредиты:
    $229.178.655.615,39
    Репутация:
    -1
    Всё решил проблему, теперь нормально копилится :)
     
  4. Offline

    yayaya Ефрейтор Команда форума

    399
    103
    76
    Кредиты:
    $110.698.146.149,14
    Репутация:
    34
    Ну и напиши как решил, пройдет еще год и такой же появится вопрос...
     
  5. TopicStarter Overlay
    Offline

    Dev4ik Ефрейтор

    230
    5
    51
    Кредиты:
    $229.178.655.615,39
    Репутация:
    -1
    Код:
    package pirate.events;
    
    import pirate.events.enums.EventType;
    import com.aionemu.commons.services.CronService;
    import com.aionemu.gameserver.model.TeleportAnimation;
    import com.aionemu.gameserver.model.gameobjects.player.Player;
    import com.aionemu.gameserver.model.team2.alliance.PlayerAllianceService;
    import com.aionemu.gameserver.model.team2.group.PlayerGroup;
    import com.aionemu.gameserver.model.team2.group.PlayerGroupService;
    import com.aionemu.gameserver.services.instance.InstanceService;
    import com.aionemu.gameserver.services.teleport.TeleportService2;
    import com.aionemu.gameserver.utils.PacketSendUtility;
    import com.aionemu.gameserver.utils.ThreadPoolManager;
    import com.aionemu.gameserver.world.World;
    import com.aionemu.gameserver.world.WorldMapInstance;
    import com.aionemu.gameserver.world.knownlist.Visitor;
    import java.util.Collection;
    import java.util.EnumMap;
    import java.util.List;
    import java.util.Map;
    import java.util.Map.Entry;
    import java.util.concurrent.ScheduledFuture;
    import java.sql.Timestamp;
    import javolution.util.FastList;
    import javolution.util.FastMap;
    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;
    import pirate.events.enums.EventPlayerLevel;
    import pirate.events.enums.EventRergisterState;
    import pirate.events.holders.IEventHolder;
    import pirate.events.holders.PlayerGroupEventHolder;
    import pirate.events.holders.SimpleSinglePlayerEventHolder;
    import pirate.events.holders.SinglePlayerHolder;
    import pirate.events.xml.EventStartPosition;
    import pirate.events.xml.EventStartPositionList;
    import pirate.utils.TimeUtil;
    
    /**
     *
     * @author f14shm4n
     */
    public class EventManager {
    
    	private final Logger log = LoggerFactory.getLogger(PlayerInfo.class);
    	private Map<EventType, Map<Integer, PlayerInfo>> playedPlayers;
    	private List<IEventHolder> holders;
    	private Map<EventType, Boolean> events;
    	private Map<EventType, ScheduledFuture> endRegTasks;
    	private boolean launcheAnnounce = false;
    	private int holderCounter = 0;
    
    	private EventManager() {
    		this.events = new EnumMap<EventType, Boolean>(EventType.class);
    		this.endRegTasks = new EnumMap<EventType, ScheduledFuture>(EventType.class);
    		this.playedPlayers = new EnumMap<EventType, Map<Integer, PlayerInfo>>(EventType.class);
    		this.holders = new FastList<IEventHolder>();
    	}
    
    	public void Init() {
    		for (final EventType et : EventType.values()) {
    			if (!et.IsDone()) {
    				continue;
    			}
    			this.events.put(et, false);
    			this.playedPlayers.put(et, new FastMap<Integer, PlayerInfo>().shared());
    			CronService.getInstance().schedule(new Runnable() {
    				@Override
    				public void run() {
    					RunEvent(et);
    				}
    			}, et.getEventTemplate().getSchedule());
    		}
    	}
    
    	public boolean RunEvent(final EventType et) {
    		if (this.eventIsActive(et)) {
    			return false;
    		}
    		changeEventActiveState(et, true);
    		switch (et) {
    			// Regular run type
    			default:
    				this.endRegTasks.put(et, ThreadPoolManager.getInstance().schedule(new Runnable() {
    					@Override
    					public void run() {
    						changeEventActiveState(et, false);
    						endRegTasks.remove(et);
    					}
    				}, et.getEventTemplate().getRegistrationTime() * 1000));
    				break;
    		}
    		return true;
    	}
    
    	public synchronized EventRegisterInfo register(Player player, EventType etype) {
    		switch (etype) {
    			case E_1x1:
    			case E_LHE:
    			case E_FFA:
    				return this.registerSinglePlayer(player, etype);
    			case E_2x2:
    			case E_3x3:
    			case E_4x4:
    			case E_6x6:
    				return this.registerPlayerGroup(player, etype);
    			default:
    				return new EventRegisterInfo(EventRergisterState.ERROR, "[ERROR_0001] Unknown type of Event.");
    		}
    	}
    
    	private EventRegisterInfo registerSinglePlayer(Player player, EventType etype) {
    		EventRegisterInfo eri = this.standartCheck(etype);
    		if (eri != null) {
    			return eri;
    		}
    
    		if (this.containsInHolders(player)) {
    			return new EventRegisterInfo(EventRergisterState.ALREADY_REGISTRED, "You are already registered event. If you want to create another event, you must first exit the current.");
    		}
    
    		eri = this.checkInPlayed(player, etype);
    		if (eri != null) {
    			return eri;
    		}
    
    		byte lvl = player.getLevel();
    		EventPlayerLevel epl = EventPlayerLevel.getEventLevelByPlayerLevel(lvl);
    
    		String registerMsg;
    		IEventHolder holder = this.getFirstFreeHolderForSinglePlayer(player, etype, epl);
    		if (holder == null) {
    			holderCounter += 1;
    			holder = this.createEventHolder(holderCounter, etype, epl);
    			holder.addPlayer(player);
    			this.holders.add(holder);
    			registerMsg = String.format("You have successfully registered with the registrar of the new group.\nEvent: %s\nLevels: %s - %s", etype.name(), epl.getMin(), epl.getMax());
    			log.info("[EventManager] Create new {} with index: {}", holder.getClass().getName(), holder.Index());
    			log.info("[EventManager] Add {} to {} with index: {}", new Object[]{player.getName(), holder.getClass().getSimpleName(), holder.Index()});
    		} else {
    			holder.addPlayer(player);
    			registerMsg = String.format("Are you a member in the group waiting registrar.\nEvent: %s\nLevels: %s - %s", etype.name(), epl.getMin(), epl.getMax());
    			log.info("[EventManager] Add {} to {} with index: {}", new Object[]{player.getName(), holder.getClass().getSimpleName(), holder.Index()});
    		}
    		this.tryStartEvent(holder);
    
    		return new EventRegisterInfo(EventRergisterState.REGISTRED, registerMsg);
    	}
    
    	private EventRegisterInfo registerPlayerGroup(Player leader, EventType etype) {
    		if (!leader.isInGroup2()) {
    			return new EventRegisterInfo(EventRergisterState.ERROR, "You must be in a group and be its leader.");
    		}
    		PlayerGroup group = leader.getPlayerGroup2();
    		if (!group.isLeader(leader)) {
    			return new EventRegisterInfo(EventRergisterState.PLAYER_IS_NOT_GROUP_LEADER, "You are not the leader of the group, you can not carry out the registration of the group.");
    		}
    		EventRegisterInfo eri = this.standartCheck(etype);
    		if (eri != null) {
    			return eri;
    		}
    		for (Player member : group.getMembers()) {
    			if (this.containsInHolders(member)) {
    				return new EventRegisterInfo(EventRergisterState.ALREADY_REGISTRED,
    						"One or more groups of players already registered in this event or other events.");
    			}
    		}
    		eri = this.checkInPlayedGroup(group, etype);
    		if (eri != null) {
    			return eri;
    		}
    
    		byte lvl = this.getHigherLvlInGroup(group);
    		EventPlayerLevel epl = EventPlayerLevel.getEventLevelByPlayerLevel(lvl);
    		String registerMsg;
    		IEventHolder holder = this.getFirstFreeHolderForPlayerGroup(group, etype, epl);
    
    		if (holder == null) {
    			holderCounter += 1;
    			holder = this.createEventHolder(holderCounter, etype, epl);
    			holder.addPlayerGroup(group);
    			this.holders.add(holder);
    			registerMsg = String.format("Your group is registered in the list of the new registrar.\nEvent: %s\nlevels: %s - %s", etype.name(), epl.getMin(), epl.getMax());
    			log.info("[EventManager] Create new {} with index: {}", holder.getClass().getName(), holder.Index());
    			log.info("[EventManager] Add playerGroup Leader {} to {} with index: {}", new Object[]{leader.getName(), holder.getClass().getSimpleName(), holder.Index()});
    		} else {
    			holder.addPlayerGroup(group);
    			registerMsg = String.format("Your group is registered on a waiting list registrar.\nEvent: %s\nlevels: %s - %s", etype.name(), epl.getMin(), epl.getMax());
    			log.info("[EventManager] Add playerGroup Leader {} to {} with index: {}", new Object[]{leader.getName(), holder.getClass().getSimpleName(), holder.Index()});
    		}
    		this.tryStartEvent(holder);
    
    		return new EventRegisterInfo(EventRergisterState.REGISTRED, registerMsg);
    	}
    
    	public synchronized EventRegisterInfo unregister(Player player, EventType etype) {
    		switch (etype) {
    			case E_1x1:
    			case E_LHE:
    			case E_FFA:
    				return this.unregisterSinglePlayer(player, etype);
    			case E_2x2:
    			case E_3x3:
    			case E_4x4:
    			case E_6x6:
    				return this.unregisterPlayerGroup(player);
    			default:
    				return new EventRegisterInfo(EventRergisterState.ERROR, "[ERROR_0002] Unknown type of Event.");
    		}
    	}
    
    	private EventRegisterInfo unregisterSinglePlayer(Player player, EventType et) {
    		IEventHolder ph = this.getHolderByPlayer(player);
    		if (ph != null) {
    			if (ph.deletePlayer(player)) {
    				return new EventRegisterInfo(EventRergisterState.UNREGISTRED, String.format("You came out of the group on the event registrar: %s.", et.getEventTemplate().getEventName()));
    			}
    		}
    		return new EventRegisterInfo(EventRergisterState.ERROR, String.format("You are not in the registration list for event: %s.", et.getEventTemplate().getEventName()));
    	}
    
    	public EventRegisterInfo unregisterPlayerGroup(Player leader) {
    		if (!leader.isInGroup2()) {
    			return new EventRegisterInfo(EventRergisterState.ERROR, "You must be in a group and be its leader.");
    		}
    		PlayerGroup group = leader.getPlayerGroup2();
    		if (!group.isLeader(leader)) {
    			return new EventRegisterInfo(EventRergisterState.PLAYER_IS_NOT_GROUP_LEADER, "You are not the leader of the group, you can not produce the output of the recorder.");
    		}
    		IEventHolder holder = this.getHolderByPlayerGroup(group);
    		if (holder != null) {
    			if (holder.deletePlayerGroup(group)) {
    				return new EventRegisterInfo(EventRergisterState.UNREGISTRED, String.format("Your group left the list of the registrar on Event: %s.",
    						holder.getEventType().getEventTemplate().getEventName()));
    			}
    		}
    		return new EventRegisterInfo(EventRergisterState.ERROR, String.format("Your group is not listed registration."));
    	}
    
    	public synchronized boolean unregisterPlayer(Player player) {
    		IEventHolder holder = this.getHolderByPlayer(player);
    		if (holder != null) {
    			holder.deletePlayer(player);
    			log.info("[EventManager] Player: {} has been unregistered from {} with intex {}", new Object[]{player.getName(), holder.getClass().getSimpleName(), holder.Index()});
    			if (holder.isEmpty()) {
    				this.deleteHolder(holder);
    				log.info("[EventManager] {} with index {} has been deleted from list", holder.getClass().getSimpleName(), holder.Index());
    			}
    			return true;
    		}
    		return false;
    	}
    
    	/**
    	 * Sets the state of activity of the event period.
    	 *
    	 * @param etype type events
    	 * @param state state - true (active) - false (inactive)
    	 * @return operation was successful or not
    	 */
    	public boolean changeEventActiveState(EventType etype, boolean state) {
    		if (this.events.containsKey(etype)) {
    			this.events.put(etype, state);
    			if (state) {
    				this.createNewEventSession(etype);
    				log.info("Event: {} is started", etype.name());
    				if (!this.launcheAnnounce) {
    					this.launcheAnnounce = true;
    					this.announceActiveEvents();
    				}
    			} else {
    				this.removeHolderByEventType(etype);
    			}
    			return true;
    		}
    		return false;
    	}
    
    	/**
    	 * Updates the lists of those who have participated in evente of some type, thereby
    	 * sosdavaya eventa new session.
    	 *
    	 * @param etype type eventas
    	 */
    	public void createNewEventSession(EventType etype) {
    		if (this.playedPlayers.containsKey(etype)) {
    			this.playedPlayers.get(etype).clear();
    		}
    	}
    
    	/**
    	 * Removes the player from the list to play.
    	 *
    	 * @param player
    	 * @param etype
    	 * @return true - deleted ; false - no
    	 */
    	public boolean removePlayerFromPlayedList(Player player, EventType etype) {
    		if (this.playedPlayers.containsKey(etype)) {
    			if (this.playedPlayers.get(etype).containsKey(player.getObjectId())) {
    				return this.playedPlayers.get(etype).remove(player.getObjectId()) != null;
    			}
    		}
    		return false;
    	}
    
    	/**
    	 * Checks if the player is already in the list of attending event.
    	 *
    	 * @param etype
    	 * @param player
    	 * @return
    	 */
    	public boolean containsInPlayed(EventType etype, Player player) {
    		return this.playedPlayers.containsKey(etype) && this.playedPlayers.get(etype).containsKey(player.getObjectId());
    	}
    
    	/**
    	 * Checks whether the event is active or not.
    	 *
    	 * @param etype
    	 * @return
    	 */
    	public boolean eventIsActive(EventType etype) {
    		return this.events.containsKey(etype) && this.events.get(etype);
    	}
    
    	/**
    	 * Checks whether there is active opening event.
    	 *
    	 * @return
    	 */
    	public boolean hasActiveEvents() {
    		for (Boolean active : this.events.values()) {
    			if (active) {
    				return true;
    			}
    		}
    		return false;
    	}
    
    	/**
    	 * Makes an attempt to start events.
    	 *
    	 * @param holder Holder that participates in the launch of events
    	 */
    	private void tryStartEvent(IEventHolder holder) {
    		if (holder.isReadyToGo()) {
    			WorldMapInstance inst = InstanceService.getNextAvailableEventInstance(holder);
    			EventStartPositionList poss = holder.getEventType().getEventTemplate().getStartPositionInfo();
    			switch (holder.getEventType()) {
    				case E_1x1:
    				case E_LHE:
    				case E_FFA:
    					this.startMovePlayers(poss, ((SinglePlayerHolder) holder).getAllPlayers(), holder, inst, 0);
    					break;
    				case E_2x2:
    				case E_3x3:
    				case E_4x4:
    				case E_6x6:
    					List<PlayerGroup> groups = ((PlayerGroupEventHolder) holder).getPlayerGroups();
    					for (int i = 0; i < groups.size(); i++) {
    						this.startMovePlayerGroup(groups.get(i), poss, holder.getEventType(), inst, i + 1);
    					}
    					break;
    				default:
    					log.error("[EventManager] Unknown event type. Type: {}", holder);
    					break;
    			}
    
    			this.deleteHolder(holder);
    			log.info("[EventManager] {} with index {} has been deleted from list", holder.getClass().getSimpleName(), holder.Index());
    		}
    	}
    
    	private void startMovePlayers(EventStartPositionList positions, Collection<Player> players, IEventHolder ph, WorldMapInstance inst, int pos) {
    		for (Player p : players) {
    			if (ph.contains(p) && this.addPlayerToPlayedMap(p, ph.getEventType())) {
    				InstanceService.registerPlayerWithInstance(inst, p);
    				this.teleportSinglePlayer(p, inst.getMapId(), inst.getInstanceId(), positions.getPositions().get(pos), EventTeleportType.SINGLE_PLAYER);
    				pos++;
    				if (pos == positions.getPositions().size()) {
    					pos = 0;
    				}
    			}
    		}
    	}
    
    	private void startMovePlayerGroup(PlayerGroup group, EventStartPositionList poss, EventType et, WorldMapInstance inst, int groupPos) {
    		List<EventStartPosition> posList = poss.getPositionForGroup(groupPos);
    		int pos = 0;
    		for (Player m : group.getMembers()) {
    			if (this.addPlayerToPlayedMap(m, et)) {
    				InstanceService.registerPlayerWithInstance(inst, m);
    				this.teleportSinglePlayer(m, inst.getMapId(), inst.getInstanceId(), posList.get(pos), EventTeleportType.PLAYER_IN_GROUP);
    				pos++;
    				if (pos == posList.size()) {
    					pos = 0;
    				}
    			}
    		}
    	}
    
    	private void teleportSinglePlayer(Player p, int worldId, int instId, EventStartPosition spos, EventTeleportType tpType) {
    		if (tpType == EventTeleportType.SINGLE_PLAYER) {
    			if (p.getPlayerAlliance2() != null) {
    				PlayerAllianceService.removePlayer(p);
    			}
    			if (p.getPlayerGroup2() != null) {
    				PlayerGroupService.removePlayer(p);
    			}
    		}
    		if (p.getKisk() != null) {
    			p.getKisk().removePlayer(p);
    			p.setKisk(null);
    		}
    		if (p.getEffectController().getAbnormalEffects().size() > 0) {
    			p.getEffectController().removeAllEffects();
    		}
    		TeleportService2.teleportTo(p, worldId, instId, spos.getX(), spos.getY(), spos.getZ(), spos.getH(), TeleportAnimation.BEAM_ANIMATION);
    	}
    
    	/**
    	 * Adds a player to the list of those who have participated in the opening event.
    	 *
    	 * @param p
    	 * @param etype
    	 */
    	private boolean addPlayerToPlayedMap(Player p, EventType etype) {
    		if (this.playedPlayers.containsKey(etype)) {
    			if (this.playedPlayers.get(etype).containsKey(p.getObjectId())) {
    				log.warn("Player has exist in played map, something wrong. Player: {}", p.getObjectId());
    				return false;
    			}
    			PlayerInfo pi = new PlayerInfo(p.getObjectId(), etype.getEventTemplate().getReentryCooldown());
    			this.playedPlayers.get(etype).put(p.getObjectId(), pi);
    			log.info("[EventManager] Player: {} add to played list. Time in: {} Next time in: {}",
    					new Object[]{p.getName(), new Timestamp(pi.lastEntryTime).toString(), new Timestamp(pi.nextEntryTime).toString()});
    		} else {
    			Map<Integer, PlayerInfo> plrs = new FastMap<Integer, PlayerInfo>().shared();
    			PlayerInfo pi = new PlayerInfo(p.getObjectId(), etype.getEventTemplate().getReentryCooldown());
    			plrs.put(p.getObjectId(), pi);
    			log.info("[EventManager] Player: {} add to played list. Time in: {} Next time in: {}",
    					new Object[]{p.getName(), new Timestamp(pi.lastEntryTime).toString(), new Timestamp(pi.nextEntryTime).toString()});
    			this.playedPlayers.put(etype, plrs);
    		}
    		return true;
    	}
    
    	public boolean containsInHolders(Player player) {
    		for (IEventHolder holder : this.holders) {
    			if (holder.contains(player)) {
    				return true;
    			}
    		}
    		return false;
    	}
    
    	private void removeHolderByEventType(EventType etype) {
    		for (IEventHolder holder : this.holders) {
    			if (holder.getEventType() == etype) {
    				this.holders.remove(holder);
    				this.removeHolderByEventType(etype);
    				break;
    			}
    		}
    	}
    
    	private void deleteHolder(IEventHolder h) {
    		int index = h.Index();
    		for (int i = 0; i < this.holders.size(); i++) {
    			IEventHolder holder = this.holders.get(i);
    			if (holder.Index() == index) {
    				this.holders.remove(i);
    				return;
    			}
    		}
    	}
    
    	private IEventHolder getFirstFreeHolderForSinglePlayer(Player player, EventType etype, EventPlayerLevel epl) {
    		for (IEventHolder holder : this.holders) {
    			if (holder.getEventType() == etype && holder.getHolderLevel() == epl && holder.canAddPlayer(player)) {
    				return holder;
    			}
    		}
    		return null;
    	}
    
    	private IEventHolder getFirstFreeHolderForPlayerGroup(PlayerGroup group, EventType etype, EventPlayerLevel epl) {
    		for (IEventHolder holder : this.holders) {
    			if (holder.getEventType() == etype && holder.getHolderLevel() == epl && holder.canAddGroup(group)) {
    				return holder;
    			}
    		}
    		return null;
    	}
    
    	private IEventHolder getHolderByPlayer(Player player, EventType etype, EventPlayerLevel epl) {
    		for (IEventHolder holder : this.holders) {
    			if (holder.getEventType() == etype && holder.getHolderLevel() == epl && holder.contains(player)) {
    				return holder;
    			}
    		}
    		return null;
    	}
    
    	private IEventHolder getHolderByPlayer(Player player) {
    		for (IEventHolder holder : this.holders) {
    			if (holder.contains(player)) {
    				return holder;
    			}
    		}
    		return null;
    	}
    
    	private IEventHolder getHolderByPlayerGroup(PlayerGroup group, EventType etype, EventPlayerLevel epl) {
    		for (IEventHolder holder : this.holders) {
    			if (holder.getEventType() == etype && holder.getHolderLevel() == epl && holder.contains(group)) {
    				return holder;
    			}
    		}
    		return null;
    	}
    
    	private IEventHolder getHolderByPlayerGroup(PlayerGroup group) {
    		for (IEventHolder holder : this.holders) {
    			if (holder.contains(group)) {
    				return holder;
    			}
    		}
    		return null;
    	}
    
    	private IEventHolder createEventHolder(int index, EventType etype, EventPlayerLevel epl) {
    		switch (etype) {
    			case E_1x1:
    			case E_LHE:
    			case E_FFA:
    				return new SimpleSinglePlayerEventHolder(index, etype, epl);
    			case E_2x2:
    			case E_3x3:
    			case E_4x4:
    			case E_6x6:
    				return new PlayerGroupEventHolder(index, etype, epl);
    			default:
    				return null;
    		}
    	}
    
    	private EventRegisterInfo standartCheck(EventType etype) {
    		if (!this.events.containsKey(etype)) {
    			return new EventRegisterInfo(EventRergisterState.CRITICAL_ERROR, String.format("Event: %s not listed Events.", etype.name()));
    		}
    		if (!this.eventIsActive(etype)) {
    			return new EventRegisterInfo(EventRergisterState.EVENT_NOT_START, "This event has not yet started.");
    		}
    		return null;
    	}
    
    	private EventRegisterInfo checkInPlayed(Player player, EventType etype) {
    		if (this.containsInPlayed(etype, player)) {
    			if (etype.getEventTemplate().getReentryCooldown() <= 0) {
    				return new EventRegisterInfo(EventRergisterState.PLAYER_HAS_VISIT_EVENT, String.format("You have already participated in the event: %s , in this session, expect next.", etype.name()));
    			}
    			PlayerInfo pi = this.playedPlayers.get(etype).get(player.getObjectId());
    			log.info("[EventManager] Player: {} time remainig: {}", player.getName(), TimeUtil.convertToString(pi.getRemainingTime()));
    			if (!pi.canEntryNow()) {
    				String time = TimeUtil.convertToString(pi.getRemainingTime());
    				return new EventRegisterInfo(EventRergisterState.PLAYER_HAS_VISIT_EVENT, String.format("Re-entry is possible through: %s .", time));
    			}
    			this.removePlayerFromPlayedList(player, etype);
    		}
    		return null;
    	}
    
    	private EventRegisterInfo checkInPlayedGroup(PlayerGroup group, EventType etype) {
    		for (Player member : group.getMembers()) {
    			if (this.checkInPlayed(member, etype) != null) {
    				return new EventRegisterInfo(EventRergisterState.PLAYER_IN_GROUP_ALREADY_VISIT_EVENT, "One or more groups of players have participated in events.");
    			}
    		}
    		return null;
    	}
    
    	private byte getHigherLvlInGroup(PlayerGroup pg) {
    		byte lvl = 0;
    		for (Player p : pg.getMembers()) {
    			if (p.getLevel() > lvl) {
    				lvl = p.getLevel();
    			}
    		}
    		return lvl;
    	}
    
    	/**
    	 * Runs the job alert players of active opening event.
    	 *
    	 * @return
    	 */
    	private void announceActiveEvents() {
    		ThreadPoolManager.getInstance().schedule(new Runnable() {
    			@Override
    			public void run() {
    				if (hasActiveEvents()) {
    					final StringBuilder sb = new StringBuilder();
    					sb.append("==============================\n");
    					sb.append("Registration on Events is open:\n");
    					for (Entry<EventType, Boolean> entry : events.entrySet()) {
    						if (entry.getValue().booleanValue()) {
    							sb.append("- ").append(entry.getKey().getEventTemplate().getEventName()).append("\n");
    						}
    					}
    					sb.append("==============================");
    					World.getInstance().doOnAllPlayers(new Visitor<Player>() {
    						@Override
    						public void visit(Player object) {
    							PacketSendUtility.sendMessage(object, sb.toString());
    						}
    					});
    				}
    				launcheAnnounce = false;
    			}
    		}, 5000);
    	}
    
    	public String CMD_StartEvent(EventType etype) {
    		if (eventIsActive(etype)) {
    			return "Event - " + etype.name() + " is already running. Restarting is impossible.";
    		}
    		if (RunEvent(etype)) {
    			return String.format("Event: %s launched.", etype.name());
    		} else {
    			return String.format("An error occurred while trying to start of Event: %s", etype.name());
    		}
    	}
    
    	//------------------------------------------------------------------------//
    	public static EventManager getInstance() {
    		return EventManagerHolder.INSTANCE;
    	}
    
    	private static class EventManagerHolder {
    
    		private static final EventManager INSTANCE = new EventManager();
    	}
    
    	private class PlayerInfo {
    
    		int playerId;
    		long nextEntryTime;
    		long lastEntryTime;
    
    		public PlayerInfo(int playerId, int reentryCd) {
    			this.playerId = playerId;
    			this.lastEntryTime = System.currentTimeMillis();
    			this.nextEntryTime = this.lastEntryTime + reentryCd * 1000;
    		}
    
    		public boolean canEntryNow() {
    			return this.nextEntryTime < System.currentTimeMillis();
    		}
    
    		public int getRemainingTime() {
    			return (int) (this.nextEntryTime - System.currentTimeMillis()) / 1000;
    		}
    	}
    }
    
     
    yayaya нравится это.
  6. TopicStarter Overlay
    Offline

    Dev4ik Ефрейтор

    230
    5
    51
    Кредиты:
    $229.178.655.615,39
    Репутация:
    -1
    Да без проблем :)
     
    yayaya нравится это.
  7. Offline

    Oliver67 Рядовой

    33
    0
    34
    Кредиты:
    $630.818,02
    Репутация:
    0
    Hi!

    EventEngine loading error!

    2019-06-19 12:06:03,861 Error while loading static datacom.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(Unknown Source) ~[na:1.7.0_80] at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(Unknown Source) ~[na:1.7.0_80] at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(Unknown Source) ~[na:1.7.0_80] at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(Unknown Source) ~[na:1.7.0_80] at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(Unknown Source) ~[na:1.7.0_80] at com.sun.xml.internal.bind.v2.ContextFactory.createContext(Unknown Source) ~[na:1.7.0_80] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_80] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_80] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_80] at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_80] at javax.xml.bind.ContextFinder.newInstance(Unknown Source) ~[na:1.7.0_80] at javax.xml.bind.ContextFinder.newInstance(Unknown Source) ~[na:1.7.0_80] at javax.xml.bind.ContextFinder.find(Unknown Source) ~[na:1.7.0_80] at javax.xml.bind.JAXBContext.newInstance(Unknown Source) ~[na:1.7.0_80] at javax.xml.bind.JAXBContext.newInstance(Unknown Source) ~[na:1.7.0_80] at com.aionemu.gameserver.dataholders.loadingutils.XmlDataLoader.loadStaticData(Unknown Source) [AC-Game.jar:na] at com.aionemu.gameserver.dataholders.DataManager.<init>(Unknown Source) [AC-Game.jar:na] at com.aionemu.gameserver.dataholders.DataManager.<init>(Unknown Source) [AC-Game.jar:na] at com.aionemu.gameserver.dataholders.DataManager$SingletonHolder.<clinit>(Unknown Source) [AC-Game.jar:na] at com.aionemu.gameserver.dataholders.DataManager.getInstance(Unknown Source) [AC-Game.jar:na] at com.aionemu.gameserver.GameServer.main(Unknown Source) [AC-Game.jar:na]2019-06-19 12:06:03,890 Critical Error - Thread: main terminated abnormaly: java.lang.ExceptionInInitializerErrorjava.lang.ExceptionInInitializerError: null at com.aionemu.gameserver.dataholders.DataManager.getInstance(Unknown Source) ~[AC-Game.jar:na] at com.aionemu.gameserver.GameServer.main(Unknown Source) ~[AC-Game.jar:na]Caused by: java.lang.NullPointerException: null at com.aionemu.gameserver.dataholders.DataManager.<init>(Unknown Source) ~[AC-Game.jar:na] at com.aionemu.gameserver.dataholders.DataManager.<init>(Unknown Source) ~[AC-Game.jar:na] at com.aionemu.gameserver.dataholders.DataManager$SingletonHolder.<clinit>(Unknown Source) ~[AC-Game.jar:na] ... 2 common frames omitted

    Emu:
    Aion-Core v4.7.5


    Help Please!
     
  8. Offline

    klubheads Младший сержант Команда форума VIP

    1.466
    244
    139
    Кредиты:
    $169.974.266.772,11
    Репутация:
    41
    Какая версия java у вас установлена?
    (Unknown Source) ~[na:1.7.0_80]
     
  9. Offline

    Oliver67 Рядовой

    33
    0
    34
    Кредиты:
    $630.818,02
    Репутация:
    0
    jdk1.7.0_80
     
  10. Offline

    klubheads Младший сержант Команда форума VIP

    1.466
    244
    139
    Кредиты:
    $169.974.266.772,11
    Репутация:
    41
    в логах пишет Illegal Annotation Exceptions ;)и указывает именно на версию java.
    ошибка системная. Смотрите как указано у вас в JAVA_HOME
     
    Oliver67 нравится это.
  11. Offline

    Oliver67 Рядовой

    33
    0
    34
    Кредиты:
    $630.818,02
    Репутация:
    0
    What kind of java version do you suggest?
    Aion-Core-v4.7.5 only runs Java version 1.7
     
  12. Offline

    klubheads Младший сержант Команда форума VIP

    1.466
    244
    139
    Кредиты:
    $169.974.266.772,11
    Репутация:
    41
    я не предлагаю вам менять версию, смотрите что пишет у вас по ошибке. Ошибка системная, возможно JAVA_HOME не правильно прописана, или обращение PATH
     
    Oliver67 нравится это.
  13. Offline

    Oliver67 Рядовой

    33
    0
    34
    Кредиты:
    $630.818,02
    Репутация:
    0
    [QUOTE = "klubheads, post: 18758, tag: 394"] Nem javaslom, hogy módosítsd a verziót, nézd meg, mit írsz hibásan. A rendszerhiba, talán JAVA_HOME nincs helyesen kitéve, vagy PATH fellebbezés [/ QUOTE]

    Az "EventEngine" módosítás nélkül az emu normálisan fut. Ezért nincs probléma a java opcióval.
     
  14. Offline

    Oliver67 Рядовой

    33
    0
    34
    Кредиты:
    $630.818,02
    Репутация:
    0
     
  15. Offline

    klubheads Младший сержант Команда форума VIP

    1.466
    244
    139
    Кредиты:
    $169.974.266.772,11
    Репутация:
    41
    тогда скорее всего у вас что то не добавлено в static_data
    com.aionemu.gameserver.dataholders.DataManager
    если сервер не может загрузить это.
    com.aionemu.gameserver.dataholders.loadingutils.XmlDataLoader.loadStaticData
     
  16. Offline

    Oliver67 Рядовой

    33
    0
    34
    Кредиты:
    $630.818,02
    Репутация:
    0
    package com.aionemu.gameserver.dataholders;

    import org.slf4j.Logger;
    import org.slf4j.LoggerFactory;

    import com.aionemu.gameserver.dataholders.loadingutils.XmlDataLoader;
    import com.aionemu.gameserver.eventEngine.battleground.BattleGroundData;
    import com.aionemu.gameserver.model.templates.mail.Mails;
    import pirate.events.xml.EventsData;

    /**
    * This class is holding whole static data, that is loaded from
    * /data/static_data directory.<br> The data is loaded by XMLDataLoader using
    * JAXB.<br> <br> This class temporarily also contains data loaded from txt
    * files by DataLoaders. It'll be changed later.
    *
    * @author Luno , orz modified by Wakizashi, reworked by Voidstar for Dual NPC DROP .dat&xml
    */
    public final class DataManager {

    static Logger log = LoggerFactory.getLogger(DataManager.class);
    public static NpcData NPC_DATA;

    public static XmlNpcDropData XML_NPC_DROP_DATA;

    public static NpcDropData NPC_DROP_DATA;
    public static GlobalDropData GLOBAL_DROP_DATA;
    public static NpcShoutData NPC_SHOUT_DATA;
    public static GatherableData GATHERABLE_DATA;
    public static WorldMapsData WORLD_MAPS_DATA;

    public static MapWeatherData MAP_WEATHER_DATA;

    public static TradeListData TRADE_LIST_DATA;
    public static PlayerExperienceTable PLAYER_EXPERIENCE_TABLE;
    public static TeleporterData TELEPORTER_DATA;
    public static TeleLocationData TELELOCATION_DATA;
    public static CubeExpandData CUBEEXPANDER_DATA;
    public static WarehouseExpandData WAREHOUSEEXPANDER_DATA;
    public static BindPointData BIND_POINT_DATA;
    public static QuestsData QUEST_DATA;
    public static XMLQuests XML_QUESTS;
    public static PlayerStatsData PLAYER_STATS_DATA;
    public static SummonStatsData SUMMON_STATS_DATA;
    public static ItemData ITEM_DATA;
    public static ItemRandomBonusData ITEM_RANDOM_BONUSES;
    public static TitleData TITLE_DATA;
    public static PlayerInitialData PLAYER_INITIAL_DATA;
    public static SkillData SKILL_DATA;
    public static MotionData MOTION_DATA;
    public static SkillTreeData SKILL_TREE_DATA;
    public static GuideHtmlData GUIDE_HTML_DATA;
    public static WalkerData WALKER_DATA;

    public static WalkerVersionsData WALKER_VERSIONS_DATA;

    public static ZoneData ZONE_DATA;
    public static GoodsListData GOODSLIST_DATA;
    public static TribeRelationsData TRIBE_RELATIONS_DATA;
    public static RecipeData RECIPE_DATA;
    public static ChestData CHEST_DATA;
    public static StaticDoorData STATICDOOR_DATA;
    public static ItemSetData ITEM_SET_DATA;
    public static NpcFactionsData NPC_FACTIONS_DATA;
    public static NpcSkillData NPC_SKILL_DATA;
    public static PetSkillData PET_SKILL_DATA;
    public static SiegeLocationData SIEGE_LOCATION_DATA;

    public static VortexData VORTEX_DATA;

    public static RiftData RIFT_DATA;

    public static FlyRingData FLY_RING_DATA;
    public static ShieldData SHIELD_DATA;
    public static PetData PET_DATA;
    public static PetFeedData PET_FEED_DATA;
    public static PetDopingData PET_DOPING_DATA;
    public static RoadData ROAD_DATA;
    public static InstanceCooltimeData INSTANCE_COOLTIME_DATA;
    public static DecomposableItemsData DECOMPOSABLE_ITEMS_DATA;
    public static AIData AI_DATA;
    public static FlyPathData FLY_PATH;
    public static WindstreamData WINDSTREAM_DATA;
    public static ItemRestrictionCleanupData ITEM_CLEAN_UP;
    public static AssembledNpcsData ASSEMBLED_NPC_DATA;
    public static CosmeticItemsData COSMETIC_ITEMS_DATA;
    public static ItemGroupsData ITEM_GROUPS_DATA;
    public static AssemblyItemsData ASSEMBLY_ITEM_DATA;
    public static SpawnsData2 SPAWNS_DATA2;
    public static AutoGroupData AUTO_GROUP;
    public static EventData EVENT_DATA;
    public static PanelSkillsData PANEL_SKILL_DATA;
    public static InstanceBuffData INSTANCE_BUFF_DATA;
    public static HousingObjectData HOUSING_OBJECT_DATA;
    public static RideData RIDE_DATA;
    public static InstanceExitData INSTANCE_EXIT_DATA;
    public static PortalLocData PORTAL_LOC_DATA;
    public static Portal2Data PORTAL2_DATA;
    public static HouseData HOUSE_DATA;

    public static HouseBuildingData HOUSE_BUILDING_DATA;

    public static HousePartsData HOUSE_PARTS_DATA;
    public static CuringObjectsData CURING_OBJECTS_DATA;
    public static HouseNpcsData HOUSE_NPCS_DATA;
    public static HouseScriptData HOUSE_SCRIPT_DATA;
    public static Mails SYSTEM_MAIL_TEMPLATES;
    public static MaterialData MATERIAL_DATA;
    public static ChallengeData CHALLENGE_DATA;
    public static TownSpawnsData TOWN_SPAWNS_DATA;
    public static AbyssRaceBonusData ABYSS_RACE_BONUS_DATA;
    public static SerialKillerData SERIAL_KILLER_DATA;
    public static SkillChargeData SKILL_CHARGE_DATA;
    public static ItemPurificationData ITEM_PURIFICATION_DATA;
    public static DecomposableSelectItemsData DECOMPOSABLE_SELECT_ITEM_DATA;
    public static ItemEnchantData ITEM_ENCHANT_DATA;
    public static ItemEnchantTableData ITEM_ENCHANT_TABLE_DATA;
    public static HotspotTeleporterData HOTSPOT_TELEPORTER_DATA;
    public static LoginEventData LOGIN_EVENT_DATA;
    public static BaseData BASE_DATA;
    public static BeritraData BERITRA_DATA;
    public static AbsoluteStatsData ABSOLUTE_STATS_DATA;
    public static RobotData ROBOT_DATA;
    public static ArcadeUpgradeData ARCADE_UPGRADE_DATA;
    public static MultiReturnItemData MULTI_RETURN_ITEM_DATA;
    public static BattleGroundData BATTLEGROUND_DATA;
    public static EventsData F14_EVENTS_DATA;
    private XmlDataLoader loader;

    /**
    * Constructor creating <tt>DataManager</tt> instance.<br>
    * NOTICE: calling constructor implies loading whole data from
    * /data/static_data immediately
    */
    public static final DataManager getInstance() {
    return SingletonHolder.instance;
    }

    private DataManager() {
    log.info("Loading Static Data...");
    this.loader = XmlDataLoader.getInstance();

    long start = System.currentTimeMillis();
    StaticData data = loader.loadStaticData();
    long time = System.currentTimeMillis() - start;

    XML_NPC_DROP_DATA = data.xmlNpcDropData;
    WORLD_MAPS_DATA = data.worldMapsData;
    MATERIAL_DATA = data.materiaData;
    MAP_WEATHER_DATA = data.mapWeatherData;
    PLAYER_EXPERIENCE_TABLE = data.playerExperienceTable;
    PLAYER_STATS_DATA = data.playerStatsData;
    SUMMON_STATS_DATA = data.summonStatsData;
    ITEM_CLEAN_UP = data.itemCleanup;
    ITEM_DATA = data.itemData;
    ITEM_RANDOM_BONUSES = data.itemRandomBonuses;
    NPC_DATA = data.npcData;
    NPC_SHOUT_DATA = data.npcShoutData;
    GATHERABLE_DATA = data.gatherableData;
    PLAYER_INITIAL_DATA = data.playerInitialData;
    SKILL_DATA = data.skillData;
    MOTION_DATA = data.motionData;
    SKILL_TREE_DATA = data.skillTreeData;
    TITLE_DATA = data.titleData;
    TRADE_LIST_DATA = data.tradeListData;
    TELEPORTER_DATA = data.teleporterData;
    TELELOCATION_DATA = data.teleLocationData;
    CUBEEXPANDER_DATA = data.cubeExpandData;
    WAREHOUSEEXPANDER_DATA = data.warehouseExpandData;
    BIND_POINT_DATA = data.bindPointData;
    QUEST_DATA = data.questData;
    XML_QUESTS = data.questsScriptData;
    ZONE_DATA = data.zoneData;
    WALKER_DATA = data.walkerData;
    WALKER_VERSIONS_DATA = data.walkerVersionsData;
    GOODSLIST_DATA = data.goodsListData;
    TRIBE_RELATIONS_DATA = data.tribeRelationsData;
    RECIPE_DATA = data.recipeData;
    CHEST_DATA = data.chestData;
    STATICDOOR_DATA = data.staticDoorData;
    ITEM_SET_DATA = data.itemSetData;
    NPC_FACTIONS_DATA = data.npcFactionsData;
    NPC_SKILL_DATA = data.npcSkillData;
    PET_SKILL_DATA = data.petSkillData;
    SIEGE_LOCATION_DATA = data.siegeLocationData;
    VORTEX_DATA = data.vortexData;
    RIFT_DATA = data.riftData;
    FLY_RING_DATA = data.flyRingData;
    SHIELD_DATA = data.shieldData;
    PET_DATA = data.petData;
    PET_FEED_DATA = data.petFeedData;
    PET_DOPING_DATA = data.petDopingData;
    GUIDE_HTML_DATA = data.guideData;
    ROAD_DATA = data.roadData;
    INSTANCE_COOLTIME_DATA = data.instanceCooltimeData;
    DECOMPOSABLE_ITEMS_DATA = data.decomposableItemsData;
    AI_DATA = data.aiData;
    FLY_PATH = data.flyPath;
    WINDSTREAM_DATA = data.windstreamsData;
    ASSEMBLED_NPC_DATA = data.assembledNpcData;
    COSMETIC_ITEMS_DATA = data.cosmeticItemsData;
    SPAWNS_DATA2 = data.spawnsData2;
    ITEM_GROUPS_DATA = data.itemGroupsData;
    ASSEMBLY_ITEM_DATA = data.assemblyItemData;
    AUTO_GROUP = data.autoGroupData;
    EVENT_DATA = data.eventData;
    PANEL_SKILL_DATA = data.panelSkillsData;
    INSTANCE_BUFF_DATA = data.instanceBuffData;
    HOUSING_OBJECT_DATA = data.housingObjectData;
    RIDE_DATA = data.rideData;
    INSTANCE_EXIT_DATA = data.instanceExitData;
    PORTAL_LOC_DATA = data.portalLocData;
    PORTAL2_DATA = data.portalTemplate2;
    HOUSE_DATA = data.houseData;
    HOUSE_BUILDING_DATA = data.houseBuildingData;
    HOUSE_PARTS_DATA = data.housePartsData;
    CURING_OBJECTS_DATA = data.curingObjectsData;
    HOUSE_NPCS_DATA = data.houseNpcsData;
    HOUSE_SCRIPT_DATA = data.houseScriptData;
    SYSTEM_MAIL_TEMPLATES = data.systemMailTemplates;
    CHALLENGE_DATA = data.challengeData;
    TOWN_SPAWNS_DATA = data.townSpawnsData;
    ABYSS_RACE_BONUS_DATA = data.abyssRaceBonusData;
    SKILL_CHARGE_DATA = data.skillChargeData;
    ITEM_PURIFICATION_DATA = data.itemPurificationData;
    DECOMPOSABLE_SELECT_ITEM_DATA = data.decomposableSelectItemsData;
    ITEM_ENCHANT_DATA = data.itemEnchantData;
    ITEM_ENCHANT_TABLE_DATA = data.itemEnchantTableData;
    HOTSPOT_TELEPORTER_DATA = data.hotspotTeleporterData;
    LOGIN_EVENT_DATA = data.loginEventData;
    SERIAL_KILLER_DATA = data.serialKillerData;
    BASE_DATA = data.baseData;
    BERITRA_DATA = data.beritraData;
    ABSOLUTE_STATS_DATA = data.absoluteStatsData;
    ROBOT_DATA = data.robotData;
    ARCADE_UPGRADE_DATA = data.arcadeUpgradeData;
    MULTI_RETURN_ITEM_DATA = data.multiReturnItemData;
    BATTLEGROUND_DATA = data.battlegroundData;
    F14_EVENTS_DATA = data.f14_eventsData;
    ITEM_DATA.cleanup();
    NPC_DROP_DATA = NpcDropData.load();
    GLOBAL_DROP_DATA = data.globalDropData;


    // some sexy time message
    long seconds = time / 1000;

    String timeMsg = seconds > 0 ? seconds + " seconds" : time + " miliseconds";

    log.info("##### [Static Data loaded in: " + timeMsg + "] #####");
    }

    @SuppressWarnings("synthetic-access")
    private static class SingletonHolder {

    protected static final DataManager instance = new DataManager();
    }
    }
     
  17. Offline

    klubheads Младший сержант Команда форума VIP

    1.466
    244
    139
    Кредиты:
    $169.974.266.772,11
    Репутация:
    41
    а в саму static_data всё добавили?
    \data\static_data
    в static_data.xml и static_data.xsd должны быть расписаны пути файлам
     
    Последнее редактирование: 8 июл 2019
  18. Offline

    Oliver67 Рядовой

    33
    0
    34
    Кредиты:
    $630.818,02
    Репутация:
    0
     
  19. Offline

    klubheads Младший сержант Команда форума VIP

    1.466
    244
    139
    Кредиты:
    $169.974.266.772,11
    Репутация:
    41
    ну осталось только тут проверить, всё ли добавлено
    \gameserver\dataholders\StaticData.java

    @XmlElement(name = "events")
    public EventsData f14_eventsData;

    DataManager.log.info("Loaded " + f14_eventsData.size() + " f14 events");
     
  20. Offline

    Oliver67 Рядовой

    33
    0
    34
    Кредиты:
    $630.818,02
    Репутация:
    0
    package com.aionemu.gameserver.dataholders;

    import javax.xml.bind.Unmarshaller;
    import javax.xml.bind.annotation.XmlAccessType;
    import javax.xml.bind.annotation.XmlAccessorType;
    import javax.xml.bind.annotation.XmlElement;
    import javax.xml.bind.annotation.XmlRootElement;

    import com.aionemu.gameserver.eventEngine.battleground.BattleGroundData;
    import com.aionemu.gameserver.model.templates.mail.Mails;
    import pirate.events.xml.EventsData;
    /**
    * An instance of this class is the result of data loading.
    *
    * @author Luno, orz Modified by Wakizashi, reworked by Voidstar for Dual NPC DROP .dat&xml
    */
    @XmlRootElement(name = "ae_static_data")
    @XmlAccessorType(XmlAccessType.NONE)
    public class StaticData {

    @XmlElement(name="npc_drops")
    public XmlNpcDropData xmlNpcDropData;

    @XmlElement(name = "npc_drops")
    public NpcDropData npcDropData;

    @XmlElement(name = "global_rules")
    public GlobalDropData globalDropData;

    @XmlElement(name = "world_maps")
    public WorldMapsData worldMapsData;
    @XmlElement(name = "weather")
    public MapWeatherData mapWeatherData;
    @XmlElement(name = "npc_trade_list")
    public TradeListData tradeListData;
    @XmlElement(name = "npc_teleporter")
    public TeleporterData teleporterData;
    @XmlElement(name = "teleport_location")
    public TeleLocationData teleLocationData;
    @XmlElement(name = "bind_points")
    public BindPointData bindPointData;
    @XmlElement(name = "quests")
    public QuestsData questData;
    @XmlElement(name = "quest_scripts")
    public XMLQuests questsScriptData;
    @XmlElement(name = "player_experience_table")
    public PlayerExperienceTable playerExperienceTable;
    @XmlElement(name = "player_stats_templates")
    public PlayerStatsData playerStatsData;
    @XmlElement(name = "summon_stats_templates")
    public SummonStatsData summonStatsData;
    @XmlElement(name = "item_templates")
    public ItemData itemData;
    @XmlElement(name = "random_bonuses")
    public ItemRandomBonusData itemRandomBonuses;
    @XmlElement(name = "npc_templates")
    public NpcData npcData;
    @XmlElement(name = "npc_shouts")
    public NpcShoutData npcShoutData;
    @XmlElement(name = "player_initial_data")
    public PlayerInitialData playerInitialData;
    @XmlElement(name = "skill_data")
    public SkillData skillData;
    @XmlElement(name = "motion_times")
    public MotionData motionData;
    @XmlElement(name = "skill_tree")
    public SkillTreeData skillTreeData;
    @XmlElement(name = "cube_expander")
    public CubeExpandData cubeExpandData;
    @XmlElement(name = "warehouse_expander")
    public WarehouseExpandData warehouseExpandData;
    @XmlElement(name = "player_titles")
    public TitleData titleData;
    @XmlElement(name = "gatherable_templates")
    public GatherableData gatherableData;
    @XmlElement(name = "npc_walker")
    public WalkerData walkerData;
    @XmlElement(name = "zones")
    public ZoneData zoneData;
    @XmlElement(name = "goodslists")
    public GoodsListData goodsListData;
    @XmlElement(name = "tribe_relations")
    public TribeRelationsData tribeRelationsData;
    @XmlElement(name = "recipe_templates")
    public RecipeData recipeData;
    @XmlElement(name = "chest_templates")
    public ChestData chestData;
    @XmlElement(name = "staticdoor_templates")
    public StaticDoorData staticDoorData;
    @XmlElement(name = "item_sets")
    public ItemSetData itemSetData;
    @XmlElement(name = "npc_factions")
    public NpcFactionsData npcFactionsData;
    @XmlElement(name = "npc_skill_templates")
    public NpcSkillData npcSkillData;
    @XmlElement(name = "pet_skill_templates")
    public PetSkillData petSkillData;
    @XmlElement(name = "siege_locations")
    public SiegeLocationData siegeLocationData;

    @XmlElement(name = "dimensional_vortex")
    public VortexData vortexData;

    @XmlElement(name = "rift_locations")
    public RiftData riftData;

    @XmlElement(name = "fly_rings")
    public FlyRingData flyRingData;
    @XmlElement(name = "shields")
    public ShieldData shieldData;
    @XmlElement(name = "pets")
    public PetData petData;
    @XmlElement(name = "pet_feed")
    public PetFeedData petFeedData;
    @XmlElement(name = "dopings")
    public PetDopingData petDopingData;
    @XmlElement(name = "guides")
    public GuideHtmlData guideData;
    @XmlElement(name = "roads")
    public RoadData roadData;
    @XmlElement(name = "instance_cooltimes")
    public InstanceCooltimeData instanceCooltimeData;
    @XmlElement(name = "decomposable_items")
    public DecomposableItemsData decomposableItemsData;
    @XmlElement(name = "ai_templates")
    public AIData aiData;
    @XmlElement(name = "flypath_template")
    public FlyPathData flyPath;
    @XmlElement(name = "windstreams")
    public WindstreamData windstreamsData;
    @XmlElement(name = "item_restriction_cleanups")
    public ItemRestrictionCleanupData itemCleanup;
    @XmlElement(name = "assembled_npcs")
    public AssembledNpcsData assembledNpcData;
    @XmlElement(name = "cosmetic_items")
    public CosmeticItemsData cosmeticItemsData;
    @XmlElement(name = "auto_groups")
    public AutoGroupData autoGroupData;
    @XmlElement(name = "events_config")
    public EventData eventData;
    @XmlElement(name = "spawns")
    public SpawnsData2 spawnsData2;
    @XmlElement(name = "item_groups")
    public ItemGroupsData itemGroupsData;
    @XmlElement(name = "polymorph_panels")
    public PanelSkillsData panelSkillsData;
    @XmlElement(name = "instance_bonusattrs")
    public InstanceBuffData instanceBuffData;
    @XmlElement(name = "housing_objects")
    public HousingObjectData housingObjectData;
    @XmlElement(name = "rides")
    public RideData rideData;
    @XmlElement(name = "instance_exits")
    public InstanceExitData instanceExitData;
    @XmlElement(name = "portal_locs")
    PortalLocData portalLocData;
    @XmlElement(name = "portal_templates2")
    Portal2Data portalTemplate2;
    @XmlElement(name = "house_lands")
    public HouseData houseData;

    @XmlElement(name = "buildings")
    public HouseBuildingData houseBuildingData;

    @XmlElement(name = "house_parts")
    public HousePartsData housePartsData;
    @XmlElement(name = "curing_objects")
    public CuringObjectsData curingObjectsData;
    @XmlElement(name = "house_npcs")
    public HouseNpcsData houseNpcsData;
    @XmlElement(name = "assembly_items")
    public AssemblyItemsData assemblyItemData;
    @XmlElement(name = "lboxes")
    public HouseScriptData houseScriptData;
    @XmlElement(name = "mails")
    public Mails systemMailTemplates;
    @XmlElement(name = "material_templates")
    public MaterialData materiaData;
    @XmlElement(name = "challenge_tasks")
    public ChallengeData challengeData;
    @XmlElement(name = "town_spawns_data")
    public TownSpawnsData townSpawnsData;
    @XmlElement(name = "abyss_race_bonuses")
    public AbyssRaceBonusData abyssRaceBonusData;
    @XmlElement(name = "skill_charge")
    public SkillChargeData skillChargeData;
    @XmlElement(name = "item_purifications")
    public ItemPurificationData itemPurificationData;
    @XmlElement(name = "decomposable_selectitems")
    public DecomposableSelectItemsData decomposableSelectItemsData;
    @XmlElement(name = "enchant_templates")
    public ItemEnchantData itemEnchantData;
    @XmlElement(name = "enchant_tables")
    public ItemEnchantTableData itemEnchantTableData;
    @XmlElement(name = "hotspot_teleport")
    public HotspotTeleporterData hotspotTeleporterData;
    @XmlElement(name = "login_rewards")
    public LoginEventData loginEventData;
    @XmlElement(name = "serial_killers")
    public SerialKillerData serialKillerData;
    @XmlElement(name = "base_locations")
    public BaseData baseData;
    @XmlElement(name = "beritra_invasion")
    public BeritraData beritraData;
    @XmlElement(name = "absolute_stats")
    public AbsoluteStatsData absoluteStatsData;
    @XmlElement(name = "walker_versions")
    public WalkerVersionsData walkerVersionsData;
    @XmlElement(name = "robots")
    public RobotData robotData;
    @XmlElement(name = "arcadelist")
    public ArcadeUpgradeData arcadeUpgradeData;
    @XmlElement(name = "item_multi_returns")
    public MultiReturnItemData multiReturnItemData;
    @XmlElement(name = "battlegrounds")
    public BattleGroundData battlegroundData;
    @XmlElement(name = "events")
    public EventsData f14_eventsData;


    // JAXB callback
    @SuppressWarnings("unused")
    private void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
    DataManager.log.info("Loaded " + worldMapsData.size() + " world maps");
    DataManager.log.info("Loaded " + materiaData.size() + " material ids");
    DataManager.log.info("Loaded " + mapWeatherData.size() + " weather maps");
    DataManager.log.info("Loaded " + playerExperienceTable.getMaxLevel() + " levels");
    DataManager.log.info("Loaded " + playerStatsData.size() + " player stat templates");
    DataManager.log.info("Loaded " + summonStatsData.size() + " summon stat templates");
    DataManager.log.info("Loaded " + itemCleanup.size() + " item cleanup entries");
    DataManager.log.info("Loaded " + itemData.size() + " item templates");
    DataManager.log.info("Loaded " + itemRandomBonuses.size() + " item bonus templates");
    DataManager.log.info("Loaded " + itemGroupsData.bonusSize() + " bonus item group templates");
    DataManager.log.info("Loaded " + itemGroupsData.petFoodSize() + " pet food items");
    DataManager.log.info("Loaded " + npcData.size() + " npc templates");
    DataManager.log.info("Loaded " + systemMailTemplates.size() + " system mail templates");
    DataManager.log.info("Loaded " + npcShoutData.size() + " npc shout templates");
    DataManager.log.info("Loaded " + petData.size() + " pet templates");
    DataManager.log.info("Loaded " + petFeedData.size() + " food flavours");
    DataManager.log.info("Loaded " + petDopingData.size() + " pet doping templates");
    DataManager.log.info("Loaded " + playerInitialData.size() + " initial player templates");
    DataManager.log.info("Loaded " + tradeListData.size() + " trade lists");
    DataManager.log.info("Loaded " + teleporterData.size() + " npc teleporter templates");
    DataManager.log.info("Loaded " + teleLocationData.size() + " teleport locations");
    DataManager.log.info("Loaded " + skillData.size() + " skill templates");
    DataManager.log.info("Loaded " + motionData.size() + " motion times");
    DataManager.log.info("Loaded " + skillTreeData.size() + " skill learn entries");
    DataManager.log.info("Loaded " + cubeExpandData.size() + " cube expand entries");
    DataManager.log.info("Loaded " + warehouseExpandData.size() + " warehouse expand entries");
    DataManager.log.info("Loaded " + bindPointData.size() + " bind point entries");
    DataManager.log.info("Loaded " + questData.size() + " quest data entries");
    DataManager.log.info("Loaded " + gatherableData.size() + " gatherable entries");
    DataManager.log.info("Loaded " + titleData.size() + " title entries");
    DataManager.log.info("Loaded " + walkerData.size() + " walker routes");
    DataManager.log.info("Loaded " + walkerVersionsData.size() + " walker group variants");
    DataManager.log.info("Loaded " + zoneData.size() + " zone entries");
    DataManager.log.info("Loaded " + goodsListData.size() + " goodslist entries");
    DataManager.log.info("Loaded " + tribeRelationsData.size() + " tribe relation entries");
    DataManager.log.info("Loaded " + recipeData.size() + " recipe entries");
    DataManager.log.info("Loaded " + chestData.size() + " chest locations");
    DataManager.log.info("Loaded " + staticDoorData.size() + " static door locations");
    DataManager.log.info("Loaded " + itemSetData.size() + " item set entries");
    DataManager.log.info("Loaded " + npcFactionsData.size() + " npc factions");
    DataManager.log.info("Loaded " + npcSkillData.size() + " npc skill list entries");
    DataManager.log.info("Loaded " + petSkillData.size() + " pet skill list entries");
    DataManager.log.info("Loaded " + siegeLocationData.size() + " siege location entries");
    DataManager.log.info("Loaded " + vortexData.size() + " vortex entries");
    DataManager.log.info("Loaded " + riftData.size() + " rift entries");
    DataManager.log.info("Loaded " + flyRingData.size() + " fly ring entries");
    DataManager.log.info("Loaded " + shieldData.size() + " shield entries");
    DataManager.log.info("Loaded " + petData.size() + " pet entries");
    DataManager.log.info("Loaded " + guideData.size() + " guide entries");
    DataManager.log.info("Loaded " + roadData.size() + " road entries");
    DataManager.log.info("Loaded " + instanceCooltimeData.size() + " instance cooltime entries");
    DataManager.log.info("Loaded " + decomposableItemsData.size() + " decomposable items entries");
    DataManager.log.info("Loaded " + aiData.size() + " ai templates");
    DataManager.log.info("Loaded " + flyPath.size() + " flypath templates");
    DataManager.log.info("Loaded " + windstreamsData.size() + " windstream entries");
    DataManager.log.info("Loaded " + assembledNpcData.size() + " assembled npcs entries");
    DataManager.log.info("Loaded " + cosmeticItemsData.size() + " cosmetic items entries");
    DataManager.log.info("Loaded " + autoGroupData.size() + " auto group entries");
    DataManager.log.info("Loaded " + spawnsData2.size() + " spawn maps entries");
    DataManager.log.info("Loaded " + eventData.size() + " active events");
    DataManager.log.info("Loaded " + panelSkillsData.size() + " skill panel entries");
    DataManager.log.info("Loaded " + instanceBuffData.size() + " instance Buffs entries");
    DataManager.log.info("Loaded " + housingObjectData.size() + " housing object entries");
    DataManager.log.info("Loaded " + rideData.size() + " ride info entries");
    DataManager.log.info("Loaded " + instanceExitData.size() + " instance exit entries");
    DataManager.log.info("Loaded " + portalLocData.size() + " portal loc entries");
    DataManager.log.info("Loaded " + portalTemplate2.size() + " portal templates2 entries");
    DataManager.log.info("Loaded " + houseData.size() + " housing lands");
    DataManager.log.info("Loaded " + houseBuildingData.size() + " house building styles");
    DataManager.log.info("Loaded " + housePartsData.size() + " house parts");
    DataManager.log.info("Loaded " + houseNpcsData.size() + " house spawns");
    DataManager.log.info("Loaded " + houseScriptData.size() + " house default scripts");
    DataManager.log.info("Loaded " + curingObjectsData.size() + " curing Objects entries");
    DataManager.log.info("Loaded " + assemblyItemData.size() + " assembly items entries");
    DataManager.log.info("Loaded " + challengeData.size() + " challenge tasks entries");
    DataManager.log.info("Loaded " + townSpawnsData.getSpawnsCount() + " town spawns");
    DataManager.log.info("Loaded " + abyssRaceBonusData.size() + " abyss race bonus entries");
    DataManager.log.info("Loaded " + skillChargeData.size() + " skill charge entries");
    DataManager.log.info("Loaded " + itemPurificationData.size() + " item purifications entries");
    DataManager.log.info("Loaded " + decomposableSelectItemsData.size() + " decomposable select data");
    DataManager.log.info("Loaded " + itemEnchantData.size() + " item enchant data");
    DataManager.log.info("Loaded " + itemEnchantTableData.size() + " item enchant tables");
    DataManager.log.info("Loaded " + hotspotTeleporterData.size() + " hotspot templates");
    DataManager.log.info("Loaded " + arcadeUpgradeData.size() + " arcade upgrade entries");
    DataManager.log.info("Loaded " + loginEventData.size() + " atreian passports");
    DataManager.log.info("Loaded " + serialKillerData.size() + " serial killer entries");
    DataManager.log.info("Loaded " + baseData.size() + " base entries");
    DataManager.log.info("Loaded " + beritraData.size() + " beritra invasion entries");
    DataManager.log.info("Loaded " + absoluteStatsData.size() + " absolute stat templates");
    DataManager.log.info("Loaded " + robotData.size() + " robot armor entries");
    DataManager.log.info("Loaded " + multiReturnItemData.size() + " multi returns items");
    DataManager.log.info("Loaded " + battlegroundData.size() + " battleground templates");
    DataManager.log.info("Loaded " + globalDropData.size() + " global drops Rules");
    //DataManager.log.info("Loaded " + npcDropData.size() + " npc drop entries");
    DataManager.log.info("Loaded " + xmlNpcDropData.size() + " custom npc drop data");
    DataManager.log.info("Loaded " + this.f14_eventsData.size() + " f14 events");
    }
    }