public static GuildPackets Create(GuildAction action, uint targetId, uint masterId) { var packet = new GuildPackets(); if (action == GuildAction.None) { return(packet); } packet.Action = action; packet.Data = targetId; packet.Strings = new NetStringPacker(); return(packet); }
public bool HandleNotification(string characterID, Notification notification) { Hashtable notificationData = notification.data; GuildAction action = (GuildAction)(int)notificationData[(int)SPC.Action]; switch (action) { case GuildAction.AddMember: return(HandleAddMemberNotification(characterID, notificationData)); case GuildAction.RequestToGuild: return(HandleRequestToGuildNotification(characterID, notificationData)); default: log.InfoFormat("not handled notification {0}", action); return(false); } }