Jump to content
  • 0

To village button / to castle / to clan hall doesnt appear when die


Question

4 answers to this question

Recommended Posts

  • 0
Posted

That's my die.java i cant find something wrong

 

 

/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package com.l2jfrozen.gameserver.network.serverpackets;

import com.l2jfrozen.gameserver.datatables.AccessLevel;
import com.l2jfrozen.gameserver.datatables.sql.AccessLevels;
import com.l2jfrozen.gameserver.managers.CastleManager;
import com.l2jfrozen.gameserver.managers.FortManager;
import com.l2jfrozen.gameserver.model.L2Attackable;
import com.l2jfrozen.gameserver.model.L2Character;
import com.l2jfrozen.gameserver.model.L2SiegeClan;
import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
import com.l2jfrozen.gameserver.model.entity.event.CTF;
import com.l2jfrozen.gameserver.model.entity.event.DM;
import com.l2jfrozen.gameserver.model.entity.event.TvT;
import com.l2jfrozen.gameserver.model.entity.siege.Castle;
import com.l2jfrozen.gameserver.model.entity.siege.Fort;

/**
* sample 0b 952a1048 objectId 00000000 00000000 00000000 00000000 00000000 00000000 format dddddd rev 377 format
* ddddddd rev 417
* 
* @version $Revision: 1.3.3 $ $Date: 2009/04/29 00:46:18 $
*/
public class Die extends L2GameServerPacket
{
private static final String _S__0B_DIE = "[s] 06 Die";
private int _charObjId;
private boolean _fake;
private boolean _sweepable;
private boolean _canTeleport;
private AccessLevel _access = AccessLevels.getInstance()._userAccessLevel;
private com.l2jfrozen.gameserver.model.L2Clan _clan;
L2Character _activeChar;

/**
 * @param cha 
 */
public Die(L2Character cha)
{
	_activeChar = cha;
	if(cha instanceof L2PcInstance)
	{
		L2PcInstance player = (L2PcInstance) cha;
		_access = player.getAccessLevel();
		_clan = player.getClan();
		_canTeleport = !((TvT.is_started() && player._inEventTvT)
						|| (DM.is_started() && player._inEventDM)
						|| (CTF.is_started() && player._inEventCTF)
						|| player.isInFunEvent()
						|| player.isPendingRevive());
		if(_canTeleport)
			_canTeleport = com.l2jfrozen.gameserver.event.EventManager.getInstance().isRegistered(player) && com.l2jfrozen.gameserver.event.EventManager.getInstance().isRunning();
	}
	_charObjId = cha.getObjectId();
	_fake = !cha.isDead();
	if(cha instanceof L2Attackable)
	{
		_sweepable = ((L2Attackable) cha).isSweepActive();
	}

}

@Override
protected final void writeImpl()
{
	if(_fake)
		return;

	writeC(0x06);

	writeD(_charObjId);
	// NOTE:
	// 6d 00 00 00 00 - to nearest village	
	// 6d 01 00 00 00 - to hide away
	// 6d 02 00 00 00 - to castle
	// 6d 03 00 00 00 - to siege HQ
	// sweepable
	// 6d 04 00 00 00 - FIXED

	writeD(_canTeleport ? 0x01 : 0);   // 6d 00 00 00 00 - to nearest village

	if(_canTeleport && _clan != null)
	{
		L2SiegeClan siegeClan = null;
		Boolean isInDefense = false;
		Castle castle = CastleManager.getInstance().getCastle(_activeChar);
		Fort fort = FortManager.getInstance().getFort(_activeChar);

		if(castle != null && castle.getSiege().getIsInProgress())
		{
			//siege in progress
			siegeClan = castle.getSiege().getAttackerClan(_clan);
			if(siegeClan == null && castle.getSiege().checkIsDefender(_clan))
			{
				isInDefense = true;
			}
		}
		else if(fort != null && fort.getSiege().getIsInProgress())
		{
			//siege in progress
			siegeClan = fort.getSiege().getAttackerClan(_clan);
			if(siegeClan == null && fort.getSiege().checkIsDefender(_clan))
			{
				isInDefense = true;
			}
		}

		writeD(_clan.getHasHideout() > 0 ? 0x01 : 0x00); // 6d 01 00 00 00 - to hide away
		writeD(_clan.getHasCastle() > 0 || _clan.getHasFort() > 0 || isInDefense ? 0x01 : 0x00); // 6d 02 00 00 00 - to castle
		writeD(siegeClan != null && !isInDefense && siegeClan.getFlag().size() > 0 ? 0x01 : 0x00); // 6d 03 00 00 00 - to siege HQ
	}
	else
	{
		writeD(0x00); // 6d 01 00 00 00 - to hide away
		writeD(0x00); // 6d 02 00 00 00 - to castle
		writeD(0x00); // 6d 03 00 00 00 - to siege HQ
	}

	writeD(_sweepable ? 0x01 : 0x00); // sweepable  (blue glow)
	writeD(_access.allowFixedRes() ? 0x01 : 0x00); // 6d 04 00 00 00 - to FIXED
}

/* (non-Javadoc)
 * @see com.l2jfrozen.gameserver.serverpackets.ServerBasePacket#getType()
 */
@Override
public String getType()
{
	return _S__0B_DIE;
}
}

Guest
This topic is now closed to further replies.


  • Posts

    • aCis (“another Crappy interlude server”) is a commercial project I would not use even if paid. l2jfrozen yes, a 10 year old, effectively dead project produces more reliable results and at least works. l2jhellas also works. aCis might as well be renamed KPMIS (“Keep Paying My Interlude Server”): endless fixes, freemium, and no realistic path to true L2OFF parity, but its recommended like hell. lucera is even better the downside is you just need to dive into code and no sources   lets leave it at that
    • Download Here: https://sitehunterus.blogspot.com/2025/12/exelo-combo-tool-v2.html VirusTotal https://www.virustotal.com/gui/file/2acd067847ee092c7986f55c9f77620d89505d1c0bda34a0ee8f55b9c2905c11?nocache=1 Visit my Blogger list to download 100% free software https://www.freetoolss.com/ https://blackhat8.blogspot.com/ https://hack-crack9.blogspot.com/ https://hackernoons.blogspot.com/ https://sharetools99.blogspot.com/
    • Care to detail why ?   L2JHellas probably got the same issue, it's inherent to L2J if you don't rework Player intentions (and solving it with a Config < 500 attack is stupid, if it works for attack it works for other types of desires), also last time I checked L2JHellas he was using my changesets to fix its own stuff (which is ok, copy-paste my knownlist system which is 10y old is fine, but don't say it will act different since it's literally the same sub-system).   About Lucera code source isn't available so it's easy to say it's better, internally you got no clue what is happening and RU forks got the "feeling" to get everything, but everything is half done, everytime I put an eye on such sources (whatever based on l2ru, they only know how to copy-paste each other).   In the other hand, you seem to use aCis since years (I think I see your name since a decade, and you still use it since you made this topic :   Be a little more appreciative about the work done, it's not only mine but my community aswell, and if you find something, consider to report rather than getting such an idiotic behavior.   I understand you're not forced to share any type of fixes, and than people tend to feel superior when they fix something than aCis didn't yet fix. The thing is, for each bug you found, I found and fixed 10x more than you.   409 is way beyond 382 in all possible ways, if you believe the versus good for you, but don't make ppl believe it's the case, because it's not. There's at least 400+ fixed issues (and that's counting 10 issues by revision, which is kinda low) and entire new systems (spawns, SCHs, pathfind, whole AI implemented, Desire system,...).
    • better than using 409... Search for L2jHellas or Lucera and you won't have any headaches.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock