private static void DismissTeam(YiObj leader, ref MsgTeam packet) { if (packet.TargetUniqueId != leader.UniqueId) { return; } if (!TeamSystem.Teams.ContainsKey(leader.UniqueId)) { return; } if (leader.UniqueId != TeamSystem.Teams[leader.UniqueId].Leader.UniqueId) { return; } TeamSystem.Disband(leader); }