Page 1 of 1

Soulhound olympiad

Posted: Tue Jan 05, 2010 1:22 pm
by jmc11korn
Seen that the male and female soulhound are in the same table and are a single hero, how can we do for him to participate in class based although they were not the same id 132 and 133.

it is especially easy for the matches between these 2 class

Re: Soulhound olympiad

Posted: Tue Jan 05, 2010 1:49 pm
by janiii
not a (retail) feature request, moved to support.

Re: Soulhound olympiad

Posted: Tue Jan 05, 2010 4:57 pm
by jmc11korn
Sorry I post the right place at the beginning while it is true that no place here.

I do not know where and how to make the id 132 and 133 is considered as the same class based
Example: 132 = 133 = classBased soulhound, but in Java I do not know how in olympiad.java.

Re: Soulhound olympiad

Posted: Tue Jan 05, 2010 5:24 pm
by janiii
so, what you want to do is, that female soulhound and male soulhound are different classes, have different class based oly and have different oly results and different heroes?

Re: Soulhound olympiad

Posted: Tue Jan 05, 2010 6:02 pm
by jmc11korn
Not just when they make the game soulhound evil and female soulhound based class that does not work, then there is only one hero for the 2 class and both appear in the same table.

My players are male and female soulhound keeps complaining because they are blocked by other players who do not play in classBased.

if I wanted to separate them into two different table and make 2 hero I'll do.

Re: Soulhound olympiad

Posted: Fri Jan 08, 2010 1:10 am
by jmc11korn
up

Re: Soulhound olympiad

Posted: Fri Jan 08, 2010 7:26 am
by janiii
sry, i still not understand your intention what you are up to. can't help you here then.

Re: Soulhound olympiad

Posted: Fri Jan 08, 2010 9:49 am
by Tan
janiii wrote:sry, i still not understand your intention what you are up to. can't help you here then.
She wants to make Soulhound famale and male will be other class in olympiad and 2 diffrence hero...

Re: Soulhound olympiad

Posted: Fri Jan 08, 2010 8:33 pm
by Sahen
A this moment male and female soulhound are considered as the same and there's only one hero for both classes but for exemple, you can't register yourself as a male souhound in class based game against a female because olympiad manager considers it's two different class.

What JMC11 wants to do is that the both Soulhound classes are able to fight themselves in class based olympiad game and not only female with female / male with other male.

So is it possible to change something on olympiad and to do class based match between male and female?

Re: Soulhound olympiad

Posted: Sun Jan 10, 2010 9:32 am
by jmc11korn
sahen thank you, you understood what I asked for soulhound.

Re: Soulhound olympiad

Posted: Mon Jan 11, 2010 2:40 pm
by jmc11korn
up

Re: Soulhound olympiad

Posted: Thu Jan 14, 2010 5:51 am
by jmc11korn
up

Re: Soulhound olympiad

Posted: Fri Jan 15, 2010 12:36 pm
by janiii
my first try.. not tested (yet). just to let you know that i am trying to help you with that issue :) i will try to test it, i hope it will not have any side-effects :D

// edit: tested and male/female kamael soul hound could fight in class-based oly

Code: Select all

Index: java/com/l2jserver/gameserver/model/olympiad/Olympiad.java===================================================================--- java/com/l2jserver/gameserver/model/olympiad/Olympiad.java	(revision 3799)+++ java/com/l2jserver/gameserver/model/olympiad/Olympiad.java	(working copy)@@ -524,9 +524,10 @@ 		} 		/** End Olympiad Restrictions */ -		if (_classBasedRegisters.containsKey(noble.getClassId().getId()))+		int classId = noble.getClassId().getId() == 132 ? 133 : noble.getClassId().getId();+		if (_classBasedRegisters.containsKey(classId)) 		{-			L2FastList<L2PcInstance> classed = _classBasedRegisters.get(noble.getClassId().getId());+			L2FastList<L2PcInstance> classed = _classBasedRegisters.get(classId); 			for (L2PcInstance participant : classed) 			{ 				if (participant.getObjectId() == noble.getObjectId())@@ -575,20 +576,20 @@  		if (classBased) 		{-			if (_classBasedRegisters.containsKey(noble.getClassId().getId()))+			if (_classBasedRegisters.containsKey(classId)) 			{-				L2FastList<L2PcInstance> classed = _classBasedRegisters.get(noble.getClassId().getId());+				L2FastList<L2PcInstance> classed = _classBasedRegisters.get(classId); 				classed.add(noble); -				_classBasedRegisters.remove(noble.getClassId().getId());-				_classBasedRegisters.put(noble.getClassId().getId(), classed);+				_classBasedRegisters.remove(classId);+				_classBasedRegisters.put(classId, classed); 			} 			else 			{ 				L2FastList<L2PcInstance> classed = new L2FastList<L2PcInstance>(); 				classed.add(noble); -				_classBasedRegisters.put(noble.getClassId().getId(), classed);+				_classBasedRegisters.put(classId, classed); 			} 			sm = new SystemMessage(SystemMessageId.YOU_HAVE_BEEN_REGISTERED_IN_A_WAITING_LIST_OF_CLASSIFIED_GAMES); 			noble.sendPacket(sm);@@ -663,12 +664,12 @@ 	{ 		boolean result = false; +		int classId = noble.getClassId().getId() == 132 ? 133 : noble.getClassId().getId(); 		if (_nonClassBasedRegisters != null && _nonClassBasedRegisters.contains(noble)) 			result = true;-		-		else if (_classBasedRegisters != null && _classBasedRegisters.containsKey(noble.getClassId().getId()))+		else if (_classBasedRegisters != null && _classBasedRegisters.containsKey(classId)) 		{-			L2FastList<L2PcInstance> classed = _classBasedRegisters.get(noble.getClassId().getId());+			L2FastList<L2PcInstance> classed = _classBasedRegisters.get(classId); 			if (classed != null && classed.contains(noble)) 				result = true; 		}@@ -723,11 +724,12 @@ 			_nonClassBasedRegisters.remove(noble); 		else 		{-			L2FastList<L2PcInstance> classed = _classBasedRegisters.get(noble.getClassId().getId());+			int classId = noble.getClassId().getId() == 132 ? 133 : noble.getClassId().getId();+			L2FastList<L2PcInstance> classed = _classBasedRegisters.get(classId); 			classed.remove(noble); -			_classBasedRegisters.remove(noble.getClassId().getId());-			_classBasedRegisters.put(noble.getClassId().getId(), classed);+			_classBasedRegisters.remove(classId);+			_classBasedRegisters.put(classId, classed); 		}  		sm = new SystemMessage(SystemMessageId.YOU_HAVE_BEEN_DELETED_FROM_THE_WAITING_LIST_OF_A_GAME);@@ -741,16 +743,16 @@ 		if (OlympiadManager.getInstance().getOlympiadGame(player.getOlympiadGameId()) != null) 			OlympiadManager.getInstance().getOlympiadGame(player.getOlympiadGameId()).handleDisconnect(player); -		L2FastList<L2PcInstance> classed = _classBasedRegisters.get(player.getClassId().getId());-		 		if (_nonClassBasedRegisters.contains(player)) 			_nonClassBasedRegisters.remove(player);-		else if (classed != null && classed.contains(player))+		else 		{+			int classId = player.getClassId().getId() == 132 ? 133 : player.getClassId().getId();+			L2FastList<L2PcInstance> classed = _classBasedRegisters.get(classId); 			classed.remove(player); -			_classBasedRegisters.remove(player.getClassId().getId());-			_classBasedRegisters.put(player.getClassId().getId(), classed);+			_classBasedRegisters.remove(classId);+			_classBasedRegisters.put(classId, classed); 		} 	} 

Re: Soulhound olympiad

Posted: Mon Jan 18, 2010 7:20 pm
by jmc11korn
It works thank you, thank you for your help.