Jump to content
  • 0

[Help]Augments


Bobi

Question

any ideas where can be the problem chance augment to do not work i mean they never active

i check in other project to synhronizate DP settings but still same they are never active

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

any ideas where can be the problem chance augment to do not work i mean they never active

i check in other project to synhronizate DP settings but still same they are never active

explain this clearer please
Link to comment
Share on other sites

  • 0

It's clearly not DP.

 

The different codes are in many places, such as being hitted, hitting, avoiding an hit.

 

Im lazy to open Eclipse, if no one gave you exact name I will give you tomorrow.

Link to comment
Share on other sites

  • 0

explain this clearer please

i mean for example augment skill id: 3086 its have chance to hold enemy but this chance never started i do same DP settings like other project where the same augment work , i dont have any errors in GS console when load or something else

Link to comment
Share on other sites

  • 0

It's clearly not DP.

 

The different codes are in many places, such as being hitted, hitting, avoiding an hit.

 

Im lazy to open Eclipse, if no one gave you exact name I will give you tomorrow.

tnx dude i will wait you tomorrow :P if on one cant help me

Link to comment
Share on other sites

  • 0

There is so many things that are in the equation.. Resist debuff, level of the skill ls, mdef(not sure?)

 

Anyway, all skills chance are coded like on official. So they are coded for not overbuffs players i guess..

Link to comment
Share on other sites

  • 0

There is so many things that are in the equation.. Resist debuff, level of the skill ls, mdef(not sure?)

 

Anyway, all skills chance are coded like on official. So they are coded for not overbuffs players i guess..

yes i know because i was test it on char without items,buff....... but they are never started , same test in other project is successful

 

Because i thin the problem is in Java because my DP settings are same like second project

but im not good on java and because i ask for help here

Link to comment
Share on other sites

  • 0

Correct your pack about ChanceCondition, ChanceSkillList to fit with current L2J.

 

Can be either methods uses (missing method use during an "event") or methods themselves (bad coded so event never occurs even if method is correctly launched).

Link to comment
Share on other sites

  • 0

Correct your pack about ChanceCondition, ChanceSkillList to fit with current L2J.

 

Can be either methods uses (missing method use during an "event") or methods themselves (bad coded so event never occurs even if method is correctly launched).

can you help me little more?

this is my file ChanceSkillList , can you tell me what is wrong and how to fix because im not good on java :(

 

public class ChanceSkillList extends FastMap<L2Skill, ChanceCondition>
{
private static final long	serialVersionUID	= -2542073222059976854L;
private L2Character			_owner;

public ChanceSkillList(L2Character owner)
{
	super();
	setShared(true);
	_owner = owner;
}

public L2Character getOwner()
{
	return _owner;
}

public void setOwner(L2Character owner)
{
	_owner = owner;
}

public void onHit(L2Character target, boolean ownerWasHit, boolean wasCrit)
{
	int event;
	if (ownerWasHit)
	{
		event = ChanceCondition.EVT_ATTACKED | ChanceCondition.EVT_ATTACKED_HIT;
		if (wasCrit)
			event |= ChanceCondition.EVT_ATTACKED_CRIT;
	}
	else
	{
		event = ChanceCondition.EVT_HIT;
		if (wasCrit)
			event |= ChanceCondition.EVT_CRIT;
	}

	onEvent(event, target);
}

public void onSkillHit(L2Character target, boolean ownerWasHit, boolean wasMagic, boolean wasOffensive)
{
	int event;
	if (ownerWasHit)
	{
		event = ChanceCondition.EVT_HIT_BY_SKILL;
		if (wasOffensive)
		{
			event |= ChanceCondition.EVT_HIT_BY_OFFENSIVE_SKILL;
			event |= ChanceCondition.EVT_ATTACKED;
		}
		else
		{
			event |= ChanceCondition.EVT_HIT_BY_GOOD_MAGIC;
		}
	}
	else
	{
		event = ChanceCondition.EVT_CAST;
		event |= wasMagic ? ChanceCondition.EVT_MAGIC : ChanceCondition.EVT_PHYSICAL;
		event |= wasOffensive ? ChanceCondition.EVT_MAGIC_OFFENSIVE : ChanceCondition.EVT_MAGIC_GOOD;
	}

	onEvent(event, target);
}

public void onEvent(int event, L2Character target)
{
	for (FastMap.Entry<L2Skill, ChanceCondition> e = head(), end = tail(); (e = e.getNext()) != end;)
	{
		if (e.getValue() != null && e.getValue().trigger(event))
		{
			makeCast(e.getKey(), target);
		}
	}
}

private void makeCast(L2Skill skill, L2Character target)
{
	try
	{
		L2Object[] targets = skill.getTargetList(_owner, false);
		if (targets != null && targets.length > 0)
		{
			_owner.broadcastPacket(new MagicSkillLaunched(_owner, skill.getDisplayId(), skill.getLevel(), targets));
			_owner.broadcastPacket(new MagicSkillUser(_owner, (L2Character)targets[0], skill.getDisplayId(), skill.getLevel(), 0, 0));

			// Launch the magic skill and calculate its effects
			ISkillHandler handler = SkillHandler.getInstance().getSkillHandler(skill.getSkillType());
			// Launch the magic skill and calculate its effects
			if (handler != null)
				handler.useSkill(_owner, skill, targets);
			else
				skill.useSkill(_owner, targets);
		}
	}
	catch (Exception e)
	{
		e.printStackTrace();
	}
}
}

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...