public static void HandleGuildKickRequestMessage(WorldClient client, GuildKickRequestMessage message) { if (client.Character.Guild != null) { Stump.Server.WorldServer.Game.Guilds.GuildMember guildMember = client.Character.Guild.TryGetMember((int)message.kickedId); if (guildMember != null) { guildMember.Guild.KickMember(client.Character, guildMember); } } }
public static void HandleGuildChangeMemberParametersMessage(WorldClient client, GuildChangeMemberParametersMessage message) { if (client.Character.Guild != null) { Stump.Server.WorldServer.Game.Guilds.GuildMember guildMember = client.Character.Guild.TryGetMember((int)message.memberId); if (guildMember != null) { client.Character.Guild.ChangeParameters(client.Character, guildMember, (short)message.rank, (byte)message.experienceGivenPercent, message.rights); } } }
public static void HandleCharacterDeletionRequestMessage(WorldClient client, CharacterDeletionRequestMessage message) { if (!IPCAccessor.Instance.IsConnected) { client.Send(new CharacterDeletionErrorMessage(1)); client.DisconnectLater(1000); } else { CharacterRecord characterRecord = client.Characters.Find((CharacterRecord entry) => entry.Id == message.characterId); if (characterRecord == null) { client.Send(new CharacterDeletionErrorMessage(1)); client.DisconnectLater(1000); } else { Stump.Server.WorldServer.Game.Guilds.GuildMember guildMember = Singleton <GuildManager> .Instance.TryGetGuildMember(characterRecord.Id); if (guildMember != null && guildMember.IsBoss) { client.Send(new CharacterDeletionErrorMessage(1)); client.DisconnectLater(1000); } else { string secretAnswerHash = message.secretAnswerHash; if (Singleton <ExperienceManager> .Instance.GetCharacterLevel(characterRecord.Experience) <= 20 || (client.Account.SecretAnswer != null && secretAnswerHash == (message.characterId + "~" + client.Account.SecretAnswer).GetMD5())) { if (client.Account.DeletedCharactersCount > CharacterHandler.MaxDayCharacterDeletion) { client.Send(new CharacterDeletionErrorMessage(2)); } else { Singleton <CharacterManager> .Instance.DeleteCharacterOnAccount(characterRecord, client); CharacterHandler.SendCharactersListMessage(client); BasicHandler.SendBasicNoOperationMessage(client); } } else { client.Send(new CharacterDeletionErrorMessage(3)); } } } } }
public bool RemoveMember(GuildMember member) { bool result; lock (this.m_lock) { if (member == null || !this.m_members.Contains(member)) { result = false; } else { this.m_members.Remove(member); if (member.IsConnected) { this.m_clients.Remove(member.Character.Client); } this.OnMemberRemoved(member); result = true; } } return(result); }
public bool TryAddMember(Character character, out GuildMember member) { if (!CanAddMember()) { member = null; return(false); } member = new GuildMember(this, character); m_members.Add(member); character.GuildMember = member; m_clients.Add(character.Client); if (m_members.Count == 1) { SetBoss(member); } OnMemberAdded(member); return(true); }
private void BindMemberEvents(GuildMember member) { member.Connected += new System.Action <GuildMember>(this.OnMemberConnected); member.Disconnected += new Action <GuildMember, Character>(this.OnMemberDisconnected); }
protected void UpdateMember(GuildMember member) { GuildHandler.SendGuildInformationsMemberUpdateMessage(this.m_clients, member); }
public bool IsTaxCollectorOwner(Stump.Server.WorldServer.Game.Guilds.GuildMember member) { return(member.Guild.Id == this.m_record.GuildId); }
void UnBindMemberEvents(GuildMember member) { member.Connected -= OnMemberConnected; member.Disconnected -= OnMemberDisconnected; }
public void UpdateMember(GuildMember member) { GuildHandler.SendGuildInformationsMemberUpdateMessage(m_clients, member); }
public static void SendGuildMemberLeavingMessage(IPacketReceiver client, Stump.Server.WorldServer.Game.Guilds.GuildMember member, bool kicked) { client.Send(new GuildMemberLeavingMessage(kicked, member.Id)); }
public static void SendGuildJoinedMessage(IPacketReceiver client, Stump.Server.WorldServer.Game.Guilds.GuildMember member) { client.Send(new GuildJoinedMessage(member.Guild.GetGuildInformations(), (uint)member.Rights, true)); }
public static void SendGuildInformationsMemberUpdateMessage(IPacketReceiver client, Stump.Server.WorldServer.Game.Guilds.GuildMember member) { client.Send(new GuildInformationsMemberUpdateMessage(member.GetNetworkGuildMember())); }
public static void SendGuildMemberLeavingMessage(IPacketReceiver client, GuildMember member, bool kicked) { client.Send(new GuildMemberLeavingMessage(kicked, member.Id)); }
public static void SendGuildMembershipMessage(IPacketReceiver client, GuildMember member) { client.Send(new GuildMembershipMessage(member.Guild.GetGuildInformations(), (int)member.Rights, true)); }