Quote:
Originally Posted by Xenok5
Oh, thank you, but, it increase the gain XP, or it decrease? If you know if it makes any bugg or something i'll be glad to read it xD
PD: Thank you <3
|
Do not use @

code if you want to run your server correctly, you just have to change the GroupType.
On this code, you fix the amount of players to 5 without considering which GroupType is your group.
Which means that you will run a raid with only 5 guys max. (with hugo's piece of code)
Not recommended solution
Code:
public bool IsCharactersGroupFull(long characterId)
{
const int normalGroupMembersCount = 5;
return Groups != null && Groups.Any(g => g.IsMemberOfGroup(characterId) &&
(g.CharacterCount == (g.GroupType == GroupType.Group ? normalGroupMembersCount : (byte)g.GroupType)));
}
Better solution
Code:
public enum GroupType : byte
{
Group = 3, // HERE YOU CHANGE GROUP BY YOUR VALUE
CustomGroup = 6, // HERE YOU ADD ANOTHER GROUP TYPE but, depends on the sources you'r using
Team = 15,
BigTeam = 20,
GiantTeam = 40,
IceBreaker = 50
}
Or you can add, as on my code "CustomGroup" but you'll have to change every single call of GroupType.Group in your code to GroupType.CustomGroup.
However, you can too add a property for MaxCharacters that does not change the GroupType enum, it's free to you on that.
There is no "best solution" in your case, there are many way to do it, the fact is you'll require more experience to find a maintainable way to do it.
There are many options, you'r free to use the one you prefer, but do not break your Group class utilities as it's used for raids aswell.
Regards,
Blowa.